/**
  * Returns a new CcPlayoutHistoryQuery object.
  *
  * @param     string $modelAlias The alias of a model in the query
  * @param     Criteria $criteria Optional Criteria to build the query from
  *
  * @return    CcPlayoutHistoryQuery
  */
 public static function create($modelAlias = null, $criteria = null)
 {
     if ($criteria instanceof CcPlayoutHistoryQuery) {
         return $criteria;
     }
     $query = new CcPlayoutHistoryQuery();
     if (null !== $modelAlias) {
         $query->setModelAlias($modelAlias);
     }
     if ($criteria instanceof Criteria) {
         $query->mergeWith($criteria);
     }
     return $query;
 }
Ejemplo n.º 2
0
 /**
  * If this collection has already been initialized with
  * an identical criteria, it returns the collection.
  * Otherwise if this CcFiles is new, it will return
  * an empty collection; or if this CcFiles has previously
  * been saved, it will retrieve related CcPlayoutHistorys from storage.
  *
  * This method is protected by default in order to keep the public
  * api reasonable.  You can provide public methods for those you
  * actually need in CcFiles.
  *
  * @param      Criteria $criteria optional Criteria object to narrow the query
  * @param      PropelPDO $con optional connection object
  * @param      string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  * @return     PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects
  */
 public function getCcPlayoutHistorysJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $query = CcPlayoutHistoryQuery::create(null, $criteria);
     $query->joinWith('CcShowInstances', $join_behavior);
     return $this->getCcPlayoutHistorys($query, $con);
 }
 /**
  * Get the associated CcPlayoutHistory object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     CcPlayoutHistory The associated CcPlayoutHistory object.
  * @throws     PropelException
  */
 public function getCcPlayoutHistory(PropelPDO $con = null)
 {
     if ($this->aCcPlayoutHistory === null && $this->history_id !== null) {
         $this->aCcPlayoutHistory = CcPlayoutHistoryQuery::create()->findPk($this->history_id, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aCcPlayoutHistory->addCcPlayoutHistoryMetaDatas($this);
         		 */
     }
     return $this->aCcPlayoutHistory;
 }
Ejemplo n.º 4
0
 public function deletePlayedItems($ids)
 {
     $this->con->beginTransaction();
     try {
         $records = CcPlayoutHistoryQuery::create()->findPks($ids, $this->con);
         $records->delete($this->con);
         $this->con->commit();
     } catch (Exception $e) {
         $this->con->rollback();
         Logging::info($e);
         throw $e;
     }
 }