working on configuring an item template UI.
modified db to have fields concept for templates.
This commit is contained in:
parent
c0206ff8f4
commit
16581088d9
24 changed files with 509 additions and 1652 deletions
|
@ -87,12 +87,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
//$view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile('http://code.jquery.com/jquery-1.10.1.min.js','text/javascript');
|
||||
$view->headScript()->appendFile('http://code.jquery.com/jquery-migrate-1.2.1.min.js','text/javascript');
|
||||
$view->headScript()->appendFile('http://code.jquery.com/jquery-1.10.1.js','text/javascript');
|
||||
$view->headScript()->appendFile('http://code.jquery.com/jquery-migrate-1.2.1.js','text/javascript');
|
||||
|
||||
//$view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile('http://code.jquery.com/ui/1.10.3/jquery-ui.js','text/javascript');
|
||||
|
||||
$view->headScript()->appendFile($baseUrl.'js/libs/underscore-min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
|
||||
$view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
|
|
|
@ -204,20 +204,6 @@ return array (
|
|||
'BaseCcLocalePeer' => 'airtime/om/BaseCcLocalePeer.php',
|
||||
'BaseCcLocale' => 'airtime/om/BaseCcLocale.php',
|
||||
'BaseCcLocaleQuery' => 'airtime/om/BaseCcLocaleQuery.php',
|
||||
'CcTagTableMap' => 'airtime/map/CcTagTableMap.php',
|
||||
'CcTagPeer' => 'airtime/CcTagPeer.php',
|
||||
'CcTag' => 'airtime/CcTag.php',
|
||||
'CcTagQuery' => 'airtime/CcTagQuery.php',
|
||||
'BaseCcTagPeer' => 'airtime/om/BaseCcTagPeer.php',
|
||||
'BaseCcTag' => 'airtime/om/BaseCcTag.php',
|
||||
'BaseCcTagQuery' => 'airtime/om/BaseCcTagQuery.php',
|
||||
'CcFileTagTableMap' => 'airtime/map/CcFileTagTableMap.php',
|
||||
'CcFileTagPeer' => 'airtime/CcFileTagPeer.php',
|
||||
'CcFileTag' => 'airtime/CcFileTag.php',
|
||||
'CcFileTagQuery' => 'airtime/CcFileTagQuery.php',
|
||||
'BaseCcFileTagPeer' => 'airtime/om/BaseCcFileTagPeer.php',
|
||||
'BaseCcFileTag' => 'airtime/om/BaseCcFileTag.php',
|
||||
'BaseCcFileTagQuery' => 'airtime/om/BaseCcFileTagQuery.php',
|
||||
'CcPlayoutHistoryTableMap' => 'airtime/map/CcPlayoutHistoryTableMap.php',
|
||||
'CcPlayoutHistoryPeer' => 'airtime/CcPlayoutHistoryPeer.php',
|
||||
'CcPlayoutHistory' => 'airtime/CcPlayoutHistory.php',
|
||||
|
|
|
@ -190,15 +190,27 @@ class PlayouthistoryController extends Zend_Controller_Action
|
|||
|
||||
public function configureItemTemplateAction() {
|
||||
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl.'js/airtime/playouthistory/template.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
|
||||
$template_id = $this->_getParam('id', null);
|
||||
|
||||
$historyService = new Application_Service_HistoryService();
|
||||
$mandatoryFields = $historyService->mandatoryItemTemplate();
|
||||
|
||||
$this->view->template_id = $template_id;
|
||||
$this->view->fileMD = $historyService->getFileMetadataTypes();
|
||||
$this->view->fields = $historyService->getFieldTypes();
|
||||
$this->view->required = $mandatoryFields;
|
||||
}
|
||||
|
||||
public function createTemplateAction()
|
||||
{
|
||||
|
||||
$request = $this->getRequest();
|
||||
$params = $request->getPost();
|
||||
Logging::info($params);
|
||||
}
|
||||
|
||||
public function editTemplateAction()
|
||||
|
|
|
@ -123,7 +123,6 @@ class CcFilesTableMap extends TableMap {
|
|||
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcFileTag', 'CcFileTag', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ class CcPlayoutHistoryMetaDataTableMap extends TableMap {
|
|||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('HISTORY_ID', 'DbHistoryId', 'INTEGER', 'cc_playout_history', 'ID', true, null, null);
|
||||
$this->addForeignKey('TAG_ID', 'DbTagId', 'INTEGER', 'cc_tag', 'ID', true, null, null);
|
||||
$this->addColumn('KEY', 'DbKey', 'VARCHAR', true, 128, null);
|
||||
$this->addColumn('VALUE', 'DbValue', 'VARCHAR', true, 128, null);
|
||||
// validators
|
||||
|
@ -52,7 +51,6 @@ class CcPlayoutHistoryMetaDataTableMap extends TableMap {
|
|||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::MANY_TO_ONE, array('history_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcTag', 'CcTag', RelationMap::MANY_TO_ONE, array('tag_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcPlayoutHistoryMetaDataTableMap
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'cc_playout_history_template_tag' table.
|
||||
* This class defines the structure of the 'cc_playout_history_template_field' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
|
@ -31,16 +31,18 @@ class CcPlayoutHistoryTemplateTagTableMap extends TableMap {
|
|||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('cc_playout_history_template_tag');
|
||||
$this->setName('cc_playout_history_template_field');
|
||||
$this->setPhpName('CcPlayoutHistoryTemplateTag');
|
||||
$this->setClassname('CcPlayoutHistoryTemplateTag');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(true);
|
||||
$this->setPrimaryKeyMethodInfo('cc_playout_history_template_tag_id_seq');
|
||||
$this->setPrimaryKeyMethodInfo('cc_playout_history_template_field_id_seq');
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('TEMPLATE_ID', 'DbTemplateId', 'INTEGER', 'cc_playout_history_template', 'ID', true, null, null);
|
||||
$this->addForeignKey('TAG_ID', 'DbTagId', 'INTEGER', 'cc_tag', 'ID', true, null, null);
|
||||
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 128, null);
|
||||
$this->addColumn('TYPE', 'DbType', 'VARCHAR', true, 128, null);
|
||||
$this->addColumn('IS_FILE_MD', 'DbIsFileMD', 'BOOLEAN', true, null, false);
|
||||
$this->addColumn('POSITION', 'DbTagPosition', 'INTEGER', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
@ -51,7 +53,6 @@ class CcPlayoutHistoryTemplateTagTableMap extends TableMap {
|
|||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplate', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcTag', 'CcTag', RelationMap::MANY_TO_ONE, array('tag_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CcPlayoutHistoryTemplateTagTableMap
|
||||
|
|
|
@ -493,11 +493,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $collCcSchedules;
|
||||
|
||||
/**
|
||||
* @var array CcFileTag[] Collection to store aggregation of CcFileTag objects.
|
||||
*/
|
||||
protected $collCcFileTags;
|
||||
|
||||
/**
|
||||
* @var array CcPlayoutHistory[] Collection to store aggregation of CcPlayoutHistory objects.
|
||||
*/
|
||||
|
@ -3119,8 +3114,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
|
||||
$this->collCcSchedules = null;
|
||||
|
||||
$this->collCcFileTags = null;
|
||||
|
||||
$this->collCcPlayoutHistorys = null;
|
||||
|
||||
} // if (deep)
|
||||
|
@ -3314,14 +3307,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->collCcFileTags !== null) {
|
||||
foreach ($this->collCcFileTags as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted()) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collCcPlayoutHistorys !== null) {
|
||||
foreach ($this->collCcPlayoutHistorys as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted()) {
|
||||
|
@ -3457,14 +3442,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->collCcFileTags !== null) {
|
||||
foreach ($this->collCcFileTags as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collCcPlayoutHistorys !== null) {
|
||||
foreach ($this->collCcPlayoutHistorys as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
|
@ -4397,12 +4374,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($this->getCcFileTags() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCcFileTag($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->getCcPlayoutHistorys() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCcPlayoutHistory($relObj->copy($deepCopy));
|
||||
|
@ -5212,140 +5183,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
return $this->getCcSchedules($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCcFileTags collection
|
||||
*
|
||||
* This does not modify the database; however, it will remove any associated objects, causing
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @return void
|
||||
* @see addCcFileTags()
|
||||
*/
|
||||
public function clearCcFileTags()
|
||||
{
|
||||
$this->collCcFileTags = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collCcFileTags collection.
|
||||
*
|
||||
* By default this just sets the collCcFileTags collection to an empty array (like clearcollCcFileTags());
|
||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||
* to your application -- for example, setting the initial array to the values stored in database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initCcFileTags()
|
||||
{
|
||||
$this->collCcFileTags = new PropelObjectCollection();
|
||||
$this->collCcFileTags->setModel('CcFileTag');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of CcFileTag objects which contain a foreign key that references this object.
|
||||
*
|
||||
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||
* Otherwise the results are fetched from the database the first time, then cached.
|
||||
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||
* If this CcFiles is new, it will return
|
||||
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @return PropelCollection|array CcFileTag[] List of CcFileTag objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcFileTags($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcFileTags || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFileTags) {
|
||||
// return empty collection
|
||||
$this->initCcFileTags();
|
||||
} else {
|
||||
$collCcFileTags = CcFileTagQuery::create(null, $criteria)
|
||||
->filterByCcFiles($this)
|
||||
->find($con);
|
||||
if (null !== $criteria) {
|
||||
return $collCcFileTags;
|
||||
}
|
||||
$this->collCcFileTags = $collCcFileTags;
|
||||
}
|
||||
}
|
||||
return $this->collCcFileTags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related CcFileTag objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param PropelPDO $con
|
||||
* @return int Count of related CcFileTag objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countCcFileTags(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcFileTags || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFileTags) {
|
||||
return 0;
|
||||
} else {
|
||||
$query = CcFileTagQuery::create(null, $criteria);
|
||||
if($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
return $query
|
||||
->filterByCcFiles($this)
|
||||
->count($con);
|
||||
}
|
||||
} else {
|
||||
return count($this->collCcFileTags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a CcFileTag object to this object
|
||||
* through the CcFileTag foreign key attribute.
|
||||
*
|
||||
* @param CcFileTag $l CcFileTag
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function addCcFileTag(CcFileTag $l)
|
||||
{
|
||||
if ($this->collCcFileTags === null) {
|
||||
$this->initCcFileTags();
|
||||
}
|
||||
if (!$this->collCcFileTags->contains($l)) { // only add it if the **same** object is not already associated
|
||||
$this->collCcFileTags[]= $l;
|
||||
$l->setCcFiles($this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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 CcFileTags 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 CcFileTag[] List of CcFileTag objects
|
||||
*/
|
||||
public function getCcFileTagsJoinCcTag($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = CcFileTagQuery::create(null, $criteria);
|
||||
$query->joinWith('CcTag', $join_behavior);
|
||||
|
||||
return $this->getCcFileTags($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCcPlayoutHistorys collection
|
||||
*
|
||||
|
@ -5571,11 +5408,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collCcFileTags) {
|
||||
foreach ((array) $this->collCcFileTags as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collCcPlayoutHistorys) {
|
||||
foreach ((array) $this->collCcPlayoutHistorys as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
|
@ -5587,7 +5419,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->collCcPlaylistcontentss = null;
|
||||
$this->collCcBlockcontentss = null;
|
||||
$this->collCcSchedules = null;
|
||||
$this->collCcFileTags = null;
|
||||
$this->collCcPlayoutHistorys = null;
|
||||
$this->aFkOwner = null;
|
||||
$this->aCcSubjsRelatedByDbEditedby = null;
|
||||
|
|
|
@ -695,9 +695,6 @@ abstract class BaseCcFilesPeer {
|
|||
// Invalidate objects in CcSchedulePeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcSchedulePeer::clearInstancePool();
|
||||
// Invalidate objects in CcFileTagPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcFileTagPeer::clearInstancePool();
|
||||
// Invalidate objects in CcPlayoutHistoryPeer instance pool,
|
||||
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
|
||||
CcPlayoutHistoryPeer::clearInstancePool();
|
||||
|
|
|
@ -180,10 +180,6 @@
|
|||
* @method CcFilesQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation
|
||||
* @method CcFilesQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation
|
||||
*
|
||||
* @method CcFilesQuery leftJoinCcFileTag($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFileTag relation
|
||||
* @method CcFilesQuery rightJoinCcFileTag($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFileTag relation
|
||||
* @method CcFilesQuery innerJoinCcFileTag($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFileTag relation
|
||||
*
|
||||
* @method CcFilesQuery leftJoinCcPlayoutHistory($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation
|
||||
* @method CcFilesQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation
|
||||
* @method CcFilesQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation
|
||||
|
@ -2543,70 +2539,6 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
|||
->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcFileTag object
|
||||
*
|
||||
* @param CcFileTag $ccFileTag the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcFileTag($ccFileTag, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcFilesPeer::ID, $ccFileTag->getDbFileId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcFileTag relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcFileTag($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcFileTag');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcFileTag');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcFileTag relation CcFileTag object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcFileTagQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcFileTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcFileTag($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcFileTag', 'CcFileTagQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcPlayoutHistory object
|
||||
*
|
||||
|
|
|
@ -1099,31 +1099,6 @@ abstract class BaseCcPlayoutHistory extends BaseObject implements Persistent
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this CcPlayoutHistory is new, it will return
|
||||
* an empty collection; or if this CcPlayoutHistory has previously
|
||||
* been saved, it will retrieve related CcPlayoutHistoryMetaDatas 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 CcPlayoutHistory.
|
||||
*
|
||||
* @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 CcPlayoutHistoryMetaData[] List of CcPlayoutHistoryMetaData objects
|
||||
*/
|
||||
public function getCcPlayoutHistoryMetaDatasJoinCcTag($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = CcPlayoutHistoryMetaDataQuery::create(null, $criteria);
|
||||
$query->joinWith('CcTag', $join_behavior);
|
||||
|
||||
return $this->getCcPlayoutHistoryMetaDatas($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
|
|
@ -36,12 +36,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
*/
|
||||
protected $history_id;
|
||||
|
||||
/**
|
||||
* The value for the tag_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $tag_id;
|
||||
|
||||
/**
|
||||
* The value for the key field.
|
||||
* @var string
|
||||
|
@ -59,11 +53,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
*/
|
||||
protected $aCcPlayoutHistory;
|
||||
|
||||
/**
|
||||
* @var CcTag
|
||||
*/
|
||||
protected $aCcTag;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
|
@ -98,16 +87,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
return $this->history_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [tag_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDbTagId()
|
||||
{
|
||||
return $this->tag_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [key] column value.
|
||||
*
|
||||
|
@ -172,30 +151,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
return $this;
|
||||
} // setDbHistoryId()
|
||||
|
||||
/**
|
||||
* Set the value of [tag_id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return CcPlayoutHistoryMetaData The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbTagId($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->tag_id !== $v) {
|
||||
$this->tag_id = $v;
|
||||
$this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::TAG_ID;
|
||||
}
|
||||
|
||||
if ($this->aCcTag !== null && $this->aCcTag->getDbId() !== $v) {
|
||||
$this->aCcTag = null;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbTagId()
|
||||
|
||||
/**
|
||||
* Set the value of [key] column.
|
||||
*
|
||||
|
@ -270,9 +225,8 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
|
||||
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
||||
$this->history_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
|
||||
$this->tag_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
|
||||
$this->key = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
||||
$this->value = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
||||
$this->key = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||
$this->value = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -281,7 +235,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 5; // 5 = CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 4; // 4 = CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcPlayoutHistoryMetaData object", $e);
|
||||
|
@ -307,9 +261,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
if ($this->aCcPlayoutHistory !== null && $this->history_id !== $this->aCcPlayoutHistory->getDbId()) {
|
||||
$this->aCcPlayoutHistory = null;
|
||||
}
|
||||
if ($this->aCcTag !== null && $this->tag_id !== $this->aCcTag->getDbId()) {
|
||||
$this->aCcTag = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
||||
/**
|
||||
|
@ -350,7 +301,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aCcPlayoutHistory = null;
|
||||
$this->aCcTag = null;
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
|
@ -473,13 +423,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
$this->setCcPlayoutHistory($this->aCcPlayoutHistory);
|
||||
}
|
||||
|
||||
if ($this->aCcTag !== null) {
|
||||
if ($this->aCcTag->isModified() || $this->aCcTag->isNew()) {
|
||||
$affectedRows += $this->aCcTag->save($con);
|
||||
}
|
||||
$this->setCcTag($this->aCcTag);
|
||||
}
|
||||
|
||||
if ($this->isNew() ) {
|
||||
$this->modifiedColumns[] = CcPlayoutHistoryMetaDataPeer::ID;
|
||||
}
|
||||
|
@ -580,12 +523,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->aCcTag !== null) {
|
||||
if (!$this->aCcTag->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aCcTag->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (($retval = CcPlayoutHistoryMetaDataPeer::doValidate($this, $columns)) !== true) {
|
||||
$failureMap = array_merge($failureMap, $retval);
|
||||
|
@ -632,12 +569,9 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
return $this->getDbHistoryId();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getDbTagId();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getDbKey();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getDbValue();
|
||||
break;
|
||||
default:
|
||||
|
@ -666,17 +600,13 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
$result = array(
|
||||
$keys[0] => $this->getDbId(),
|
||||
$keys[1] => $this->getDbHistoryId(),
|
||||
$keys[2] => $this->getDbTagId(),
|
||||
$keys[3] => $this->getDbKey(),
|
||||
$keys[4] => $this->getDbValue(),
|
||||
$keys[2] => $this->getDbKey(),
|
||||
$keys[3] => $this->getDbValue(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcPlayoutHistory) {
|
||||
$result['CcPlayoutHistory'] = $this->aCcPlayoutHistory->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
}
|
||||
if (null !== $this->aCcTag) {
|
||||
$result['CcTag'] = $this->aCcTag->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
@ -715,12 +645,9 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
$this->setDbHistoryId($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setDbTagId($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setDbKey($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setDbValue($value);
|
||||
break;
|
||||
} // switch()
|
||||
|
@ -749,9 +676,8 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbHistoryId($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbTagId($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbKey($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDbValue($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbKey($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbValue($arr[$keys[3]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -765,7 +691,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
|
||||
if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::ID, $this->id);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::HISTORY_ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $this->history_id);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::TAG_ID)) $criteria->add(CcPlayoutHistoryMetaDataPeer::TAG_ID, $this->tag_id);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::KEY)) $criteria->add(CcPlayoutHistoryMetaDataPeer::KEY, $this->key);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryMetaDataPeer::VALUE)) $criteria->add(CcPlayoutHistoryMetaDataPeer::VALUE, $this->value);
|
||||
|
||||
|
@ -830,7 +755,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
$copyObj->setDbHistoryId($this->history_id);
|
||||
$copyObj->setDbTagId($this->tag_id);
|
||||
$copyObj->setDbKey($this->key);
|
||||
$copyObj->setDbValue($this->value);
|
||||
|
||||
|
@ -925,55 +849,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
return $this->aCcPlayoutHistory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a CcTag object.
|
||||
*
|
||||
* @param CcTag $v
|
||||
* @return CcPlayoutHistoryMetaData The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setCcTag(CcTag $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setDbTagId(NULL);
|
||||
} else {
|
||||
$this->setDbTagId($v->getDbId());
|
||||
}
|
||||
|
||||
$this->aCcTag = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the CcTag object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addCcPlayoutHistoryMetaData($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the associated CcTag object
|
||||
*
|
||||
* @param PropelPDO Optional Connection object.
|
||||
* @return CcTag The associated CcTag object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcTag(PropelPDO $con = null)
|
||||
{
|
||||
if ($this->aCcTag === null && ($this->tag_id !== null)) {
|
||||
$this->aCcTag = CcTagQuery::create()->findPk($this->tag_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->aCcTag->addCcPlayoutHistoryMetaDatas($this);
|
||||
*/
|
||||
}
|
||||
return $this->aCcTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
@ -981,7 +856,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
{
|
||||
$this->id = null;
|
||||
$this->history_id = null;
|
||||
$this->tag_id = null;
|
||||
$this->key = null;
|
||||
$this->value = null;
|
||||
$this->alreadyInSave = false;
|
||||
|
@ -1007,7 +881,6 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persi
|
|||
} // if ($deep)
|
||||
|
||||
$this->aCcPlayoutHistory = null;
|
||||
$this->aCcTag = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
const TM_CLASS = 'CcPlayoutHistoryMetaDataTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 5;
|
||||
const NUM_COLUMNS = 4;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -37,9 +37,6 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
/** the column name for the HISTORY_ID field */
|
||||
const HISTORY_ID = 'cc_playout_history_metadata.HISTORY_ID';
|
||||
|
||||
/** the column name for the TAG_ID field */
|
||||
const TAG_ID = 'cc_playout_history_metadata.TAG_ID';
|
||||
|
||||
/** the column name for the KEY field */
|
||||
const KEY = 'cc_playout_history_metadata.KEY';
|
||||
|
||||
|
@ -62,12 +59,12 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbHistoryId', 'DbTagId', 'DbKey', 'DbValue', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbHistoryId', 'dbTagId', 'dbKey', 'dbValue', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::HISTORY_ID, self::TAG_ID, self::KEY, self::VALUE, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'HISTORY_ID', 'TAG_ID', 'KEY', 'VALUE', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'history_id', 'tag_id', 'key', 'value', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbHistoryId', 'DbKey', 'DbValue', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbHistoryId', 'dbKey', 'dbValue', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::HISTORY_ID, self::KEY, self::VALUE, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'HISTORY_ID', 'KEY', 'VALUE', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'history_id', 'key', 'value', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -77,12 +74,12 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbHistoryId' => 1, 'DbTagId' => 2, 'DbKey' => 3, 'DbValue' => 4, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbHistoryId' => 1, 'dbTagId' => 2, 'dbKey' => 3, 'dbValue' => 4, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::HISTORY_ID => 1, self::TAG_ID => 2, self::KEY => 3, self::VALUE => 4, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'HISTORY_ID' => 1, 'TAG_ID' => 2, 'KEY' => 3, 'VALUE' => 4, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'history_id' => 1, 'tag_id' => 2, 'key' => 3, 'value' => 4, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbHistoryId' => 1, 'DbKey' => 2, 'DbValue' => 3, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbHistoryId' => 1, 'dbKey' => 2, 'dbValue' => 3, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::HISTORY_ID => 1, self::KEY => 2, self::VALUE => 3, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'HISTORY_ID' => 1, 'KEY' => 2, 'VALUE' => 3, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'history_id' => 1, 'key' => 2, 'value' => 3, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -156,13 +153,11 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::ID);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::HISTORY_ID);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::TAG_ID);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::KEY);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryMetaDataPeer::VALUE);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.HISTORY_ID');
|
||||
$criteria->addSelectColumn($alias . '.TAG_ID');
|
||||
$criteria->addSelectColumn($alias . '.KEY');
|
||||
$criteria->addSelectColumn($alias . '.VALUE');
|
||||
}
|
||||
|
@ -500,56 +495,6 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcTag table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with their CcPlayoutHistory objects.
|
||||
* @param Criteria $criteria
|
||||
|
@ -616,72 +561,6 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with their CcTag objects.
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcPlayoutHistoryMetaData objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria);
|
||||
$startcol = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
CcTagPeer::addSelectColumns($criteria);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
|
||||
$cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if $obj1 already loaded
|
||||
|
||||
$key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcTagPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcTagPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol);
|
||||
CcTagPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryMetaData) to $obj2 (CcTag)
|
||||
$obj2->addCcPlayoutHistoryMetaData($obj1);
|
||||
|
||||
} // if joined row was not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining all related tables
|
||||
*
|
||||
|
@ -720,8 +599,6 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
|
@ -758,13 +635,8 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
CcPlayoutHistoryPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcTagPeer::addSelectColumns($criteria);
|
||||
$startcol4 = $startcol3 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
|
@ -800,270 +672,6 @@ abstract class BaseCcPlayoutHistoryMetaDataPeer {
|
|||
$obj2->addCcPlayoutHistoryMetaData($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
// Add objects for joined CcTag rows
|
||||
|
||||
$key3 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol3);
|
||||
if ($key3 !== null) {
|
||||
$obj3 = CcTagPeer::getInstanceFromPool($key3);
|
||||
if (!$obj3) {
|
||||
|
||||
$cls = CcTagPeer::getOMClass(false);
|
||||
|
||||
$obj3 = new $cls();
|
||||
$obj3->hydrate($row, $startcol3);
|
||||
CcTagPeer::addInstanceToPool($obj3, $key3);
|
||||
} // if obj3 loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj3 (CcTag)
|
||||
$obj3->addCcPlayoutHistoryMetaData($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcPlayoutHistory table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptCcPlayoutHistory(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcTag table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcPlayoutHistoryMetaDataPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with all related objects except CcPlayoutHistory.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcPlayoutHistoryMetaData objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptCcPlayoutHistory(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
// $criteria->getDbName() will return the same object if not set to another value
|
||||
// so == check is okay and faster
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria);
|
||||
$startcol2 = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcTagPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
$cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined CcTag rows
|
||||
|
||||
$key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcTagPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcTagPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
CcTagPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj2 (CcTag)
|
||||
$obj2->addCcPlayoutHistoryMetaData($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryMetaData objects pre-filled with all related objects except CcTag.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcPlayoutHistoryMetaData objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
// $criteria->getDbName() will return the same object if not set to another value
|
||||
// so == check is okay and faster
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcPlayoutHistoryMetaDataPeer::addSelectColumns($criteria);
|
||||
$startcol2 = (CcPlayoutHistoryMetaDataPeer::NUM_COLUMNS - CcPlayoutHistoryMetaDataPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcPlayoutHistoryPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcPlayoutHistoryPeer::NUM_COLUMNS - CcPlayoutHistoryPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, CcPlayoutHistoryPeer::ID, $join_behavior);
|
||||
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcPlayoutHistoryMetaDataPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
$cls = CcPlayoutHistoryMetaDataPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcPlayoutHistoryMetaDataPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined CcPlayoutHistory rows
|
||||
|
||||
$key2 = CcPlayoutHistoryPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcPlayoutHistoryPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcPlayoutHistoryPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
CcPlayoutHistoryPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryMetaData) to the collection in $obj2 (CcPlayoutHistory)
|
||||
$obj2->addCcPlayoutHistoryMetaData($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
*
|
||||
* @method CcPlayoutHistoryMetaDataQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method CcPlayoutHistoryMetaDataQuery orderByDbHistoryId($order = Criteria::ASC) Order by the history_id column
|
||||
* @method CcPlayoutHistoryMetaDataQuery orderByDbTagId($order = Criteria::ASC) Order by the tag_id column
|
||||
* @method CcPlayoutHistoryMetaDataQuery orderByDbKey($order = Criteria::ASC) Order by the key column
|
||||
* @method CcPlayoutHistoryMetaDataQuery orderByDbValue($order = Criteria::ASC) Order by the value column
|
||||
*
|
||||
* @method CcPlayoutHistoryMetaDataQuery groupByDbId() Group by the id column
|
||||
* @method CcPlayoutHistoryMetaDataQuery groupByDbHistoryId() Group by the history_id column
|
||||
* @method CcPlayoutHistoryMetaDataQuery groupByDbTagId() Group by the tag_id column
|
||||
* @method CcPlayoutHistoryMetaDataQuery groupByDbKey() Group by the key column
|
||||
* @method CcPlayoutHistoryMetaDataQuery groupByDbValue() Group by the value column
|
||||
*
|
||||
|
@ -26,22 +24,16 @@
|
|||
* @method CcPlayoutHistoryMetaDataQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation
|
||||
* @method CcPlayoutHistoryMetaDataQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation
|
||||
*
|
||||
* @method CcPlayoutHistoryMetaDataQuery leftJoinCcTag($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcTag relation
|
||||
* @method CcPlayoutHistoryMetaDataQuery rightJoinCcTag($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTag relation
|
||||
* @method CcPlayoutHistoryMetaDataQuery innerJoinCcTag($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTag relation
|
||||
*
|
||||
* @method CcPlayoutHistoryMetaData findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query
|
||||
* @method CcPlayoutHistoryMetaData findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query, or a new CcPlayoutHistoryMetaData object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method CcPlayoutHistoryMetaData findOneByDbId(int $id) Return the first CcPlayoutHistoryMetaData filtered by the id column
|
||||
* @method CcPlayoutHistoryMetaData findOneByDbHistoryId(int $history_id) Return the first CcPlayoutHistoryMetaData filtered by the history_id column
|
||||
* @method CcPlayoutHistoryMetaData findOneByDbTagId(int $tag_id) Return the first CcPlayoutHistoryMetaData filtered by the tag_id column
|
||||
* @method CcPlayoutHistoryMetaData findOneByDbKey(string $key) Return the first CcPlayoutHistoryMetaData filtered by the key column
|
||||
* @method CcPlayoutHistoryMetaData findOneByDbValue(string $value) Return the first CcPlayoutHistoryMetaData filtered by the value column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcPlayoutHistoryMetaData objects filtered by the id column
|
||||
* @method array findByDbHistoryId(int $history_id) Return CcPlayoutHistoryMetaData objects filtered by the history_id column
|
||||
* @method array findByDbTagId(int $tag_id) Return CcPlayoutHistoryMetaData objects filtered by the tag_id column
|
||||
* @method array findByDbKey(string $key) Return CcPlayoutHistoryMetaData objects filtered by the key column
|
||||
* @method array findByDbValue(string $value) Return CcPlayoutHistoryMetaData objects filtered by the value column
|
||||
*
|
||||
|
@ -201,37 +193,6 @@ abstract class BaseCcPlayoutHistoryMetaDataQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the tag_id column
|
||||
*
|
||||
* @param int|array $dbTagId The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbTagId($dbTagId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbTagId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbTagId['min'])) {
|
||||
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $dbTagId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbTagId['max'])) {
|
||||
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $dbTagId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $dbTagId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the key column
|
||||
*
|
||||
|
@ -340,70 +301,6 @@ abstract class BaseCcPlayoutHistoryMetaDataQuery extends ModelCriteria
|
|||
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcTag object
|
||||
*
|
||||
* @param CcTag $ccTag the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcTag($ccTag, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcPlayoutHistoryMetaDataPeer::TAG_ID, $ccTag->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcTag relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcTag($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcTag');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcTag');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcTag relation CcTag object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcTagQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcTag($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcTag', 'CcTagQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
|
|
@ -809,31 +809,6 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persi
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this CcPlayoutHistoryTemplate is new, it will return
|
||||
* an empty collection; or if this CcPlayoutHistoryTemplate has previously
|
||||
* been saved, it will retrieve related CcPlayoutHistoryTemplateTags 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 CcPlayoutHistoryTemplate.
|
||||
*
|
||||
* @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 CcPlayoutHistoryTemplateTag[] List of CcPlayoutHistoryTemplateTag objects
|
||||
*/
|
||||
public function getCcPlayoutHistoryTemplateTagsJoinCcTag($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = CcPlayoutHistoryTemplateTagQuery::create(null, $criteria);
|
||||
$query->joinWith('CcTag', $join_behavior);
|
||||
|
||||
return $this->getCcPlayoutHistoryTemplateTags($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* Base class that represents a row from the 'cc_playout_history_template_tag' table.
|
||||
* Base class that represents a row from the 'cc_playout_history_template_field' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
|
@ -37,10 +37,23 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
protected $template_id;
|
||||
|
||||
/**
|
||||
* The value for the tag_id field.
|
||||
* @var int
|
||||
* The value for the name field.
|
||||
* @var string
|
||||
*/
|
||||
protected $tag_id;
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* The value for the type field.
|
||||
* @var string
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* The value for the is_file_md field.
|
||||
* Note: this column has a database default value of: false
|
||||
* @var boolean
|
||||
*/
|
||||
protected $is_file_md;
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
|
@ -53,11 +66,6 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
*/
|
||||
protected $aCcPlayoutHistoryTemplate;
|
||||
|
||||
/**
|
||||
* @var CcTag
|
||||
*/
|
||||
protected $aCcTag;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
|
@ -72,6 +80,27 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
*/
|
||||
protected $alreadyInValidation = false;
|
||||
|
||||
/**
|
||||
* Applies default values to this object.
|
||||
* This method should be called from the object's constructor (or
|
||||
* equivalent initialization method).
|
||||
* @see __construct()
|
||||
*/
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->is_file_md = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes internal state of BaseCcPlayoutHistoryTemplateTag object.
|
||||
* @see applyDefaults()
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->applyDefaultValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [id] column value.
|
||||
*
|
||||
|
@ -93,13 +122,33 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the [tag_id] column value.
|
||||
* Get the [name] column value.
|
||||
*
|
||||
* @return int
|
||||
* @return string
|
||||
*/
|
||||
public function getDbTagId()
|
||||
public function getDbName()
|
||||
{
|
||||
return $this->tag_id;
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [type] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [is_file_md] column value.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDbIsFileMD()
|
||||
{
|
||||
return $this->is_file_md;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -157,28 +206,64 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
} // setDbTemplateId()
|
||||
|
||||
/**
|
||||
* Set the value of [tag_id] column.
|
||||
* Set the value of [name] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @param string $v new value
|
||||
* @return CcPlayoutHistoryTemplateTag The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbTagId($v)
|
||||
public function setDbName($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->tag_id !== $v) {
|
||||
$this->tag_id = $v;
|
||||
$this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::TAG_ID;
|
||||
}
|
||||
|
||||
if ($this->aCcTag !== null && $this->aCcTag->getDbId() !== $v) {
|
||||
$this->aCcTag = null;
|
||||
if ($this->name !== $v) {
|
||||
$this->name = $v;
|
||||
$this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::NAME;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbTagId()
|
||||
} // setDbName()
|
||||
|
||||
/**
|
||||
* Set the value of [type] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return CcPlayoutHistoryTemplateTag The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbType($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->type !== $v) {
|
||||
$this->type = $v;
|
||||
$this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::TYPE;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbType()
|
||||
|
||||
/**
|
||||
* Set the value of [is_file_md] column.
|
||||
*
|
||||
* @param boolean $v new value
|
||||
* @return CcPlayoutHistoryTemplateTag The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbIsFileMD($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (boolean) $v;
|
||||
}
|
||||
|
||||
if ($this->is_file_md !== $v || $this->isNew()) {
|
||||
$this->is_file_md = $v;
|
||||
$this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbIsFileMD()
|
||||
|
||||
/**
|
||||
* Set the value of [position] column.
|
||||
|
@ -210,6 +295,10 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
*/
|
||||
public function hasOnlyDefaultValues()
|
||||
{
|
||||
if ($this->is_file_md !== false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
|
@ -234,8 +323,10 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
|
||||
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
||||
$this->template_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
|
||||
$this->tag_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
|
||||
$this->position = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
|
||||
$this->name = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||
$this->type = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
||||
$this->is_file_md = ($row[$startcol + 4] !== null) ? (boolean) $row[$startcol + 4] : null;
|
||||
$this->position = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -244,7 +335,7 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 4; // 4 = CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 6; // 6 = CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcPlayoutHistoryTemplateTag object", $e);
|
||||
|
@ -270,9 +361,6 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
if ($this->aCcPlayoutHistoryTemplate !== null && $this->template_id !== $this->aCcPlayoutHistoryTemplate->getDbId()) {
|
||||
$this->aCcPlayoutHistoryTemplate = null;
|
||||
}
|
||||
if ($this->aCcTag !== null && $this->tag_id !== $this->aCcTag->getDbId()) {
|
||||
$this->aCcTag = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
||||
/**
|
||||
|
@ -313,7 +401,6 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aCcPlayoutHistoryTemplate = null;
|
||||
$this->aCcTag = null;
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
|
@ -436,13 +523,6 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
$this->setCcPlayoutHistoryTemplate($this->aCcPlayoutHistoryTemplate);
|
||||
}
|
||||
|
||||
if ($this->aCcTag !== null) {
|
||||
if ($this->aCcTag->isModified() || $this->aCcTag->isNew()) {
|
||||
$affectedRows += $this->aCcTag->save($con);
|
||||
}
|
||||
$this->setCcTag($this->aCcTag);
|
||||
}
|
||||
|
||||
if ($this->isNew() ) {
|
||||
$this->modifiedColumns[] = CcPlayoutHistoryTemplateTagPeer::ID;
|
||||
}
|
||||
|
@ -543,12 +623,6 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
}
|
||||
}
|
||||
|
||||
if ($this->aCcTag !== null) {
|
||||
if (!$this->aCcTag->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aCcTag->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (($retval = CcPlayoutHistoryTemplateTagPeer::doValidate($this, $columns)) !== true) {
|
||||
$failureMap = array_merge($failureMap, $retval);
|
||||
|
@ -595,9 +669,15 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
return $this->getDbTemplateId();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getDbTagId();
|
||||
return $this->getDbName();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getDbType();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getDbIsFileMD();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getDbTagPosition();
|
||||
break;
|
||||
default:
|
||||
|
@ -626,16 +706,15 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
$result = array(
|
||||
$keys[0] => $this->getDbId(),
|
||||
$keys[1] => $this->getDbTemplateId(),
|
||||
$keys[2] => $this->getDbTagId(),
|
||||
$keys[3] => $this->getDbTagPosition(),
|
||||
$keys[2] => $this->getDbName(),
|
||||
$keys[3] => $this->getDbType(),
|
||||
$keys[4] => $this->getDbIsFileMD(),
|
||||
$keys[5] => $this->getDbTagPosition(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcPlayoutHistoryTemplate) {
|
||||
$result['CcPlayoutHistoryTemplate'] = $this->aCcPlayoutHistoryTemplate->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
}
|
||||
if (null !== $this->aCcTag) {
|
||||
$result['CcTag'] = $this->aCcTag->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
@ -674,9 +753,15 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
$this->setDbTemplateId($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setDbTagId($value);
|
||||
$this->setDbName($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setDbType($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setDbIsFileMD($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setDbTagPosition($value);
|
||||
break;
|
||||
} // switch()
|
||||
|
@ -705,8 +790,10 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbTemplateId($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbTagId($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbTagPosition($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbName($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbType($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDbIsFileMD($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDbTagPosition($arr[$keys[5]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -720,7 +807,9 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
|
||||
if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::ID, $this->id);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, $this->template_id);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TAG_ID)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $this->tag_id);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::NAME)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::NAME, $this->name);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::TYPE)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::TYPE, $this->type);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD, $this->is_file_md);
|
||||
if ($this->isColumnModified(CcPlayoutHistoryTemplateTagPeer::POSITION)) $criteria->add(CcPlayoutHistoryTemplateTagPeer::POSITION, $this->position);
|
||||
|
||||
return $criteria;
|
||||
|
@ -784,7 +873,9 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
$copyObj->setDbTemplateId($this->template_id);
|
||||
$copyObj->setDbTagId($this->tag_id);
|
||||
$copyObj->setDbName($this->name);
|
||||
$copyObj->setDbType($this->type);
|
||||
$copyObj->setDbIsFileMD($this->is_file_md);
|
||||
$copyObj->setDbTagPosition($this->position);
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
@ -878,55 +969,6 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
return $this->aCcPlayoutHistoryTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a CcTag object.
|
||||
*
|
||||
* @param CcTag $v
|
||||
* @return CcPlayoutHistoryTemplateTag The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setCcTag(CcTag $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setDbTagId(NULL);
|
||||
} else {
|
||||
$this->setDbTagId($v->getDbId());
|
||||
}
|
||||
|
||||
$this->aCcTag = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the CcTag object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addCcPlayoutHistoryTemplateTag($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the associated CcTag object
|
||||
*
|
||||
* @param PropelPDO Optional Connection object.
|
||||
* @return CcTag The associated CcTag object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcTag(PropelPDO $con = null)
|
||||
{
|
||||
if ($this->aCcTag === null && ($this->tag_id !== null)) {
|
||||
$this->aCcTag = CcTagQuery::create()->findPk($this->tag_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->aCcTag->addCcPlayoutHistoryTemplateTags($this);
|
||||
*/
|
||||
}
|
||||
return $this->aCcTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
@ -934,11 +976,14 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
{
|
||||
$this->id = null;
|
||||
$this->template_id = null;
|
||||
$this->tag_id = null;
|
||||
$this->name = null;
|
||||
$this->type = null;
|
||||
$this->is_file_md = null;
|
||||
$this->position = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
$this->resetModified();
|
||||
$this->setNew(true);
|
||||
$this->setDeleted(false);
|
||||
|
@ -959,7 +1004,6 @@ abstract class BaseCcPlayoutHistoryTemplateTag extends BaseObject implements Pe
|
|||
} // if ($deep)
|
||||
|
||||
$this->aCcPlayoutHistoryTemplate = null;
|
||||
$this->aCcTag = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'cc_playout_history_template_tag' table.
|
||||
* Base static class for performing query and update operations on the 'cc_playout_history_template_field' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
|
@ -14,7 +14,7 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
const DATABASE_NAME = 'airtime';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'cc_playout_history_template_tag';
|
||||
const TABLE_NAME = 'cc_playout_history_template_field';
|
||||
|
||||
/** the related Propel class for this table */
|
||||
const OM_CLASS = 'CcPlayoutHistoryTemplateTag';
|
||||
|
@ -26,22 +26,28 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
const TM_CLASS = 'CcPlayoutHistoryTemplateTagTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 4;
|
||||
const NUM_COLUMNS = 6;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
/** the column name for the ID field */
|
||||
const ID = 'cc_playout_history_template_tag.ID';
|
||||
const ID = 'cc_playout_history_template_field.ID';
|
||||
|
||||
/** the column name for the TEMPLATE_ID field */
|
||||
const TEMPLATE_ID = 'cc_playout_history_template_tag.TEMPLATE_ID';
|
||||
const TEMPLATE_ID = 'cc_playout_history_template_field.TEMPLATE_ID';
|
||||
|
||||
/** the column name for the TAG_ID field */
|
||||
const TAG_ID = 'cc_playout_history_template_tag.TAG_ID';
|
||||
/** the column name for the NAME field */
|
||||
const NAME = 'cc_playout_history_template_field.NAME';
|
||||
|
||||
/** the column name for the TYPE field */
|
||||
const TYPE = 'cc_playout_history_template_field.TYPE';
|
||||
|
||||
/** the column name for the IS_FILE_MD field */
|
||||
const IS_FILE_MD = 'cc_playout_history_template_field.IS_FILE_MD';
|
||||
|
||||
/** the column name for the POSITION field */
|
||||
const POSITION = 'cc_playout_history_template_tag.POSITION';
|
||||
const POSITION = 'cc_playout_history_template_field.POSITION';
|
||||
|
||||
/**
|
||||
* An identiy map to hold any loaded instances of CcPlayoutHistoryTemplateTag objects.
|
||||
|
@ -59,12 +65,12 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbTemplateId', 'DbTagId', 'DbTagPosition', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateId', 'dbTagId', 'dbTagPosition', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_ID, self::TAG_ID, self::POSITION, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_ID', 'TAG_ID', 'POSITION', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'template_id', 'tag_id', 'position', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbTemplateId', 'DbName', 'DbType', 'DbIsFileMD', 'DbTagPosition', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbTemplateId', 'dbName', 'dbType', 'dbIsFileMD', 'dbTagPosition', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::TEMPLATE_ID, self::NAME, self::TYPE, self::IS_FILE_MD, self::POSITION, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'TEMPLATE_ID', 'NAME', 'TYPE', 'IS_FILE_MD', 'POSITION', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'template_id', 'name', 'type', 'is_file_md', 'position', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -74,12 +80,12 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateId' => 1, 'DbTagId' => 2, 'DbTagPosition' => 3, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateId' => 1, 'dbTagId' => 2, 'dbTagPosition' => 3, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_ID => 1, self::TAG_ID => 2, self::POSITION => 3, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_ID' => 1, 'TAG_ID' => 2, 'POSITION' => 3, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_id' => 1, 'tag_id' => 2, 'position' => 3, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbTemplateId' => 1, 'DbName' => 2, 'DbType' => 3, 'DbIsFileMD' => 4, 'DbTagPosition' => 5, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbTemplateId' => 1, 'dbName' => 2, 'dbType' => 3, 'dbIsFileMD' => 4, 'dbTagPosition' => 5, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::TEMPLATE_ID => 1, self::NAME => 2, self::TYPE => 3, self::IS_FILE_MD => 4, self::POSITION => 5, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'TEMPLATE_ID' => 1, 'NAME' => 2, 'TYPE' => 3, 'IS_FILE_MD' => 4, 'POSITION' => 5, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'template_id' => 1, 'name' => 2, 'type' => 3, 'is_file_md' => 4, 'position' => 5, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -153,12 +159,16 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::ID);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TAG_ID);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::NAME);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::TYPE);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD);
|
||||
$criteria->addSelectColumn(CcPlayoutHistoryTemplateTagPeer::POSITION);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.TEMPLATE_ID');
|
||||
$criteria->addSelectColumn($alias . '.TAG_ID');
|
||||
$criteria->addSelectColumn($alias . '.NAME');
|
||||
$criteria->addSelectColumn($alias . '.TYPE');
|
||||
$criteria->addSelectColumn($alias . '.IS_FILE_MD');
|
||||
$criteria->addSelectColumn($alias . '.POSITION');
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +358,7 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Method to invalidate the instance pool of all tables related to cc_playout_history_template_tag
|
||||
* Method to invalidate the instance pool of all tables related to cc_playout_history_template_field
|
||||
* by a foreign key with ON DELETE CASCADE
|
||||
*/
|
||||
public static function clearRelatedInstancePool()
|
||||
|
@ -495,56 +505,6 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcTag table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with their CcPlayoutHistoryTemplate objects.
|
||||
* @param Criteria $criteria
|
||||
|
@ -611,72 +571,6 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with their CcTag objects.
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcPlayoutHistoryTemplateTag objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria);
|
||||
$startcol = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
CcTagPeer::addSelectColumns($criteria);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
|
||||
$cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if $obj1 already loaded
|
||||
|
||||
$key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcTagPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcTagPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol);
|
||||
CcTagPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryTemplateTag) to $obj2 (CcTag)
|
||||
$obj2->addCcPlayoutHistoryTemplateTag($obj1);
|
||||
|
||||
} // if joined row was not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining all related tables
|
||||
*
|
||||
|
@ -715,8 +609,6 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
|
@ -753,13 +645,8 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcTagPeer::addSelectColumns($criteria);
|
||||
$startcol4 = $startcol3 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
|
@ -795,270 +682,6 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
$obj2->addCcPlayoutHistoryTemplateTag($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
// Add objects for joined CcTag rows
|
||||
|
||||
$key3 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol3);
|
||||
if ($key3 !== null) {
|
||||
$obj3 = CcTagPeer::getInstanceFromPool($key3);
|
||||
if (!$obj3) {
|
||||
|
||||
$cls = CcTagPeer::getOMClass(false);
|
||||
|
||||
$obj3 = new $cls();
|
||||
$obj3->hydrate($row, $startcol3);
|
||||
CcTagPeer::addInstanceToPool($obj3, $key3);
|
||||
} // if obj3 loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj3 (CcTag)
|
||||
$obj3->addCcPlayoutHistoryTemplateTag($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcPlayoutHistoryTemplate table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptCcPlayoutHistoryTemplate(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcTag table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptCcTag(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcPlayoutHistoryTemplateTagPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcPlayoutHistoryTemplateTagPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with all related objects except CcPlayoutHistoryTemplate.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcPlayoutHistoryTemplateTag objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptCcPlayoutHistoryTemplate(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
// $criteria->getDbName() will return the same object if not set to another value
|
||||
// so == check is okay and faster
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria);
|
||||
$startcol2 = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcTagPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcTagPeer::NUM_COLUMNS - CcTagPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TAG_ID, CcTagPeer::ID, $join_behavior);
|
||||
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
$cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined CcTag rows
|
||||
|
||||
$key2 = CcTagPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcTagPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcTagPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
CcTagPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj2 (CcTag)
|
||||
$obj2->addCcPlayoutHistoryTemplateTag($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcPlayoutHistoryTemplateTag objects pre-filled with all related objects except CcTag.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcPlayoutHistoryTemplateTag objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptCcTag(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
// $criteria->getDbName() will return the same object if not set to another value
|
||||
// so == check is okay and faster
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcPlayoutHistoryTemplateTagPeer::addSelectColumns($criteria);
|
||||
$startcol2 = (CcPlayoutHistoryTemplateTagPeer::NUM_COLUMNS - CcPlayoutHistoryTemplateTagPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcPlayoutHistoryTemplatePeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcPlayoutHistoryTemplatePeer::NUM_COLUMNS - CcPlayoutHistoryTemplatePeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcPlayoutHistoryTemplateTagPeer::TEMPLATE_ID, CcPlayoutHistoryTemplatePeer::ID, $join_behavior);
|
||||
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcPlayoutHistoryTemplateTagPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcPlayoutHistoryTemplateTagPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
$cls = CcPlayoutHistoryTemplateTagPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcPlayoutHistoryTemplateTagPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined CcPlayoutHistoryTemplate rows
|
||||
|
||||
$key2 = CcPlayoutHistoryTemplatePeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcPlayoutHistoryTemplatePeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcPlayoutHistoryTemplatePeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
CcPlayoutHistoryTemplatePeer::addInstanceToPool($obj2, $key2);
|
||||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcPlayoutHistoryTemplateTag) to the collection in $obj2 (CcPlayoutHistoryTemplate)
|
||||
$obj2->addCcPlayoutHistoryTemplateTag($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
@ -1188,7 +811,7 @@ abstract class BaseCcPlayoutHistoryTemplateTagPeer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Method to DELETE all rows from the cc_playout_history_template_tag table.
|
||||
* Method to DELETE all rows from the cc_playout_history_template_field table.
|
||||
*
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
|
|
|
@ -2,18 +2,22 @@
|
|||
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'cc_playout_history_template_tag' table.
|
||||
* Base class that represents a query for the 'cc_playout_history_template_field' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method CcPlayoutHistoryTemplateTagQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery orderByDbTemplateId($order = Criteria::ASC) Order by the template_id column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery orderByDbTagId($order = Criteria::ASC) Order by the tag_id column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery orderByDbName($order = Criteria::ASC) Order by the name column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery orderByDbType($order = Criteria::ASC) Order by the type column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery orderByDbIsFileMD($order = Criteria::ASC) Order by the is_file_md column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery orderByDbTagPosition($order = Criteria::ASC) Order by the position column
|
||||
*
|
||||
* @method CcPlayoutHistoryTemplateTagQuery groupByDbId() Group by the id column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery groupByDbTemplateId() Group by the template_id column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery groupByDbTagId() Group by the tag_id column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery groupByDbName() Group by the name column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery groupByDbType() Group by the type column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery groupByDbIsFileMD() Group by the is_file_md column
|
||||
* @method CcPlayoutHistoryTemplateTagQuery groupByDbTagPosition() Group by the position column
|
||||
*
|
||||
* @method CcPlayoutHistoryTemplateTagQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
|
@ -24,21 +28,21 @@
|
|||
* @method CcPlayoutHistoryTemplateTagQuery rightJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryTemplate relation
|
||||
* @method CcPlayoutHistoryTemplateTagQuery innerJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryTemplate relation
|
||||
*
|
||||
* @method CcPlayoutHistoryTemplateTagQuery leftJoinCcTag($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcTag relation
|
||||
* @method CcPlayoutHistoryTemplateTagQuery rightJoinCcTag($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTag relation
|
||||
* @method CcPlayoutHistoryTemplateTagQuery innerJoinCcTag($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTag relation
|
||||
*
|
||||
* @method CcPlayoutHistoryTemplateTag findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateTag matching the query
|
||||
* @method CcPlayoutHistoryTemplateTag findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateTag matching the query, or a new CcPlayoutHistoryTemplateTag object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method CcPlayoutHistoryTemplateTag findOneByDbId(int $id) Return the first CcPlayoutHistoryTemplateTag filtered by the id column
|
||||
* @method CcPlayoutHistoryTemplateTag findOneByDbTemplateId(int $template_id) Return the first CcPlayoutHistoryTemplateTag filtered by the template_id column
|
||||
* @method CcPlayoutHistoryTemplateTag findOneByDbTagId(int $tag_id) Return the first CcPlayoutHistoryTemplateTag filtered by the tag_id column
|
||||
* @method CcPlayoutHistoryTemplateTag findOneByDbName(string $name) Return the first CcPlayoutHistoryTemplateTag filtered by the name column
|
||||
* @method CcPlayoutHistoryTemplateTag findOneByDbType(string $type) Return the first CcPlayoutHistoryTemplateTag filtered by the type column
|
||||
* @method CcPlayoutHistoryTemplateTag findOneByDbIsFileMD(boolean $is_file_md) Return the first CcPlayoutHistoryTemplateTag filtered by the is_file_md column
|
||||
* @method CcPlayoutHistoryTemplateTag findOneByDbTagPosition(int $position) Return the first CcPlayoutHistoryTemplateTag filtered by the position column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcPlayoutHistoryTemplateTag objects filtered by the id column
|
||||
* @method array findByDbTemplateId(int $template_id) Return CcPlayoutHistoryTemplateTag objects filtered by the template_id column
|
||||
* @method array findByDbTagId(int $tag_id) Return CcPlayoutHistoryTemplateTag objects filtered by the tag_id column
|
||||
* @method array findByDbName(string $name) Return CcPlayoutHistoryTemplateTag objects filtered by the name column
|
||||
* @method array findByDbType(string $type) Return CcPlayoutHistoryTemplateTag objects filtered by the type column
|
||||
* @method array findByDbIsFileMD(boolean $is_file_md) Return CcPlayoutHistoryTemplateTag objects filtered by the is_file_md column
|
||||
* @method array findByDbTagPosition(int $position) Return CcPlayoutHistoryTemplateTag objects filtered by the position column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
|
@ -198,34 +202,64 @@ abstract class BaseCcPlayoutHistoryTemplateTagQuery extends ModelCriteria
|
|||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the tag_id column
|
||||
* Filter the query on the name column
|
||||
*
|
||||
* @param int|array $dbTagId The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $dbName The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbTagId($dbTagId = null, $comparison = null)
|
||||
public function filterByDbName($dbName = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbTagId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbTagId['min'])) {
|
||||
$this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $dbTagId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbTagId['max'])) {
|
||||
$this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $dbTagId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbName)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbName)) {
|
||||
$dbName = str_replace('*', '%', $dbName);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $dbTagId, $comparison);
|
||||
return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::NAME, $dbName, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the type column
|
||||
*
|
||||
* @param string $dbType The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbType($dbType = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbType)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbType)) {
|
||||
$dbType = str_replace('*', '%', $dbType);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TYPE, $dbType, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the is_file_md column
|
||||
*
|
||||
* @param boolean|string $dbIsFileMD The value to use as filter.
|
||||
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbIsFileMD($dbIsFileMD = null, $comparison = null)
|
||||
{
|
||||
if (is_string($dbIsFileMD)) {
|
||||
$is_file_md = in_array(strtolower($dbIsFileMD), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
||||
}
|
||||
return $this->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::IS_FILE_MD, $dbIsFileMD, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -323,70 +357,6 @@ abstract class BaseCcPlayoutHistoryTemplateTagQuery extends ModelCriteria
|
|||
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplateQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcTag object
|
||||
*
|
||||
* @param CcTag $ccTag the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcTag($ccTag, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcPlayoutHistoryTemplateTagPeer::TAG_ID, $ccTag->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcTag relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcPlayoutHistoryTemplateTagQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcTag($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcTag');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcTag');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcTag relation CcTag object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcTagQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcTagQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcTag($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcTag', 'CcTagQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
|
|
@ -413,6 +413,28 @@ class Application_Service_HistoryService
|
|||
return $fields;
|
||||
}
|
||||
|
||||
public function getFileMetadataTypes() {
|
||||
|
||||
$fileMD = array(
|
||||
array("name"=> MDATA_KEY_TITLE, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_CREATOR, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_SOURCE, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_DURATION, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_GENRE, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_MOOD, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_LABEL, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_COMPOSER, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_ISRC, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_COPYRIGHT, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_YEAR, "type"=> TEMPLATE_INT),
|
||||
array("name"=> MDATA_KEY_TRACKNUMBER, "type"=> TEMPLATE_INT),
|
||||
array("name"=> MDATA_KEY_CONDUCTOR, "type"=> TEMPLATE_STRING),
|
||||
array("name"=> MDATA_KEY_LANGUAGE, "type"=> TEMPLATE_STRING),
|
||||
);
|
||||
|
||||
return $fileMD;
|
||||
}
|
||||
|
||||
public function mandatoryItemTemplate() {
|
||||
|
||||
$fields = array();
|
||||
|
|
|
@ -1,7 +1,38 @@
|
|||
<div id="configure_item_template" class="ui-widget ui-widget-content block-shadow alpha-block padded">
|
||||
<button id="template_item_save" data-template="<?php echo $this->template_id; ?>">Save</button>
|
||||
|
||||
<?php $i = 0; ?>
|
||||
|
||||
<ul class="template_item_list">
|
||||
<?php foreach ($this->required as $field): ?>
|
||||
<div><?php echo $field["name"]?></div>
|
||||
|
||||
<li id="<?php echo "field_".$i?>" data-name="<?php echo $field["name"]?>" data-type="<?php echo $field["type"]?>" data-filemd="<?php echo var_export($field["isFileMd"], true)?>">
|
||||
<span><?php echo $field["name"]?></span>
|
||||
<span><?php echo $field["type"]?></span>
|
||||
</li>
|
||||
<?php $i++; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<ul class="template_file_md">
|
||||
<?php foreach ($this->fileMD as $md): ?>
|
||||
|
||||
<li id="<?php echo "md_".$md["name"]?>" data-name="<?php echo $md["name"]?>" data-type="<?php echo $md["type"]?>"><?php echo $md["name"] ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<div class="template_item_add">
|
||||
<div>Add New Field</div>
|
||||
<div>
|
||||
<input type="text">
|
||||
<select>
|
||||
<?php foreach ($this->fields as $field): ?>
|
||||
<option value="<?php echo $field; ?>"><?php echo $field; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button>Add</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -479,22 +479,6 @@
|
|||
<column name="locale_code" phpName="DbLocaleCode" type="VARCHAR" size="16" required="true" />
|
||||
<column name="locale_lang" phpName="DbLocaleLang" type="VARCHAR" size="128" required="true" />
|
||||
</table>
|
||||
<table name="cc_tag" phpName="CcTag">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="tag_name" phpName="DbTagName" type="VARCHAR" size="128" required="true" />
|
||||
<column name="tag_type" phpName="DbTagType" type="VARCHAR" size="128" required="true" defaultValue="boolean" />
|
||||
</table>
|
||||
<table name="cc_file_tag" phpName="CcFileTag">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="file_id" phpName="DbFileId" type="INTEGER" required="true" />
|
||||
<column name="tag_id" phpName="DbTagId" type="INTEGER" required="true" />
|
||||
<foreign-key foreignTable="cc_files" name="cc_file_tag_file_fkey" onDelete="CASCADE">
|
||||
<reference local="file_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_tag" name="cc_file_tag_tag_fkey" onDelete="CASCADE">
|
||||
<reference local="tag_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
<table name="cc_playout_history" phpName="CcPlayoutHistory">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="file_id" phpName="DbFileId" type="INTEGER" required="false" />
|
||||
|
@ -507,30 +491,25 @@
|
|||
<table name="cc_playout_history_metadata" phpName="CcPlayoutHistoryMetaData">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="history_id" phpName="DbHistoryId" type="INTEGER" required="true" />
|
||||
<column name="tag_id" phpName="DbTagId" type="INTEGER" required="true" />
|
||||
<column name="key" phpName="DbKey" type="VARCHAR" size="128" required="true" />
|
||||
<column name="value" phpName="DbValue" type="VARCHAR" size="128" required="true" />
|
||||
<foreign-key foreignTable="cc_playout_history" name="cc_playout_history_metadata_entry_fkey" onDelete="CASCADE">
|
||||
<reference local="history_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_tag" name="c_playout_metadata_tag_fkey" onDelete="CASCADE">
|
||||
<reference local="tag_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
<table name="cc_playout_history_template" phpName="CcPlayoutHistoryTemplate">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="template_name" phpName="DbTemplateName" type="VARCHAR" size="128" required="true" />
|
||||
</table>
|
||||
<table name="cc_playout_history_template_tag" phpName="CcPlayoutHistoryTemplateTag">
|
||||
<table name="cc_playout_history_template_field" phpName="CcPlayoutHistoryTemplateTag">
|
||||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="template_id" phpName="DbTemplateId" type="INTEGER" required="true" />
|
||||
<column name="tag_id" phpName="DbTagId" type="INTEGER" required="true" />
|
||||
<column name="name" phpName="DbName" type="VARCHAR" size="128" required="true" />
|
||||
<column name="type" phpName="DbType" type="VARCHAR" size="128" required="true" />
|
||||
<column name="is_file_md" phpName="DbIsFileMD" type="BOOLEAN" required="true" defaultValue="false"/>
|
||||
<column name="position" phpName="DbTagPosition" type="INTEGER" required="true" />
|
||||
<foreign-key foreignTable="cc_playout_history_template" name="cc_playout_history_template_template_fkey" onDelete="CASCADE">
|
||||
<reference local="template_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_tag" name="cc_playout_history_template_tag_fkey" onDelete="CASCADE">
|
||||
<reference local="tag_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
</database>
|
||||
|
|
|
@ -752,44 +752,6 @@ CREATE TABLE "cc_locale"
|
|||
COMMENT ON TABLE "cc_locale" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_tag
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_tag" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_tag"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"tag_name" VARCHAR(128) NOT NULL,
|
||||
"tag_type" VARCHAR(128) default 'boolean' NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_tag" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_file_tag
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_file_tag" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_file_tag"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"file_id" INTEGER NOT NULL,
|
||||
"tag_id" INTEGER NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_file_tag" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_playout_history
|
||||
|
@ -822,7 +784,6 @@ CREATE TABLE "cc_playout_history_metadata"
|
|||
(
|
||||
"id" serial NOT NULL,
|
||||
"history_id" INTEGER NOT NULL,
|
||||
"tag_id" INTEGER NOT NULL,
|
||||
"key" VARCHAR(128) NOT NULL,
|
||||
"value" VARCHAR(128) NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
|
@ -851,22 +812,24 @@ COMMENT ON TABLE "cc_playout_history_template" IS '';
|
|||
|
||||
SET search_path TO public;
|
||||
-----------------------------------------------------------------------------
|
||||
-- cc_playout_history_template_tag
|
||||
-- cc_playout_history_template_field
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE "cc_playout_history_template_tag" CASCADE;
|
||||
DROP TABLE "cc_playout_history_template_field" CASCADE;
|
||||
|
||||
|
||||
CREATE TABLE "cc_playout_history_template_tag"
|
||||
CREATE TABLE "cc_playout_history_template_field"
|
||||
(
|
||||
"id" serial NOT NULL,
|
||||
"template_id" INTEGER NOT NULL,
|
||||
"tag_id" INTEGER NOT NULL,
|
||||
"name" VARCHAR(128) NOT NULL,
|
||||
"type" VARCHAR(128) NOT NULL,
|
||||
"is_file_md" BOOLEAN default 'f' NOT NULL,
|
||||
"position" INTEGER NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
COMMENT ON TABLE "cc_playout_history_template_tag" IS '';
|
||||
COMMENT ON TABLE "cc_playout_history_template_field" IS '';
|
||||
|
||||
|
||||
SET search_path TO public;
|
||||
|
@ -926,16 +889,8 @@ ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_timestamp_inst_fkey" FOREIGN
|
|||
|
||||
ALTER TABLE "cc_listener_count" ADD CONSTRAINT "cc_mount_name_inst_fkey" FOREIGN KEY ("mount_name_id") REFERENCES "cc_mount_name" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_file_tag" ADD CONSTRAINT "cc_file_tag_file_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_file_tag" ADD CONSTRAINT "cc_file_tag_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playout_history" ADD CONSTRAINT "cc_playout_history_file_tag_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "cc_playout_history_metadata_entry_fkey" FOREIGN KEY ("history_id") REFERENCES "cc_playout_history" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playout_history_metadata" ADD CONSTRAINT "c_playout_metadata_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playout_history_template_tag" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playout_history_template_tag" ADD CONSTRAINT "cc_playout_history_template_tag_fkey" FOREIGN KEY ("tag_id") REFERENCES "cc_tag" ("id") ON DELETE CASCADE;
|
||||
ALTER TABLE "cc_playout_history_template_field" ADD CONSTRAINT "cc_playout_history_template_template_fkey" FOREIGN KEY ("template_id") REFERENCES "cc_playout_history_template" ("id") ON DELETE CASCADE;
|
||||
|
|
|
@ -488,13 +488,13 @@ $(document).ready(function() {
|
|||
setCurrentUserPseudoPassword();
|
||||
}
|
||||
|
||||
$('#current-user').live('click', function() {
|
||||
$('body').on('click','#current-user', function() {
|
||||
$.ajax({
|
||||
url: baseUrl+'user/edit-user/format/json'
|
||||
});
|
||||
});
|
||||
|
||||
$('#cu_save_user').live('click', function() {
|
||||
$('body').on('click', '#cu_save_user', function() {
|
||||
$.cookie("airtime_locale", $('#cu_locale').val(), {path: '/'});
|
||||
});
|
||||
|
||||
|
|
141
airtime_mvc/public/js/airtime/playouthistory/template.js
Normal file
141
airtime_mvc/public/js/airtime/playouthistory/template.js
Normal file
|
@ -0,0 +1,141 @@
|
|||
var AIRTIME = (function(AIRTIME) {
|
||||
var mod;
|
||||
var $templateList;
|
||||
var $fileMDList;
|
||||
|
||||
if (AIRTIME.historyTemplate === undefined) {
|
||||
AIRTIME.historyTemplate = {};
|
||||
}
|
||||
mod = AIRTIME.historyTemplate;
|
||||
|
||||
function createTemplateLi(name, type, filemd, required) {
|
||||
|
||||
var templateRequired =
|
||||
"<li id='<%= id %>' data-name='<%= name %>' data-type='<%= type %>' data-filemd='<%= filemd %>'>" +
|
||||
"<span><%= name %></span>" +
|
||||
"<span><%= type %></span>" +
|
||||
"</li>";
|
||||
|
||||
var templateOptional =
|
||||
"<li id='<%= id %>' data-name='<%= name %>' data-type='<%= type %>' data-filemd='<%= filemd %>'>" +
|
||||
"<span><%= name %></span>" +
|
||||
"<span><%= type %></span>" +
|
||||
"<span class='template_item_remove'>Remove</span>" +
|
||||
"</li>";
|
||||
|
||||
var template = (required) === true ? templateRequired : templateOptional;
|
||||
|
||||
var template = _.template(template);
|
||||
var count = $templateList.find("li").length;
|
||||
var id = "field_"+count;
|
||||
var $li = $(template({id: id, name: name, type: type, filemd: filemd}));
|
||||
|
||||
return $li;
|
||||
}
|
||||
|
||||
function addField(name, type, filemd, required) {
|
||||
|
||||
$templateList.append(createTemplateLi(name, type, filemd, required));
|
||||
}
|
||||
|
||||
function getFieldData($el) {
|
||||
|
||||
return {
|
||||
name: $el.data("name"),
|
||||
type: $el.data("type"),
|
||||
filemd: $el.data("filemd"),
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
var fieldSortable = (function() {
|
||||
|
||||
var $newLi;
|
||||
|
||||
return {
|
||||
receive: function( event, ui ) {
|
||||
var name = $newLi.data("name");
|
||||
var type = $newLi.data("type");
|
||||
var $prev = $newLi.prev();
|
||||
|
||||
$newLi.remove();
|
||||
|
||||
var $li = createTemplateLi(name, type, true, false);
|
||||
|
||||
if ($prev.length) {
|
||||
$prev.after($li);
|
||||
}
|
||||
else {
|
||||
$templateList.prepend($li);
|
||||
}
|
||||
},
|
||||
beforeStop: function( event, ui ) {
|
||||
$newLi = ui.item;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
mod.onReady = function() {
|
||||
|
||||
$templateList = $(".template_item_list");
|
||||
$fileMDList = $(".template_file_md");
|
||||
|
||||
|
||||
$fileMDList.find("li").draggable({
|
||||
//helper: "clone",
|
||||
helper: function(event, ui) {
|
||||
var $li = $(this);
|
||||
var name = $li.data("name");
|
||||
var type = $li.data("type");
|
||||
|
||||
return createTemplateLi(name, type, true, false);
|
||||
|
||||
},
|
||||
connectToSortable: ".template_item_list"
|
||||
});
|
||||
|
||||
$templateList.sortable(fieldSortable);
|
||||
|
||||
$templateList.on("click", ".template_item_remove", function() {
|
||||
$(this).parents("li").remove();
|
||||
});
|
||||
|
||||
$(".template_item_add").on("click", "button", function() {
|
||||
var $div = $(this).parents("div.template_item_add");
|
||||
|
||||
var name = $div.find("input").val();
|
||||
var type = $div.find("select").val();
|
||||
|
||||
addField(name, type, false, false);
|
||||
});
|
||||
|
||||
$("#template_item_save").click(function(){
|
||||
var template_id = $(this).data("template");
|
||||
var createUrl = baseUrl+"Playouthistory/create-template/format/json";
|
||||
var updateUrl = baseUrl+"Playouthistory/update-template/format/json";
|
||||
var url;
|
||||
var data = {};
|
||||
var $lis, $li;
|
||||
var i, len;
|
||||
|
||||
url = (isNaN(parseInt(template_id, 10))) ? createUrl : updateUrl;
|
||||
|
||||
$lis = $templateList.children();
|
||||
|
||||
for (i = 0, len = $lis.length; i < len; i++) {
|
||||
$li = $($lis[i]);
|
||||
|
||||
data[i] = getFieldData($li);
|
||||
}
|
||||
|
||||
$.post(url, data, function(json) {
|
||||
var x;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
return AIRTIME;
|
||||
|
||||
}(AIRTIME || {}));
|
||||
|
||||
$(document).ready(AIRTIME.historyTemplate.onReady);
|
6
airtime_mvc/public/js/libs/underscore-min.js
vendored
Normal file
6
airtime_mvc/public/js/libs/underscore-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue