home
api
develop
badge
wallpaper
rhaco.org
PHP library & setup framework
lingr
bugs
jaja
arbo
rhaco_1_x
jaja rev. 263
branches/pond/library/model/table/RepositoryTable.php
DBの設計変更
263: DBの設計変更
255: ソースビューに対応
249: project.xml定義の変更
245: マルチレポに対応したレイアウトに修正
243: svnをマルチ対応に修正
__init__($id); } function __init__($id=null){ $this->id = null; $this->name = null; $this->type = 1; $this->url = "rhaco"; $this->cmd = "/usr/bin/svn"; $this->rss = null; $this->description = "svn co https://rhaco.svn.sourceforge.net/svnroot/rhaco/trunk rhaco"; $this->sortOrder = 0; $this->setId($id); } function connection(){ if(!Rhaco::isVariable("_R_D_CON_","pond")){ Rhaco::addVariable("_R_D_CON_",new DbConnection("pond"),"pond"); } return Rhaco::getVariable("_R_D_CON_",null,"pond"); } function table(){ if(!Rhaco::isVariable("_R_D_T_","Repository")){ Rhaco::addVariable("_R_D_T_",new Table(Rhaco::constant("DATABASE_pond_PREFIX")."repository",__CLASS__),"Repository"); } return Rhaco::getVariable("_R_D_T_",null,"Repository"); } /** * * @return database.model.Column */ function columnId(){ if(!Rhaco::isVariable("_R_D_C_","Repository::Id")){ $column = new Column("column=id,variable=id,type=serial,size=22,primary=true,",__CLASS__); $column->label(Message::_("id")); $column->depend("CommitLog::RepositoryId"); Rhaco::addVariable("_R_D_C_",$column,"Repository::Id"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::Id"); } /** * * @return serial */ function setId($value){ $this->id = TableObjectUtil::cast($value,"serial"); } /** * */ function getId(){ return $this->id; } /** * * @return database.model.Column */ function columnName(){ if(!Rhaco::isVariable("_R_D_C_","Repository::Name")){ $column = new Column("column=name,variable=name,type=string,require=true,unique=true,chartype=/^[^\/]+$/,",__CLASS__); $column->label(Message::_("name")); Rhaco::addVariable("_R_D_C_",$column,"Repository::Name"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::Name"); } /** * * @return string */ function setName($value){ $this->name = TableObjectUtil::cast($value,"string"); } /** * */ function getName(){ return $this->name; } /** * 接続タイプ * Choices * 1: sourceforge.net * 2: code.google.com * 0: shell command * * @return database.model.Column */ function columnType(){ if(!Rhaco::isVariable("_R_D_C_","Repository::Type")){ $column = new Column("column=type,variable=type,type=integer,size=22,require=true,",__CLASS__); $column->label(Message::_("type")); $column->choices(array("1"=>Message::_("sourceforge.net"),"2"=>Message::_("code.google.com"),"0"=>Message::_("shell command"),)); Rhaco::addVariable("_R_D_C_",$column,"Repository::Type"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::Type"); } /** * 接続タイプ * Choices * 1: sourceforge.net * 2: code.google.com * 0: shell command * * @return integer */ function setType($value){ $this->type = TableObjectUtil::cast($value,"integer"); } /** * 接続タイプ * Choices * 1: sourceforge.net * 2: code.google.com * 0: shell command * */ function getType(){ return $this->type; } function captionType(){ return TableObjectUtil::caption($this,Repository::columnType()); } /** * svnのURLまたはアカウント * * @return database.model.Column */ function columnUrl(){ if(!Rhaco::isVariable("_R_D_C_","Repository::Url")){ $column = new Column("column=url,variable=url,type=string,require=true,",__CLASS__); $column->label(Message::_("url")); Rhaco::addVariable("_R_D_C_",$column,"Repository::Url"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::Url"); } /** * svnのURLまたはアカウント * * @return string */ function setUrl($value){ $this->url = TableObjectUtil::cast($value,"string"); } /** * svnのURLまたはアカウント * */ function getUrl(){ return $this->url; } /** * shellを利用する場合に必要 * * @return database.model.Column */ function columnCmd(){ if(!Rhaco::isVariable("_R_D_C_","Repository::Cmd")){ $column = new Column("column=cmd,variable=cmd,type=string,",__CLASS__); $column->label(Message::_("cmd")); Rhaco::addVariable("_R_D_C_",$column,"Repository::Cmd"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::Cmd"); } /** * shellを利用する場合に必要 * * @return string */ function setCmd($value){ $this->cmd = TableObjectUtil::cast($value,"string"); } /** * shellを利用する場合に必要 * */ function getCmd(){ return $this->cmd; } /** * * @return database.model.Column */ function columnRss(){ if(!Rhaco::isVariable("_R_D_C_","Repository::Rss")){ $column = new Column("column=rss,variable=rss,type=text,",__CLASS__); $column->label(Message::_("rss")); Rhaco::addVariable("_R_D_C_",$column,"Repository::Rss"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::Rss"); } /** * * @return text */ function setRss($value){ $this->rss = TableObjectUtil::cast($value,"text"); } /** * */ function getRss(){ return $this->rss; } /** * * @return database.model.Column */ function columnDescription(){ if(!Rhaco::isVariable("_R_D_C_","Repository::Description")){ $column = new Column("column=description,variable=description,type=text,",__CLASS__); $column->label(Message::_("description")); Rhaco::addVariable("_R_D_C_",$column,"Repository::Description"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::Description"); } /** * * @return text */ function setDescription($value){ $this->description = TableObjectUtil::cast($value,"text"); } /** * */ function getDescription(){ return $this->description; } /** * * @return database.model.Column */ function columnSortOrder(){ if(!Rhaco::isVariable("_R_D_C_","Repository::SortOrder")){ $column = new Column("column=sort_order,variable=sortOrder,type=integer,size=22,",__CLASS__); $column->label(Message::_("sort_order")); Rhaco::addVariable("_R_D_C_",$column,"Repository::SortOrder"); } return Rhaco::getVariable("_R_D_C_",null,"Repository::SortOrder"); } /** * * @return integer */ function setSortOrder($value){ $this->sortOrder = TableObjectUtil::cast($value,"integer"); } /** * */ function getSortOrder(){ return $this->sortOrder; } function setDependCommitLogs($value){ $this->dependCommitLogs = $value; } function getDependCommitLogs(){ return $this->dependCommitLogs; } } ?>