/** * 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); }
private function getDrmKey($entry) { if ($entry) { $drmKey = DrmKeyPeer::retrieveByUniqueKey($entry->getId(), DrmKeyObjectType::ENTRY, PlayReadyPlugin::getPlayReadyProviderCoreValue()); } else { $drmKey = null; } return $drmKey; }
private function getEntryKeyId($entryId) { $drmKey = DrmKeyPeer::retrieveByUniqueKey($entryId, DrmKeyObjectType::ENTRY, PlayReadyPlugin::getPlayReadyProviderCoreValue()); if ($drmKey) { return $drmKey->getDrmKey(); } else { return null; } }
/** * 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; }
/** * 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; }