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 getPremiumPolicy() { return $this->getGenericDataValue( 'premium_policy_id' ); } /** * @param string $value UUID * @return bool */ function setPremiumPolicy( $value ) { $value = TTUUID::castUUID( $value ); return $this->setGenericDataValue( 'premium_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' ) ); // Premium Policy if ( $this->getPremiumPolicy() != TTUUID::getZeroID() ) { $pplf = TTnew( 'PremiumPolicyListFactory' ); /** @var PremiumPolicyListFactory $pplf */ $this->Validator->isResultSetWithRows( 'premium_policy', $pplf->getByID( $this->getPremiumPolicy() ), TTi18n::gettext( 'Selected Premium 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; } } ?>