getGenericDataValue( 'policy_group_id' ); } /** * @param string $value UUID * @return bool */ function setPolicyGroup( $value ) { $value = TTUUID::castUUID( $value ); return $this->setGenericDataValue( 'policy_group_id', $value ); } /** * @return mixed */ function getAccrualPolicy() { return $this->getGenericDataValue( 'accrual_policy_id' ); } /** * @param string $value UUID * @return bool */ function setAccrualPolicy( $value ) { $value = TTUUID::castUUID( $value ); return $this->setGenericDataValue( 'accrual_policy_id', $value ); } /** * @return bool */ function Validate() { // // BELOW: Validation code moved from set*() functions. // // Policy Group $pglf = TTnew( 'PolicyGroupListFactory' ); /** @var PolicyGroupListFactory $pglf */ $this->Validator->isResultSetWithRows( 'policy_group', $pglf->getByID( $this->getPolicyGroup() ), TTi18n::gettext( 'Policy Group is invalid' ) ); // Accrual Policy if ( $this->getAccrualPolicy() != TTUUID::getZeroID() ) { $aplf = TTnew( 'AccrualPolicyListFactory' ); /** @var AccrualPolicyListFactory $aplf */ $this->Validator->isResultSetWithRows( 'over_time_policy', $aplf->getByID( $this->getAccrualPolicy() ), TTi18n::gettext( 'Selected Accrual Policy is invalid' ) ); } // // ABOVE: Validation code moved from set*() functions. // return true; } //This table doesn't have any of these columns, so overload the functions. /** * @return bool */ function getDeleted() { return false; } /** * @param $bool * @return bool */ function setDeleted( $bool ) { return false; } /** * @return bool */ function getCreatedDate() { return false; } /** * @param int $epoch EPOCH * @return bool */ function setCreatedDate( $epoch = null ) { return false; } /** * @return bool */ function getCreatedBy() { return false; } /** * @param string $id UUID * @return bool */ function setCreatedBy( $id = null ) { return false; } /** * @return bool */ function getUpdatedDate() { return false; } /** * @param int $epoch EPOCH * @return bool */ function setUpdatedDate( $epoch = null ) { return false; } /** * @return bool */ function getUpdatedBy() { return false; } /** * @param string $id UUID * @return bool */ function setUpdatedBy( $id = null ) { return false; } /** * @return bool */ function getDeletedDate() { return false; } /** * @param int $epoch EPOCH * @return bool */ function setDeletedDate( $epoch = null ) { return false; } /** * @return bool */ function getDeletedBy() { return false; } /** * @param string $id UUID * @return bool */ function setDeletedBy( $id = null ) { return false; } } ?>