Esempio n. 1
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     FileSyncPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new FileSyncPeer();
     }
     return self::$peer;
 }
Esempio n. 2
0
 public function setStatus($v)
 {
     if ($v == FileSync::FILE_SYNC_STATUS_READY || $v == FileSync::FILE_SYNC_STATUS_ERROR) {
         $this->setReadyAt(time());
     }
     if ($v == FileSync::FILE_SYNC_STATUS_READY) {
         // no longer need these, unset them to reduce table size
         $this->unsetOriginalId();
         $this->unsetOriginalDc();
     }
     return parent::setStatus($v);
 }
Esempio n. 3
0
 public function postUpdate(PropelPDO $con = null)
 {
     $objectDeleted = false;
     if ($this->isColumnModified(FileSyncPeer::STATUS) && $this->getStatus() == self::FILE_SYNC_STATUS_DELETED) {
         $objectDeleted = true;
     }
     $ret = parent::postUpdate($con);
     if ($objectDeleted) {
         kEventsManager::raiseEvent(new kObjectDeletedEvent($this));
     }
     return $ret;
 }
 public function setStatus($v)
 {
     if ($v == FileSync::FILE_SYNC_STATUS_READY || $v == FileSync::FILE_SYNC_STATUS_ERROR) {
         $this->setReadyAt(time());
     }
     return parent::setStatus($v);
 }