"id", "iDocumentId" => 'document_id', "iMetadataVersion" => 'metadata_version', "iContentVersionId" => 'content_version_id', "iDocumentTypeId" => 'document_type_id', "sName" => 'name', "sDescription" => 'description', "iStatusId" => 'status_id', "dVersionCreated" => 'version_created', "iVersionCreatorId" => 'version_creator_id', "iWorkflowId" => 'workflow_id', "iWorkflowStateId" => 'workflow_state_id', ); // {{{ getters/setters function getDocumentId() { return $this->iDocumentId; } function setDocumentId($iNewValue) { $this->iDocumentId = $iNewValue; } function getMetadataVersion() { return $this->iMetadataVersion; } function setMetadataVersion($iNewValue) { $this->iMetadataVersion = $iNewValue; } function getContentVersionId() { return $this->iContentVersionId; } function setContentVersionId($iNewValue) { $this->iContentVersionId = $iNewValue; } function setContentVersion($iNewValue) { $this->iContentVersion = $iNewValue; } function getDocumentTypeId() { return $this->iDocumentTypeId; } function setDocumentTypeId($iNewValue) { $this->iDocumentTypeId = $iNewValue; } function getName() { return $this->sName; } function setName($sNewValue) { $this->sName = $sNewValue; } function getDescription() { return $this->sDescription; } function setDescription($sNewValue) { $this->sDescription = $sNewValue; } function getStatusId() { return $this->iStatusId; } function setStatusId($iNewValue) { $this->iStatusId = $iNewValue; } function getVersionCreated() { return $this->dVersionCreated; } function setVersionCreated($dNewValue) { $this->dVersionCreated = $dNewValue; } function getVersionCreatorId() { return $this->iVersionCreatorId; } function setVersionCreatorId($iNewValue) { $this->iVersionCreatorId = $iNewValue; } function getWorkflowId() { return $this->iWorkflowId; } function setWorkflowId($mValue) { $this->iWorkflowId = $mValue; } function getWorkflowStateId() { return $this->iWorkflowStateId; } function setWorkflowStateId($mValue) { $this->iWorkflowStateId = $mValue; } // }}} function &createFromArray($aOptions) { return KTEntityUtil::createFromArray('KTDocumentMetadataVersion', $aOptions); } function _table() { return KTUtil::getTableName('document_metadata_version'); } function create() { if (is_null($this->iMetadataVersion)) { $this->iMetadataVersion = 0; } if (is_null($this->dVersionCreated)) { $this->dVersionCreated = getCurrentDateTime(); } return parent::create(); } function &get($iId) { return KTEntityUtil::get('KTDocumentMetadataVersion', $iId); } function &getByDocument($oDocument) { $iDocumentId = KTUtil::getId($oDocument); return KTEntityUtil::getByDict('KTDocumentMetadataVersion', array( 'document_id' => $iDocumentId, ), array( 'multi' => true, 'orderby' => 'version_created DESC', )); } function bumpMetadataVersion() { $this->iMetadataVersion++; } } ?>