Exemplo n.º 1
0
 /**
  * Retrieve drm keys according to uique key
  * @param string $systemName
  * @param int $excludeId
  * @param PropelPDO $con
  * @return DrmPolicy
  */
 public static function retrieveByUniqueKey($objectId, $objectType, $provider)
 {
     $c = new Criteria();
     $c->add(DrmKeyPeer::OBJECT_ID, $objectId);
     $c->add(DrmKeyPeer::OBJECT_TYPE, $objectType);
     $c->add(DrmKeyPeer::PROVIDER, $provider);
     return DrmKeyPeer::doSelectOne($c);
 }
Exemplo n.º 2
0
 private function getDrmKey($entry)
 {
     if ($entry) {
         $drmKey = DrmKeyPeer::retrieveByUniqueKey($entry->getId(), DrmKeyObjectType::ENTRY, PlayReadyPlugin::getPlayReadyProviderCoreValue());
     } else {
         $drmKey = null;
     }
     return $drmKey;
 }
Exemplo n.º 3
0
 private function getEntryKeyId($entryId)
 {
     $drmKey = DrmKeyPeer::retrieveByUniqueKey($entryId, DrmKeyObjectType::ENTRY, PlayReadyPlugin::getPlayReadyProviderCoreValue());
     if ($drmKey) {
         return $drmKey->getDrmKey();
     } else {
         return null;
     }
 }
Exemplo n.º 4
0
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(DrmKeyPeer::DATABASE_NAME);
         $criteria->add(DrmKeyPeer::ID, $pks, Criteria::IN);
         $objs = DrmKeyPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Exemplo n.º 5
0
 /**
  * Builds a Criteria object containing the primary key for this object.
  *
  * Unlike buildCriteria() this method includes the primary key values regardless
  * of whether or not they have been modified.
  *
  * @return     Criteria The Criteria object containing value(s) for primary key(s).
  */
 public function buildPkeyCriteria()
 {
     $criteria = new Criteria(DrmKeyPeer::DATABASE_NAME);
     $criteria->add(DrmKeyPeer::ID, $this->id);
     if ($this->alreadyInSave) {
         if (count($this->modifiedColumns) == 2 && $this->isColumnModified(DrmKeyPeer::UPDATED_AT)) {
             $theModifiedColumn = null;
             foreach ($this->modifiedColumns as $modifiedColumn) {
                 if ($modifiedColumn != DrmKeyPeer::UPDATED_AT) {
                     $theModifiedColumn = $modifiedColumn;
                 }
             }
             $atomicColumns = DrmKeyPeer::getAtomicColumns();
             if (in_array($theModifiedColumn, $atomicColumns)) {
                 $criteria->add($theModifiedColumn, $this->getByName($theModifiedColumn, BasePeer::TYPE_COLNAME), Criteria::NOT_EQUAL);
             }
         }
     }
     return $criteria;
 }