Ejemplo n.º 1
0
 public function save(Default_Model_Site $value)
 {
     global $application;
     $data = array();
     if (!isnull($value->getId())) {
         $data['id'] = $value->getId();
     }
     if (!isnull($value->getName())) {
         $data['name'] = $value->getName();
     }
     if (!isnull($value->getShortname())) {
         $data['shortname'] = $value->getShortname();
     }
     if (!isnull($value->getOfficialname())) {
         $data['officialname'] = $value->getOfficialname();
     }
     if (!isnull($value->getDescription())) {
         $data['description'] = $value->getDescription();
     }
     if (!isnull($value->getPortalurl())) {
         $data['portalurl'] = $value->getPortalurl();
     }
     if (!isnull($value->getHomeurl())) {
         $data['homeurl'] = $value->getHomeurl();
     }
     if (!isnull($value->getContactemail())) {
         $data['contactemail'] = $value->getContactemail();
     }
     if (!isnull($value->getContacttel())) {
         $data['contacttel'] = $value->getContacttel();
     }
     if (!isnull($value->getAlarmemail())) {
         $data['alarmemail'] = $value->getAlarmemail();
     }
     if (!isnull($value->getCsirtemail())) {
         $data['csirtemail'] = $value->getCsirtemail();
     }
     if (!isnull($value->getGiisurl())) {
         $data['giisurl'] = $value->getGiisurl();
     }
     if (!isnull($value->getCountryID())) {
         $data['countryid'] = $value->getCountryID();
     }
     if (!isnull($value->getCountrycode())) {
         $data['countrycode'] = $value->getCountrycode();
     }
     if (!isnull($value->getCountryname())) {
         $data['countryname'] = $value->getCountryname();
     }
     if (!isnull($value->getRegionID())) {
         $data['regionid'] = $value->getRegionID();
     }
     if (!isnull($value->getRegionname())) {
         $data['regionname'] = $value->getRegionname();
     }
     if (!isnull($value->getTier())) {
         $data['tier'] = $value->getTier();
     }
     if (!isnull($value->getSubgrID())) {
         $data['subgrid'] = $value->getSubgrID();
     }
     if (!isnull($value->getRoc())) {
         $data['roc'] = $value->getRoc();
     }
     if (!isnull($value->getProductioninfrastructure())) {
         $data['productioninfrastructure'] = $value->getProductioninfrastructure();
     }
     if (!isnull($value->getCertificationstatus())) {
         $data['certificationstatus'] = $value->getCertificationstatus();
     }
     if (!isnull($value->getTimezone())) {
         $data['timezone'] = $value->getTimezone();
     }
     if (!isnull($value->getLatitude())) {
         $data['latitude'] = $value->getLatitude();
     }
     if (!isnull($value->getLongitude())) {
         $data['longitude'] = $value->getLongitude();
     }
     if (!isnull($value->getDomainname())) {
         $data['domainname'] = $value->getDomainname();
     }
     if (!isnull($value->getIp())) {
         $data['ip'] = $value->getIp();
     }
     if (!isnull($value->getGuID())) {
         $data['guid'] = $value->getGuID();
     }
     if (!isnull($value->getDatasource())) {
         $data['datasource'] = $value->getDatasource();
     }
     if (!isnull($value->getCreatedon())) {
         $data['createdon'] = $value->getCreatedon();
     }
     if (!isnull($value->getCreatedby())) {
         $data['createdby'] = $value->getCreatedby();
     }
     if (!isnull($value->getUpdatedon())) {
         $data['updatedon'] = $value->getUpdatedon();
     }
     if (!isnull($value->getUpdatedby())) {
         $data['updatedby'] = $value->getUpdatedby();
     }
     if (!isnull($value->getDeleted())) {
         $data['deleted'] = $this->pgBool($value->getDeleted());
     }
     if (!isnull($value->getDeletedon())) {
         $data['deletedon'] = $value->getDeletedon();
     }
     if (!isnull($value->getDeletedby())) {
         $data['deletedby'] = $value->getDeletedby();
     }
     $q1 = '';
     $q2 = '';
     if (null === ($id = '')) {
         unset($data['']);
         $this->getDbTable()->insert($data);
     } else {
         $s = $this->getDbTable()->getAdapter()->quoteInto($q1, $q2);
         $this->getDbTable()->update($data, $s);
     }
 }