CC-4961: Show linking
This commit is contained in:
parent
e64f6fb3fd
commit
9b2fb3bece
|
@ -128,4 +128,9 @@ class CcShow extends BaseCcShow {
|
|||
->orderByDbStarts()
|
||||
->find();
|
||||
}
|
||||
|
||||
public function isLinked()
|
||||
{
|
||||
return $this->getDbLinked();
|
||||
}
|
||||
} // CcShow
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_stamp' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowStamp extends BaseCcShowStamp {
|
||||
|
||||
} // CcShowStamp
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_stamp' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowStampPeer extends BaseCcShowStampPeer {
|
||||
|
||||
} // CcShowStampPeer
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'cc_show_stamp' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowStampQuery extends BaseCcShowStampQuery {
|
||||
|
||||
} // CcShowStampQuery
|
|
@ -53,6 +53,7 @@ class CcScheduleTableMap extends TableMap {
|
|||
$this->addColumn('PLAYOUT_STATUS', 'DbPlayoutStatus', 'SMALLINT', true, null, 1);
|
||||
$this->addColumn('BROADCASTED', 'DbBroadcasted', 'SMALLINT', true, null, 0);
|
||||
$this->addColumn('STAMP_ID', 'DbStampId', 'INTEGER', true, null, 0);
|
||||
$this->addColumn('STAMP_CONTENT_ID', 'DbStampContentId', 'INTEGER', true, null, 0);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class CcStampContentsTableMap extends TableMap {
|
|||
$this->addForeignKey('STREAM_ID', 'DbStreamId', 'INTEGER', 'cc_webstream', 'ID', false, null, null);
|
||||
$this->addForeignKey('BLOCK_ID', 'DbBlockId', 'INTEGER', 'cc_block', 'ID', false, null, null);
|
||||
$this->addForeignKey('PLAYLIST_ID', 'DbPlaylistId', 'INTEGER', 'cc_playlist', 'ID', false, null, null);
|
||||
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', true, null, null);
|
||||
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
|
||||
$this->addColumn('CLIP_LENGTH', 'DbClipLength', 'VARCHAR', false, null, '00:00:00');
|
||||
$this->addColumn('CUE_IN', 'DbCueIn', 'VARCHAR', false, null, '00:00:00');
|
||||
$this->addColumn('CUE_OUT', 'DbCueOut', 'VARCHAR', false, null, '00:00:00');
|
||||
|
|
|
@ -41,6 +41,7 @@ class CcStampTableMap extends TableMap {
|
|||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
|
||||
$this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', false, null, null);
|
||||
$this->addColumn('LINKED', 'DbLinked', 'BOOLEAN', true, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
|
|
@ -121,6 +121,13 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $stamp_id;
|
||||
|
||||
/**
|
||||
* The value for the stamp_content_id field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $stamp_content_id;
|
||||
|
||||
/**
|
||||
* @var CcShowInstances
|
||||
*/
|
||||
|
@ -170,6 +177,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->playout_status = 1;
|
||||
$this->broadcasted = 0;
|
||||
$this->stamp_id = 0;
|
||||
$this->stamp_content_id = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -424,6 +432,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
return $this->stamp_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [stamp_content_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDbStampContentId()
|
||||
{
|
||||
return $this->stamp_content_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
|
@ -854,6 +872,26 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbStampId()
|
||||
|
||||
/**
|
||||
* Set the value of [stamp_content_id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return CcSchedule The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbStampContentId($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->stamp_content_id !== $v || $this->isNew()) {
|
||||
$this->stamp_content_id = $v;
|
||||
$this->modifiedColumns[] = CcSchedulePeer::STAMP_CONTENT_ID;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbStampContentId()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
|
@ -892,6 +930,10 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($this->stamp_content_id !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
|
@ -929,6 +971,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->playout_status = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
|
||||
$this->broadcasted = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null;
|
||||
$this->stamp_id = ($row[$startcol + 14] !== null) ? (int) $row[$startcol + 14] : null;
|
||||
$this->stamp_content_id = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -937,7 +980,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 15; // 15 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 16; // 16 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcSchedule object", $e);
|
||||
|
@ -1361,6 +1404,9 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
case 14:
|
||||
return $this->getDbStampId();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getDbStampContentId();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -1400,6 +1446,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$keys[12] => $this->getDbPlayoutStatus(),
|
||||
$keys[13] => $this->getDbBroadcasted(),
|
||||
$keys[14] => $this->getDbStampId(),
|
||||
$keys[15] => $this->getDbStampContentId(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcShowInstances) {
|
||||
|
@ -1487,6 +1534,9 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
case 14:
|
||||
$this->setDbStampId($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setDbStampContentId($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -1526,6 +1576,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[12], $arr)) $this->setDbPlayoutStatus($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setDbBroadcasted($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setDbStampId($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setDbStampContentId($arr[$keys[15]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1552,6 +1603,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcSchedulePeer::PLAYOUT_STATUS)) $criteria->add(CcSchedulePeer::PLAYOUT_STATUS, $this->playout_status);
|
||||
if ($this->isColumnModified(CcSchedulePeer::BROADCASTED)) $criteria->add(CcSchedulePeer::BROADCASTED, $this->broadcasted);
|
||||
if ($this->isColumnModified(CcSchedulePeer::STAMP_ID)) $criteria->add(CcSchedulePeer::STAMP_ID, $this->stamp_id);
|
||||
if ($this->isColumnModified(CcSchedulePeer::STAMP_CONTENT_ID)) $criteria->add(CcSchedulePeer::STAMP_CONTENT_ID, $this->stamp_content_id);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -1627,6 +1679,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$copyObj->setDbPlayoutStatus($this->playout_status);
|
||||
$copyObj->setDbBroadcasted($this->broadcasted);
|
||||
$copyObj->setDbStampId($this->stamp_id);
|
||||
$copyObj->setDbStampContentId($this->stamp_content_id);
|
||||
|
||||
if ($deepCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -1960,6 +2013,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
|
|||
$this->playout_status = null;
|
||||
$this->broadcasted = null;
|
||||
$this->stamp_id = null;
|
||||
$this->stamp_content_id = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->clearAllReferences();
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcSchedulePeer {
|
|||
const TM_CLASS = 'CcScheduleTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 15;
|
||||
const NUM_COLUMNS = 16;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -76,6 +76,9 @@ abstract class BaseCcSchedulePeer {
|
|||
/** the column name for the STAMP_ID field */
|
||||
const STAMP_ID = 'cc_schedule.STAMP_ID';
|
||||
|
||||
/** the column name for the STAMP_CONTENT_ID field */
|
||||
const STAMP_CONTENT_ID = 'cc_schedule.STAMP_CONTENT_ID';
|
||||
|
||||
/**
|
||||
* An identiy map to hold any loaded instances of CcSchedule objects.
|
||||
* This must be public so that other peer classes can access this when hydrating from JOIN
|
||||
|
@ -92,12 +95,12 @@ abstract class BaseCcSchedulePeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbStarts', 'DbEnds', 'DbFileId', 'DbStreamId', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', 'DbMediaItemPlayed', 'DbInstanceId', 'DbPlayoutStatus', 'DbBroadcasted', 'DbStampId', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbStarts', 'dbEnds', 'dbFileId', 'dbStreamId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', 'dbMediaItemPlayed', 'dbInstanceId', 'dbPlayoutStatus', 'dbBroadcasted', 'dbStampId', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::STARTS, self::ENDS, self::FILE_ID, self::STREAM_ID, self::CLIP_LENGTH, self::FADE_IN, self::FADE_OUT, self::CUE_IN, self::CUE_OUT, self::MEDIA_ITEM_PLAYED, self::INSTANCE_ID, self::PLAYOUT_STATUS, self::BROADCASTED, self::STAMP_ID, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'STARTS', 'ENDS', 'FILE_ID', 'STREAM_ID', 'CLIP_LENGTH', 'FADE_IN', 'FADE_OUT', 'CUE_IN', 'CUE_OUT', 'MEDIA_ITEM_PLAYED', 'INSTANCE_ID', 'PLAYOUT_STATUS', 'BROADCASTED', 'STAMP_ID', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'starts', 'ends', 'file_id', 'stream_id', 'clip_length', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'media_item_played', 'instance_id', 'playout_status', 'broadcasted', 'stamp_id', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbStarts', 'DbEnds', 'DbFileId', 'DbStreamId', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', 'DbMediaItemPlayed', 'DbInstanceId', 'DbPlayoutStatus', 'DbBroadcasted', 'DbStampId', 'DbStampContentId', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbStarts', 'dbEnds', 'dbFileId', 'dbStreamId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', 'dbMediaItemPlayed', 'dbInstanceId', 'dbPlayoutStatus', 'dbBroadcasted', 'dbStampId', 'dbStampContentId', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::STARTS, self::ENDS, self::FILE_ID, self::STREAM_ID, self::CLIP_LENGTH, self::FADE_IN, self::FADE_OUT, self::CUE_IN, self::CUE_OUT, self::MEDIA_ITEM_PLAYED, self::INSTANCE_ID, self::PLAYOUT_STATUS, self::BROADCASTED, self::STAMP_ID, self::STAMP_CONTENT_ID, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'STARTS', 'ENDS', 'FILE_ID', 'STREAM_ID', 'CLIP_LENGTH', 'FADE_IN', 'FADE_OUT', 'CUE_IN', 'CUE_OUT', 'MEDIA_ITEM_PLAYED', 'INSTANCE_ID', 'PLAYOUT_STATUS', 'BROADCASTED', 'STAMP_ID', 'STAMP_CONTENT_ID', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'starts', 'ends', 'file_id', 'stream_id', 'clip_length', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'media_item_played', 'instance_id', 'playout_status', 'broadcasted', 'stamp_id', 'stamp_content_id', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -107,12 +110,12 @@ abstract class BaseCcSchedulePeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbStarts' => 1, 'DbEnds' => 2, 'DbFileId' => 3, 'DbStreamId' => 4, 'DbClipLength' => 5, 'DbFadeIn' => 6, 'DbFadeOut' => 7, 'DbCueIn' => 8, 'DbCueOut' => 9, 'DbMediaItemPlayed' => 10, 'DbInstanceId' => 11, 'DbPlayoutStatus' => 12, 'DbBroadcasted' => 13, 'DbStampId' => 14, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbStarts' => 1, 'dbEnds' => 2, 'dbFileId' => 3, 'dbStreamId' => 4, 'dbClipLength' => 5, 'dbFadeIn' => 6, 'dbFadeOut' => 7, 'dbCueIn' => 8, 'dbCueOut' => 9, 'dbMediaItemPlayed' => 10, 'dbInstanceId' => 11, 'dbPlayoutStatus' => 12, 'dbBroadcasted' => 13, 'dbStampId' => 14, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::STARTS => 1, self::ENDS => 2, self::FILE_ID => 3, self::STREAM_ID => 4, self::CLIP_LENGTH => 5, self::FADE_IN => 6, self::FADE_OUT => 7, self::CUE_IN => 8, self::CUE_OUT => 9, self::MEDIA_ITEM_PLAYED => 10, self::INSTANCE_ID => 11, self::PLAYOUT_STATUS => 12, self::BROADCASTED => 13, self::STAMP_ID => 14, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'STARTS' => 1, 'ENDS' => 2, 'FILE_ID' => 3, 'STREAM_ID' => 4, 'CLIP_LENGTH' => 5, 'FADE_IN' => 6, 'FADE_OUT' => 7, 'CUE_IN' => 8, 'CUE_OUT' => 9, 'MEDIA_ITEM_PLAYED' => 10, 'INSTANCE_ID' => 11, 'PLAYOUT_STATUS' => 12, 'BROADCASTED' => 13, 'STAMP_ID' => 14, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'starts' => 1, 'ends' => 2, 'file_id' => 3, 'stream_id' => 4, 'clip_length' => 5, 'fade_in' => 6, 'fade_out' => 7, 'cue_in' => 8, 'cue_out' => 9, 'media_item_played' => 10, 'instance_id' => 11, 'playout_status' => 12, 'broadcasted' => 13, 'stamp_id' => 14, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbStarts' => 1, 'DbEnds' => 2, 'DbFileId' => 3, 'DbStreamId' => 4, 'DbClipLength' => 5, 'DbFadeIn' => 6, 'DbFadeOut' => 7, 'DbCueIn' => 8, 'DbCueOut' => 9, 'DbMediaItemPlayed' => 10, 'DbInstanceId' => 11, 'DbPlayoutStatus' => 12, 'DbBroadcasted' => 13, 'DbStampId' => 14, 'DbStampContentId' => 15, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbStarts' => 1, 'dbEnds' => 2, 'dbFileId' => 3, 'dbStreamId' => 4, 'dbClipLength' => 5, 'dbFadeIn' => 6, 'dbFadeOut' => 7, 'dbCueIn' => 8, 'dbCueOut' => 9, 'dbMediaItemPlayed' => 10, 'dbInstanceId' => 11, 'dbPlayoutStatus' => 12, 'dbBroadcasted' => 13, 'dbStampId' => 14, 'dbStampContentId' => 15, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::STARTS => 1, self::ENDS => 2, self::FILE_ID => 3, self::STREAM_ID => 4, self::CLIP_LENGTH => 5, self::FADE_IN => 6, self::FADE_OUT => 7, self::CUE_IN => 8, self::CUE_OUT => 9, self::MEDIA_ITEM_PLAYED => 10, self::INSTANCE_ID => 11, self::PLAYOUT_STATUS => 12, self::BROADCASTED => 13, self::STAMP_ID => 14, self::STAMP_CONTENT_ID => 15, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'STARTS' => 1, 'ENDS' => 2, 'FILE_ID' => 3, 'STREAM_ID' => 4, 'CLIP_LENGTH' => 5, 'FADE_IN' => 6, 'FADE_OUT' => 7, 'CUE_IN' => 8, 'CUE_OUT' => 9, 'MEDIA_ITEM_PLAYED' => 10, 'INSTANCE_ID' => 11, 'PLAYOUT_STATUS' => 12, 'BROADCASTED' => 13, 'STAMP_ID' => 14, 'STAMP_CONTENT_ID' => 15, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'starts' => 1, 'ends' => 2, 'file_id' => 3, 'stream_id' => 4, 'clip_length' => 5, 'fade_in' => 6, 'fade_out' => 7, 'cue_in' => 8, 'cue_out' => 9, 'media_item_played' => 10, 'instance_id' => 11, 'playout_status' => 12, 'broadcasted' => 13, 'stamp_id' => 14, 'stamp_content_id' => 15, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -199,6 +202,7 @@ abstract class BaseCcSchedulePeer {
|
|||
$criteria->addSelectColumn(CcSchedulePeer::PLAYOUT_STATUS);
|
||||
$criteria->addSelectColumn(CcSchedulePeer::BROADCASTED);
|
||||
$criteria->addSelectColumn(CcSchedulePeer::STAMP_ID);
|
||||
$criteria->addSelectColumn(CcSchedulePeer::STAMP_CONTENT_ID);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.STARTS');
|
||||
|
@ -215,6 +219,7 @@ abstract class BaseCcSchedulePeer {
|
|||
$criteria->addSelectColumn($alias . '.PLAYOUT_STATUS');
|
||||
$criteria->addSelectColumn($alias . '.BROADCASTED');
|
||||
$criteria->addSelectColumn($alias . '.STAMP_ID');
|
||||
$criteria->addSelectColumn($alias . '.STAMP_CONTENT_ID');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
* @method CcScheduleQuery orderByDbPlayoutStatus($order = Criteria::ASC) Order by the playout_status column
|
||||
* @method CcScheduleQuery orderByDbBroadcasted($order = Criteria::ASC) Order by the broadcasted column
|
||||
* @method CcScheduleQuery orderByDbStampId($order = Criteria::ASC) Order by the stamp_id column
|
||||
* @method CcScheduleQuery orderByDbStampContentId($order = Criteria::ASC) Order by the stamp_content_id column
|
||||
*
|
||||
* @method CcScheduleQuery groupByDbId() Group by the id column
|
||||
* @method CcScheduleQuery groupByDbStarts() Group by the starts column
|
||||
|
@ -37,6 +38,7 @@
|
|||
* @method CcScheduleQuery groupByDbPlayoutStatus() Group by the playout_status column
|
||||
* @method CcScheduleQuery groupByDbBroadcasted() Group by the broadcasted column
|
||||
* @method CcScheduleQuery groupByDbStampId() Group by the stamp_id column
|
||||
* @method CcScheduleQuery groupByDbStampContentId() Group by the stamp_content_id column
|
||||
*
|
||||
* @method CcScheduleQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcScheduleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
|
@ -76,6 +78,7 @@
|
|||
* @method CcSchedule findOneByDbPlayoutStatus(int $playout_status) Return the first CcSchedule filtered by the playout_status column
|
||||
* @method CcSchedule findOneByDbBroadcasted(int $broadcasted) Return the first CcSchedule filtered by the broadcasted column
|
||||
* @method CcSchedule findOneByDbStampId(int $stamp_id) Return the first CcSchedule filtered by the stamp_id column
|
||||
* @method CcSchedule findOneByDbStampContentId(int $stamp_content_id) Return the first CcSchedule filtered by the stamp_content_id column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcSchedule objects filtered by the id column
|
||||
* @method array findByDbStarts(string $starts) Return CcSchedule objects filtered by the starts column
|
||||
|
@ -92,6 +95,7 @@
|
|||
* @method array findByDbPlayoutStatus(int $playout_status) Return CcSchedule objects filtered by the playout_status column
|
||||
* @method array findByDbBroadcasted(int $broadcasted) Return CcSchedule objects filtered by the broadcasted column
|
||||
* @method array findByDbStampId(int $stamp_id) Return CcSchedule objects filtered by the stamp_id column
|
||||
* @method array findByDbStampContentId(int $stamp_content_id) Return CcSchedule objects filtered by the stamp_content_id column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
|
@ -611,6 +615,37 @@ abstract class BaseCcScheduleQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcSchedulePeer::STAMP_ID, $dbStampId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the stamp_content_id column
|
||||
*
|
||||
* @param int|array $dbStampContentId 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 CcScheduleQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbStampContentId($dbStampContentId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbStampContentId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbStampContentId['min'])) {
|
||||
$this->addUsingAlias(CcSchedulePeer::STAMP_CONTENT_ID, $dbStampContentId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbStampContentId['max'])) {
|
||||
$this->addUsingAlias(CcSchedulePeer::STAMP_CONTENT_ID, $dbStampContentId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcSchedulePeer::STAMP_CONTENT_ID, $dbStampContentId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcShowInstances object
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,948 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'cc_show_stamp' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method CcShowStampQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method CcShowStampQuery orderByDbShowId($order = Criteria::ASC) Order by the show_id column
|
||||
* @method CcShowStampQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column
|
||||
* @method CcShowStampQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column
|
||||
* @method CcShowStampQuery orderByDbStreamId($order = Criteria::ASC) Order by the stream_id column
|
||||
* @method CcShowStampQuery orderByDbBlockId($order = Criteria::ASC) Order by the block_id column
|
||||
* @method CcShowStampQuery orderByDbPlaylistId($order = Criteria::ASC) Order by the playlist_id column
|
||||
* @method CcShowStampQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method CcShowStampQuery orderByDbClipLength($order = Criteria::ASC) Order by the clip_length column
|
||||
* @method CcShowStampQuery orderByDbCueIn($order = Criteria::ASC) Order by the cue_in column
|
||||
* @method CcShowStampQuery orderByDbCueOut($order = Criteria::ASC) Order by the cue_out column
|
||||
* @method CcShowStampQuery orderByDbFadeIn($order = Criteria::ASC) Order by the fade_in column
|
||||
* @method CcShowStampQuery orderByDbFadeOut($order = Criteria::ASC) Order by the fade_out column
|
||||
*
|
||||
* @method CcShowStampQuery groupByDbId() Group by the id column
|
||||
* @method CcShowStampQuery groupByDbShowId() Group by the show_id column
|
||||
* @method CcShowStampQuery groupByDbInstanceId() Group by the instance_id column
|
||||
* @method CcShowStampQuery groupByDbFileId() Group by the file_id column
|
||||
* @method CcShowStampQuery groupByDbStreamId() Group by the stream_id column
|
||||
* @method CcShowStampQuery groupByDbBlockId() Group by the block_id column
|
||||
* @method CcShowStampQuery groupByDbPlaylistId() Group by the playlist_id column
|
||||
* @method CcShowStampQuery groupByDbPosition() Group by the position column
|
||||
* @method CcShowStampQuery groupByDbClipLength() Group by the clip_length column
|
||||
* @method CcShowStampQuery groupByDbCueIn() Group by the cue_in column
|
||||
* @method CcShowStampQuery groupByDbCueOut() Group by the cue_out column
|
||||
* @method CcShowStampQuery groupByDbFadeIn() Group by the fade_in column
|
||||
* @method CcShowStampQuery groupByDbFadeOut() Group by the fade_out column
|
||||
*
|
||||
* @method CcShowStampQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcShowStampQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method CcShowStampQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method CcShowStampQuery leftJoinCcShow($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShow relation
|
||||
* @method CcShowStampQuery rightJoinCcShow($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShow relation
|
||||
* @method CcShowStampQuery innerJoinCcShow($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShow relation
|
||||
*
|
||||
* @method CcShowStampQuery leftJoinCcShowInstances($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShowInstances relation
|
||||
* @method CcShowStampQuery rightJoinCcShowInstances($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShowInstances relation
|
||||
* @method CcShowStampQuery innerJoinCcShowInstances($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShowInstances relation
|
||||
*
|
||||
* @method CcShowStampQuery leftJoinCcFiles($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFiles relation
|
||||
* @method CcShowStampQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
|
||||
* @method CcShowStampQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
|
||||
*
|
||||
* @method CcShowStampQuery leftJoinCcWebstream($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcWebstream relation
|
||||
* @method CcShowStampQuery rightJoinCcWebstream($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcWebstream relation
|
||||
* @method CcShowStampQuery innerJoinCcWebstream($relationAlias = '') Adds a INNER JOIN clause to the query using the CcWebstream relation
|
||||
*
|
||||
* @method CcShowStampQuery leftJoinCcBlock($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcBlock relation
|
||||
* @method CcShowStampQuery rightJoinCcBlock($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcBlock relation
|
||||
* @method CcShowStampQuery innerJoinCcBlock($relationAlias = '') Adds a INNER JOIN clause to the query using the CcBlock relation
|
||||
*
|
||||
* @method CcShowStampQuery leftJoinCcPlaylist($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlaylist relation
|
||||
* @method CcShowStampQuery rightJoinCcPlaylist($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlaylist relation
|
||||
* @method CcShowStampQuery innerJoinCcPlaylist($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlaylist relation
|
||||
*
|
||||
* @method CcShowStamp findOne(PropelPDO $con = null) Return the first CcShowStamp matching the query
|
||||
* @method CcShowStamp findOneOrCreate(PropelPDO $con = null) Return the first CcShowStamp matching the query, or a new CcShowStamp object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method CcShowStamp findOneByDbId(int $id) Return the first CcShowStamp filtered by the id column
|
||||
* @method CcShowStamp findOneByDbShowId(int $show_id) Return the first CcShowStamp filtered by the show_id column
|
||||
* @method CcShowStamp findOneByDbInstanceId(int $instance_id) Return the first CcShowStamp filtered by the instance_id column
|
||||
* @method CcShowStamp findOneByDbFileId(int $file_id) Return the first CcShowStamp filtered by the file_id column
|
||||
* @method CcShowStamp findOneByDbStreamId(int $stream_id) Return the first CcShowStamp filtered by the stream_id column
|
||||
* @method CcShowStamp findOneByDbBlockId(int $block_id) Return the first CcShowStamp filtered by the block_id column
|
||||
* @method CcShowStamp findOneByDbPlaylistId(int $playlist_id) Return the first CcShowStamp filtered by the playlist_id column
|
||||
* @method CcShowStamp findOneByDbPosition(int $position) Return the first CcShowStamp filtered by the position column
|
||||
* @method CcShowStamp findOneByDbClipLength(string $clip_length) Return the first CcShowStamp filtered by the clip_length column
|
||||
* @method CcShowStamp findOneByDbCueIn(string $cue_in) Return the first CcShowStamp filtered by the cue_in column
|
||||
* @method CcShowStamp findOneByDbCueOut(string $cue_out) Return the first CcShowStamp filtered by the cue_out column
|
||||
* @method CcShowStamp findOneByDbFadeIn(string $fade_in) Return the first CcShowStamp filtered by the fade_in column
|
||||
* @method CcShowStamp findOneByDbFadeOut(string $fade_out) Return the first CcShowStamp filtered by the fade_out column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcShowStamp objects filtered by the id column
|
||||
* @method array findByDbShowId(int $show_id) Return CcShowStamp objects filtered by the show_id column
|
||||
* @method array findByDbInstanceId(int $instance_id) Return CcShowStamp objects filtered by the instance_id column
|
||||
* @method array findByDbFileId(int $file_id) Return CcShowStamp objects filtered by the file_id column
|
||||
* @method array findByDbStreamId(int $stream_id) Return CcShowStamp objects filtered by the stream_id column
|
||||
* @method array findByDbBlockId(int $block_id) Return CcShowStamp objects filtered by the block_id column
|
||||
* @method array findByDbPlaylistId(int $playlist_id) Return CcShowStamp objects filtered by the playlist_id column
|
||||
* @method array findByDbPosition(int $position) Return CcShowStamp objects filtered by the position column
|
||||
* @method array findByDbClipLength(string $clip_length) Return CcShowStamp objects filtered by the clip_length column
|
||||
* @method array findByDbCueIn(string $cue_in) Return CcShowStamp objects filtered by the cue_in column
|
||||
* @method array findByDbCueOut(string $cue_out) Return CcShowStamp objects filtered by the cue_out column
|
||||
* @method array findByDbFadeIn(string $fade_in) Return CcShowStamp objects filtered by the fade_in column
|
||||
* @method array findByDbFadeOut(string $fade_out) Return CcShowStamp objects filtered by the fade_out column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
abstract class BaseCcShowStampQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of BaseCcShowStampQuery object.
|
||||
*
|
||||
* @param string $dbName The dabase name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'airtime', $modelName = 'CcShowStamp', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new CcShowStampQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return CcShowStampQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof CcShowStampQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new CcShowStampQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key
|
||||
* Use instance pooling to avoid a database query if the object exists
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param PropelPDO $con an optional connection object
|
||||
*
|
||||
* @return CcShowStamp|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ((null !== ($obj = CcShowStampPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
|
||||
// the object is alredy in the instance pool
|
||||
return $obj;
|
||||
} else {
|
||||
// the object has not been requested yet, or the formatter is not an object formatter
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$stmt = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->getSelectStatement($con);
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param PropelPDO $con an optional connection object
|
||||
*
|
||||
* @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
return $this
|
||||
->filterByPrimaryKeys($keys)
|
||||
->find($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
return $this->addUsingAlias(CcShowStampPeer::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
return $this->addUsingAlias(CcShowStampPeer::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* @param int|array $dbId 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbId($dbId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbId) && null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::ID, $dbId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the show_id column
|
||||
*
|
||||
* @param int|array $dbShowId 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbShowId($dbShowId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbShowId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbShowId['min'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::SHOW_ID, $dbShowId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbShowId['max'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::SHOW_ID, $dbShowId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::SHOW_ID, $dbShowId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the instance_id column
|
||||
*
|
||||
* @param int|array $dbInstanceId 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbInstanceId($dbInstanceId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbInstanceId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbInstanceId['min'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbInstanceId['max'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::INSTANCE_ID, $dbInstanceId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the file_id column
|
||||
*
|
||||
* @param int|array $dbFileId 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbFileId($dbFileId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbFileId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbFileId['min'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbFileId['max'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::FILE_ID, $dbFileId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the stream_id column
|
||||
*
|
||||
* @param int|array $dbStreamId 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbStreamId($dbStreamId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbStreamId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbStreamId['min'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::STREAM_ID, $dbStreamId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbStreamId['max'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::STREAM_ID, $dbStreamId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::STREAM_ID, $dbStreamId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the block_id column
|
||||
*
|
||||
* @param int|array $dbBlockId 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbBlockId($dbBlockId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbBlockId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbBlockId['min'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::BLOCK_ID, $dbBlockId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbBlockId['max'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::BLOCK_ID, $dbBlockId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::BLOCK_ID, $dbBlockId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the playlist_id column
|
||||
*
|
||||
* @param int|array $dbPlaylistId 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbPlaylistId($dbPlaylistId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbPlaylistId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbPlaylistId['min'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::PLAYLIST_ID, $dbPlaylistId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbPlaylistId['max'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::PLAYLIST_ID, $dbPlaylistId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::PLAYLIST_ID, $dbPlaylistId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* @param int|array $dbPosition 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbPosition($dbPosition = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbPosition)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbPosition['min'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbPosition['max'])) {
|
||||
$this->addUsingAlias(CcShowStampPeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::POSITION, $dbPosition, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the clip_length column
|
||||
*
|
||||
* @param string $dbClipLength 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbClipLength($dbClipLength = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbClipLength)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbClipLength)) {
|
||||
$dbClipLength = str_replace('*', '%', $dbClipLength);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::CLIP_LENGTH, $dbClipLength, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the cue_in column
|
||||
*
|
||||
* @param string $dbCueIn 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCueIn($dbCueIn = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbCueIn)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbCueIn)) {
|
||||
$dbCueIn = str_replace('*', '%', $dbCueIn);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::CUE_IN, $dbCueIn, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the cue_out column
|
||||
*
|
||||
* @param string $dbCueOut 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCueOut($dbCueOut = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbCueOut)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbCueOut)) {
|
||||
$dbCueOut = str_replace('*', '%', $dbCueOut);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::CUE_OUT, $dbCueOut, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the fade_in column
|
||||
*
|
||||
* @param string $dbFadeIn 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbFadeIn($dbFadeIn = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbFadeIn)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbFadeIn)) {
|
||||
$dbFadeIn = str_replace('*', '%', $dbFadeIn);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::FADE_IN, $dbFadeIn, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the fade_out column
|
||||
*
|
||||
* @param string $dbFadeOut 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 CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbFadeOut($dbFadeOut = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbFadeOut)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbFadeOut)) {
|
||||
$dbFadeOut = str_replace('*', '%', $dbFadeOut);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcShowStampPeer::FADE_OUT, $dbFadeOut, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcShow object
|
||||
*
|
||||
* @param CcShow $ccShow the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcShow($ccShow, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowStampPeer::SHOW_ID, $ccShow->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcShow relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcShow($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcShow');
|
||||
|
||||
// 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, 'CcShow');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcShow relation CcShow 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 CcShowQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcShowQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcShow($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcShowInstances object
|
||||
*
|
||||
* @param CcShowInstances $ccShowInstances the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcShowInstances($ccShowInstances, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowStampPeer::INSTANCE_ID, $ccShowInstances->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcShowInstances relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcShowInstances($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcShowInstances');
|
||||
|
||||
// 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, 'CcShowInstances');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcShowInstances relation CcShowInstances 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 CcShowInstancesQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcShowInstancesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcShowInstances($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcShowInstances', 'CcShowInstancesQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcFiles object
|
||||
*
|
||||
* @param CcFiles $ccFiles the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcFiles($ccFiles, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowStampPeer::FILE_ID, $ccFiles->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcFiles relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcFiles($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcFiles');
|
||||
|
||||
// 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, 'CcFiles');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcFiles relation CcFiles 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 CcFilesQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcFiles($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcWebstream object
|
||||
*
|
||||
* @param CcWebstream $ccWebstream the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcWebstream($ccWebstream, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowStampPeer::STREAM_ID, $ccWebstream->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcWebstream relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcWebstream($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcWebstream');
|
||||
|
||||
// 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, 'CcWebstream');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcWebstream relation CcWebstream 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 CcWebstreamQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcWebstreamQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcWebstream($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcWebstream', 'CcWebstreamQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcBlock object
|
||||
*
|
||||
* @param CcBlock $ccBlock the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcBlock($ccBlock, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowStampPeer::BLOCK_ID, $ccBlock->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcBlock relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcBlock($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcBlock');
|
||||
|
||||
// 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, 'CcBlock');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcBlock relation CcBlock 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 CcBlockQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcBlockQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcBlock($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcBlock', 'CcBlockQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcPlaylist object
|
||||
*
|
||||
* @param CcPlaylist $ccPlaylist the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcPlaylist($ccPlaylist, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcShowStampPeer::PLAYLIST_ID, $ccPlaylist->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcPlaylist relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcPlaylist($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcPlaylist');
|
||||
|
||||
// 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, 'CcPlaylist');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcPlaylist relation CcPlaylist 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 CcPlaylistQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcPlaylistQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcPlaylist($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcPlaylist', 'CcPlaylistQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param CcShowStamp $ccShowStamp Object to remove from the list of results
|
||||
*
|
||||
* @return CcShowStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($ccShowStamp = null)
|
||||
{
|
||||
if ($ccShowStamp) {
|
||||
$this->addUsingAlias(CcShowStampPeer::ID, $ccShowStamp->getDbId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
} // BaseCcShowStampQuery
|
|
@ -42,6 +42,12 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $instance_id;
|
||||
|
||||
/**
|
||||
* The value for the linked field.
|
||||
* @var boolean
|
||||
*/
|
||||
protected $linked;
|
||||
|
||||
/**
|
||||
* @var CcShow
|
||||
*/
|
||||
|
@ -101,6 +107,16 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
return $this->instance_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [linked] column value.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDbLinked()
|
||||
{
|
||||
return $this->linked;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
|
@ -169,6 +185,26 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbInstanceId()
|
||||
|
||||
/**
|
||||
* Set the value of [linked] column.
|
||||
*
|
||||
* @param boolean $v new value
|
||||
* @return CcStamp The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbLinked($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (boolean) $v;
|
||||
}
|
||||
|
||||
if ($this->linked !== $v) {
|
||||
$this->linked = $v;
|
||||
$this->modifiedColumns[] = CcStampPeer::LINKED;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbLinked()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
|
@ -204,6 +240,7 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
||||
$this->show_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
|
||||
$this->instance_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
|
||||
$this->linked = ($row[$startcol + 3] !== null) ? (boolean) $row[$startcol + 3] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -212,7 +249,7 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 3; // 3 = CcStampPeer::NUM_COLUMNS - CcStampPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 4; // 4 = CcStampPeer::NUM_COLUMNS - CcStampPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcStamp object", $e);
|
||||
|
@ -583,6 +620,9 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
case 2:
|
||||
return $this->getDbInstanceId();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getDbLinked();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -610,6 +650,7 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
$keys[0] => $this->getDbId(),
|
||||
$keys[1] => $this->getDbShowId(),
|
||||
$keys[2] => $this->getDbInstanceId(),
|
||||
$keys[3] => $this->getDbLinked(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcShow) {
|
||||
|
@ -658,6 +699,9 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
case 2:
|
||||
$this->setDbInstanceId($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setDbLinked($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -685,6 +729,7 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbShowId($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbInstanceId($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbLinked($arr[$keys[3]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -699,6 +744,7 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcStampPeer::ID)) $criteria->add(CcStampPeer::ID, $this->id);
|
||||
if ($this->isColumnModified(CcStampPeer::SHOW_ID)) $criteria->add(CcStampPeer::SHOW_ID, $this->show_id);
|
||||
if ($this->isColumnModified(CcStampPeer::INSTANCE_ID)) $criteria->add(CcStampPeer::INSTANCE_ID, $this->instance_id);
|
||||
if ($this->isColumnModified(CcStampPeer::LINKED)) $criteria->add(CcStampPeer::LINKED, $this->linked);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -762,6 +808,7 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
{
|
||||
$copyObj->setDbShowId($this->show_id);
|
||||
$copyObj->setDbInstanceId($this->instance_id);
|
||||
$copyObj->setDbLinked($this->linked);
|
||||
|
||||
if ($deepCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -1134,6 +1181,7 @@ abstract class BaseCcStamp extends BaseObject implements Persistent
|
|||
$this->id = null;
|
||||
$this->show_id = null;
|
||||
$this->instance_id = null;
|
||||
$this->linked = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->clearAllReferences();
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcStampPeer {
|
|||
const TM_CLASS = 'CcStampTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 3;
|
||||
const NUM_COLUMNS = 4;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -40,6 +40,9 @@ abstract class BaseCcStampPeer {
|
|||
/** the column name for the INSTANCE_ID field */
|
||||
const INSTANCE_ID = 'cc_stamp.INSTANCE_ID';
|
||||
|
||||
/** the column name for the LINKED field */
|
||||
const LINKED = 'cc_stamp.LINKED';
|
||||
|
||||
/**
|
||||
* An identiy map to hold any loaded instances of CcStamp objects.
|
||||
* This must be public so that other peer classes can access this when hydrating from JOIN
|
||||
|
@ -56,12 +59,12 @@ abstract class BaseCcStampPeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbShowId', 'DbInstanceId', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbShowId', 'dbInstanceId', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::SHOW_ID, self::INSTANCE_ID, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'SHOW_ID', 'INSTANCE_ID', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'show_id', 'instance_id', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbShowId', 'DbInstanceId', 'DbLinked', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbShowId', 'dbInstanceId', 'dbLinked', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::SHOW_ID, self::INSTANCE_ID, self::LINKED, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'SHOW_ID', 'INSTANCE_ID', 'LINKED', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'show_id', 'instance_id', 'linked', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -71,12 +74,12 @@ abstract class BaseCcStampPeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbShowId' => 1, 'DbInstanceId' => 2, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbShowId' => 1, 'dbInstanceId' => 2, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::SHOW_ID => 1, self::INSTANCE_ID => 2, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'SHOW_ID' => 1, 'INSTANCE_ID' => 2, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'show_id' => 1, 'instance_id' => 2, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbShowId' => 1, 'DbInstanceId' => 2, 'DbLinked' => 3, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbShowId' => 1, 'dbInstanceId' => 2, 'dbLinked' => 3, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::SHOW_ID => 1, self::INSTANCE_ID => 2, self::LINKED => 3, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'SHOW_ID' => 1, 'INSTANCE_ID' => 2, 'LINKED' => 3, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'show_id' => 1, 'instance_id' => 2, 'linked' => 3, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -151,10 +154,12 @@ abstract class BaseCcStampPeer {
|
|||
$criteria->addSelectColumn(CcStampPeer::ID);
|
||||
$criteria->addSelectColumn(CcStampPeer::SHOW_ID);
|
||||
$criteria->addSelectColumn(CcStampPeer::INSTANCE_ID);
|
||||
$criteria->addSelectColumn(CcStampPeer::LINKED);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.SHOW_ID');
|
||||
$criteria->addSelectColumn($alias . '.INSTANCE_ID');
|
||||
$criteria->addSelectColumn($alias . '.LINKED');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
* @method CcStampQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method CcStampQuery orderByDbShowId($order = Criteria::ASC) Order by the show_id column
|
||||
* @method CcStampQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column
|
||||
* @method CcStampQuery orderByDbLinked($order = Criteria::ASC) Order by the linked column
|
||||
*
|
||||
* @method CcStampQuery groupByDbId() Group by the id column
|
||||
* @method CcStampQuery groupByDbShowId() Group by the show_id column
|
||||
* @method CcStampQuery groupByDbInstanceId() Group by the instance_id column
|
||||
* @method CcStampQuery groupByDbLinked() Group by the linked column
|
||||
*
|
||||
* @method CcStampQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcStampQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
|
@ -36,10 +38,12 @@
|
|||
* @method CcStamp findOneByDbId(int $id) Return the first CcStamp filtered by the id column
|
||||
* @method CcStamp findOneByDbShowId(int $show_id) Return the first CcStamp filtered by the show_id column
|
||||
* @method CcStamp findOneByDbInstanceId(int $instance_id) Return the first CcStamp filtered by the instance_id column
|
||||
* @method CcStamp findOneByDbLinked(boolean $linked) Return the first CcStamp filtered by the linked column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcStamp objects filtered by the id column
|
||||
* @method array findByDbShowId(int $show_id) Return CcStamp objects filtered by the show_id column
|
||||
* @method array findByDbInstanceId(int $instance_id) Return CcStamp objects filtered by the instance_id column
|
||||
* @method array findByDbLinked(boolean $linked) Return CcStamp objects filtered by the linked column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
|
@ -228,6 +232,23 @@ abstract class BaseCcStampQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcStampPeer::INSTANCE_ID, $dbInstanceId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the linked column
|
||||
*
|
||||
* @param boolean|string $dbLinked 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 CcStampQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbLinked($dbLinked = null, $comparison = null)
|
||||
{
|
||||
if (is_string($dbLinked)) {
|
||||
$linked = in_array(strtolower($dbLinked), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
|
||||
}
|
||||
return $this->addUsingAlias(CcStampPeer::LINKED, $dbLinked, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcShow object
|
||||
*
|
||||
|
|
|
@ -15,7 +15,7 @@ class Application_Service_SchedulerService
|
|||
|
||||
private $epochNow;
|
||||
private $nowDT;
|
||||
private $user;
|
||||
private $currentUser;
|
||||
private $checkUserPermissions = true;
|
||||
|
||||
public function __construct()
|
||||
|
@ -36,7 +36,7 @@ class Application_Service_SchedulerService
|
|||
}
|
||||
|
||||
$user_service = new Application_Service_UserService();
|
||||
$this->user = $user_service->getCurrentUser();
|
||||
$this->currentUser = $user_service->getCurrentUser();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,12 +63,16 @@ class Application_Service_SchedulerService
|
|||
|
||||
$diff = $showStartsEpoch - $scheduleStartsEpoch;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "UPDATE cc_schedule "
|
||||
."SET starts = starts + INTERVAL '$diff sec', "
|
||||
."ends = ends + INTERVAL '$diff sec' "
|
||||
."WHERE instance_id IN ($showIdList)";
|
||||
$con->exec($sql);
|
||||
$ccSchedules = CcScheduleQuery::create()
|
||||
->filterByDbInstanceId($instanceIds, Criteria::IN)
|
||||
->find();
|
||||
foreach ($ccSchedules as $ccSchedule) {
|
||||
$ccSchedule
|
||||
->setDbStarts($ccSchedule->getDbStarts() + $diff)
|
||||
->setDbEnds($ccSchedule->getDbEnds() + $diff)
|
||||
->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,4 +135,268 @@ class Application_Service_SchedulerService
|
|||
|
||||
return $dt;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @param array $scheduleItems (schedule_id and instance_id it belongs to)
|
||||
* @param array $mediaItems (file|block|playlist|webstream)
|
||||
* @param $adjustSched
|
||||
*/
|
||||
public function scheduleAdd($scheduleItems, $mediaItems, $adjustSched=true)
|
||||
{
|
||||
$this->con->beginTransaction();
|
||||
|
||||
$filesToInsert = array();
|
||||
|
||||
try {
|
||||
$this->validateRequest($scheduleItems);
|
||||
|
||||
/*
|
||||
* create array of arrays
|
||||
* array of schedule item info
|
||||
* (sched_id is the cc_schedule id and is set if an item is being
|
||||
* moved because it is already in cc_schedule)
|
||||
* [0] = Array(
|
||||
* id => 1,
|
||||
* cliplength => 00:04:32,
|
||||
* cuein => 00:00:00,
|
||||
* cueout => 00:04:32,
|
||||
* fadein => 00.5,
|
||||
* fadeout => 00.5,
|
||||
* sched_id => ,
|
||||
* type => 0)
|
||||
* [1] = Array(
|
||||
* id => 2,
|
||||
* cliplength => 00:05:07,
|
||||
* cuein => 00:00:00,
|
||||
* cueout => 00:05:07,
|
||||
* fadein => 00.5,
|
||||
* fadeout => 00.5,
|
||||
* sched_id => ,
|
||||
* type => 0)
|
||||
*/
|
||||
foreach ($mediaItems as $media) {
|
||||
$filesToInsert = array_merge($filesToInsert, $this->retrieveMediaFiles($media["id"], $media["type"]));
|
||||
}
|
||||
|
||||
//$this->insertAfter($scheduleItems, $filesToInsert, $adjustSched);
|
||||
$ccStamp = $this->prepareStamp($scheduleItems, $mediaItems, $adjustSched);
|
||||
|
||||
$this->insertStamp($ccStamp);
|
||||
|
||||
//keep track of which shows had their schedule change
|
||||
//dont forget about the linked shows
|
||||
|
||||
$this->con->commit();
|
||||
|
||||
Application_Model_RabbitMq::PushSchedule();
|
||||
} catch (Exception $e) {
|
||||
$this->con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
private function setCcStamp($ccStamp, $instanceId)
|
||||
{
|
||||
$ccShowInstance = CcShowInstancesQuery::create()->findPk($instanceId);
|
||||
$ccShow = $ccShowInstance->getCcShow();
|
||||
if ($ccShow->isLinked()) {
|
||||
$ccStamp
|
||||
->setDbLinked(true)
|
||||
->setDbShowId($ccShow->getDbId())
|
||||
->save();
|
||||
} else {
|
||||
$ccStamp
|
||||
->setDbLinked(false)
|
||||
->setDbInstanceId($ccShowInstance->getDbId())
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @param $scheduleItems
|
||||
* cc_schedule items, where the items get inserted after
|
||||
* @param $filesToInsert
|
||||
* array of schedule item info, what gets inserted into cc_schedule
|
||||
* @param $adjustSched
|
||||
*/
|
||||
private function prepareStamp($scheduleItems, $itemsToInsert, $adjustSched = true)
|
||||
{
|
||||
try {
|
||||
|
||||
foreach ($scheduleItems as $schedule) {
|
||||
$id = intval($schedule["id"]);
|
||||
|
||||
if ($id == 0) {
|
||||
//if we get here, we know the show is empty and therefore
|
||||
//need to create a new stamp
|
||||
$pos = 0;
|
||||
$ccStamp = new CcStamp();
|
||||
$this->setCcStamp($ccStamp, $schedule["instance"]);
|
||||
} else {
|
||||
$ccStamp = $this->getStamp($id);
|
||||
//get the cc_stamp_contents item of the scheduleItem($schedule)
|
||||
//this is where we are inserting after so we have to start the
|
||||
//position counter after it
|
||||
$ccStampContent = $this->getCurrentStampItem($id);
|
||||
$pos = $ccStampContent->getDbPosition() + 1;
|
||||
|
||||
//clear the positions of stamp items after the current
|
||||
//item so we know we have to reassign their positions
|
||||
//after inserting the new items
|
||||
CcStampContentsQuery::create()
|
||||
->filterByDbStampId($ccStamp->getDbId())
|
||||
->filterByDbPosition($pos, Criteria::GREATER_EQUAL)
|
||||
->setDbPosition(null)
|
||||
->save();
|
||||
}
|
||||
|
||||
$stampId = $ccStamp->getDbId();
|
||||
foreach ($itemsToInsert as $item) {
|
||||
$ccStampContent = new CcStampContents();
|
||||
$ccStampContent
|
||||
->setDbStampId($stampId)
|
||||
->setDbPosition($pos)
|
||||
->save();
|
||||
switch ($item["type"]) {
|
||||
case "playlist":
|
||||
$ccStampContent->setDbPlaylistId($item["id"])->save();
|
||||
break;
|
||||
case "audioclip":
|
||||
$ccStampContent->setDbFileId($item["id"])->save();
|
||||
|
||||
//update is_scheduled flag in cc_files
|
||||
$ccFile = CcFilesQuery::create()->findPk($item['id']);
|
||||
$ccFile->setDbIsScheduled(true)->save();
|
||||
break;
|
||||
case "block":
|
||||
$ccStampContent->setDbBlockId($item["id"])->save();
|
||||
break;
|
||||
case "stream":
|
||||
$ccStampContent->setDbStreamId($item["id"])->save();
|
||||
break;
|
||||
}
|
||||
$pos++;
|
||||
}
|
||||
|
||||
//reassign positions
|
||||
$ccStampContents = CcStampContentsQuery::create()
|
||||
->filterByDbStampId($stampId)
|
||||
->filterByDbPosition(null)
|
||||
->find();
|
||||
foreach ($ccStampContents as $ccStampContent) {
|
||||
$ccStampContent->setDbPosition($pos)->save();
|
||||
$pos++;
|
||||
}
|
||||
|
||||
return $ccStamp;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
Logging::debug($e->getMessage());
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
private function insertStamp($ccStamp)
|
||||
{
|
||||
//delete cc_schedule entries
|
||||
//CcScheduleQuery::create()->filterByDbStampId($ccStamp->getDbId())->delete();
|
||||
}
|
||||
|
||||
private function getStamp($scheduleId)
|
||||
{
|
||||
$ccSchedule = CcScheduleQuery::create()->findPk($scheduleId);
|
||||
return CcStamp::create()->findPk($ccSchedule->getDbStampId());
|
||||
}
|
||||
|
||||
private function getCurrentStampItem($scheduleId)
|
||||
{
|
||||
$ccSchedule = CcScheduleQuery::create()->findPk($scheduleId);
|
||||
return CcStampContents::create()->findPk($ccSchedule->getDbStampContentsId());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @param array $items (schedule_id and instance_id it belongs to)
|
||||
*/
|
||||
private function validateRequest($items)
|
||||
{
|
||||
$nowEpoch = floatval($this->nowDT->format("U.u"));
|
||||
|
||||
for ($i = 0; $i < count($items); $i++) {
|
||||
$id = $items[$i]["id"];
|
||||
|
||||
//could be added to the beginning of a show, which sends id = 0;
|
||||
if ($id > 0) {
|
||||
//schedule_id of where we are inserting after?
|
||||
$schedInfo[$id] = $items[$i]["instance"];
|
||||
}
|
||||
|
||||
//what is timestamp for?
|
||||
//format is instance_id => timestamp
|
||||
$instanceInfo[$items[$i]["instance"]] = $items[$i]["timestamp"];
|
||||
}
|
||||
|
||||
if (count($instanceInfo) === 0) {
|
||||
throw new Exception("Invalid Request.");
|
||||
}
|
||||
|
||||
$schedIds = array();
|
||||
if (isset($schedInfo)) {
|
||||
$schedIds = array_keys($schedInfo);
|
||||
}
|
||||
$schedItems = CcScheduleQuery::create()->findPKs($schedIds, $this->con);
|
||||
$instanceIds = array_keys($instanceInfo);
|
||||
$showInstances = CcShowInstancesQuery::create()->findPKs($instanceIds, $this->con);
|
||||
|
||||
//an item has been deleted
|
||||
if (count($schedIds) !== count($schedItems)) {
|
||||
throw new OutDatedScheduleException(_("The schedule you're viewing is out of date! (sched mismatch)"));
|
||||
}
|
||||
|
||||
//a show has been deleted
|
||||
if (count($instanceIds) !== count($showInstances)) {
|
||||
throw new OutDatedScheduleException(_("The schedule you're viewing is out of date! (instance mismatch)"));
|
||||
}
|
||||
|
||||
foreach ($schedItems as $schedItem) {
|
||||
$id = $schedItem->getDbId();
|
||||
$instance = $schedItem->getCcShowInstances($this->con);
|
||||
|
||||
if (intval($schedInfo[$id]) !== $instance->getDbId()) {
|
||||
throw new OutDatedScheduleException(_("The schedule you're viewing is out of date!"));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($showInstances as $instance) {
|
||||
|
||||
$id = $instance->getDbId();
|
||||
$show = $instance->getCcShow($this->con);
|
||||
|
||||
if ($this->checkUserPermissions && $this->user->canSchedule($show->getDbId()) === false) {
|
||||
throw new Exception(sprintf(_("You are not allowed to schedule show %s."), $show->getDbName()));
|
||||
}
|
||||
|
||||
if ($instance->getDbRecord()) {
|
||||
throw new Exception(_("You cannot add files to recording shows."));
|
||||
}
|
||||
|
||||
$showEndEpoch = floatval($instance->getDbEnds("U.u"));
|
||||
|
||||
if ($showEndEpoch < $nowEpoch) {
|
||||
throw new OutDatedScheduleException(sprintf(_("The show %s is over and cannot be scheduled."), $show->getDbName()));
|
||||
}
|
||||
|
||||
$ts = intval($instanceInfo[$id]);
|
||||
$lastSchedTs = intval($instance->getDbLastScheduled("U")) ? : 0;
|
||||
if ($ts < $lastSchedTs) {
|
||||
Logging::info("ts {$ts} last sched {$lastSchedTs}");
|
||||
throw new OutDatedScheduleException(sprintf(_("The show %s has been previously updated!"), $show->getDbName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -328,6 +328,7 @@
|
|||
broadcasted = 1)
|
||||
-->
|
||||
<column name="stamp_id" phpName="DbStampId" type="INTEGER" required="true" default="0" />
|
||||
<column name="stamp_content_id" phpName="DbStampContentId" type="INTEGER" required="true" default="0" />
|
||||
<!-- This foreign key is still useful even though it may seem we don't ever delete cc_show_instances anymore.
|
||||
We will do delete them in some cases (when editing a show and changing the repeating days of the week
|
||||
for example. \
|
||||
|
@ -484,7 +485,7 @@
|
|||
<column name="stream_id" phpName="DbStreamId" type="INTEGER" required="false" />
|
||||
<column name="block_id" phpName="DbBlockId" type="INTEGER" required="false" />
|
||||
<column name="playlist_id" phpName="DbPlaylistId" type="INTEGER" required="false" />
|
||||
<column name="position" phpName="DbPosition" type="INTEGER" required="true" />
|
||||
<column name="position" phpName="DbPosition" type="INTEGER" required="false" />
|
||||
<column name="clip_length" phpName="DbClipLength" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00" />
|
||||
<column name="cue_in" phpName="DbCueIn" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00" />
|
||||
<column name="cue_out" phpName="DbCueOut" type="VARCHAR" sqlType="interval" required="false" defaultValue="00:00:00" />
|
||||
|
@ -510,6 +511,7 @@
|
|||
<column name="id" phpName="DbId" primaryKey="true" type="INTEGER" autoIncrement="true" required="true" />
|
||||
<column name="show_id" phpName="DbShowId" type="INTEGER" required="true" />
|
||||
<column name="instance_id" phpName="DbInstanceId" type="INTEGER" required="false" />
|
||||
<column name="linked" phpName="DbLinked" type="BOOLEAN" required="true" />
|
||||
<foreign-key foreignTable="cc_show" name="cc_stamp_show_id_fkey" onDelete="CASCADE">
|
||||
<reference local="show_id" foreign="id" />
|
||||
</foreign-key>
|
||||
|
|
|
@ -428,6 +428,7 @@ CREATE TABLE "cc_schedule"
|
|||
"playout_status" INT2 default 1 NOT NULL,
|
||||
"broadcasted" INT2 default 0 NOT NULL,
|
||||
"stamp_id" INTEGER default 0 NOT NULL,
|
||||
"stamp_content_id" INTEGER default 0 NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -765,7 +766,7 @@ CREATE TABLE "cc_stamp_contents"
|
|||
"stream_id" INTEGER,
|
||||
"block_id" INTEGER,
|
||||
"playlist_id" INTEGER,
|
||||
"position" INTEGER NOT NULL,
|
||||
"position" INTEGER,
|
||||
"clip_length" interval default '00:00:00',
|
||||
"cue_in" interval default '00:00:00',
|
||||
"cue_out" interval default '00:00:00',
|
||||
|
@ -790,6 +791,7 @@ CREATE TABLE "cc_stamp"
|
|||
"id" serial NOT NULL,
|
||||
"show_id" INTEGER NOT NULL,
|
||||
"instance_id" INTEGER,
|
||||
"linked" BOOLEAN NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue