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/SourceTable.php
DBの設計変更
266: diffの実装
263: DBの設計変更
255: ソースビューに対応
__init__($id); } function __init__($id=null){ $this->id = null; $this->logId = null; $this->value = null; $this->path = null; $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_","Source")){ Rhaco::addVariable("_R_D_T_",new Table(Rhaco::constant("DATABASE_pond_PREFIX")."source",__CLASS__),"Source"); } return Rhaco::getVariable("_R_D_T_",null,"Source"); } /** * * @return database.model.Column */ function columnId(){ if(!Rhaco::isVariable("_R_D_C_","Source::Id")){ $column = new Column("column=id,variable=id,type=serial,size=22,primary=true,",__CLASS__); $column->label(Message::_("id")); Rhaco::addVariable("_R_D_C_",$column,"Source::Id"); } return Rhaco::getVariable("_R_D_C_",null,"Source::Id"); } /** * * @return serial */ function setId($value){ $this->id = TableObjectUtil::cast($value,"serial"); } /** * */ function getId(){ return $this->id; } /** * * @return database.model.Column */ function columnLogId(){ if(!Rhaco::isVariable("_R_D_C_","Source::LogId")){ $column = new Column("column=log_id,variable=logId,type=integer,size=22,reference=CommitLog::Id,",__CLASS__); $column->label(Message::_("log_id")); Rhaco::addVariable("_R_D_C_",$column,"Source::LogId"); } return Rhaco::getVariable("_R_D_C_",null,"Source::LogId"); } /** * * @return integer */ function setLogId($value){ $this->logId = TableObjectUtil::cast($value,"integer"); } /** * */ function getLogId(){ return $this->logId; } /** * * @return database.model.Column */ function columnValue(){ if(!Rhaco::isVariable("_R_D_C_","Source::Value")){ $column = new Column("column=value,variable=value,type=text,",__CLASS__); $column->label(Message::_("value")); Rhaco::addVariable("_R_D_C_",$column,"Source::Value"); } return Rhaco::getVariable("_R_D_C_",null,"Source::Value"); } /** * * @return text */ function setValue($value){ $this->value = TableObjectUtil::cast($value,"text"); } /** * */ function getValue(){ return $this->value; } /** * * @return database.model.Column */ function columnPath(){ if(!Rhaco::isVariable("_R_D_C_","Source::Path")){ $column = new Column("column=path,variable=path,type=string,unique=true,uniqueWith=Source::LogId,",__CLASS__); $column->label(Message::_("path")); Rhaco::addVariable("_R_D_C_",$column,"Source::Path"); } return Rhaco::getVariable("_R_D_C_",null,"Source::Path"); } /** * * @return string */ function setPath($value){ $this->path = TableObjectUtil::cast($value,"string"); } /** * */ function getPath(){ return $this->path; } function getFactLogId(){ return $this->factLogId; } function setFactLogId($obj){ $this->factLogId = $obj; } } ?>