예제 #1
0
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param PrincipalArchive $obj A PrincipalArchive object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         PrincipalArchivePeer::$instances[$key] = $obj;
     }
 }
예제 #2
0
 /**
  * Exclude object from result
  *
  * @param   PrincipalArchive $principalArchive Object to remove from the list of results
  *
  * @return PrincipalArchiveQuery The current query, for fluid interface
  */
 public function prune($principalArchive = null)
 {
     if ($principalArchive) {
         $this->addUsingAlias(PrincipalArchivePeer::ID, $principalArchive->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
예제 #3
0
 /**
  * Populates the the current object based on a $archiveTablePhpName archive object.
  *
  * @param      PrincipalArchive $archive An archived object based on the same class
  * @param      Boolean $populateAutoIncrementPrimaryKeys
  *               If true, autoincrement columns are copied from the archive object.
  *               If false, autoincrement columns are left intact.
  *
  * @return     Principal The current object (for fluent API support)
  */
 public function populateFromArchive($archive, $populateAutoIncrementPrimaryKeys = false)
 {
     if ($populateAutoIncrementPrimaryKeys) {
         $this->setId($archive->getId());
     }
     $this->setUserId($archive->getUserId());
     $this->setName($archive->getName());
     $this->setNameSlug($archive->getNameSlug());
     $this->setGovermentLicense($archive->getGovermentLicense());
     $this->setJoinAt($archive->getJoinAt());
     $this->setAddress1($archive->getAddress1());
     $this->setAddress2($archive->getAddress2());
     $this->setCity($archive->getCity());
     $this->setZipcode($archive->getZipcode());
     $this->setCountryId($archive->getCountryId());
     $this->setStateId($archive->getStateId());
     $this->setPhone($archive->getPhone());
     $this->setFax($archive->getFax());
     $this->setMobile($archive->getMobile());
     $this->setEmail($archive->getEmail());
     $this->setWebsite($archive->getWebsite());
     $this->setLogo($archive->getLogo());
     $this->setStatus($archive->getStatus());
     $this->setIsPrincipal($archive->getIsPrincipal());
     $this->setConfirmation($archive->getConfirmation());
     $this->setSortableRank($archive->getSortableRank());
     $this->setCreatedAt($archive->getCreatedAt());
     $this->setUpdatedAt($archive->getUpdatedAt());
     return $this;
 }