+ * $obj = $c->findPk(12, $con);
+ *
+ * @param mixed $key Primary key to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return CcBlock|array|mixed the result, formatted by the current formatter
+ */
+ public function findPk($key, $con = null)
+ {
+ if ((null !== ($obj = CcBlockPeer::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
+ *
+ * $objs = $c->findPks(array(12, 56, 832), $con);
+ *
+ * @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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKey($key)
+ {
+ return $this->addUsingAlias(CcBlockPeer::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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKeys($keys)
+ {
+ return $this->addUsingAlias(CcBlockPeer::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 CcBlockQuery 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(CcBlockPeer::ID, $dbId, $comparison);
+ }
+
+ /**
+ * Filter the query on the name column
+ *
+ * @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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByDbName($dbName = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbName)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbName)) {
+ $dbName = str_replace('*', '%', $dbName);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcBlockPeer::NAME, $dbName, $comparison);
+ }
+
+ /**
+ * Filter the query on the mtime column
+ *
+ * @param string|array $dbMtime 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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByDbMtime($dbMtime = null, $comparison = null)
+ {
+ if (is_array($dbMtime)) {
+ $useMinMax = false;
+ if (isset($dbMtime['min'])) {
+ $this->addUsingAlias(CcBlockPeer::MTIME, $dbMtime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbMtime['max'])) {
+ $this->addUsingAlias(CcBlockPeer::MTIME, $dbMtime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockPeer::MTIME, $dbMtime, $comparison);
+ }
+
+ /**
+ * Filter the query on the utime column
+ *
+ * @param string|array $dbUtime 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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByDbUtime($dbUtime = null, $comparison = null)
+ {
+ if (is_array($dbUtime)) {
+ $useMinMax = false;
+ if (isset($dbUtime['min'])) {
+ $this->addUsingAlias(CcBlockPeer::UTIME, $dbUtime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbUtime['max'])) {
+ $this->addUsingAlias(CcBlockPeer::UTIME, $dbUtime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockPeer::UTIME, $dbUtime, $comparison);
+ }
+
+ /**
+ * Filter the query on the creator_id column
+ *
+ * @param int|array $dbCreatorId 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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByDbCreatorId($dbCreatorId = null, $comparison = null)
+ {
+ if (is_array($dbCreatorId)) {
+ $useMinMax = false;
+ if (isset($dbCreatorId['min'])) {
+ $this->addUsingAlias(CcBlockPeer::CREATOR_ID, $dbCreatorId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbCreatorId['max'])) {
+ $this->addUsingAlias(CcBlockPeer::CREATOR_ID, $dbCreatorId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockPeer::CREATOR_ID, $dbCreatorId, $comparison);
+ }
+
+ /**
+ * Filter the query on the description column
+ *
+ * @param string $dbDescription 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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByDbDescription($dbDescription = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbDescription)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbDescription)) {
+ $dbDescription = str_replace('*', '%', $dbDescription);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcBlockPeer::DESCRIPTION, $dbDescription, $comparison);
+ }
+
+ /**
+ * Filter the query on the length column
+ *
+ * @param string $dbLength 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 CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByDbLength($dbLength = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbLength)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbLength)) {
+ $dbLength = str_replace('*', '%', $dbLength);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcBlockPeer::LENGTH, $dbLength, $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 CcBlockQuery 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(CcBlockPeer::TYPE, $dbType, $comparison);
+ }
+
+ /**
+ * Filter the query by a related CcSubjs object
+ *
+ * @param CcSubjs $ccSubjs the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByCcSubjs($ccSubjs, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcBlockPeer::CREATOR_ID, $ccSubjs->getDbId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcSubjs relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function joinCcSubjs($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcSubjs');
+
+ // 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, 'CcSubjs');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcSubjs relation CcSubjs 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 CcSubjsQuery A secondary query class using the current class as primary query
+ */
+ public function useCcSubjsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcSubjs($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
+ }
+
+ /**
+ * Filter the query by a related CcPlaylistcontents object
+ *
+ * @param CcPlaylistcontents $ccPlaylistcontents the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByCcPlaylistcontents($ccPlaylistcontents, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcBlockPeer::ID, $ccPlaylistcontents->getDbBlockId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcPlaylistcontents relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function joinCcPlaylistcontents($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcPlaylistcontents');
+
+ // 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, 'CcPlaylistcontents');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcPlaylistcontents relation CcPlaylistcontents 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 CcPlaylistcontentsQuery A secondary query class using the current class as primary query
+ */
+ public function useCcPlaylistcontentsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcPlaylistcontents($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcPlaylistcontents', 'CcPlaylistcontentsQuery');
+ }
+
+ /**
+ * Filter the query by a related CcBlockcontents object
+ *
+ * @param CcBlockcontents $ccBlockcontents the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByCcBlockcontents($ccBlockcontents, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcBlockPeer::ID, $ccBlockcontents->getDbBlockId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcBlockcontents relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function joinCcBlockcontents($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcBlockcontents');
+
+ // 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, 'CcBlockcontents');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcBlockcontents relation CcBlockcontents 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 CcBlockcontentsQuery A secondary query class using the current class as primary query
+ */
+ public function useCcBlockcontentsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcBlockcontents($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcBlockcontents', 'CcBlockcontentsQuery');
+ }
+
+ /**
+ * Filter the query by a related CcBlockcriteria object
+ *
+ * @param CcBlockcriteria $ccBlockcriteria the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function filterByCcBlockcriteria($ccBlockcriteria, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcBlockPeer::ID, $ccBlockcriteria->getDbBlockId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcBlockcriteria relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function joinCcBlockcriteria($relationAlias = '', $joinType = Criteria::INNER_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcBlockcriteria');
+
+ // 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, 'CcBlockcriteria');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcBlockcriteria relation CcBlockcriteria 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 CcBlockcriteriaQuery A secondary query class using the current class as primary query
+ */
+ public function useCcBlockcriteriaQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
+ {
+ return $this
+ ->joinCcBlockcriteria($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcBlockcriteria', 'CcBlockcriteriaQuery');
+ }
+
+ /**
+ * Exclude object from result
+ *
+ * @param CcBlock $ccBlock Object to remove from the list of results
+ *
+ * @return CcBlockQuery The current query, for fluid interface
+ */
+ public function prune($ccBlock = null)
+ {
+ if ($ccBlock) {
+ $this->addUsingAlias(CcBlockPeer::ID, $ccBlock->getDbId(), Criteria::NOT_EQUAL);
+ }
+
+ return $this;
+ }
+
+} // BaseCcBlockQuery
diff --git a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylistcontents.php b/airtime_mvc/application/models/airtime/om/BaseCcBlockcontents.php
similarity index 68%
rename from install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylistcontents.php
rename to airtime_mvc/application/models/airtime/om/BaseCcBlockcontents.php
index 0118d5038..d6beab8b4 100644
--- a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylistcontents.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcBlockcontents.php
@@ -2,25 +2,25 @@
/**
- * Base class that represents a row from the 'cc_playlistcontents' table.
+ * Base class that represents a row from the 'cc_blockcontents' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
+abstract class BaseCcBlockcontents extends BaseObject implements Persistent
{
/**
* Peer class name
*/
- const PEER = 'CcPlaylistcontentsPeer';
+ const PEER = 'CcBlockcontentsPeer';
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
- * @var CcPlaylistcontentsPeer
+ * @var CcBlockcontentsPeer
*/
protected static $peer;
@@ -31,10 +31,10 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
protected $id;
/**
- * The value for the playlist_id field.
+ * The value for the block_id field.
* @var int
*/
- protected $playlist_id;
+ protected $block_id;
/**
* The value for the file_id field.
@@ -89,9 +89,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
protected $aCcFiles;
/**
- * @var CcPlaylist
+ * @var CcBlock
*/
- protected $aCcPlaylist;
+ protected $aCcBlock;
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -107,6 +107,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
+ // aggregate_column_relation behavior
+ protected $oldCcBlock;
+
/**
* Applies default values to this object.
* This method should be called from the object's constructor (or
@@ -123,7 +126,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
/**
- * Initializes internal state of BaseCcPlaylistcontents object.
+ * Initializes internal state of BaseCcBlockcontents object.
* @see applyDefaults()
*/
public function __construct()
@@ -143,13 +146,13 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
/**
- * Get the [playlist_id] column value.
+ * Get the [block_id] column value.
*
* @return int
*/
- public function getDbPlaylistId()
+ public function getDbBlockId()
{
- return $this->playlist_id;
+ return $this->block_id;
}
/**
@@ -173,102 +176,33 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
/**
- * Get the [optionally formatted] temporal [cliplength] column value.
+ * Get the [cliplength] column value.
*
- *
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
- * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @return string
*/
- public function getDbCliplength($format = '%X')
+ public function getDbCliplength()
{
- if ($this->cliplength === null) {
- return null;
- }
-
-
-
- try {
- $dt = new DateTime($this->cliplength);
- } catch (Exception $x) {
- throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->cliplength, true), $x);
- }
-
- if ($format === null) {
- // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
- return $dt;
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $dt->format('U'));
- } else {
- return $dt->format($format);
- }
+ return $this->cliplength;
}
/**
- * Get the [optionally formatted] temporal [cuein] column value.
+ * Get the [cuein] column value.
*
- *
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
- * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @return string
*/
- public function getDbCuein($format = '%X')
+ public function getDbCuein()
{
- if ($this->cuein === null) {
- return null;
- }
-
-
-
- try {
- $dt = new DateTime($this->cuein);
- } catch (Exception $x) {
- throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->cuein, true), $x);
- }
-
- if ($format === null) {
- // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
- return $dt;
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $dt->format('U'));
- } else {
- return $dt->format($format);
- }
+ return $this->cuein;
}
/**
- * Get the [optionally formatted] temporal [cueout] column value.
+ * Get the [cueout] column value.
*
- *
- * @param string $format The date/time format string (either date()-style or strftime()-style).
- * If format is NULL, then the raw DateTime object will be returned.
- * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
- * @throws PropelException - if unable to parse/validate the date/time value.
+ * @return string
*/
- public function getDbCueout($format = '%X')
+ public function getDbCueout()
{
- if ($this->cueout === null) {
- return null;
- }
-
-
-
- try {
- $dt = new DateTime($this->cueout);
- } catch (Exception $x) {
- throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->cueout, true), $x);
- }
-
- if ($format === null) {
- // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
- return $dt;
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $dt->format('U'));
- } else {
- return $dt->format($format);
- }
+ return $this->cueout;
}
/**
@@ -341,7 +275,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
* Set the value of [id] column.
*
* @param int $v new value
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbId($v)
{
@@ -351,41 +285,41 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if ($this->id !== $v) {
$this->id = $v;
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::ID;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::ID;
}
return $this;
} // setDbId()
/**
- * Set the value of [playlist_id] column.
+ * Set the value of [block_id] column.
*
* @param int $v new value
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @return CcBlockcontents The current object (for fluent API support)
*/
- public function setDbPlaylistId($v)
+ public function setDbBlockId($v)
{
if ($v !== null) {
$v = (int) $v;
}
- if ($this->playlist_id !== $v) {
- $this->playlist_id = $v;
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::PLAYLIST_ID;
+ if ($this->block_id !== $v) {
+ $this->block_id = $v;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::BLOCK_ID;
}
- if ($this->aCcPlaylist !== null && $this->aCcPlaylist->getDbId() !== $v) {
- $this->aCcPlaylist = null;
+ if ($this->aCcBlock !== null && $this->aCcBlock->getDbId() !== $v) {
+ $this->aCcBlock = null;
}
return $this;
- } // setDbPlaylistId()
+ } // setDbBlockId()
/**
* Set the value of [file_id] column.
*
* @param int $v new value
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbFileId($v)
{
@@ -395,7 +329,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if ($this->file_id !== $v) {
$this->file_id = $v;
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::FILE_ID;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::FILE_ID;
}
if ($this->aCcFiles !== null && $this->aCcFiles->getDbId() !== $v) {
@@ -409,7 +343,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
* Set the value of [position] column.
*
* @param int $v new value
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbPosition($v)
{
@@ -419,158 +353,68 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if ($this->position !== $v) {
$this->position = $v;
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::POSITION;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::POSITION;
}
return $this;
} // setDbPosition()
/**
- * Sets the value of [cliplength] column to a normalized version of the date/time value specified.
+ * Set the value of [cliplength] column.
*
- * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
- * be treated as NULL for temporal objects.
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbCliplength($v)
{
- // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
- // -- which is unexpected, to say the least.
- if ($v === null || $v === '') {
- $dt = null;
- } elseif ($v instanceof DateTime) {
- $dt = $v;
- } else {
- // some string/numeric value passed; we normalize that so that we can
- // validate it.
- try {
- if (is_numeric($v)) { // if it's a unix timestamp
- $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
- // We have to explicitly specify and then change the time zone because of a
- // DateTime bug: http://bugs.php.net/bug.php?id=43003
- $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
- } else {
- $dt = new DateTime($v);
- }
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
+ if ($v !== null) {
+ $v = (string) $v;
}
- if ( $this->cliplength !== null || $dt !== null ) {
- // (nested ifs are a little easier to read in this case)
-
- $currNorm = ($this->cliplength !== null && $tmpDt = new DateTime($this->cliplength)) ? $tmpDt->format('H:i:s') : null;
- $newNorm = ($dt !== null) ? $dt->format('H:i:s') : null;
-
- if ( ($currNorm !== $newNorm) // normalized values don't match
- || ($dt->format('H:i:s') === '00:00:00') // or the entered value matches the default
- )
- {
- $this->cliplength = ($dt ? $dt->format('H:i:s') : null);
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::CLIPLENGTH;
- }
- } // if either are not null
+ if ($this->cliplength !== $v || $this->isNew()) {
+ $this->cliplength = $v;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::CLIPLENGTH;
+ }
return $this;
} // setDbCliplength()
/**
- * Sets the value of [cuein] column to a normalized version of the date/time value specified.
+ * Set the value of [cuein] column.
*
- * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
- * be treated as NULL for temporal objects.
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbCuein($v)
{
- // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
- // -- which is unexpected, to say the least.
- if ($v === null || $v === '') {
- $dt = null;
- } elseif ($v instanceof DateTime) {
- $dt = $v;
- } else {
- // some string/numeric value passed; we normalize that so that we can
- // validate it.
- try {
- if (is_numeric($v)) { // if it's a unix timestamp
- $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
- // We have to explicitly specify and then change the time zone because of a
- // DateTime bug: http://bugs.php.net/bug.php?id=43003
- $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
- } else {
- $dt = new DateTime($v);
- }
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
+ if ($v !== null) {
+ $v = (string) $v;
}
- if ( $this->cuein !== null || $dt !== null ) {
- // (nested ifs are a little easier to read in this case)
-
- $currNorm = ($this->cuein !== null && $tmpDt = new DateTime($this->cuein)) ? $tmpDt->format('H:i:s') : null;
- $newNorm = ($dt !== null) ? $dt->format('H:i:s') : null;
-
- if ( ($currNorm !== $newNorm) // normalized values don't match
- || ($dt->format('H:i:s') === '00:00:00') // or the entered value matches the default
- )
- {
- $this->cuein = ($dt ? $dt->format('H:i:s') : null);
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEIN;
- }
- } // if either are not null
+ if ($this->cuein !== $v || $this->isNew()) {
+ $this->cuein = $v;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::CUEIN;
+ }
return $this;
} // setDbCuein()
/**
- * Sets the value of [cueout] column to a normalized version of the date/time value specified.
+ * Set the value of [cueout] column.
*
- * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
- * be treated as NULL for temporal objects.
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbCueout($v)
{
- // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
- // -- which is unexpected, to say the least.
- if ($v === null || $v === '') {
- $dt = null;
- } elseif ($v instanceof DateTime) {
- $dt = $v;
- } else {
- // some string/numeric value passed; we normalize that so that we can
- // validate it.
- try {
- if (is_numeric($v)) { // if it's a unix timestamp
- $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
- // We have to explicitly specify and then change the time zone because of a
- // DateTime bug: http://bugs.php.net/bug.php?id=43003
- $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
- } else {
- $dt = new DateTime($v);
- }
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
+ if ($v !== null) {
+ $v = (string) $v;
}
- if ( $this->cueout !== null || $dt !== null ) {
- // (nested ifs are a little easier to read in this case)
-
- $currNorm = ($this->cueout !== null && $tmpDt = new DateTime($this->cueout)) ? $tmpDt->format('H:i:s') : null;
- $newNorm = ($dt !== null) ? $dt->format('H:i:s') : null;
-
- if ( ($currNorm !== $newNorm) // normalized values don't match
- || ($dt->format('H:i:s') === '00:00:00') // or the entered value matches the default
- )
- {
- $this->cueout = ($dt ? $dt->format('H:i:s') : null);
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEOUT;
- }
- } // if either are not null
+ if ($this->cueout !== $v || $this->isNew()) {
+ $this->cueout = $v;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::CUEOUT;
+ }
return $this;
} // setDbCueout()
@@ -580,7 +424,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*
* @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
* be treated as NULL for temporal objects.
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbFadein($v)
{
@@ -618,7 +462,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
)
{
$this->fadein = ($dt ? $dt->format('H:i:s') : null);
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::FADEIN;
}
} // if either are not null
@@ -630,7 +474,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*
* @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
* be treated as NULL for temporal objects.
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @return CcBlockcontents The current object (for fluent API support)
*/
public function setDbFadeout($v)
{
@@ -668,7 +512,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
)
{
$this->fadeout = ($dt ? $dt->format('H:i:s') : null);
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::FADEOUT;
}
} // if either are not null
@@ -728,7 +572,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
- $this->playlist_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
+ $this->block_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->file_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
$this->position = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
$this->cliplength = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
@@ -744,10 +588,10 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 9; // 9 = CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 9; // 9 = CcBlockcontentsPeer::NUM_COLUMNS - CcBlockcontentsPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
- throw new PropelException("Error populating CcPlaylistcontents object", $e);
+ throw new PropelException("Error populating CcBlockcontents object", $e);
}
}
@@ -767,8 +611,8 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
public function ensureConsistency()
{
- if ($this->aCcPlaylist !== null && $this->playlist_id !== $this->aCcPlaylist->getDbId()) {
- $this->aCcPlaylist = null;
+ if ($this->aCcBlock !== null && $this->block_id !== $this->aCcBlock->getDbId()) {
+ $this->aCcBlock = null;
}
if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) {
$this->aCcFiles = null;
@@ -796,13 +640,13 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// We don't need to alter the object instance pool; we're just modifying this instance
// already in the pool.
- $stmt = CcPlaylistcontentsPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
+ $stmt = CcBlockcontentsPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
$row = $stmt->fetch(PDO::FETCH_NUM);
$stmt->closeCursor();
if (!$row) {
@@ -813,7 +657,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
$this->aCcFiles = null;
- $this->aCcPlaylist = null;
+ $this->aCcBlock = null;
} // if (deep)
}
@@ -833,14 +677,14 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
try {
$ret = $this->preDelete($con);
if ($ret) {
- CcPlaylistcontentsQuery::create()
+ CcBlockcontentsQuery::create()
->filterByPrimaryKey($this->getPrimaryKey())
->delete($con);
$this->postDelete($con);
@@ -875,7 +719,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
@@ -895,7 +739,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->postUpdate($con);
}
$this->postSave($con);
- CcPlaylistcontentsPeer::addInstanceToPool($this);
+ // aggregate_column_relation behavior
+ $this->updateRelatedCcBlock($con);
+ CcBlockcontentsPeer::addInstanceToPool($this);
} else {
$affectedRows = 0;
}
@@ -936,23 +782,23 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->setCcFiles($this->aCcFiles);
}
- if ($this->aCcPlaylist !== null) {
- if ($this->aCcPlaylist->isModified() || $this->aCcPlaylist->isNew()) {
- $affectedRows += $this->aCcPlaylist->save($con);
+ if ($this->aCcBlock !== null) {
+ if ($this->aCcBlock->isModified() || $this->aCcBlock->isNew()) {
+ $affectedRows += $this->aCcBlock->save($con);
}
- $this->setCcPlaylist($this->aCcPlaylist);
+ $this->setCcBlock($this->aCcBlock);
}
if ($this->isNew() ) {
- $this->modifiedColumns[] = CcPlaylistcontentsPeer::ID;
+ $this->modifiedColumns[] = CcBlockcontentsPeer::ID;
}
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$criteria = $this->buildCriteria();
- if ($criteria->keyContainsValue(CcPlaylistcontentsPeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlaylistcontentsPeer::ID.')');
+ if ($criteria->keyContainsValue(CcBlockcontentsPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcBlockcontentsPeer::ID.')');
}
$pk = BasePeer::doInsert($criteria, $con);
@@ -960,7 +806,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->setDbId($pk); //[IMV] update autoincrement primary key
$this->setNew(false);
} else {
- $affectedRows += CcPlaylistcontentsPeer::doUpdate($this, $con);
+ $affectedRows += CcBlockcontentsPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
@@ -1043,14 +889,14 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
}
- if ($this->aCcPlaylist !== null) {
- if (!$this->aCcPlaylist->validate($columns)) {
- $failureMap = array_merge($failureMap, $this->aCcPlaylist->getValidationFailures());
+ if ($this->aCcBlock !== null) {
+ if (!$this->aCcBlock->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcBlock->getValidationFailures());
}
}
- if (($retval = CcPlaylistcontentsPeer::doValidate($this, $columns)) !== true) {
+ if (($retval = CcBlockcontentsPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -1073,7 +919,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcPlaylistcontentsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcBlockcontentsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$field = $this->getByPosition($pos);
return $field;
}
@@ -1092,7 +938,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
return $this->getDbId();
break;
case 1:
- return $this->getDbPlaylistId();
+ return $this->getDbBlockId();
break;
case 2:
return $this->getDbFileId();
@@ -1137,10 +983,10 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false)
{
- $keys = CcPlaylistcontentsPeer::getFieldNames($keyType);
+ $keys = CcBlockcontentsPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getDbId(),
- $keys[1] => $this->getDbPlaylistId(),
+ $keys[1] => $this->getDbBlockId(),
$keys[2] => $this->getDbFileId(),
$keys[3] => $this->getDbPosition(),
$keys[4] => $this->getDbCliplength(),
@@ -1153,8 +999,8 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if (null !== $this->aCcFiles) {
$result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true);
}
- if (null !== $this->aCcPlaylist) {
- $result['CcPlaylist'] = $this->aCcPlaylist->toArray($keyType, $includeLazyLoadColumns, true);
+ if (null !== $this->aCcBlock) {
+ $result['CcBlock'] = $this->aCcBlock->toArray($keyType, $includeLazyLoadColumns, true);
}
}
return $result;
@@ -1172,7 +1018,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcPlaylistcontentsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcBlockcontentsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -1191,7 +1037,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->setDbId($value);
break;
case 1:
- $this->setDbPlaylistId($value);
+ $this->setDbBlockId($value);
break;
case 2:
$this->setDbFileId($value);
@@ -1236,10 +1082,10 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
- $keys = CcPlaylistcontentsPeer::getFieldNames($keyType);
+ $keys = CcBlockcontentsPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setDbPlaylistId($arr[$keys[1]]);
+ if (array_key_exists($keys[1], $arr)) $this->setDbBlockId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDbFileId($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setDbPosition($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setDbCliplength($arr[$keys[4]]);
@@ -1256,17 +1102,17 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function buildCriteria()
{
- $criteria = new Criteria(CcPlaylistcontentsPeer::DATABASE_NAME);
+ $criteria = new Criteria(CcBlockcontentsPeer::DATABASE_NAME);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::ID)) $criteria->add(CcPlaylistcontentsPeer::ID, $this->id);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::PLAYLIST_ID)) $criteria->add(CcPlaylistcontentsPeer::PLAYLIST_ID, $this->playlist_id);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::FILE_ID)) $criteria->add(CcPlaylistcontentsPeer::FILE_ID, $this->file_id);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::POSITION)) $criteria->add(CcPlaylistcontentsPeer::POSITION, $this->position);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::CLIPLENGTH)) $criteria->add(CcPlaylistcontentsPeer::CLIPLENGTH, $this->cliplength);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::CUEIN)) $criteria->add(CcPlaylistcontentsPeer::CUEIN, $this->cuein);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::CUEOUT)) $criteria->add(CcPlaylistcontentsPeer::CUEOUT, $this->cueout);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::FADEIN)) $criteria->add(CcPlaylistcontentsPeer::FADEIN, $this->fadein);
- if ($this->isColumnModified(CcPlaylistcontentsPeer::FADEOUT)) $criteria->add(CcPlaylistcontentsPeer::FADEOUT, $this->fadeout);
+ if ($this->isColumnModified(CcBlockcontentsPeer::ID)) $criteria->add(CcBlockcontentsPeer::ID, $this->id);
+ if ($this->isColumnModified(CcBlockcontentsPeer::BLOCK_ID)) $criteria->add(CcBlockcontentsPeer::BLOCK_ID, $this->block_id);
+ if ($this->isColumnModified(CcBlockcontentsPeer::FILE_ID)) $criteria->add(CcBlockcontentsPeer::FILE_ID, $this->file_id);
+ if ($this->isColumnModified(CcBlockcontentsPeer::POSITION)) $criteria->add(CcBlockcontentsPeer::POSITION, $this->position);
+ if ($this->isColumnModified(CcBlockcontentsPeer::CLIPLENGTH)) $criteria->add(CcBlockcontentsPeer::CLIPLENGTH, $this->cliplength);
+ if ($this->isColumnModified(CcBlockcontentsPeer::CUEIN)) $criteria->add(CcBlockcontentsPeer::CUEIN, $this->cuein);
+ if ($this->isColumnModified(CcBlockcontentsPeer::CUEOUT)) $criteria->add(CcBlockcontentsPeer::CUEOUT, $this->cueout);
+ if ($this->isColumnModified(CcBlockcontentsPeer::FADEIN)) $criteria->add(CcBlockcontentsPeer::FADEIN, $this->fadein);
+ if ($this->isColumnModified(CcBlockcontentsPeer::FADEOUT)) $criteria->add(CcBlockcontentsPeer::FADEOUT, $this->fadeout);
return $criteria;
}
@@ -1281,8 +1127,8 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
- $criteria = new Criteria(CcPlaylistcontentsPeer::DATABASE_NAME);
- $criteria->add(CcPlaylistcontentsPeer::ID, $this->id);
+ $criteria = new Criteria(CcBlockcontentsPeer::DATABASE_NAME);
+ $criteria->add(CcBlockcontentsPeer::ID, $this->id);
return $criteria;
}
@@ -1322,13 +1168,13 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of CcPlaylistcontents (or compatible) type.
+ * @param object $copyObj An object of CcBlockcontents (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
- $copyObj->setDbPlaylistId($this->playlist_id);
+ $copyObj->setDbBlockId($this->block_id);
$copyObj->setDbFileId($this->file_id);
$copyObj->setDbPosition($this->position);
$copyObj->setDbCliplength($this->cliplength);
@@ -1350,7 +1196,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @return CcPlaylistcontents Clone of current object.
+ * @return CcBlockcontents Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
@@ -1369,12 +1215,12 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
- * @return CcPlaylistcontentsPeer
+ * @return CcBlockcontentsPeer
*/
public function getPeer()
{
if (self::$peer === null) {
- self::$peer = new CcPlaylistcontentsPeer();
+ self::$peer = new CcBlockcontentsPeer();
}
return self::$peer;
}
@@ -1383,7 +1229,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
* Declares an association between this object and a CcFiles object.
*
* @param CcFiles $v
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @return CcBlockcontents The current object (for fluent API support)
* @throws PropelException
*/
public function setCcFiles(CcFiles $v = null)
@@ -1399,7 +1245,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcFiles object, it will not be re-added.
if ($v !== null) {
- $v->addCcPlaylistcontents($this);
+ $v->addCcBlockcontents($this);
}
return $this;
@@ -1422,33 +1268,37 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
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->aCcFiles->addCcPlaylistcontentss($this);
+ $this->aCcFiles->addCcBlockcontentss($this);
*/
}
return $this->aCcFiles;
}
/**
- * Declares an association between this object and a CcPlaylist object.
+ * Declares an association between this object and a CcBlock object.
*
- * @param CcPlaylist $v
- * @return CcPlaylistcontents The current object (for fluent API support)
+ * @param CcBlock $v
+ * @return CcBlockcontents The current object (for fluent API support)
* @throws PropelException
*/
- public function setCcPlaylist(CcPlaylist $v = null)
+ public function setCcBlock(CcBlock $v = null)
{
+ // aggregate_column_relation behavior
+ if (null !== $this->aCcBlock && $v !== $this->aCcBlock) {
+ $this->oldCcBlock = $this->aCcBlock;
+ }
if ($v === null) {
- $this->setDbPlaylistId(NULL);
+ $this->setDbBlockId(NULL);
} else {
- $this->setDbPlaylistId($v->getDbId());
+ $this->setDbBlockId($v->getDbId());
}
- $this->aCcPlaylist = $v;
+ $this->aCcBlock = $v;
// Add binding for other direction of this n:n relationship.
- // If this object has already been added to the CcPlaylist object, it will not be re-added.
+ // If this object has already been added to the CcBlock object, it will not be re-added.
if ($v !== null) {
- $v->addCcPlaylistcontents($this);
+ $v->addCcBlockcontents($this);
}
return $this;
@@ -1456,25 +1306,25 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
/**
- * Get the associated CcPlaylist object
+ * Get the associated CcBlock object
*
* @param PropelPDO Optional Connection object.
- * @return CcPlaylist The associated CcPlaylist object.
+ * @return CcBlock The associated CcBlock object.
* @throws PropelException
*/
- public function getCcPlaylist(PropelPDO $con = null)
+ public function getCcBlock(PropelPDO $con = null)
{
- if ($this->aCcPlaylist === null && ($this->playlist_id !== null)) {
- $this->aCcPlaylist = CcPlaylistQuery::create()->findPk($this->playlist_id, $con);
+ if ($this->aCcBlock === null && ($this->block_id !== null)) {
+ $this->aCcBlock = CcBlockQuery::create()->findPk($this->block_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->aCcPlaylist->addCcPlaylistcontentss($this);
+ $this->aCcBlock->addCcBlockcontentss($this);
*/
}
- return $this->aCcPlaylist;
+ return $this->aCcBlock;
}
/**
@@ -1483,7 +1333,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
public function clear()
{
$this->id = null;
- $this->playlist_id = null;
+ $this->block_id = null;
$this->file_id = null;
$this->position = null;
$this->cliplength = null;
@@ -1515,7 +1365,25 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
} // if ($deep)
$this->aCcFiles = null;
- $this->aCcPlaylist = null;
+ $this->aCcBlock = null;
+ }
+
+ // aggregate_column_relation behavior
+
+ /**
+ * Update the aggregate column in the related CcBlock object
+ *
+ * @param PropelPDO $con A connection object
+ */
+ protected function updateRelatedCcBlock(PropelPDO $con)
+ {
+ if ($ccBlock = $this->getCcBlock()) {
+ $ccBlock->updateDbLength($con);
+ }
+ if ($this->oldCcBlock) {
+ $this->oldCcBlock->updateDbLength($con);
+ $this->oldCcBlock = null;
+ }
}
/**
@@ -1537,4 +1405,4 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
throw new PropelException('Call to undefined method: ' . $name);
}
-} // BaseCcPlaylistcontents
+} // BaseCcBlockcontents
diff --git a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylistcontentsPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcBlockcontentsPeer.php
similarity index 68%
rename from install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylistcontentsPeer.php
rename to airtime_mvc/application/models/airtime/om/BaseCcBlockcontentsPeer.php
index 0bb899b67..7bee15279 100644
--- a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylistcontentsPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcBlockcontentsPeer.php
@@ -2,28 +2,28 @@
/**
- * Base static class for performing query and update operations on the 'cc_playlistcontents' table.
+ * Base static class for performing query and update operations on the 'cc_blockcontents' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcPlaylistcontentsPeer {
+abstract class BaseCcBlockcontentsPeer {
/** the default database name for this class */
const DATABASE_NAME = 'airtime';
/** the table name for this class */
- const TABLE_NAME = 'cc_playlistcontents';
+ const TABLE_NAME = 'cc_blockcontents';
/** the related Propel class for this table */
- const OM_CLASS = 'CcPlaylistcontents';
+ const OM_CLASS = 'CcBlockcontents';
/** A class that can be returned by this peer. */
- const CLASS_DEFAULT = 'airtime.CcPlaylistcontents';
+ const CLASS_DEFAULT = 'airtime.CcBlockcontents';
/** the related TableMap class for this table */
- const TM_CLASS = 'CcPlaylistcontentsTableMap';
+ const TM_CLASS = 'CcBlockcontentsTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 9;
@@ -32,37 +32,37 @@ abstract class BaseCcPlaylistcontentsPeer {
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the ID field */
- const ID = 'cc_playlistcontents.ID';
+ const ID = 'cc_blockcontents.ID';
- /** the column name for the PLAYLIST_ID field */
- const PLAYLIST_ID = 'cc_playlistcontents.PLAYLIST_ID';
+ /** the column name for the BLOCK_ID field */
+ const BLOCK_ID = 'cc_blockcontents.BLOCK_ID';
/** the column name for the FILE_ID field */
- const FILE_ID = 'cc_playlistcontents.FILE_ID';
+ const FILE_ID = 'cc_blockcontents.FILE_ID';
/** the column name for the POSITION field */
- const POSITION = 'cc_playlistcontents.POSITION';
+ const POSITION = 'cc_blockcontents.POSITION';
/** the column name for the CLIPLENGTH field */
- const CLIPLENGTH = 'cc_playlistcontents.CLIPLENGTH';
+ const CLIPLENGTH = 'cc_blockcontents.CLIPLENGTH';
/** the column name for the CUEIN field */
- const CUEIN = 'cc_playlistcontents.CUEIN';
+ const CUEIN = 'cc_blockcontents.CUEIN';
/** the column name for the CUEOUT field */
- const CUEOUT = 'cc_playlistcontents.CUEOUT';
+ const CUEOUT = 'cc_blockcontents.CUEOUT';
/** the column name for the FADEIN field */
- const FADEIN = 'cc_playlistcontents.FADEIN';
+ const FADEIN = 'cc_blockcontents.FADEIN';
/** the column name for the FADEOUT field */
- const FADEOUT = 'cc_playlistcontents.FADEOUT';
+ const FADEOUT = 'cc_blockcontents.FADEOUT';
/**
- * An identiy map to hold any loaded instances of CcPlaylistcontents objects.
+ * An identiy map to hold any loaded instances of CcBlockcontents objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
* queries.
- * @var array CcPlaylistcontents[]
+ * @var array CcBlockcontents[]
*/
public static $instances = array();
@@ -74,11 +74,11 @@ abstract class BaseCcPlaylistcontentsPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbPlaylistId', 'DbFileId', 'DbPosition', 'DbCliplength', 'DbCuein', 'DbCueout', 'DbFadein', 'DbFadeout', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbPlaylistId', 'dbFileId', 'dbPosition', 'dbCliplength', 'dbCuein', 'dbCueout', 'dbFadein', 'dbFadeout', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::PLAYLIST_ID, self::FILE_ID, self::POSITION, self::CLIPLENGTH, self::CUEIN, self::CUEOUT, self::FADEIN, self::FADEOUT, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'PLAYLIST_ID', 'FILE_ID', 'POSITION', 'CLIPLENGTH', 'CUEIN', 'CUEOUT', 'FADEIN', 'FADEOUT', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'playlist_id', 'file_id', 'position', 'cliplength', 'cuein', 'cueout', 'fadein', 'fadeout', ),
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbBlockId', 'DbFileId', 'DbPosition', 'DbCliplength', 'DbCuein', 'DbCueout', 'DbFadein', 'DbFadeout', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbBlockId', 'dbFileId', 'dbPosition', 'dbCliplength', 'dbCuein', 'dbCueout', 'dbFadein', 'dbFadeout', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::BLOCK_ID, self::FILE_ID, self::POSITION, self::CLIPLENGTH, self::CUEIN, self::CUEOUT, self::FADEIN, self::FADEOUT, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'BLOCK_ID', 'FILE_ID', 'POSITION', 'CLIPLENGTH', 'CUEIN', 'CUEOUT', 'FADEIN', 'FADEOUT', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'block_id', 'file_id', 'position', 'cliplength', 'cuein', 'cueout', 'fadein', 'fadeout', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
);
@@ -89,11 +89,11 @@ abstract class BaseCcPlaylistcontentsPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbPlaylistId' => 1, 'DbFileId' => 2, 'DbPosition' => 3, 'DbCliplength' => 4, 'DbCuein' => 5, 'DbCueout' => 6, 'DbFadein' => 7, 'DbFadeout' => 8, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbPlaylistId' => 1, 'dbFileId' => 2, 'dbPosition' => 3, 'dbCliplength' => 4, 'dbCuein' => 5, 'dbCueout' => 6, 'dbFadein' => 7, 'dbFadeout' => 8, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::PLAYLIST_ID => 1, self::FILE_ID => 2, self::POSITION => 3, self::CLIPLENGTH => 4, self::CUEIN => 5, self::CUEOUT => 6, self::FADEIN => 7, self::FADEOUT => 8, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'PLAYLIST_ID' => 1, 'FILE_ID' => 2, 'POSITION' => 3, 'CLIPLENGTH' => 4, 'CUEIN' => 5, 'CUEOUT' => 6, 'FADEIN' => 7, 'FADEOUT' => 8, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'playlist_id' => 1, 'file_id' => 2, 'position' => 3, 'cliplength' => 4, 'cuein' => 5, 'cueout' => 6, 'fadein' => 7, 'fadeout' => 8, ),
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbBlockId' => 1, 'DbFileId' => 2, 'DbPosition' => 3, 'DbCliplength' => 4, 'DbCuein' => 5, 'DbCueout' => 6, 'DbFadein' => 7, 'DbFadeout' => 8, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbBlockId' => 1, 'dbFileId' => 2, 'dbPosition' => 3, 'dbCliplength' => 4, 'dbCuein' => 5, 'dbCueout' => 6, 'dbFadein' => 7, 'dbFadeout' => 8, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::BLOCK_ID => 1, self::FILE_ID => 2, self::POSITION => 3, self::CLIPLENGTH => 4, self::CUEIN => 5, self::CUEOUT => 6, self::FADEIN => 7, self::FADEOUT => 8, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'BLOCK_ID' => 1, 'FILE_ID' => 2, 'POSITION' => 3, 'CLIPLENGTH' => 4, 'CUEIN' => 5, 'CUEOUT' => 6, 'FADEIN' => 7, 'FADEOUT' => 8, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'block_id' => 1, 'file_id' => 2, 'position' => 3, 'cliplength' => 4, 'cuein' => 5, 'cueout' => 6, 'fadein' => 7, 'fadeout' => 8, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
);
@@ -143,12 +143,12 @@ abstract class BaseCcPlaylistcontentsPeer {
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
*
* @param string $alias The alias for the current table.
- * @param string $column The column name for current table. (i.e. CcPlaylistcontentsPeer::COLUMN_NAME).
+ * @param string $column The column name for current table. (i.e. CcBlockcontentsPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
- return str_replace(CcPlaylistcontentsPeer::TABLE_NAME.'.', $alias.'.', $column);
+ return str_replace(CcBlockcontentsPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -166,18 +166,18 @@ abstract class BaseCcPlaylistcontentsPeer {
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::ID);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::PLAYLIST_ID);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::FILE_ID);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::POSITION);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::CLIPLENGTH);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::CUEIN);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::CUEOUT);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::FADEIN);
- $criteria->addSelectColumn(CcPlaylistcontentsPeer::FADEOUT);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::ID);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::BLOCK_ID);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::FILE_ID);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::POSITION);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::CLIPLENGTH);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::CUEIN);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::CUEOUT);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::FADEIN);
+ $criteria->addSelectColumn(CcBlockcontentsPeer::FADEOUT);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.PLAYLIST_ID');
+ $criteria->addSelectColumn($alias . '.BLOCK_ID');
$criteria->addSelectColumn($alias . '.FILE_ID');
$criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.CLIPLENGTH');
@@ -204,21 +204,21 @@ abstract class BaseCcPlaylistcontentsPeer {
// 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(CcPlaylistcontentsPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcontentsPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
$criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// BasePeer returns a PDOStatement
$stmt = BasePeer::doCount($criteria, $con);
@@ -236,7 +236,7 @@ abstract class BaseCcPlaylistcontentsPeer {
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param PropelPDO $con
- * @return CcPlaylistcontents
+ * @return CcBlockcontents
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -244,7 +244,7 @@ abstract class BaseCcPlaylistcontentsPeer {
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
- $objects = CcPlaylistcontentsPeer::doSelect($critcopy, $con);
+ $objects = CcBlockcontentsPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -261,7 +261,7 @@ abstract class BaseCcPlaylistcontentsPeer {
*/
public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
- return CcPlaylistcontentsPeer::populateObjects(CcPlaylistcontentsPeer::doSelectStmt($criteria, $con));
+ return CcBlockcontentsPeer::populateObjects(CcBlockcontentsPeer::doSelectStmt($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
@@ -279,12 +279,12 @@ abstract class BaseCcPlaylistcontentsPeer {
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
if (!$criteria->hasSelectClause()) {
$criteria = clone $criteria;
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -302,10 +302,10 @@ abstract class BaseCcPlaylistcontentsPeer {
* to the cache in order to ensure that the same objects are always returned by doSelect*()
* and retrieveByPK*() calls.
*
- * @param CcPlaylistcontents $value A CcPlaylistcontents object.
+ * @param CcBlockcontents $value A CcBlockcontents object.
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
*/
- public static function addInstanceToPool(CcPlaylistcontents $obj, $key = null)
+ public static function addInstanceToPool(CcBlockcontents $obj, $key = null)
{
if (Propel::isInstancePoolingEnabled()) {
if ($key === null) {
@@ -323,18 +323,18 @@ abstract class BaseCcPlaylistcontentsPeer {
* methods in your stub classes -- you may need to explicitly remove objects
* from the cache in order to prevent returning objects that no longer exist.
*
- * @param mixed $value A CcPlaylistcontents object or a primary key value.
+ * @param mixed $value A CcBlockcontents object or a primary key value.
*/
public static function removeInstanceFromPool($value)
{
if (Propel::isInstancePoolingEnabled() && $value !== null) {
- if (is_object($value) && $value instanceof CcPlaylistcontents) {
+ if (is_object($value) && $value instanceof CcBlockcontents) {
$key = (string) $value->getDbId();
} elseif (is_scalar($value)) {
// assume we've been passed a primary key
$key = (string) $value;
} else {
- $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlaylistcontents object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
+ $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcBlockcontents object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
throw $e;
}
@@ -349,7 +349,7 @@ abstract class BaseCcPlaylistcontentsPeer {
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param string $key The key (@see getPrimaryKeyHash()) for this instance.
- * @return CcPlaylistcontents Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
+ * @return CcBlockcontents Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
* @see getPrimaryKeyHash()
*/
public static function getInstanceFromPool($key)
@@ -373,7 +373,7 @@ abstract class BaseCcPlaylistcontentsPeer {
}
/**
- * Method to invalidate the instance pool of all tables related to cc_playlistcontents
+ * Method to invalidate the instance pool of all tables related to cc_blockcontents
* by a foreign key with ON DELETE CASCADE
*/
public static function clearRelatedInstancePool()
@@ -425,11 +425,11 @@ abstract class BaseCcPlaylistcontentsPeer {
$results = array();
// set the class once to avoid overhead in the loop
- $cls = CcPlaylistcontentsPeer::getOMClass(false);
+ $cls = CcBlockcontentsPeer::getOMClass(false);
// populate the object(s)
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj = CcPlaylistcontentsPeer::getInstanceFromPool($key))) {
+ $key = CcBlockcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj = CcBlockcontentsPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
@@ -438,7 +438,7 @@ abstract class BaseCcPlaylistcontentsPeer {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
- CcPlaylistcontentsPeer::addInstanceToPool($obj, $key);
+ CcBlockcontentsPeer::addInstanceToPool($obj, $key);
} // if key exists
}
$stmt->closeCursor();
@@ -451,21 +451,21 @@ abstract class BaseCcPlaylistcontentsPeer {
* @param int $startcol The 0-based offset for reading from the resultset row.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
- * @return array (CcPlaylistcontents object, last column rank)
+ * @return array (CcBlockcontents object, last column rank)
*/
public static function populateObject($row, $startcol = 0)
{
- $key = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, $startcol);
- if (null !== ($obj = CcPlaylistcontentsPeer::getInstanceFromPool($key))) {
+ $key = CcBlockcontentsPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if (null !== ($obj = CcBlockcontentsPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $startcol, true); // rehydrate
- $col = $startcol + CcPlaylistcontentsPeer::NUM_COLUMNS;
+ $col = $startcol + CcBlockcontentsPeer::NUM_COLUMNS;
} else {
- $cls = CcPlaylistcontentsPeer::OM_CLASS;
+ $cls = CcBlockcontentsPeer::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $startcol);
- CcPlaylistcontentsPeer::addInstanceToPool($obj, $key);
+ CcBlockcontentsPeer::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
@@ -487,14 +487,14 @@ abstract class BaseCcPlaylistcontentsPeer {
// 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(CcPlaylistcontentsPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcontentsPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -503,10 +503,10 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -521,7 +521,7 @@ abstract class BaseCcPlaylistcontentsPeer {
/**
- * Returns the number of rows matching criteria, joining the related CcPlaylist table
+ * Returns the number of rows matching criteria, joining the related CcBlock table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@@ -529,7 +529,7 @@ abstract class BaseCcPlaylistcontentsPeer {
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
- public static function doCountJoinCcPlaylist(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doCountJoinCcBlock(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;
@@ -537,14 +537,14 @@ abstract class BaseCcPlaylistcontentsPeer {
// 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(CcPlaylistcontentsPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcontentsPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -553,10 +553,10 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -571,11 +571,11 @@ abstract class BaseCcPlaylistcontentsPeer {
/**
- * Selects a collection of CcPlaylistcontents objects pre-filled with their CcFiles objects.
+ * Selects a collection of CcBlockcontents objects pre-filled with their CcFiles 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 CcPlaylistcontents objects.
+ * @return array Array of CcBlockcontents objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -588,28 +588,28 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
- $startcol = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
+ $startcol = (CcBlockcontentsPeer::NUM_COLUMNS - CcBlockcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
CcFilesPeer::addSelectColumns($criteria);
- $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcPlaylistcontentsPeer::getInstanceFromPool($key1))) {
+ $key1 = CcBlockcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcBlockcontentsPeer::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 = CcPlaylistcontentsPeer::getOMClass(false);
+ $cls = CcBlockcontentsPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
+ CcBlockcontentsPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol);
@@ -624,8 +624,8 @@ abstract class BaseCcPlaylistcontentsPeer {
CcFilesPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
- // Add the $obj1 (CcPlaylistcontents) to $obj2 (CcFiles)
- $obj2->addCcPlaylistcontents($obj1);
+ // Add the $obj1 (CcBlockcontents) to $obj2 (CcFiles)
+ $obj2->addCcBlockcontents($obj1);
} // if joined row was not null
@@ -637,15 +637,15 @@ abstract class BaseCcPlaylistcontentsPeer {
/**
- * Selects a collection of CcPlaylistcontents objects pre-filled with their CcPlaylist objects.
+ * Selects a collection of CcBlockcontents objects pre-filled with their CcBlock 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 CcPlaylistcontents objects.
+ * @return array Array of CcBlockcontents objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public static function doSelectJoinCcPlaylist(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doSelectJoinCcBlock(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@@ -654,44 +654,44 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
- $startcol = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
- CcPlaylistPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
+ $startcol = (CcBlockcontentsPeer::NUM_COLUMNS - CcBlockcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
- $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcPlaylistcontentsPeer::getInstanceFromPool($key1))) {
+ $key1 = CcBlockcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcBlockcontentsPeer::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 = CcPlaylistcontentsPeer::getOMClass(false);
+ $cls = CcBlockcontentsPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
+ CcBlockcontentsPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
- $key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ $key2 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
- $obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
+ $obj2 = CcBlockPeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcPlaylistPeer::getOMClass(false);
+ $cls = CcBlockPeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
- CcPlaylistPeer::addInstanceToPool($obj2, $key2);
+ CcBlockPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
- // Add the $obj1 (CcPlaylistcontents) to $obj2 (CcPlaylist)
- $obj2->addCcPlaylistcontents($obj1);
+ // Add the $obj1 (CcBlockcontents) to $obj2 (CcBlock)
+ $obj2->addCcBlockcontents($obj1);
} // if joined row was not null
@@ -719,14 +719,14 @@ abstract class BaseCcPlaylistcontentsPeer {
// 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(CcPlaylistcontentsPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcontentsPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -735,12 +735,12 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
- $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -754,12 +754,12 @@ abstract class BaseCcPlaylistcontentsPeer {
}
/**
- * Selects a collection of CcPlaylistcontents objects pre-filled with all related objects.
+ * Selects a collection of CcBlockcontents objects pre-filled with all related 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 CcPlaylistcontents objects.
+ * @return array Array of CcBlockcontents objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -772,34 +772,34 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
- $startcol2 = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
+ $startcol2 = (CcBlockcontentsPeer::NUM_COLUMNS - CcBlockcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
CcFilesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
- CcPlaylistPeer::addSelectColumns($criteria);
- $startcol4 = $startcol3 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcBlockPeer::NUM_COLUMNS - CcBlockPeer::NUM_LAZY_LOAD_COLUMNS);
- $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
- $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcPlaylistcontentsPeer::getInstanceFromPool($key1))) {
+ $key1 = CcBlockcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcBlockcontentsPeer::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 = CcPlaylistcontentsPeer::getOMClass(false);
+ $cls = CcBlockcontentsPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
+ CcBlockcontentsPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
// Add objects for joined CcFiles rows
@@ -816,26 +816,26 @@ abstract class BaseCcPlaylistcontentsPeer {
CcFilesPeer::addInstanceToPool($obj2, $key2);
} // if obj2 loaded
- // Add the $obj1 (CcPlaylistcontents) to the collection in $obj2 (CcFiles)
- $obj2->addCcPlaylistcontents($obj1);
+ // Add the $obj1 (CcBlockcontents) to the collection in $obj2 (CcFiles)
+ $obj2->addCcBlockcontents($obj1);
} // if joined row not null
- // Add objects for joined CcPlaylist rows
+ // Add objects for joined CcBlock rows
- $key3 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ $key3 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) {
- $obj3 = CcPlaylistPeer::getInstanceFromPool($key3);
+ $obj3 = CcBlockPeer::getInstanceFromPool($key3);
if (!$obj3) {
- $cls = CcPlaylistPeer::getOMClass(false);
+ $cls = CcBlockPeer::getOMClass(false);
$obj3 = new $cls();
$obj3->hydrate($row, $startcol3);
- CcPlaylistPeer::addInstanceToPool($obj3, $key3);
+ CcBlockPeer::addInstanceToPool($obj3, $key3);
} // if obj3 loaded
- // Add the $obj1 (CcPlaylistcontents) to the collection in $obj3 (CcPlaylist)
- $obj3->addCcPlaylistcontents($obj1);
+ // Add the $obj1 (CcBlockcontents) to the collection in $obj3 (CcBlock)
+ $obj3->addCcBlockcontents($obj1);
} // if joined row not null
$results[] = $obj1;
@@ -862,14 +862,14 @@ abstract class BaseCcPlaylistcontentsPeer {
// 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(CcPlaylistcontentsPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcontentsPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
@@ -878,10 +878,10 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -896,7 +896,7 @@ abstract class BaseCcPlaylistcontentsPeer {
/**
- * Returns the number of rows matching criteria, joining the related CcPlaylist table
+ * Returns the number of rows matching criteria, joining the related CcBlock table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@@ -904,7 +904,7 @@ abstract class BaseCcPlaylistcontentsPeer {
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
- public static function doCountJoinAllExceptCcPlaylist(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doCountJoinAllExceptCcBlock(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;
@@ -912,14 +912,14 @@ abstract class BaseCcPlaylistcontentsPeer {
// 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(CcPlaylistcontentsPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcontentsPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
@@ -928,10 +928,10 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -946,12 +946,12 @@ abstract class BaseCcPlaylistcontentsPeer {
/**
- * Selects a collection of CcPlaylistcontents objects pre-filled with all related objects except CcFiles.
+ * Selects a collection of CcBlockcontents objects pre-filled with all related objects except CcFiles.
*
* @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 CcPlaylistcontents objects.
+ * @return array Array of CcBlockcontents objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -966,48 +966,48 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
- $startcol2 = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
+ $startcol2 = (CcBlockcontentsPeer::NUM_COLUMNS - CcBlockcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
- CcPlaylistPeer::addSelectColumns($criteria);
- $startcol3 = $startcol2 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcBlockPeer::NUM_COLUMNS - CcBlockPeer::NUM_LAZY_LOAD_COLUMNS);
- $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcPlaylistcontentsPeer::getInstanceFromPool($key1))) {
+ $key1 = CcBlockcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcBlockcontentsPeer::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 = CcPlaylistcontentsPeer::getOMClass(false);
+ $cls = CcBlockcontentsPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
+ CcBlockcontentsPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
- // Add objects for joined CcPlaylist rows
+ // Add objects for joined CcBlock rows
- $key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ $key2 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
- $obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
+ $obj2 = CcBlockPeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcPlaylistPeer::getOMClass(false);
+ $cls = CcBlockPeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
- CcPlaylistPeer::addInstanceToPool($obj2, $key2);
+ CcBlockPeer::addInstanceToPool($obj2, $key2);
} // if $obj2 already loaded
- // Add the $obj1 (CcPlaylistcontents) to the collection in $obj2 (CcPlaylist)
- $obj2->addCcPlaylistcontents($obj1);
+ // Add the $obj1 (CcBlockcontents) to the collection in $obj2 (CcBlock)
+ $obj2->addCcBlockcontents($obj1);
} // if joined row is not null
@@ -1019,16 +1019,16 @@ abstract class BaseCcPlaylistcontentsPeer {
/**
- * Selects a collection of CcPlaylistcontents objects pre-filled with all related objects except CcPlaylist.
+ * Selects a collection of CcBlockcontents objects pre-filled with all related objects except CcBlock.
*
* @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 CcPlaylistcontents objects.
+ * @return array Array of CcBlockcontents objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public static function doSelectJoinAllExceptCcPlaylist(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doSelectJoinAllExceptCcBlock(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@@ -1039,30 +1039,30 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcPlaylistcontentsPeer::addSelectColumns($criteria);
- $startcol2 = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockcontentsPeer::addSelectColumns($criteria);
+ $startcol2 = (CcBlockcontentsPeer::NUM_COLUMNS - CcBlockcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
CcFilesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
- $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcPlaylistcontentsPeer::getInstanceFromPool($key1))) {
+ $key1 = CcBlockcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcBlockcontentsPeer::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 = CcPlaylistcontentsPeer::getOMClass(false);
+ $cls = CcBlockcontentsPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
+ CcBlockcontentsPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
// Add objects for joined CcFiles rows
@@ -1079,8 +1079,8 @@ abstract class BaseCcPlaylistcontentsPeer {
CcFilesPeer::addInstanceToPool($obj2, $key2);
} // if $obj2 already loaded
- // Add the $obj1 (CcPlaylistcontents) to the collection in $obj2 (CcFiles)
- $obj2->addCcPlaylistcontents($obj1);
+ // Add the $obj1 (CcBlockcontents) to the collection in $obj2 (CcFiles)
+ $obj2->addCcBlockcontents($obj1);
} // if joined row is not null
@@ -1107,10 +1107,10 @@ abstract class BaseCcPlaylistcontentsPeer {
*/
public static function buildTableMap()
{
- $dbMap = Propel::getDatabaseMap(BaseCcPlaylistcontentsPeer::DATABASE_NAME);
- if (!$dbMap->hasTable(BaseCcPlaylistcontentsPeer::TABLE_NAME))
+ $dbMap = Propel::getDatabaseMap(BaseCcBlockcontentsPeer::DATABASE_NAME);
+ if (!$dbMap->hasTable(BaseCcBlockcontentsPeer::TABLE_NAME))
{
- $dbMap->addTableObject(new CcPlaylistcontentsTableMap());
+ $dbMap->addTableObject(new CcBlockcontentsTableMap());
}
}
@@ -1127,13 +1127,13 @@ abstract class BaseCcPlaylistcontentsPeer {
*/
public static function getOMClass($withPrefix = true)
{
- return $withPrefix ? CcPlaylistcontentsPeer::CLASS_DEFAULT : CcPlaylistcontentsPeer::OM_CLASS;
+ return $withPrefix ? CcBlockcontentsPeer::CLASS_DEFAULT : CcBlockcontentsPeer::OM_CLASS;
}
/**
- * Method perform an INSERT on the database, given a CcPlaylistcontents or Criteria object.
+ * Method perform an INSERT on the database, given a CcBlockcontents or Criteria object.
*
- * @param mixed $values Criteria or CcPlaylistcontents object containing data that is used to create the INSERT statement.
+ * @param mixed $values Criteria or CcBlockcontents object containing data that is used to create the INSERT statement.
* @param PropelPDO $con the PropelPDO connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
@@ -1142,17 +1142,17 @@ abstract class BaseCcPlaylistcontentsPeer {
public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
- $criteria = $values->buildCriteria(); // build Criteria from CcPlaylistcontents object
+ $criteria = $values->buildCriteria(); // build Criteria from CcBlockcontents object
}
- if ($criteria->containsKey(CcPlaylistcontentsPeer::ID) && $criteria->keyContainsValue(CcPlaylistcontentsPeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlaylistcontentsPeer::ID.')');
+ if ($criteria->containsKey(CcBlockcontentsPeer::ID) && $criteria->keyContainsValue(CcBlockcontentsPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcBlockcontentsPeer::ID.')');
}
@@ -1174,9 +1174,9 @@ abstract class BaseCcPlaylistcontentsPeer {
}
/**
- * Method perform an UPDATE on the database, given a CcPlaylistcontents or Criteria object.
+ * Method perform an UPDATE on the database, given a CcBlockcontents or Criteria object.
*
- * @param mixed $values Criteria or CcPlaylistcontents object containing data that is used to create the UPDATE statement.
+ * @param mixed $values Criteria or CcBlockcontents object containing data that is used to create the UPDATE statement.
* @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
@@ -1185,7 +1185,7 @@ abstract class BaseCcPlaylistcontentsPeer {
public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
@@ -1193,15 +1193,15 @@ abstract class BaseCcPlaylistcontentsPeer {
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
- $comparison = $criteria->getComparison(CcPlaylistcontentsPeer::ID);
- $value = $criteria->remove(CcPlaylistcontentsPeer::ID);
+ $comparison = $criteria->getComparison(CcBlockcontentsPeer::ID);
+ $value = $criteria->remove(CcBlockcontentsPeer::ID);
if ($value) {
- $selectCriteria->add(CcPlaylistcontentsPeer::ID, $value, $comparison);
+ $selectCriteria->add(CcBlockcontentsPeer::ID, $value, $comparison);
} else {
- $selectCriteria->setPrimaryTableName(CcPlaylistcontentsPeer::TABLE_NAME);
+ $selectCriteria->setPrimaryTableName(CcBlockcontentsPeer::TABLE_NAME);
}
- } else { // $values is CcPlaylistcontents object
+ } else { // $values is CcBlockcontents object
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
@@ -1213,26 +1213,26 @@ abstract class BaseCcPlaylistcontentsPeer {
}
/**
- * Method to DELETE all rows from the cc_playlistcontents table.
+ * Method to DELETE all rows from the cc_blockcontents table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
- $affectedRows += BasePeer::doDeleteAll(CcPlaylistcontentsPeer::TABLE_NAME, $con, CcPlaylistcontentsPeer::DATABASE_NAME);
+ $affectedRows += BasePeer::doDeleteAll(CcBlockcontentsPeer::TABLE_NAME, $con, CcBlockcontentsPeer::DATABASE_NAME);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
- CcPlaylistcontentsPeer::clearInstancePool();
- CcPlaylistcontentsPeer::clearRelatedInstancePool();
+ CcBlockcontentsPeer::clearInstancePool();
+ CcBlockcontentsPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -1242,9 +1242,9 @@ abstract class BaseCcPlaylistcontentsPeer {
}
/**
- * Method perform a DELETE on the database, given a CcPlaylistcontents or Criteria object OR a primary key value.
+ * Method perform a DELETE on the database, given a CcBlockcontents or Criteria object OR a primary key value.
*
- * @param mixed $values Criteria or CcPlaylistcontents object or primary key or array of primary keys
+ * @param mixed $values Criteria or CcBlockcontents object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
@@ -1255,27 +1255,27 @@ abstract class BaseCcPlaylistcontentsPeer {
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
- CcPlaylistcontentsPeer::clearInstancePool();
+ CcBlockcontentsPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
- } elseif ($values instanceof CcPlaylistcontents) { // it's a model object
+ } elseif ($values instanceof CcBlockcontents) { // it's a model object
// invalidate the cache for this single object
- CcPlaylistcontentsPeer::removeInstanceFromPool($values);
+ CcBlockcontentsPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(self::DATABASE_NAME);
- $criteria->add(CcPlaylistcontentsPeer::ID, (array) $values, Criteria::IN);
+ $criteria->add(CcBlockcontentsPeer::ID, (array) $values, Criteria::IN);
// invalidate the cache for this object(s)
foreach ((array) $values as $singleval) {
- CcPlaylistcontentsPeer::removeInstanceFromPool($singleval);
+ CcBlockcontentsPeer::removeInstanceFromPool($singleval);
}
}
@@ -1290,7 +1290,7 @@ abstract class BaseCcPlaylistcontentsPeer {
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
- CcPlaylistcontentsPeer::clearRelatedInstancePool();
+ CcBlockcontentsPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -1300,24 +1300,24 @@ abstract class BaseCcPlaylistcontentsPeer {
}
/**
- * Validates all modified columns of given CcPlaylistcontents object.
+ * Validates all modified columns of given CcBlockcontents object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
- * @param CcPlaylistcontents $obj The object to validate.
+ * @param CcBlockcontents $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
- public static function doValidate(CcPlaylistcontents $obj, $cols = null)
+ public static function doValidate(CcBlockcontents $obj, $cols = null)
{
$columns = array();
if ($cols) {
- $dbMap = Propel::getDatabaseMap(CcPlaylistcontentsPeer::DATABASE_NAME);
- $tableMap = $dbMap->getTable(CcPlaylistcontentsPeer::TABLE_NAME);
+ $dbMap = Propel::getDatabaseMap(CcBlockcontentsPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(CcBlockcontentsPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -1333,7 +1333,7 @@ abstract class BaseCcPlaylistcontentsPeer {
}
- return BasePeer::doValidate(CcPlaylistcontentsPeer::DATABASE_NAME, CcPlaylistcontentsPeer::TABLE_NAME, $columns);
+ return BasePeer::doValidate(CcBlockcontentsPeer::DATABASE_NAME, CcBlockcontentsPeer::TABLE_NAME, $columns);
}
/**
@@ -1341,23 +1341,23 @@ abstract class BaseCcPlaylistcontentsPeer {
*
* @param int $pk the primary key.
* @param PropelPDO $con the connection to use
- * @return CcPlaylistcontents
+ * @return CcBlockcontents
*/
public static function retrieveByPK($pk, PropelPDO $con = null)
{
- if (null !== ($obj = CcPlaylistcontentsPeer::getInstanceFromPool((string) $pk))) {
+ if (null !== ($obj = CcBlockcontentsPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria = new Criteria(CcPlaylistcontentsPeer::DATABASE_NAME);
- $criteria->add(CcPlaylistcontentsPeer::ID, $pk);
+ $criteria = new Criteria(CcBlockcontentsPeer::DATABASE_NAME);
+ $criteria->add(CcBlockcontentsPeer::ID, $pk);
- $v = CcPlaylistcontentsPeer::doSelect($criteria, $con);
+ $v = CcBlockcontentsPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -1373,23 +1373,23 @@ abstract class BaseCcPlaylistcontentsPeer {
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
- $criteria = new Criteria(CcPlaylistcontentsPeer::DATABASE_NAME);
- $criteria->add(CcPlaylistcontentsPeer::ID, $pks, Criteria::IN);
- $objs = CcPlaylistcontentsPeer::doSelect($criteria, $con);
+ $criteria = new Criteria(CcBlockcontentsPeer::DATABASE_NAME);
+ $criteria->add(CcBlockcontentsPeer::ID, $pks, Criteria::IN);
+ $objs = CcBlockcontentsPeer::doSelect($criteria, $con);
}
return $objs;
}
-} // BaseCcPlaylistcontentsPeer
+} // BaseCcBlockcontentsPeer
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
-BaseCcPlaylistcontentsPeer::buildTableMap();
+BaseCcBlockcontentsPeer::buildTableMap();
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcBlockcontentsQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcBlockcontentsQuery.php
new file mode 100644
index 000000000..6cc00d53c
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcBlockcontentsQuery.php
@@ -0,0 +1,640 @@
+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
+ *
+ * $obj = $c->findPk(12, $con);
+ *
+ * @param mixed $key Primary key to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return CcBlockcontents|array|mixed the result, formatted by the current formatter
+ */
+ public function findPk($key, $con = null)
+ {
+ if ((null !== ($obj = CcBlockcontentsPeer::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
+ *
+ * $objs = $c->findPks(array(12, 56, 832), $con);
+ *
+ * @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 CcBlockcontentsQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKey($key)
+ {
+ return $this->addUsingAlias(CcBlockcontentsPeer::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 CcBlockcontentsQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKeys($keys)
+ {
+ return $this->addUsingAlias(CcBlockcontentsPeer::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 CcBlockcontentsQuery 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(CcBlockcontentsPeer::ID, $dbId, $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 CcBlockcontentsQuery 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(CcBlockcontentsPeer::BLOCK_ID, $dbBlockId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbBlockId['max'])) {
+ $this->addUsingAlias(CcBlockcontentsPeer::BLOCK_ID, $dbBlockId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcontentsPeer::BLOCK_ID, $dbBlockId, $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 CcBlockcontentsQuery 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(CcBlockcontentsPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbFileId['max'])) {
+ $this->addUsingAlias(CcBlockcontentsPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcontentsPeer::FILE_ID, $dbFileId, $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 CcBlockcontentsQuery 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(CcBlockcontentsPeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbPosition['max'])) {
+ $this->addUsingAlias(CcBlockcontentsPeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcontentsPeer::POSITION, $dbPosition, $comparison);
+ }
+
+ /**
+ * Filter the query on the cliplength 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 CcBlockcontentsQuery 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(CcBlockcontentsPeer::CLIPLENGTH, $dbCliplength, $comparison);
+ }
+
+ /**
+ * Filter the query on the cuein 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 CcBlockcontentsQuery 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(CcBlockcontentsPeer::CUEIN, $dbCuein, $comparison);
+ }
+
+ /**
+ * Filter the query on the cueout 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 CcBlockcontentsQuery 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(CcBlockcontentsPeer::CUEOUT, $dbCueout, $comparison);
+ }
+
+ /**
+ * Filter the query on the fadein column
+ *
+ * @param string|array $dbFadein 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 CcBlockcontentsQuery The current query, for fluid interface
+ */
+ public function filterByDbFadein($dbFadein = null, $comparison = null)
+ {
+ if (is_array($dbFadein)) {
+ $useMinMax = false;
+ if (isset($dbFadein['min'])) {
+ $this->addUsingAlias(CcBlockcontentsPeer::FADEIN, $dbFadein['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbFadein['max'])) {
+ $this->addUsingAlias(CcBlockcontentsPeer::FADEIN, $dbFadein['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcontentsPeer::FADEIN, $dbFadein, $comparison);
+ }
+
+ /**
+ * Filter the query on the fadeout column
+ *
+ * @param string|array $dbFadeout 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 CcBlockcontentsQuery The current query, for fluid interface
+ */
+ public function filterByDbFadeout($dbFadeout = null, $comparison = null)
+ {
+ if (is_array($dbFadeout)) {
+ $useMinMax = false;
+ if (isset($dbFadeout['min'])) {
+ $this->addUsingAlias(CcBlockcontentsPeer::FADEOUT, $dbFadeout['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbFadeout['max'])) {
+ $this->addUsingAlias(CcBlockcontentsPeer::FADEOUT, $dbFadeout['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcontentsPeer::FADEOUT, $dbFadeout, $comparison);
+ }
+
+ /**
+ * 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 CcBlockcontentsQuery The current query, for fluid interface
+ */
+ public function filterByCcFiles($ccFiles, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcBlockcontentsPeer::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 CcBlockcontentsQuery 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 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 CcBlockcontentsQuery The current query, for fluid interface
+ */
+ public function filterByCcBlock($ccBlock, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcBlockcontentsPeer::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 CcBlockcontentsQuery 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');
+ }
+
+ /**
+ * Exclude object from result
+ *
+ * @param CcBlockcontents $ccBlockcontents Object to remove from the list of results
+ *
+ * @return CcBlockcontentsQuery The current query, for fluid interface
+ */
+ public function prune($ccBlockcontents = null)
+ {
+ if ($ccBlockcontents) {
+ $this->addUsingAlias(CcBlockcontentsPeer::ID, $ccBlockcontents->getDbId(), Criteria::NOT_EQUAL);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Code to execute before every DELETE statement
+ *
+ * @param PropelPDO $con The connection object used by the query
+ */
+ protected function basePreDelete(PropelPDO $con)
+ {
+ // aggregate_column_relation behavior
+ $this->findRelatedCcBlocks($con);
+
+ return $this->preDelete($con);
+ }
+
+ /**
+ * Code to execute after every DELETE statement
+ *
+ * @param int $affectedRows the number of deleted rows
+ * @param PropelPDO $con The connection object used by the query
+ */
+ protected function basePostDelete($affectedRows, PropelPDO $con)
+ {
+ // aggregate_column_relation behavior
+ $this->updateRelatedCcBlocks($con);
+
+ return $this->postDelete($affectedRows, $con);
+ }
+
+ /**
+ * Code to execute before every UPDATE statement
+ *
+ * @param array $values The associatiove array of columns and values for the update
+ * @param PropelPDO $con The connection object used by the query
+ * @param boolean $forceIndividualSaves If false (default), the resulting call is a BasePeer::doUpdate(), ortherwise it is a series of save() calls on all the found objects
+ */
+ protected function basePreUpdate(&$values, PropelPDO $con, $forceIndividualSaves = false)
+ {
+ // aggregate_column_relation behavior
+ $this->findRelatedCcBlocks($con);
+
+ return $this->preUpdate($values, $con, $forceIndividualSaves);
+ }
+
+ /**
+ * Code to execute after every UPDATE statement
+ *
+ * @param int $affectedRows the number of udated rows
+ * @param PropelPDO $con The connection object used by the query
+ */
+ protected function basePostUpdate($affectedRows, PropelPDO $con)
+ {
+ // aggregate_column_relation behavior
+ $this->updateRelatedCcBlocks($con);
+
+ return $this->postUpdate($affectedRows, $con);
+ }
+
+ // aggregate_column_relation behavior
+
+ /**
+ * Finds the related CcBlock objects and keep them for later
+ *
+ * @param PropelPDO $con A connection object
+ */
+ protected function findRelatedCcBlocks($con)
+ {
+ $criteria = clone $this;
+ if ($this->useAliasInSQL) {
+ $alias = $this->getModelAlias();
+ $criteria->removeAlias($alias);
+ } else {
+ $alias = '';
+ }
+ $this->ccBlocks = CcBlockQuery::create()
+ ->joinCcBlockcontents($alias)
+ ->mergeWith($criteria)
+ ->find($con);
+ }
+
+ protected function updateRelatedCcBlocks($con)
+ {
+ foreach ($this->ccBlocks as $ccBlock) {
+ $ccBlock->updateDbLength($con);
+ }
+ $this->ccBlocks = array();
+ }
+
+} // BaseCcBlockcontentsQuery
diff --git a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcShowSchedule.php b/airtime_mvc/application/models/airtime/om/BaseCcBlockcriteria.php
similarity index 68%
rename from install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcShowSchedule.php
rename to airtime_mvc/application/models/airtime/om/BaseCcBlockcriteria.php
index bf8b384e6..2982a3b86 100644
--- a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcShowSchedule.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcBlockcriteria.php
@@ -2,25 +2,25 @@
/**
- * Base class that represents a row from the 'cc_show_schedule' table.
+ * Base class that represents a row from the 'cc_blockcriteria' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcShowSchedule extends BaseObject implements Persistent
+abstract class BaseCcBlockcriteria extends BaseObject implements Persistent
{
/**
* Peer class name
*/
- const PEER = 'CcShowSchedulePeer';
+ const PEER = 'CcBlockcriteriaPeer';
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
- * @var CcShowSchedulePeer
+ * @var CcBlockcriteriaPeer
*/
protected static $peer;
@@ -31,27 +31,39 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
protected $id;
/**
- * The value for the instance_id field.
- * @var int
+ * The value for the criteria field.
+ * @var string
*/
- protected $instance_id;
+ protected $criteria;
/**
- * The value for the position field.
- * @var int
+ * The value for the modifier field.
+ * @var string
*/
- protected $position;
+ protected $modifier;
/**
- * The value for the group_id field.
- * @var int
+ * The value for the value field.
+ * @var string
*/
- protected $group_id;
+ protected $value;
/**
- * @var CcShowInstances
+ * The value for the extra field.
+ * @var string
*/
- protected $aCcShowInstances;
+ protected $extra;
+
+ /**
+ * The value for the block_id field.
+ * @var int
+ */
+ protected $block_id;
+
+ /**
+ * @var CcBlock
+ */
+ protected $aCcBlock;
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -78,40 +90,60 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
/**
- * Get the [instance_id] column value.
+ * Get the [criteria] column value.
*
- * @return int
+ * @return string
*/
- public function getDbInstanceId()
+ public function getDbCriteria()
{
- return $this->instance_id;
+ return $this->criteria;
}
/**
- * Get the [position] column value.
+ * Get the [modifier] column value.
*
- * @return int
+ * @return string
*/
- public function getDbPosition()
+ public function getDbModifier()
{
- return $this->position;
+ return $this->modifier;
}
/**
- * Get the [group_id] column value.
+ * Get the [value] column value.
+ *
+ * @return string
+ */
+ public function getDbValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Get the [extra] column value.
+ *
+ * @return string
+ */
+ public function getDbExtra()
+ {
+ return $this->extra;
+ }
+
+ /**
+ * Get the [block_id] column value.
*
* @return int
*/
- public function getDbGroupId()
+ public function getDbBlockId()
{
- return $this->group_id;
+ return $this->block_id;
}
/**
* Set the value of [id] column.
*
* @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @return CcBlockcriteria The current object (for fluent API support)
*/
public function setDbId($v)
{
@@ -121,75 +153,115 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if ($this->id !== $v) {
$this->id = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::ID;
+ $this->modifiedColumns[] = CcBlockcriteriaPeer::ID;
}
return $this;
} // setDbId()
/**
- * Set the value of [instance_id] column.
+ * Set the value of [criteria] column.
*
- * @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcBlockcriteria The current object (for fluent API support)
*/
- public function setDbInstanceId($v)
+ public function setDbCriteria($v)
{
if ($v !== null) {
- $v = (int) $v;
+ $v = (string) $v;
}
- if ($this->instance_id !== $v) {
- $this->instance_id = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::INSTANCE_ID;
- }
-
- if ($this->aCcShowInstances !== null && $this->aCcShowInstances->getDbId() !== $v) {
- $this->aCcShowInstances = null;
+ if ($this->criteria !== $v) {
+ $this->criteria = $v;
+ $this->modifiedColumns[] = CcBlockcriteriaPeer::CRITERIA;
}
return $this;
- } // setDbInstanceId()
+ } // setDbCriteria()
/**
- * Set the value of [position] column.
+ * Set the value of [modifier] column.
*
- * @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcBlockcriteria The current object (for fluent API support)
*/
- public function setDbPosition($v)
+ public function setDbModifier($v)
{
if ($v !== null) {
- $v = (int) $v;
+ $v = (string) $v;
}
- if ($this->position !== $v) {
- $this->position = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::POSITION;
+ if ($this->modifier !== $v) {
+ $this->modifier = $v;
+ $this->modifiedColumns[] = CcBlockcriteriaPeer::MODIFIER;
}
return $this;
- } // setDbPosition()
+ } // setDbModifier()
/**
- * Set the value of [group_id] column.
+ * Set the value of [value] column.
+ *
+ * @param string $v new value
+ * @return CcBlockcriteria The current object (for fluent API support)
+ */
+ public function setDbValue($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->value !== $v) {
+ $this->value = $v;
+ $this->modifiedColumns[] = CcBlockcriteriaPeer::VALUE;
+ }
+
+ return $this;
+ } // setDbValue()
+
+ /**
+ * Set the value of [extra] column.
+ *
+ * @param string $v new value
+ * @return CcBlockcriteria The current object (for fluent API support)
+ */
+ public function setDbExtra($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->extra !== $v) {
+ $this->extra = $v;
+ $this->modifiedColumns[] = CcBlockcriteriaPeer::EXTRA;
+ }
+
+ return $this;
+ } // setDbExtra()
+
+ /**
+ * Set the value of [block_id] column.
*
* @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @return CcBlockcriteria The current object (for fluent API support)
*/
- public function setDbGroupId($v)
+ public function setDbBlockId($v)
{
if ($v !== null) {
$v = (int) $v;
}
- if ($this->group_id !== $v) {
- $this->group_id = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::GROUP_ID;
+ if ($this->block_id !== $v) {
+ $this->block_id = $v;
+ $this->modifiedColumns[] = CcBlockcriteriaPeer::BLOCK_ID;
+ }
+
+ if ($this->aCcBlock !== null && $this->aCcBlock->getDbId() !== $v) {
+ $this->aCcBlock = null;
}
return $this;
- } // setDbGroupId()
+ } // setDbBlockId()
/**
* Indicates whether the columns in this object are only set to default values.
@@ -224,9 +296,11 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
- $this->instance_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
- $this->position = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
- $this->group_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
+ $this->criteria = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
+ $this->modifier = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
+ $this->value = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
+ $this->extra = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
+ $this->block_id = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
$this->resetModified();
$this->setNew(false);
@@ -235,10 +309,10 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 4; // 4 = CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 6; // 6 = CcBlockcriteriaPeer::NUM_COLUMNS - CcBlockcriteriaPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
- throw new PropelException("Error populating CcShowSchedule object", $e);
+ throw new PropelException("Error populating CcBlockcriteria object", $e);
}
}
@@ -258,8 +332,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
public function ensureConsistency()
{
- if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) {
- $this->aCcShowInstances = null;
+ if ($this->aCcBlock !== null && $this->block_id !== $this->aCcBlock->getDbId()) {
+ $this->aCcBlock = null;
}
} // ensureConsistency
@@ -284,13 +358,13 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// We don't need to alter the object instance pool; we're just modifying this instance
// already in the pool.
- $stmt = CcShowSchedulePeer::doSelectStmt($this->buildPkeyCriteria(), $con);
+ $stmt = CcBlockcriteriaPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
$row = $stmt->fetch(PDO::FETCH_NUM);
$stmt->closeCursor();
if (!$row) {
@@ -300,7 +374,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
- $this->aCcShowInstances = null;
+ $this->aCcBlock = null;
} // if (deep)
}
@@ -320,14 +394,14 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
try {
$ret = $this->preDelete($con);
if ($ret) {
- CcShowScheduleQuery::create()
+ CcBlockcriteriaQuery::create()
->filterByPrimaryKey($this->getPrimaryKey())
->delete($con);
$this->postDelete($con);
@@ -362,7 +436,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
@@ -382,7 +456,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->postUpdate($con);
}
$this->postSave($con);
- CcShowSchedulePeer::addInstanceToPool($this);
+ CcBlockcriteriaPeer::addInstanceToPool($this);
} else {
$affectedRows = 0;
}
@@ -416,23 +490,23 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcShowInstances !== null) {
- if ($this->aCcShowInstances->isModified() || $this->aCcShowInstances->isNew()) {
- $affectedRows += $this->aCcShowInstances->save($con);
+ if ($this->aCcBlock !== null) {
+ if ($this->aCcBlock->isModified() || $this->aCcBlock->isNew()) {
+ $affectedRows += $this->aCcBlock->save($con);
}
- $this->setCcShowInstances($this->aCcShowInstances);
+ $this->setCcBlock($this->aCcBlock);
}
if ($this->isNew() ) {
- $this->modifiedColumns[] = CcShowSchedulePeer::ID;
+ $this->modifiedColumns[] = CcBlockcriteriaPeer::ID;
}
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$criteria = $this->buildCriteria();
- if ($criteria->keyContainsValue(CcShowSchedulePeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcShowSchedulePeer::ID.')');
+ if ($criteria->keyContainsValue(CcBlockcriteriaPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcBlockcriteriaPeer::ID.')');
}
$pk = BasePeer::doInsert($criteria, $con);
@@ -440,7 +514,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->setDbId($pk); //[IMV] update autoincrement primary key
$this->setNew(false);
} else {
- $affectedRows += CcShowSchedulePeer::doUpdate($this, $con);
+ $affectedRows += CcBlockcriteriaPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
@@ -517,14 +591,14 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcShowInstances !== null) {
- if (!$this->aCcShowInstances->validate($columns)) {
- $failureMap = array_merge($failureMap, $this->aCcShowInstances->getValidationFailures());
+ if ($this->aCcBlock !== null) {
+ if (!$this->aCcBlock->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcBlock->getValidationFailures());
}
}
- if (($retval = CcShowSchedulePeer::doValidate($this, $columns)) !== true) {
+ if (($retval = CcBlockcriteriaPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -547,7 +621,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcShowSchedulePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcBlockcriteriaPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$field = $this->getByPosition($pos);
return $field;
}
@@ -566,13 +640,19 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
return $this->getDbId();
break;
case 1:
- return $this->getDbInstanceId();
+ return $this->getDbCriteria();
break;
case 2:
- return $this->getDbPosition();
+ return $this->getDbModifier();
break;
case 3:
- return $this->getDbGroupId();
+ return $this->getDbValue();
+ break;
+ case 4:
+ return $this->getDbExtra();
+ break;
+ case 5:
+ return $this->getDbBlockId();
break;
default:
return null;
@@ -596,16 +676,18 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false)
{
- $keys = CcShowSchedulePeer::getFieldNames($keyType);
+ $keys = CcBlockcriteriaPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getDbId(),
- $keys[1] => $this->getDbInstanceId(),
- $keys[2] => $this->getDbPosition(),
- $keys[3] => $this->getDbGroupId(),
+ $keys[1] => $this->getDbCriteria(),
+ $keys[2] => $this->getDbModifier(),
+ $keys[3] => $this->getDbValue(),
+ $keys[4] => $this->getDbExtra(),
+ $keys[5] => $this->getDbBlockId(),
);
if ($includeForeignObjects) {
- if (null !== $this->aCcShowInstances) {
- $result['CcShowInstances'] = $this->aCcShowInstances->toArray($keyType, $includeLazyLoadColumns, true);
+ if (null !== $this->aCcBlock) {
+ $result['CcBlock'] = $this->aCcBlock->toArray($keyType, $includeLazyLoadColumns, true);
}
}
return $result;
@@ -623,7 +705,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcShowSchedulePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcBlockcriteriaPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -642,13 +724,19 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->setDbId($value);
break;
case 1:
- $this->setDbInstanceId($value);
+ $this->setDbCriteria($value);
break;
case 2:
- $this->setDbPosition($value);
+ $this->setDbModifier($value);
break;
case 3:
- $this->setDbGroupId($value);
+ $this->setDbValue($value);
+ break;
+ case 4:
+ $this->setDbExtra($value);
+ break;
+ case 5:
+ $this->setDbBlockId($value);
break;
} // switch()
}
@@ -672,12 +760,14 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
- $keys = CcShowSchedulePeer::getFieldNames($keyType);
+ $keys = CcBlockcriteriaPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setDbInstanceId($arr[$keys[1]]);
- if (array_key_exists($keys[2], $arr)) $this->setDbPosition($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDbGroupId($arr[$keys[3]]);
+ if (array_key_exists($keys[1], $arr)) $this->setDbCriteria($arr[$keys[1]]);
+ if (array_key_exists($keys[2], $arr)) $this->setDbModifier($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbValue($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbExtra($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbBlockId($arr[$keys[5]]);
}
/**
@@ -687,12 +777,14 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function buildCriteria()
{
- $criteria = new Criteria(CcShowSchedulePeer::DATABASE_NAME);
+ $criteria = new Criteria(CcBlockcriteriaPeer::DATABASE_NAME);
- if ($this->isColumnModified(CcShowSchedulePeer::ID)) $criteria->add(CcShowSchedulePeer::ID, $this->id);
- if ($this->isColumnModified(CcShowSchedulePeer::INSTANCE_ID)) $criteria->add(CcShowSchedulePeer::INSTANCE_ID, $this->instance_id);
- if ($this->isColumnModified(CcShowSchedulePeer::POSITION)) $criteria->add(CcShowSchedulePeer::POSITION, $this->position);
- if ($this->isColumnModified(CcShowSchedulePeer::GROUP_ID)) $criteria->add(CcShowSchedulePeer::GROUP_ID, $this->group_id);
+ if ($this->isColumnModified(CcBlockcriteriaPeer::ID)) $criteria->add(CcBlockcriteriaPeer::ID, $this->id);
+ if ($this->isColumnModified(CcBlockcriteriaPeer::CRITERIA)) $criteria->add(CcBlockcriteriaPeer::CRITERIA, $this->criteria);
+ if ($this->isColumnModified(CcBlockcriteriaPeer::MODIFIER)) $criteria->add(CcBlockcriteriaPeer::MODIFIER, $this->modifier);
+ if ($this->isColumnModified(CcBlockcriteriaPeer::VALUE)) $criteria->add(CcBlockcriteriaPeer::VALUE, $this->value);
+ if ($this->isColumnModified(CcBlockcriteriaPeer::EXTRA)) $criteria->add(CcBlockcriteriaPeer::EXTRA, $this->extra);
+ if ($this->isColumnModified(CcBlockcriteriaPeer::BLOCK_ID)) $criteria->add(CcBlockcriteriaPeer::BLOCK_ID, $this->block_id);
return $criteria;
}
@@ -707,8 +799,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
- $criteria = new Criteria(CcShowSchedulePeer::DATABASE_NAME);
- $criteria->add(CcShowSchedulePeer::ID, $this->id);
+ $criteria = new Criteria(CcBlockcriteriaPeer::DATABASE_NAME);
+ $criteria->add(CcBlockcriteriaPeer::ID, $this->id);
return $criteria;
}
@@ -748,15 +840,17 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of CcShowSchedule (or compatible) type.
+ * @param object $copyObj An object of CcBlockcriteria (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
- $copyObj->setDbInstanceId($this->instance_id);
- $copyObj->setDbPosition($this->position);
- $copyObj->setDbGroupId($this->group_id);
+ $copyObj->setDbCriteria($this->criteria);
+ $copyObj->setDbModifier($this->modifier);
+ $copyObj->setDbValue($this->value);
+ $copyObj->setDbExtra($this->extra);
+ $copyObj->setDbBlockId($this->block_id);
$copyObj->setNew(true);
$copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
@@ -771,7 +865,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @return CcShowSchedule Clone of current object.
+ * @return CcBlockcriteria Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
@@ -790,37 +884,37 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
- * @return CcShowSchedulePeer
+ * @return CcBlockcriteriaPeer
*/
public function getPeer()
{
if (self::$peer === null) {
- self::$peer = new CcShowSchedulePeer();
+ self::$peer = new CcBlockcriteriaPeer();
}
return self::$peer;
}
/**
- * Declares an association between this object and a CcShowInstances object.
+ * Declares an association between this object and a CcBlock object.
*
- * @param CcShowInstances $v
- * @return CcShowSchedule The current object (for fluent API support)
+ * @param CcBlock $v
+ * @return CcBlockcriteria The current object (for fluent API support)
* @throws PropelException
*/
- public function setCcShowInstances(CcShowInstances $v = null)
+ public function setCcBlock(CcBlock $v = null)
{
if ($v === null) {
- $this->setDbInstanceId(NULL);
+ $this->setDbBlockId(NULL);
} else {
- $this->setDbInstanceId($v->getDbId());
+ $this->setDbBlockId($v->getDbId());
}
- $this->aCcShowInstances = $v;
+ $this->aCcBlock = $v;
// Add binding for other direction of this n:n relationship.
- // If this object has already been added to the CcShowInstances object, it will not be re-added.
+ // If this object has already been added to the CcBlock object, it will not be re-added.
if ($v !== null) {
- $v->addCcShowSchedule($this);
+ $v->addCcBlockcriteria($this);
}
return $this;
@@ -828,25 +922,25 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
/**
- * Get the associated CcShowInstances object
+ * Get the associated CcBlock object
*
* @param PropelPDO Optional Connection object.
- * @return CcShowInstances The associated CcShowInstances object.
+ * @return CcBlock The associated CcBlock object.
* @throws PropelException
*/
- public function getCcShowInstances(PropelPDO $con = null)
+ public function getCcBlock(PropelPDO $con = null)
{
- if ($this->aCcShowInstances === null && ($this->instance_id !== null)) {
- $this->aCcShowInstances = CcShowInstancesQuery::create()->findPk($this->instance_id, $con);
+ if ($this->aCcBlock === null && ($this->block_id !== null)) {
+ $this->aCcBlock = CcBlockQuery::create()->findPk($this->block_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->aCcShowInstances->addCcShowSchedules($this);
+ $this->aCcBlock->addCcBlockcriterias($this);
*/
}
- return $this->aCcShowInstances;
+ return $this->aCcBlock;
}
/**
@@ -855,9 +949,11 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
public function clear()
{
$this->id = null;
- $this->instance_id = null;
- $this->position = null;
- $this->group_id = null;
+ $this->criteria = null;
+ $this->modifier = null;
+ $this->value = null;
+ $this->extra = null;
+ $this->block_id = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();
@@ -880,7 +976,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if ($deep) {
} // if ($deep)
- $this->aCcShowInstances = null;
+ $this->aCcBlock = null;
}
/**
@@ -902,4 +998,4 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
throw new PropelException('Call to undefined method: ' . $name);
}
-} // BaseCcShowSchedule
+} // BaseCcBlockcriteria
diff --git a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcAccessPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcBlockcriteriaPeer.php
similarity index 69%
rename from install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcAccessPeer.php
rename to airtime_mvc/application/models/airtime/om/BaseCcBlockcriteriaPeer.php
index c14312b14..a523024ad 100644
--- a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcAccessPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcBlockcriteriaPeer.php
@@ -2,67 +2,58 @@
/**
- * Base static class for performing query and update operations on the 'cc_access' table.
+ * Base static class for performing query and update operations on the 'cc_blockcriteria' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcAccessPeer {
+abstract class BaseCcBlockcriteriaPeer {
/** the default database name for this class */
const DATABASE_NAME = 'airtime';
/** the table name for this class */
- const TABLE_NAME = 'cc_access';
+ const TABLE_NAME = 'cc_blockcriteria';
/** the related Propel class for this table */
- const OM_CLASS = 'CcAccess';
+ const OM_CLASS = 'CcBlockcriteria';
/** A class that can be returned by this peer. */
- const CLASS_DEFAULT = 'airtime.CcAccess';
+ const CLASS_DEFAULT = 'airtime.CcBlockcriteria';
/** the related TableMap class for this table */
- const TM_CLASS = 'CcAccessTableMap';
+ const TM_CLASS = 'CcBlockcriteriaTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 9;
+ 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_access.ID';
+ const ID = 'cc_blockcriteria.ID';
- /** the column name for the GUNID field */
- const GUNID = 'cc_access.GUNID';
+ /** the column name for the CRITERIA field */
+ const CRITERIA = 'cc_blockcriteria.CRITERIA';
- /** the column name for the TOKEN field */
- const TOKEN = 'cc_access.TOKEN';
+ /** the column name for the MODIFIER field */
+ const MODIFIER = 'cc_blockcriteria.MODIFIER';
- /** the column name for the CHSUM field */
- const CHSUM = 'cc_access.CHSUM';
+ /** the column name for the VALUE field */
+ const VALUE = 'cc_blockcriteria.VALUE';
- /** the column name for the EXT field */
- const EXT = 'cc_access.EXT';
+ /** the column name for the EXTRA field */
+ const EXTRA = 'cc_blockcriteria.EXTRA';
- /** the column name for the TYPE field */
- const TYPE = 'cc_access.TYPE';
-
- /** the column name for the PARENT field */
- const PARENT = 'cc_access.PARENT';
-
- /** the column name for the OWNER field */
- const OWNER = 'cc_access.OWNER';
-
- /** the column name for the TS field */
- const TS = 'cc_access.TS';
+ /** the column name for the BLOCK_ID field */
+ const BLOCK_ID = 'cc_blockcriteria.BLOCK_ID';
/**
- * An identiy map to hold any loaded instances of CcAccess objects.
+ * An identiy map to hold any loaded instances of CcBlockcriteria objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
* queries.
- * @var array CcAccess[]
+ * @var array CcBlockcriteria[]
*/
public static $instances = array();
@@ -74,12 +65,12 @@ abstract class BaseCcAccessPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('Id', 'Gunid', 'Token', 'Chsum', 'Ext', 'Type', 'Parent', 'Owner', 'Ts', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'gunid', 'token', 'chsum', 'ext', 'type', 'parent', 'owner', 'ts', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::TOKEN, self::CHSUM, self::EXT, self::TYPE, self::PARENT, self::OWNER, self::TS, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'TOKEN', 'CHSUM', 'EXT', 'TYPE', 'PARENT', 'OWNER', 'TS', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'token', 'chsum', 'ext', 'type', 'parent', 'owner', 'ts', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbCriteria', 'DbModifier', 'DbValue', 'DbExtra', 'DbBlockId', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbCriteria', 'dbModifier', 'dbValue', 'dbExtra', 'dbBlockId', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::CRITERIA, self::MODIFIER, self::VALUE, self::EXTRA, self::BLOCK_ID, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'CRITERIA', 'MODIFIER', 'VALUE', 'EXTRA', 'BLOCK_ID', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'criteria', 'modifier', 'value', 'extra', 'block_id', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
@@ -89,12 +80,12 @@ abstract class BaseCcAccessPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Gunid' => 1, 'Token' => 2, 'Chsum' => 3, 'Ext' => 4, 'Type' => 5, 'Parent' => 6, 'Owner' => 7, 'Ts' => 8, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'gunid' => 1, 'token' => 2, 'chsum' => 3, 'ext' => 4, 'type' => 5, 'parent' => 6, 'owner' => 7, 'ts' => 8, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::TOKEN => 2, self::CHSUM => 3, self::EXT => 4, self::TYPE => 5, self::PARENT => 6, self::OWNER => 7, self::TS => 8, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'TOKEN' => 2, 'CHSUM' => 3, 'EXT' => 4, 'TYPE' => 5, 'PARENT' => 6, 'OWNER' => 7, 'TS' => 8, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'token' => 2, 'chsum' => 3, 'ext' => 4, 'type' => 5, 'parent' => 6, 'owner' => 7, 'ts' => 8, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbCriteria' => 1, 'DbModifier' => 2, 'DbValue' => 3, 'DbExtra' => 4, 'DbBlockId' => 5, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbCriteria' => 1, 'dbModifier' => 2, 'dbValue' => 3, 'dbExtra' => 4, 'dbBlockId' => 5, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::CRITERIA => 1, self::MODIFIER => 2, self::VALUE => 3, self::EXTRA => 4, self::BLOCK_ID => 5, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'CRITERIA' => 1, 'MODIFIER' => 2, 'VALUE' => 3, 'EXTRA' => 4, 'BLOCK_ID' => 5, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'criteria' => 1, 'modifier' => 2, 'value' => 3, 'extra' => 4, 'block_id' => 5, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
@@ -143,12 +134,12 @@ abstract class BaseCcAccessPeer {
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
*
* @param string $alias The alias for the current table.
- * @param string $column The column name for current table. (i.e. CcAccessPeer::COLUMN_NAME).
+ * @param string $column The column name for current table. (i.e. CcBlockcriteriaPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
- return str_replace(CcAccessPeer::TABLE_NAME.'.', $alias.'.', $column);
+ return str_replace(CcBlockcriteriaPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -166,25 +157,19 @@ abstract class BaseCcAccessPeer {
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
- $criteria->addSelectColumn(CcAccessPeer::ID);
- $criteria->addSelectColumn(CcAccessPeer::GUNID);
- $criteria->addSelectColumn(CcAccessPeer::TOKEN);
- $criteria->addSelectColumn(CcAccessPeer::CHSUM);
- $criteria->addSelectColumn(CcAccessPeer::EXT);
- $criteria->addSelectColumn(CcAccessPeer::TYPE);
- $criteria->addSelectColumn(CcAccessPeer::PARENT);
- $criteria->addSelectColumn(CcAccessPeer::OWNER);
- $criteria->addSelectColumn(CcAccessPeer::TS);
+ $criteria->addSelectColumn(CcBlockcriteriaPeer::ID);
+ $criteria->addSelectColumn(CcBlockcriteriaPeer::CRITERIA);
+ $criteria->addSelectColumn(CcBlockcriteriaPeer::MODIFIER);
+ $criteria->addSelectColumn(CcBlockcriteriaPeer::VALUE);
+ $criteria->addSelectColumn(CcBlockcriteriaPeer::EXTRA);
+ $criteria->addSelectColumn(CcBlockcriteriaPeer::BLOCK_ID);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.GUNID');
- $criteria->addSelectColumn($alias . '.TOKEN');
- $criteria->addSelectColumn($alias . '.CHSUM');
- $criteria->addSelectColumn($alias . '.EXT');
- $criteria->addSelectColumn($alias . '.TYPE');
- $criteria->addSelectColumn($alias . '.PARENT');
- $criteria->addSelectColumn($alias . '.OWNER');
- $criteria->addSelectColumn($alias . '.TS');
+ $criteria->addSelectColumn($alias . '.CRITERIA');
+ $criteria->addSelectColumn($alias . '.MODIFIER');
+ $criteria->addSelectColumn($alias . '.VALUE');
+ $criteria->addSelectColumn($alias . '.EXTRA');
+ $criteria->addSelectColumn($alias . '.BLOCK_ID');
}
}
@@ -204,21 +189,21 @@ abstract class BaseCcAccessPeer {
// 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(CcAccessPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcriteriaPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcAccessPeer::addSelectColumns($criteria);
+ CcBlockcriteriaPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
$criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// BasePeer returns a PDOStatement
$stmt = BasePeer::doCount($criteria, $con);
@@ -236,7 +221,7 @@ abstract class BaseCcAccessPeer {
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param PropelPDO $con
- * @return CcAccess
+ * @return CcBlockcriteria
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -244,7 +229,7 @@ abstract class BaseCcAccessPeer {
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
- $objects = CcAccessPeer::doSelect($critcopy, $con);
+ $objects = CcBlockcriteriaPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -261,7 +246,7 @@ abstract class BaseCcAccessPeer {
*/
public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
- return CcAccessPeer::populateObjects(CcAccessPeer::doSelectStmt($criteria, $con));
+ return CcBlockcriteriaPeer::populateObjects(CcBlockcriteriaPeer::doSelectStmt($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
@@ -279,12 +264,12 @@ abstract class BaseCcAccessPeer {
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
if (!$criteria->hasSelectClause()) {
$criteria = clone $criteria;
- CcAccessPeer::addSelectColumns($criteria);
+ CcBlockcriteriaPeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -302,14 +287,14 @@ abstract class BaseCcAccessPeer {
* to the cache in order to ensure that the same objects are always returned by doSelect*()
* and retrieveByPK*() calls.
*
- * @param CcAccess $value A CcAccess object.
+ * @param CcBlockcriteria $value A CcBlockcriteria object.
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
*/
- public static function addInstanceToPool(CcAccess $obj, $key = null)
+ public static function addInstanceToPool(CcBlockcriteria $obj, $key = null)
{
if (Propel::isInstancePoolingEnabled()) {
if ($key === null) {
- $key = (string) $obj->getId();
+ $key = (string) $obj->getDbId();
} // if key === null
self::$instances[$key] = $obj;
}
@@ -323,18 +308,18 @@ abstract class BaseCcAccessPeer {
* methods in your stub classes -- you may need to explicitly remove objects
* from the cache in order to prevent returning objects that no longer exist.
*
- * @param mixed $value A CcAccess object or a primary key value.
+ * @param mixed $value A CcBlockcriteria object or a primary key value.
*/
public static function removeInstanceFromPool($value)
{
if (Propel::isInstancePoolingEnabled() && $value !== null) {
- if (is_object($value) && $value instanceof CcAccess) {
- $key = (string) $value->getId();
+ if (is_object($value) && $value instanceof CcBlockcriteria) {
+ $key = (string) $value->getDbId();
} elseif (is_scalar($value)) {
// assume we've been passed a primary key
$key = (string) $value;
} else {
- $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcAccess object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
+ $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcBlockcriteria object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
throw $e;
}
@@ -349,7 +334,7 @@ abstract class BaseCcAccessPeer {
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param string $key The key (@see getPrimaryKeyHash()) for this instance.
- * @return CcAccess Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
+ * @return CcBlockcriteria Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
* @see getPrimaryKeyHash()
*/
public static function getInstanceFromPool($key)
@@ -373,7 +358,7 @@ abstract class BaseCcAccessPeer {
}
/**
- * Method to invalidate the instance pool of all tables related to cc_access
+ * Method to invalidate the instance pool of all tables related to cc_blockcriteria
* by a foreign key with ON DELETE CASCADE
*/
public static function clearRelatedInstancePool()
@@ -425,11 +410,11 @@ abstract class BaseCcAccessPeer {
$results = array();
// set the class once to avoid overhead in the loop
- $cls = CcAccessPeer::getOMClass(false);
+ $cls = CcBlockcriteriaPeer::getOMClass(false);
// populate the object(s)
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key = CcAccessPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj = CcAccessPeer::getInstanceFromPool($key))) {
+ $key = CcBlockcriteriaPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj = CcBlockcriteriaPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
@@ -438,7 +423,7 @@ abstract class BaseCcAccessPeer {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
- CcAccessPeer::addInstanceToPool($obj, $key);
+ CcBlockcriteriaPeer::addInstanceToPool($obj, $key);
} // if key exists
}
$stmt->closeCursor();
@@ -451,27 +436,27 @@ abstract class BaseCcAccessPeer {
* @param int $startcol The 0-based offset for reading from the resultset row.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
- * @return array (CcAccess object, last column rank)
+ * @return array (CcBlockcriteria object, last column rank)
*/
public static function populateObject($row, $startcol = 0)
{
- $key = CcAccessPeer::getPrimaryKeyHashFromRow($row, $startcol);
- if (null !== ($obj = CcAccessPeer::getInstanceFromPool($key))) {
+ $key = CcBlockcriteriaPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if (null !== ($obj = CcBlockcriteriaPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $startcol, true); // rehydrate
- $col = $startcol + CcAccessPeer::NUM_COLUMNS;
+ $col = $startcol + CcBlockcriteriaPeer::NUM_COLUMNS;
} else {
- $cls = CcAccessPeer::OM_CLASS;
+ $cls = CcBlockcriteriaPeer::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $startcol);
- CcAccessPeer::addInstanceToPool($obj, $key);
+ CcBlockcriteriaPeer::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
/**
- * Returns the number of rows matching criteria, joining the related CcSubjs table
+ * Returns the number of rows matching criteria, joining the related CcBlock table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@@ -479,7 +464,7 @@ abstract class BaseCcAccessPeer {
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
- public static function doCountJoinCcSubjs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doCountJoinCcBlock(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;
@@ -487,14 +472,14 @@ abstract class BaseCcAccessPeer {
// 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(CcAccessPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcriteriaPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcAccessPeer::addSelectColumns($criteria);
+ CcBlockcriteriaPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -503,10 +488,10 @@ abstract class BaseCcAccessPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcAccessPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcriteriaPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -521,15 +506,15 @@ abstract class BaseCcAccessPeer {
/**
- * Selects a collection of CcAccess objects pre-filled with their CcSubjs objects.
+ * Selects a collection of CcBlockcriteria objects pre-filled with their CcBlock 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 CcAccess objects.
+ * @return array Array of CcBlockcriteria objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public static function doSelectJoinCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doSelectJoinCcBlock(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@@ -538,44 +523,44 @@ abstract class BaseCcAccessPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcAccessPeer::addSelectColumns($criteria);
- $startcol = (CcAccessPeer::NUM_COLUMNS - CcAccessPeer::NUM_LAZY_LOAD_COLUMNS);
- CcSubjsPeer::addSelectColumns($criteria);
+ CcBlockcriteriaPeer::addSelectColumns($criteria);
+ $startcol = (CcBlockcriteriaPeer::NUM_COLUMNS - CcBlockcriteriaPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
- $criteria->addJoin(CcAccessPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcriteriaPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcAccessPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcAccessPeer::getInstanceFromPool($key1))) {
+ $key1 = CcBlockcriteriaPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcBlockcriteriaPeer::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 = CcAccessPeer::getOMClass(false);
+ $cls = CcBlockcriteriaPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcAccessPeer::addInstanceToPool($obj1, $key1);
+ CcBlockcriteriaPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
- $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ $key2 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
- $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
+ $obj2 = CcBlockPeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcSubjsPeer::getOMClass(false);
+ $cls = CcBlockPeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
- CcSubjsPeer::addInstanceToPool($obj2, $key2);
+ CcBlockPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
- // Add the $obj1 (CcAccess) to $obj2 (CcSubjs)
- $obj2->addCcAccess($obj1);
+ // Add the $obj1 (CcBlockcriteria) to $obj2 (CcBlock)
+ $obj2->addCcBlockcriteria($obj1);
} // if joined row was not null
@@ -603,14 +588,14 @@ abstract class BaseCcAccessPeer {
// 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(CcAccessPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcBlockcriteriaPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcAccessPeer::addSelectColumns($criteria);
+ CcBlockcriteriaPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -619,10 +604,10 @@ abstract class BaseCcAccessPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcAccessPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcriteriaPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -636,12 +621,12 @@ abstract class BaseCcAccessPeer {
}
/**
- * Selects a collection of CcAccess objects pre-filled with all related objects.
+ * Selects a collection of CcBlockcriteria objects pre-filled with all related 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 CcAccess objects.
+ * @return array Array of CcBlockcriteria objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -654,47 +639,47 @@ abstract class BaseCcAccessPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcAccessPeer::addSelectColumns($criteria);
- $startcol2 = (CcAccessPeer::NUM_COLUMNS - CcAccessPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockcriteriaPeer::addSelectColumns($criteria);
+ $startcol2 = (CcBlockcriteriaPeer::NUM_COLUMNS - CcBlockcriteriaPeer::NUM_LAZY_LOAD_COLUMNS);
- CcSubjsPeer::addSelectColumns($criteria);
- $startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcBlockPeer::NUM_COLUMNS - CcBlockPeer::NUM_LAZY_LOAD_COLUMNS);
- $criteria->addJoin(CcAccessPeer::OWNER, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcBlockcriteriaPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcAccessPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcAccessPeer::getInstanceFromPool($key1))) {
+ $key1 = CcBlockcriteriaPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcBlockcriteriaPeer::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 = CcAccessPeer::getOMClass(false);
+ $cls = CcBlockcriteriaPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcAccessPeer::addInstanceToPool($obj1, $key1);
+ CcBlockcriteriaPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
- // Add objects for joined CcSubjs rows
+ // Add objects for joined CcBlock rows
- $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ $key2 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
- $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
+ $obj2 = CcBlockPeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcSubjsPeer::getOMClass(false);
+ $cls = CcBlockPeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
- CcSubjsPeer::addInstanceToPool($obj2, $key2);
+ CcBlockPeer::addInstanceToPool($obj2, $key2);
} // if obj2 loaded
- // Add the $obj1 (CcAccess) to the collection in $obj2 (CcSubjs)
- $obj2->addCcAccess($obj1);
+ // Add the $obj1 (CcBlockcriteria) to the collection in $obj2 (CcBlock)
+ $obj2->addCcBlockcriteria($obj1);
} // if joined row not null
$results[] = $obj1;
@@ -720,10 +705,10 @@ abstract class BaseCcAccessPeer {
*/
public static function buildTableMap()
{
- $dbMap = Propel::getDatabaseMap(BaseCcAccessPeer::DATABASE_NAME);
- if (!$dbMap->hasTable(BaseCcAccessPeer::TABLE_NAME))
+ $dbMap = Propel::getDatabaseMap(BaseCcBlockcriteriaPeer::DATABASE_NAME);
+ if (!$dbMap->hasTable(BaseCcBlockcriteriaPeer::TABLE_NAME))
{
- $dbMap->addTableObject(new CcAccessTableMap());
+ $dbMap->addTableObject(new CcBlockcriteriaTableMap());
}
}
@@ -740,13 +725,13 @@ abstract class BaseCcAccessPeer {
*/
public static function getOMClass($withPrefix = true)
{
- return $withPrefix ? CcAccessPeer::CLASS_DEFAULT : CcAccessPeer::OM_CLASS;
+ return $withPrefix ? CcBlockcriteriaPeer::CLASS_DEFAULT : CcBlockcriteriaPeer::OM_CLASS;
}
/**
- * Method perform an INSERT on the database, given a CcAccess or Criteria object.
+ * Method perform an INSERT on the database, given a CcBlockcriteria or Criteria object.
*
- * @param mixed $values Criteria or CcAccess object containing data that is used to create the INSERT statement.
+ * @param mixed $values Criteria or CcBlockcriteria object containing data that is used to create the INSERT statement.
* @param PropelPDO $con the PropelPDO connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
@@ -755,17 +740,17 @@ abstract class BaseCcAccessPeer {
public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
- $criteria = $values->buildCriteria(); // build Criteria from CcAccess object
+ $criteria = $values->buildCriteria(); // build Criteria from CcBlockcriteria object
}
- if ($criteria->containsKey(CcAccessPeer::ID) && $criteria->keyContainsValue(CcAccessPeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcAccessPeer::ID.')');
+ if ($criteria->containsKey(CcBlockcriteriaPeer::ID) && $criteria->keyContainsValue(CcBlockcriteriaPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcBlockcriteriaPeer::ID.')');
}
@@ -787,9 +772,9 @@ abstract class BaseCcAccessPeer {
}
/**
- * Method perform an UPDATE on the database, given a CcAccess or Criteria object.
+ * Method perform an UPDATE on the database, given a CcBlockcriteria or Criteria object.
*
- * @param mixed $values Criteria or CcAccess object containing data that is used to create the UPDATE statement.
+ * @param mixed $values Criteria or CcBlockcriteria object containing data that is used to create the UPDATE statement.
* @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
@@ -798,7 +783,7 @@ abstract class BaseCcAccessPeer {
public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
@@ -806,15 +791,15 @@ abstract class BaseCcAccessPeer {
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
- $comparison = $criteria->getComparison(CcAccessPeer::ID);
- $value = $criteria->remove(CcAccessPeer::ID);
+ $comparison = $criteria->getComparison(CcBlockcriteriaPeer::ID);
+ $value = $criteria->remove(CcBlockcriteriaPeer::ID);
if ($value) {
- $selectCriteria->add(CcAccessPeer::ID, $value, $comparison);
+ $selectCriteria->add(CcBlockcriteriaPeer::ID, $value, $comparison);
} else {
- $selectCriteria->setPrimaryTableName(CcAccessPeer::TABLE_NAME);
+ $selectCriteria->setPrimaryTableName(CcBlockcriteriaPeer::TABLE_NAME);
}
- } else { // $values is CcAccess object
+ } else { // $values is CcBlockcriteria object
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
@@ -826,26 +811,26 @@ abstract class BaseCcAccessPeer {
}
/**
- * Method to DELETE all rows from the cc_access table.
+ * Method to DELETE all rows from the cc_blockcriteria table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
- $affectedRows += BasePeer::doDeleteAll(CcAccessPeer::TABLE_NAME, $con, CcAccessPeer::DATABASE_NAME);
+ $affectedRows += BasePeer::doDeleteAll(CcBlockcriteriaPeer::TABLE_NAME, $con, CcBlockcriteriaPeer::DATABASE_NAME);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
- CcAccessPeer::clearInstancePool();
- CcAccessPeer::clearRelatedInstancePool();
+ CcBlockcriteriaPeer::clearInstancePool();
+ CcBlockcriteriaPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -855,9 +840,9 @@ abstract class BaseCcAccessPeer {
}
/**
- * Method perform a DELETE on the database, given a CcAccess or Criteria object OR a primary key value.
+ * Method perform a DELETE on the database, given a CcBlockcriteria or Criteria object OR a primary key value.
*
- * @param mixed $values Criteria or CcAccess object or primary key or array of primary keys
+ * @param mixed $values Criteria or CcBlockcriteria object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
@@ -868,27 +853,27 @@ abstract class BaseCcAccessPeer {
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
- CcAccessPeer::clearInstancePool();
+ CcBlockcriteriaPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
- } elseif ($values instanceof CcAccess) { // it's a model object
+ } elseif ($values instanceof CcBlockcriteria) { // it's a model object
// invalidate the cache for this single object
- CcAccessPeer::removeInstanceFromPool($values);
+ CcBlockcriteriaPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(self::DATABASE_NAME);
- $criteria->add(CcAccessPeer::ID, (array) $values, Criteria::IN);
+ $criteria->add(CcBlockcriteriaPeer::ID, (array) $values, Criteria::IN);
// invalidate the cache for this object(s)
foreach ((array) $values as $singleval) {
- CcAccessPeer::removeInstanceFromPool($singleval);
+ CcBlockcriteriaPeer::removeInstanceFromPool($singleval);
}
}
@@ -903,7 +888,7 @@ abstract class BaseCcAccessPeer {
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
- CcAccessPeer::clearRelatedInstancePool();
+ CcBlockcriteriaPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -913,24 +898,24 @@ abstract class BaseCcAccessPeer {
}
/**
- * Validates all modified columns of given CcAccess object.
+ * Validates all modified columns of given CcBlockcriteria object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
- * @param CcAccess $obj The object to validate.
+ * @param CcBlockcriteria $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
- public static function doValidate(CcAccess $obj, $cols = null)
+ public static function doValidate(CcBlockcriteria $obj, $cols = null)
{
$columns = array();
if ($cols) {
- $dbMap = Propel::getDatabaseMap(CcAccessPeer::DATABASE_NAME);
- $tableMap = $dbMap->getTable(CcAccessPeer::TABLE_NAME);
+ $dbMap = Propel::getDatabaseMap(CcBlockcriteriaPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(CcBlockcriteriaPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -946,7 +931,7 @@ abstract class BaseCcAccessPeer {
}
- return BasePeer::doValidate(CcAccessPeer::DATABASE_NAME, CcAccessPeer::TABLE_NAME, $columns);
+ return BasePeer::doValidate(CcBlockcriteriaPeer::DATABASE_NAME, CcBlockcriteriaPeer::TABLE_NAME, $columns);
}
/**
@@ -954,23 +939,23 @@ abstract class BaseCcAccessPeer {
*
* @param int $pk the primary key.
* @param PropelPDO $con the connection to use
- * @return CcAccess
+ * @return CcBlockcriteria
*/
public static function retrieveByPK($pk, PropelPDO $con = null)
{
- if (null !== ($obj = CcAccessPeer::getInstanceFromPool((string) $pk))) {
+ if (null !== ($obj = CcBlockcriteriaPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria = new Criteria(CcAccessPeer::DATABASE_NAME);
- $criteria->add(CcAccessPeer::ID, $pk);
+ $criteria = new Criteria(CcBlockcriteriaPeer::DATABASE_NAME);
+ $criteria->add(CcBlockcriteriaPeer::ID, $pk);
- $v = CcAccessPeer::doSelect($criteria, $con);
+ $v = CcBlockcriteriaPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -986,23 +971,23 @@ abstract class BaseCcAccessPeer {
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcAccessPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
- $criteria = new Criteria(CcAccessPeer::DATABASE_NAME);
- $criteria->add(CcAccessPeer::ID, $pks, Criteria::IN);
- $objs = CcAccessPeer::doSelect($criteria, $con);
+ $criteria = new Criteria(CcBlockcriteriaPeer::DATABASE_NAME);
+ $criteria->add(CcBlockcriteriaPeer::ID, $pks, Criteria::IN);
+ $objs = CcBlockcriteriaPeer::doSelect($criteria, $con);
}
return $objs;
}
-} // BaseCcAccessPeer
+} // BaseCcBlockcriteriaPeer
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
-BaseCcAccessPeer::buildTableMap();
+BaseCcBlockcriteriaPeer::buildTableMap();
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcBlockcriteriaQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcBlockcriteriaQuery.php
new file mode 100644
index 000000000..9baabbd74
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcBlockcriteriaQuery.php
@@ -0,0 +1,372 @@
+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
+ *
+ * $obj = $c->findPk(12, $con);
+ *
+ * @param mixed $key Primary key to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return CcBlockcriteria|array|mixed the result, formatted by the current formatter
+ */
+ public function findPk($key, $con = null)
+ {
+ if ((null !== ($obj = CcBlockcriteriaPeer::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
+ *
+ * $objs = $c->findPks(array(12, 56, 832), $con);
+ *
+ * @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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKey($key)
+ {
+ return $this->addUsingAlias(CcBlockcriteriaPeer::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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKeys($keys)
+ {
+ return $this->addUsingAlias(CcBlockcriteriaPeer::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 CcBlockcriteriaQuery 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(CcBlockcriteriaPeer::ID, $dbId, $comparison);
+ }
+
+ /**
+ * Filter the query on the criteria column
+ *
+ * @param string $dbCriteria 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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbCriteria($dbCriteria = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbCriteria)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbCriteria)) {
+ $dbCriteria = str_replace('*', '%', $dbCriteria);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcriteriaPeer::CRITERIA, $dbCriteria, $comparison);
+ }
+
+ /**
+ * Filter the query on the modifier column
+ *
+ * @param string $dbModifier 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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbModifier($dbModifier = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbModifier)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbModifier)) {
+ $dbModifier = str_replace('*', '%', $dbModifier);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcriteriaPeer::MODIFIER, $dbModifier, $comparison);
+ }
+
+ /**
+ * Filter the query on the value column
+ *
+ * @param string $dbValue 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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbValue($dbValue = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbValue)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbValue)) {
+ $dbValue = str_replace('*', '%', $dbValue);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcriteriaPeer::VALUE, $dbValue, $comparison);
+ }
+
+ /**
+ * Filter the query on the extra column
+ *
+ * @param string $dbExtra 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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbExtra($dbExtra = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbExtra)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbExtra)) {
+ $dbExtra = str_replace('*', '%', $dbExtra);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcriteriaPeer::EXTRA, $dbExtra, $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 CcBlockcriteriaQuery 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(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbBlockId['max'])) {
+ $this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId, $comparison);
+ }
+
+ /**
+ * 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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByCcBlock($ccBlock, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcBlockcriteriaPeer::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 CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function joinCcBlock($relationAlias = '', $joinType = Criteria::INNER_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::INNER_JOIN)
+ {
+ return $this
+ ->joinCcBlock($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcBlock', 'CcBlockQuery');
+ }
+
+ /**
+ * Exclude object from result
+ *
+ * @param CcBlockcriteria $ccBlockcriteria Object to remove from the list of results
+ *
+ * @return CcBlockcriteriaQuery The current query, for fluid interface
+ */
+ public function prune($ccBlockcriteria = null)
+ {
+ if ($ccBlockcriteria) {
+ $this->addUsingAlias(CcBlockcriteriaPeer::ID, $ccBlockcriteria->getDbId(), Criteria::NOT_EQUAL);
+ }
+
+ return $this;
+ }
+
+} // BaseCcBlockcriteriaQuery
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
index f3f60d2e1..a18d65dca 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
@@ -30,12 +30,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $id;
- /**
- * The value for the gunid field.
- * @var string
- */
- protected $gunid;
-
/**
* The value for the name field.
* Note: this column has a database default value of: ''
@@ -195,7 +189,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
/**
* The value for the bpm field.
- * @var string
+ * @var int
*/
protected $bpm;
@@ -410,10 +404,27 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $soundcloud_upload_time;
+ /**
+ * The value for the replay_gain field.
+ * @var string
+ */
+ protected $replay_gain;
+
+ /**
+ * The value for the owner_id field.
+ * @var int
+ */
+ protected $owner_id;
+
/**
* @var CcSubjs
*/
- protected $aCcSubjs;
+ protected $aFkOwner;
+
+ /**
+ * @var CcSubjs
+ */
+ protected $aCcSubjsRelatedByDbEditedby;
/**
* @var CcMusicDirs
@@ -430,6 +441,11 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $collCcPlaylistcontentss;
+ /**
+ * @var array CcBlockcontents[] Collection to store aggregation of CcBlockcontents objects.
+ */
+ protected $collCcBlockcontentss;
+
/**
* @var array CcSchedule[] Collection to store aggregation of CcSchedule objects.
*/
@@ -487,16 +503,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->id;
}
- /**
- * Get the [gunid] column value.
- *
- * @return string
- */
- public function getDbGunid()
- {
- return $this->gunid;
- }
-
/**
* Get the [name] column value.
*
@@ -819,7 +825,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
/**
* Get the [bpm] column value.
*
- * @return string
+ * @return int
*/
public function getDbBpm()
{
@@ -1199,6 +1205,26 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
}
}
+ /**
+ * Get the [replay_gain] column value.
+ *
+ * @return string
+ */
+ public function getDbReplayGain()
+ {
+ return $this->replay_gain;
+ }
+
+ /**
+ * Get the [owner_id] column value.
+ *
+ * @return int
+ */
+ public function getDbOwnerId()
+ {
+ return $this->owner_id;
+ }
+
/**
* Set the value of [id] column.
*
@@ -1219,26 +1245,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbId()
- /**
- * Set the value of [gunid] column.
- *
- * @param string $v new value
- * @return CcFiles The current object (for fluent API support)
- */
- public function setDbGunid($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->gunid !== $v) {
- $this->gunid = $v;
- $this->modifiedColumns[] = CcFilesPeer::GUNID;
- }
-
- return $this;
- } // setDbGunid()
-
/**
* Set the value of [name] column.
*
@@ -1400,8 +1406,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->modifiedColumns[] = CcFilesPeer::EDITEDBY;
}
- if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
- $this->aCcSubjs = null;
+ if ($this->aCcSubjsRelatedByDbEditedby !== null && $this->aCcSubjsRelatedByDbEditedby->getDbId() !== $v) {
+ $this->aCcSubjsRelatedByDbEditedby = null;
}
return $this;
@@ -1837,13 +1843,13 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
/**
* Set the value of [bpm] column.
*
- * @param string $v new value
+ * @param int $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbBpm($v)
{
if ($v !== null) {
- $v = (string) $v;
+ $v = (int) $v;
}
if ($this->bpm !== $v) {
@@ -2583,6 +2589,50 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbSoundCloundUploadTime()
+ /**
+ * Set the value of [replay_gain] column.
+ *
+ * @param string $v new value
+ * @return CcFiles The current object (for fluent API support)
+ */
+ public function setDbReplayGain($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->replay_gain !== $v) {
+ $this->replay_gain = $v;
+ $this->modifiedColumns[] = CcFilesPeer::REPLAY_GAIN;
+ }
+
+ return $this;
+ } // setDbReplayGain()
+
+ /**
+ * Set the value of [owner_id] column.
+ *
+ * @param int $v new value
+ * @return CcFiles The current object (for fluent API support)
+ */
+ public function setDbOwnerId($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->owner_id !== $v) {
+ $this->owner_id = $v;
+ $this->modifiedColumns[] = CcFilesPeer::OWNER_ID;
+ }
+
+ if ($this->aFkOwner !== null && $this->aFkOwner->getDbId() !== $v) {
+ $this->aFkOwner = null;
+ }
+
+ return $this;
+ } // setDbOwnerId()
+
/**
* Indicates whether the columns in this object are only set to default values.
*
@@ -2648,68 +2698,69 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
- $this->gunid = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
- $this->name = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
- $this->mime = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
- $this->ftype = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
- $this->directory = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
- $this->filepath = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
- $this->state = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
- $this->currentlyaccessing = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
- $this->editedby = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
- $this->mtime = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
- $this->utime = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
- $this->lptime = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
- $this->md5 = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
- $this->track_title = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
- $this->artist_name = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null;
- $this->bit_rate = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;
- $this->sample_rate = ($row[$startcol + 17] !== null) ? (int) $row[$startcol + 17] : null;
- $this->format = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
- $this->length = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
- $this->album_title = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null;
- $this->genre = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null;
- $this->comments = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null;
- $this->year = ($row[$startcol + 23] !== null) ? (string) $row[$startcol + 23] : null;
- $this->track_number = ($row[$startcol + 24] !== null) ? (int) $row[$startcol + 24] : null;
- $this->channels = ($row[$startcol + 25] !== null) ? (int) $row[$startcol + 25] : null;
- $this->url = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null;
- $this->bpm = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
- $this->rating = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
- $this->encoded_by = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
- $this->disc_number = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
- $this->mood = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
- $this->label = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
- $this->composer = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null;
- $this->encoder = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null;
- $this->checksum = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
- $this->lyrics = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null;
- $this->orchestra = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null;
- $this->conductor = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null;
- $this->lyricist = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null;
- $this->original_lyricist = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null;
- $this->radio_station_name = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null;
- $this->info_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null;
- $this->artist_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null;
- $this->audio_source_url = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null;
- $this->radio_station_url = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null;
- $this->buy_this_url = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null;
- $this->isrc_number = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null;
- $this->catalog_number = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null;
- $this->original_artist = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null;
- $this->copyright = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null;
- $this->report_datetime = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null;
- $this->report_location = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null;
- $this->report_organization = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null;
- $this->subject = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
- $this->contributor = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
- $this->language = ($row[$startcol + 56] !== null) ? (string) $row[$startcol + 56] : null;
- $this->file_exists = ($row[$startcol + 57] !== null) ? (boolean) $row[$startcol + 57] : null;
- $this->soundcloud_id = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
- $this->soundcloud_error_code = ($row[$startcol + 59] !== null) ? (int) $row[$startcol + 59] : null;
- $this->soundcloud_error_msg = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
- $this->soundcloud_link_to_file = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null;
- $this->soundcloud_upload_time = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null;
+ $this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
+ $this->mime = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
+ $this->ftype = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
+ $this->directory = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
+ $this->filepath = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
+ $this->state = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
+ $this->currentlyaccessing = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
+ $this->editedby = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
+ $this->mtime = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
+ $this->utime = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
+ $this->lptime = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
+ $this->md5 = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
+ $this->track_title = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
+ $this->artist_name = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
+ $this->bit_rate = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
+ $this->sample_rate = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;
+ $this->format = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
+ $this->length = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
+ $this->album_title = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
+ $this->genre = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null;
+ $this->comments = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null;
+ $this->year = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null;
+ $this->track_number = ($row[$startcol + 23] !== null) ? (int) $row[$startcol + 23] : null;
+ $this->channels = ($row[$startcol + 24] !== null) ? (int) $row[$startcol + 24] : null;
+ $this->url = ($row[$startcol + 25] !== null) ? (string) $row[$startcol + 25] : null;
+ $this->bpm = ($row[$startcol + 26] !== null) ? (int) $row[$startcol + 26] : null;
+ $this->rating = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
+ $this->encoded_by = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
+ $this->disc_number = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
+ $this->mood = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
+ $this->label = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
+ $this->composer = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
+ $this->encoder = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null;
+ $this->checksum = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null;
+ $this->lyrics = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
+ $this->orchestra = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null;
+ $this->conductor = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null;
+ $this->lyricist = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null;
+ $this->original_lyricist = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null;
+ $this->radio_station_name = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null;
+ $this->info_url = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null;
+ $this->artist_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null;
+ $this->audio_source_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null;
+ $this->radio_station_url = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null;
+ $this->buy_this_url = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null;
+ $this->isrc_number = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null;
+ $this->catalog_number = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null;
+ $this->original_artist = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null;
+ $this->copyright = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null;
+ $this->report_datetime = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null;
+ $this->report_location = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null;
+ $this->report_organization = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null;
+ $this->subject = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null;
+ $this->contributor = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
+ $this->language = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
+ $this->file_exists = ($row[$startcol + 56] !== null) ? (boolean) $row[$startcol + 56] : null;
+ $this->soundcloud_id = ($row[$startcol + 57] !== null) ? (int) $row[$startcol + 57] : null;
+ $this->soundcloud_error_code = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
+ $this->soundcloud_error_msg = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null;
+ $this->soundcloud_link_to_file = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
+ $this->soundcloud_upload_time = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null;
+ $this->replay_gain = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null;
+ $this->owner_id = ($row[$startcol + 63] !== null) ? (int) $row[$startcol + 63] : null;
$this->resetModified();
$this->setNew(false);
@@ -2718,7 +2769,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 63; // 63 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 64; // 64 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcFiles object", $e);
@@ -2744,8 +2795,11 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($this->aCcMusicDirs !== null && $this->directory !== $this->aCcMusicDirs->getId()) {
$this->aCcMusicDirs = null;
}
- if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getDbId()) {
- $this->aCcSubjs = null;
+ if ($this->aCcSubjsRelatedByDbEditedby !== null && $this->editedby !== $this->aCcSubjsRelatedByDbEditedby->getDbId()) {
+ $this->aCcSubjsRelatedByDbEditedby = null;
+ }
+ if ($this->aFkOwner !== null && $this->owner_id !== $this->aFkOwner->getDbId()) {
+ $this->aFkOwner = null;
}
} // ensureConsistency
@@ -2786,12 +2840,15 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
- $this->aCcSubjs = null;
+ $this->aFkOwner = null;
+ $this->aCcSubjsRelatedByDbEditedby = null;
$this->aCcMusicDirs = null;
$this->collCcShowInstancess = null;
$this->collCcPlaylistcontentss = null;
+ $this->collCcBlockcontentss = null;
+
$this->collCcSchedules = null;
} // if (deep)
@@ -2909,11 +2966,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcSubjs !== null) {
- if ($this->aCcSubjs->isModified() || $this->aCcSubjs->isNew()) {
- $affectedRows += $this->aCcSubjs->save($con);
+ if ($this->aFkOwner !== null) {
+ if ($this->aFkOwner->isModified() || $this->aFkOwner->isNew()) {
+ $affectedRows += $this->aFkOwner->save($con);
}
- $this->setCcSubjs($this->aCcSubjs);
+ $this->setFkOwner($this->aFkOwner);
+ }
+
+ if ($this->aCcSubjsRelatedByDbEditedby !== null) {
+ if ($this->aCcSubjsRelatedByDbEditedby->isModified() || $this->aCcSubjsRelatedByDbEditedby->isNew()) {
+ $affectedRows += $this->aCcSubjsRelatedByDbEditedby->save($con);
+ }
+ $this->setCcSubjsRelatedByDbEditedby($this->aCcSubjsRelatedByDbEditedby);
}
if ($this->aCcMusicDirs !== null) {
@@ -2962,6 +3026,14 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
}
}
+ if ($this->collCcBlockcontentss !== null) {
+ foreach ($this->collCcBlockcontentss as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
if ($this->collCcSchedules !== null) {
foreach ($this->collCcSchedules as $referrerFK) {
if (!$referrerFK->isDeleted()) {
@@ -3041,9 +3113,15 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcSubjs !== null) {
- if (!$this->aCcSubjs->validate($columns)) {
- $failureMap = array_merge($failureMap, $this->aCcSubjs->getValidationFailures());
+ if ($this->aFkOwner !== null) {
+ if (!$this->aFkOwner->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aFkOwner->getValidationFailures());
+ }
+ }
+
+ if ($this->aCcSubjsRelatedByDbEditedby !== null) {
+ if (!$this->aCcSubjsRelatedByDbEditedby->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcSubjsRelatedByDbEditedby->getValidationFailures());
}
}
@@ -3075,6 +3153,14 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
}
}
+ if ($this->collCcBlockcontentss !== null) {
+ foreach ($this->collCcBlockcontentss as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
if ($this->collCcSchedules !== null) {
foreach ($this->collCcSchedules as $referrerFK) {
if (!$referrerFK->validate($columns)) {
@@ -3120,191 +3206,194 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getDbId();
break;
case 1:
- return $this->getDbGunid();
- break;
- case 2:
return $this->getDbName();
break;
- case 3:
+ case 2:
return $this->getDbMime();
break;
- case 4:
+ case 3:
return $this->getDbFtype();
break;
- case 5:
+ case 4:
return $this->getDbDirectory();
break;
- case 6:
+ case 5:
return $this->getDbFilepath();
break;
- case 7:
+ case 6:
return $this->getDbState();
break;
- case 8:
+ case 7:
return $this->getDbCurrentlyaccessing();
break;
- case 9:
+ case 8:
return $this->getDbEditedby();
break;
- case 10:
+ case 9:
return $this->getDbMtime();
break;
- case 11:
+ case 10:
return $this->getDbUtime();
break;
- case 12:
+ case 11:
return $this->getDbLPtime();
break;
- case 13:
+ case 12:
return $this->getDbMd5();
break;
- case 14:
+ case 13:
return $this->getDbTrackTitle();
break;
- case 15:
+ case 14:
return $this->getDbArtistName();
break;
- case 16:
+ case 15:
return $this->getDbBitRate();
break;
- case 17:
+ case 16:
return $this->getDbSampleRate();
break;
- case 18:
+ case 17:
return $this->getDbFormat();
break;
- case 19:
+ case 18:
return $this->getDbLength();
break;
- case 20:
+ case 19:
return $this->getDbAlbumTitle();
break;
- case 21:
+ case 20:
return $this->getDbGenre();
break;
- case 22:
+ case 21:
return $this->getDbComments();
break;
- case 23:
+ case 22:
return $this->getDbYear();
break;
- case 24:
+ case 23:
return $this->getDbTrackNumber();
break;
- case 25:
+ case 24:
return $this->getDbChannels();
break;
- case 26:
+ case 25:
return $this->getDbUrl();
break;
- case 27:
+ case 26:
return $this->getDbBpm();
break;
- case 28:
+ case 27:
return $this->getDbRating();
break;
- case 29:
+ case 28:
return $this->getDbEncodedBy();
break;
- case 30:
+ case 29:
return $this->getDbDiscNumber();
break;
- case 31:
+ case 30:
return $this->getDbMood();
break;
- case 32:
+ case 31:
return $this->getDbLabel();
break;
- case 33:
+ case 32:
return $this->getDbComposer();
break;
- case 34:
+ case 33:
return $this->getDbEncoder();
break;
- case 35:
+ case 34:
return $this->getDbChecksum();
break;
- case 36:
+ case 35:
return $this->getDbLyrics();
break;
- case 37:
+ case 36:
return $this->getDbOrchestra();
break;
- case 38:
+ case 37:
return $this->getDbConductor();
break;
- case 39:
+ case 38:
return $this->getDbLyricist();
break;
- case 40:
+ case 39:
return $this->getDbOriginalLyricist();
break;
- case 41:
+ case 40:
return $this->getDbRadioStationName();
break;
- case 42:
+ case 41:
return $this->getDbInfoUrl();
break;
- case 43:
+ case 42:
return $this->getDbArtistUrl();
break;
- case 44:
+ case 43:
return $this->getDbAudioSourceUrl();
break;
- case 45:
+ case 44:
return $this->getDbRadioStationUrl();
break;
- case 46:
+ case 45:
return $this->getDbBuyThisUrl();
break;
- case 47:
+ case 46:
return $this->getDbIsrcNumber();
break;
- case 48:
+ case 47:
return $this->getDbCatalogNumber();
break;
- case 49:
+ case 48:
return $this->getDbOriginalArtist();
break;
- case 50:
+ case 49:
return $this->getDbCopyright();
break;
- case 51:
+ case 50:
return $this->getDbReportDatetime();
break;
- case 52:
+ case 51:
return $this->getDbReportLocation();
break;
- case 53:
+ case 52:
return $this->getDbReportOrganization();
break;
- case 54:
+ case 53:
return $this->getDbSubject();
break;
- case 55:
+ case 54:
return $this->getDbContributor();
break;
- case 56:
+ case 55:
return $this->getDbLanguage();
break;
- case 57:
+ case 56:
return $this->getDbFileExists();
break;
- case 58:
+ case 57:
return $this->getDbSoundcloudId();
break;
- case 59:
+ case 58:
return $this->getDbSoundcloudErrorCode();
break;
- case 60:
+ case 59:
return $this->getDbSoundcloudErrorMsg();
break;
- case 61:
+ case 60:
return $this->getDbSoundcloudLinkToFile();
break;
- case 62:
+ case 61:
return $this->getDbSoundCloundUploadTime();
break;
+ case 62:
+ return $this->getDbReplayGain();
+ break;
+ case 63:
+ return $this->getDbOwnerId();
+ break;
default:
return null;
break;
@@ -3330,72 +3419,76 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys = CcFilesPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getDbId(),
- $keys[1] => $this->getDbGunid(),
- $keys[2] => $this->getDbName(),
- $keys[3] => $this->getDbMime(),
- $keys[4] => $this->getDbFtype(),
- $keys[5] => $this->getDbDirectory(),
- $keys[6] => $this->getDbFilepath(),
- $keys[7] => $this->getDbState(),
- $keys[8] => $this->getDbCurrentlyaccessing(),
- $keys[9] => $this->getDbEditedby(),
- $keys[10] => $this->getDbMtime(),
- $keys[11] => $this->getDbUtime(),
- $keys[12] => $this->getDbLPtime(),
- $keys[13] => $this->getDbMd5(),
- $keys[14] => $this->getDbTrackTitle(),
- $keys[15] => $this->getDbArtistName(),
- $keys[16] => $this->getDbBitRate(),
- $keys[17] => $this->getDbSampleRate(),
- $keys[18] => $this->getDbFormat(),
- $keys[19] => $this->getDbLength(),
- $keys[20] => $this->getDbAlbumTitle(),
- $keys[21] => $this->getDbGenre(),
- $keys[22] => $this->getDbComments(),
- $keys[23] => $this->getDbYear(),
- $keys[24] => $this->getDbTrackNumber(),
- $keys[25] => $this->getDbChannels(),
- $keys[26] => $this->getDbUrl(),
- $keys[27] => $this->getDbBpm(),
- $keys[28] => $this->getDbRating(),
- $keys[29] => $this->getDbEncodedBy(),
- $keys[30] => $this->getDbDiscNumber(),
- $keys[31] => $this->getDbMood(),
- $keys[32] => $this->getDbLabel(),
- $keys[33] => $this->getDbComposer(),
- $keys[34] => $this->getDbEncoder(),
- $keys[35] => $this->getDbChecksum(),
- $keys[36] => $this->getDbLyrics(),
- $keys[37] => $this->getDbOrchestra(),
- $keys[38] => $this->getDbConductor(),
- $keys[39] => $this->getDbLyricist(),
- $keys[40] => $this->getDbOriginalLyricist(),
- $keys[41] => $this->getDbRadioStationName(),
- $keys[42] => $this->getDbInfoUrl(),
- $keys[43] => $this->getDbArtistUrl(),
- $keys[44] => $this->getDbAudioSourceUrl(),
- $keys[45] => $this->getDbRadioStationUrl(),
- $keys[46] => $this->getDbBuyThisUrl(),
- $keys[47] => $this->getDbIsrcNumber(),
- $keys[48] => $this->getDbCatalogNumber(),
- $keys[49] => $this->getDbOriginalArtist(),
- $keys[50] => $this->getDbCopyright(),
- $keys[51] => $this->getDbReportDatetime(),
- $keys[52] => $this->getDbReportLocation(),
- $keys[53] => $this->getDbReportOrganization(),
- $keys[54] => $this->getDbSubject(),
- $keys[55] => $this->getDbContributor(),
- $keys[56] => $this->getDbLanguage(),
- $keys[57] => $this->getDbFileExists(),
- $keys[58] => $this->getDbSoundcloudId(),
- $keys[59] => $this->getDbSoundcloudErrorCode(),
- $keys[60] => $this->getDbSoundcloudErrorMsg(),
- $keys[61] => $this->getDbSoundcloudLinkToFile(),
- $keys[62] => $this->getDbSoundCloundUploadTime(),
+ $keys[1] => $this->getDbName(),
+ $keys[2] => $this->getDbMime(),
+ $keys[3] => $this->getDbFtype(),
+ $keys[4] => $this->getDbDirectory(),
+ $keys[5] => $this->getDbFilepath(),
+ $keys[6] => $this->getDbState(),
+ $keys[7] => $this->getDbCurrentlyaccessing(),
+ $keys[8] => $this->getDbEditedby(),
+ $keys[9] => $this->getDbMtime(),
+ $keys[10] => $this->getDbUtime(),
+ $keys[11] => $this->getDbLPtime(),
+ $keys[12] => $this->getDbMd5(),
+ $keys[13] => $this->getDbTrackTitle(),
+ $keys[14] => $this->getDbArtistName(),
+ $keys[15] => $this->getDbBitRate(),
+ $keys[16] => $this->getDbSampleRate(),
+ $keys[17] => $this->getDbFormat(),
+ $keys[18] => $this->getDbLength(),
+ $keys[19] => $this->getDbAlbumTitle(),
+ $keys[20] => $this->getDbGenre(),
+ $keys[21] => $this->getDbComments(),
+ $keys[22] => $this->getDbYear(),
+ $keys[23] => $this->getDbTrackNumber(),
+ $keys[24] => $this->getDbChannels(),
+ $keys[25] => $this->getDbUrl(),
+ $keys[26] => $this->getDbBpm(),
+ $keys[27] => $this->getDbRating(),
+ $keys[28] => $this->getDbEncodedBy(),
+ $keys[29] => $this->getDbDiscNumber(),
+ $keys[30] => $this->getDbMood(),
+ $keys[31] => $this->getDbLabel(),
+ $keys[32] => $this->getDbComposer(),
+ $keys[33] => $this->getDbEncoder(),
+ $keys[34] => $this->getDbChecksum(),
+ $keys[35] => $this->getDbLyrics(),
+ $keys[36] => $this->getDbOrchestra(),
+ $keys[37] => $this->getDbConductor(),
+ $keys[38] => $this->getDbLyricist(),
+ $keys[39] => $this->getDbOriginalLyricist(),
+ $keys[40] => $this->getDbRadioStationName(),
+ $keys[41] => $this->getDbInfoUrl(),
+ $keys[42] => $this->getDbArtistUrl(),
+ $keys[43] => $this->getDbAudioSourceUrl(),
+ $keys[44] => $this->getDbRadioStationUrl(),
+ $keys[45] => $this->getDbBuyThisUrl(),
+ $keys[46] => $this->getDbIsrcNumber(),
+ $keys[47] => $this->getDbCatalogNumber(),
+ $keys[48] => $this->getDbOriginalArtist(),
+ $keys[49] => $this->getDbCopyright(),
+ $keys[50] => $this->getDbReportDatetime(),
+ $keys[51] => $this->getDbReportLocation(),
+ $keys[52] => $this->getDbReportOrganization(),
+ $keys[53] => $this->getDbSubject(),
+ $keys[54] => $this->getDbContributor(),
+ $keys[55] => $this->getDbLanguage(),
+ $keys[56] => $this->getDbFileExists(),
+ $keys[57] => $this->getDbSoundcloudId(),
+ $keys[58] => $this->getDbSoundcloudErrorCode(),
+ $keys[59] => $this->getDbSoundcloudErrorMsg(),
+ $keys[60] => $this->getDbSoundcloudLinkToFile(),
+ $keys[61] => $this->getDbSoundCloundUploadTime(),
+ $keys[62] => $this->getDbReplayGain(),
+ $keys[63] => $this->getDbOwnerId(),
);
if ($includeForeignObjects) {
- if (null !== $this->aCcSubjs) {
- $result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, true);
+ if (null !== $this->aFkOwner) {
+ $result['FkOwner'] = $this->aFkOwner->toArray($keyType, $includeLazyLoadColumns, true);
+ }
+ if (null !== $this->aCcSubjsRelatedByDbEditedby) {
+ $result['CcSubjsRelatedByDbEditedby'] = $this->aCcSubjsRelatedByDbEditedby->toArray($keyType, $includeLazyLoadColumns, true);
}
if (null !== $this->aCcMusicDirs) {
$result['CcMusicDirs'] = $this->aCcMusicDirs->toArray($keyType, $includeLazyLoadColumns, true);
@@ -3435,191 +3528,194 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->setDbId($value);
break;
case 1:
- $this->setDbGunid($value);
- break;
- case 2:
$this->setDbName($value);
break;
- case 3:
+ case 2:
$this->setDbMime($value);
break;
- case 4:
+ case 3:
$this->setDbFtype($value);
break;
- case 5:
+ case 4:
$this->setDbDirectory($value);
break;
- case 6:
+ case 5:
$this->setDbFilepath($value);
break;
- case 7:
+ case 6:
$this->setDbState($value);
break;
- case 8:
+ case 7:
$this->setDbCurrentlyaccessing($value);
break;
- case 9:
+ case 8:
$this->setDbEditedby($value);
break;
- case 10:
+ case 9:
$this->setDbMtime($value);
break;
- case 11:
+ case 10:
$this->setDbUtime($value);
break;
- case 12:
+ case 11:
$this->setDbLPtime($value);
break;
- case 13:
+ case 12:
$this->setDbMd5($value);
break;
- case 14:
+ case 13:
$this->setDbTrackTitle($value);
break;
- case 15:
+ case 14:
$this->setDbArtistName($value);
break;
- case 16:
+ case 15:
$this->setDbBitRate($value);
break;
- case 17:
+ case 16:
$this->setDbSampleRate($value);
break;
- case 18:
+ case 17:
$this->setDbFormat($value);
break;
- case 19:
+ case 18:
$this->setDbLength($value);
break;
- case 20:
+ case 19:
$this->setDbAlbumTitle($value);
break;
- case 21:
+ case 20:
$this->setDbGenre($value);
break;
- case 22:
+ case 21:
$this->setDbComments($value);
break;
- case 23:
+ case 22:
$this->setDbYear($value);
break;
- case 24:
+ case 23:
$this->setDbTrackNumber($value);
break;
- case 25:
+ case 24:
$this->setDbChannels($value);
break;
- case 26:
+ case 25:
$this->setDbUrl($value);
break;
- case 27:
+ case 26:
$this->setDbBpm($value);
break;
- case 28:
+ case 27:
$this->setDbRating($value);
break;
- case 29:
+ case 28:
$this->setDbEncodedBy($value);
break;
- case 30:
+ case 29:
$this->setDbDiscNumber($value);
break;
- case 31:
+ case 30:
$this->setDbMood($value);
break;
- case 32:
+ case 31:
$this->setDbLabel($value);
break;
- case 33:
+ case 32:
$this->setDbComposer($value);
break;
- case 34:
+ case 33:
$this->setDbEncoder($value);
break;
- case 35:
+ case 34:
$this->setDbChecksum($value);
break;
- case 36:
+ case 35:
$this->setDbLyrics($value);
break;
- case 37:
+ case 36:
$this->setDbOrchestra($value);
break;
- case 38:
+ case 37:
$this->setDbConductor($value);
break;
- case 39:
+ case 38:
$this->setDbLyricist($value);
break;
- case 40:
+ case 39:
$this->setDbOriginalLyricist($value);
break;
- case 41:
+ case 40:
$this->setDbRadioStationName($value);
break;
- case 42:
+ case 41:
$this->setDbInfoUrl($value);
break;
- case 43:
+ case 42:
$this->setDbArtistUrl($value);
break;
- case 44:
+ case 43:
$this->setDbAudioSourceUrl($value);
break;
- case 45:
+ case 44:
$this->setDbRadioStationUrl($value);
break;
- case 46:
+ case 45:
$this->setDbBuyThisUrl($value);
break;
- case 47:
+ case 46:
$this->setDbIsrcNumber($value);
break;
- case 48:
+ case 47:
$this->setDbCatalogNumber($value);
break;
- case 49:
+ case 48:
$this->setDbOriginalArtist($value);
break;
- case 50:
+ case 49:
$this->setDbCopyright($value);
break;
- case 51:
+ case 50:
$this->setDbReportDatetime($value);
break;
- case 52:
+ case 51:
$this->setDbReportLocation($value);
break;
- case 53:
+ case 52:
$this->setDbReportOrganization($value);
break;
- case 54:
+ case 53:
$this->setDbSubject($value);
break;
- case 55:
+ case 54:
$this->setDbContributor($value);
break;
- case 56:
+ case 55:
$this->setDbLanguage($value);
break;
- case 57:
+ case 56:
$this->setDbFileExists($value);
break;
- case 58:
+ case 57:
$this->setDbSoundcloudId($value);
break;
- case 59:
+ case 58:
$this->setDbSoundcloudErrorCode($value);
break;
- case 60:
+ case 59:
$this->setDbSoundcloudErrorMsg($value);
break;
- case 61:
+ case 60:
$this->setDbSoundcloudLinkToFile($value);
break;
- case 62:
+ case 61:
$this->setDbSoundCloundUploadTime($value);
break;
+ case 62:
+ $this->setDbReplayGain($value);
+ break;
+ case 63:
+ $this->setDbOwnerId($value);
+ break;
} // switch()
}
@@ -3645,68 +3741,69 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys = CcFilesPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setDbGunid($arr[$keys[1]]);
- if (array_key_exists($keys[2], $arr)) $this->setDbName($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDbMime($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setDbFtype($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDbDirectory($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setDbFilepath($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setDbState($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[8]]);
- if (array_key_exists($keys[9], $arr)) $this->setDbEditedby($arr[$keys[9]]);
- if (array_key_exists($keys[10], $arr)) $this->setDbMtime($arr[$keys[10]]);
- if (array_key_exists($keys[11], $arr)) $this->setDbUtime($arr[$keys[11]]);
- if (array_key_exists($keys[12], $arr)) $this->setDbLPtime($arr[$keys[12]]);
- if (array_key_exists($keys[13], $arr)) $this->setDbMd5($arr[$keys[13]]);
- if (array_key_exists($keys[14], $arr)) $this->setDbTrackTitle($arr[$keys[14]]);
- if (array_key_exists($keys[15], $arr)) $this->setDbArtistName($arr[$keys[15]]);
- if (array_key_exists($keys[16], $arr)) $this->setDbBitRate($arr[$keys[16]]);
- if (array_key_exists($keys[17], $arr)) $this->setDbSampleRate($arr[$keys[17]]);
- if (array_key_exists($keys[18], $arr)) $this->setDbFormat($arr[$keys[18]]);
- if (array_key_exists($keys[19], $arr)) $this->setDbLength($arr[$keys[19]]);
- if (array_key_exists($keys[20], $arr)) $this->setDbAlbumTitle($arr[$keys[20]]);
- if (array_key_exists($keys[21], $arr)) $this->setDbGenre($arr[$keys[21]]);
- if (array_key_exists($keys[22], $arr)) $this->setDbComments($arr[$keys[22]]);
- if (array_key_exists($keys[23], $arr)) $this->setDbYear($arr[$keys[23]]);
- if (array_key_exists($keys[24], $arr)) $this->setDbTrackNumber($arr[$keys[24]]);
- if (array_key_exists($keys[25], $arr)) $this->setDbChannels($arr[$keys[25]]);
- if (array_key_exists($keys[26], $arr)) $this->setDbUrl($arr[$keys[26]]);
- if (array_key_exists($keys[27], $arr)) $this->setDbBpm($arr[$keys[27]]);
- if (array_key_exists($keys[28], $arr)) $this->setDbRating($arr[$keys[28]]);
- if (array_key_exists($keys[29], $arr)) $this->setDbEncodedBy($arr[$keys[29]]);
- if (array_key_exists($keys[30], $arr)) $this->setDbDiscNumber($arr[$keys[30]]);
- if (array_key_exists($keys[31], $arr)) $this->setDbMood($arr[$keys[31]]);
- if (array_key_exists($keys[32], $arr)) $this->setDbLabel($arr[$keys[32]]);
- if (array_key_exists($keys[33], $arr)) $this->setDbComposer($arr[$keys[33]]);
- if (array_key_exists($keys[34], $arr)) $this->setDbEncoder($arr[$keys[34]]);
- if (array_key_exists($keys[35], $arr)) $this->setDbChecksum($arr[$keys[35]]);
- if (array_key_exists($keys[36], $arr)) $this->setDbLyrics($arr[$keys[36]]);
- if (array_key_exists($keys[37], $arr)) $this->setDbOrchestra($arr[$keys[37]]);
- if (array_key_exists($keys[38], $arr)) $this->setDbConductor($arr[$keys[38]]);
- if (array_key_exists($keys[39], $arr)) $this->setDbLyricist($arr[$keys[39]]);
- if (array_key_exists($keys[40], $arr)) $this->setDbOriginalLyricist($arr[$keys[40]]);
- if (array_key_exists($keys[41], $arr)) $this->setDbRadioStationName($arr[$keys[41]]);
- if (array_key_exists($keys[42], $arr)) $this->setDbInfoUrl($arr[$keys[42]]);
- if (array_key_exists($keys[43], $arr)) $this->setDbArtistUrl($arr[$keys[43]]);
- if (array_key_exists($keys[44], $arr)) $this->setDbAudioSourceUrl($arr[$keys[44]]);
- if (array_key_exists($keys[45], $arr)) $this->setDbRadioStationUrl($arr[$keys[45]]);
- if (array_key_exists($keys[46], $arr)) $this->setDbBuyThisUrl($arr[$keys[46]]);
- if (array_key_exists($keys[47], $arr)) $this->setDbIsrcNumber($arr[$keys[47]]);
- if (array_key_exists($keys[48], $arr)) $this->setDbCatalogNumber($arr[$keys[48]]);
- if (array_key_exists($keys[49], $arr)) $this->setDbOriginalArtist($arr[$keys[49]]);
- if (array_key_exists($keys[50], $arr)) $this->setDbCopyright($arr[$keys[50]]);
- if (array_key_exists($keys[51], $arr)) $this->setDbReportDatetime($arr[$keys[51]]);
- if (array_key_exists($keys[52], $arr)) $this->setDbReportLocation($arr[$keys[52]]);
- if (array_key_exists($keys[53], $arr)) $this->setDbReportOrganization($arr[$keys[53]]);
- if (array_key_exists($keys[54], $arr)) $this->setDbSubject($arr[$keys[54]]);
- if (array_key_exists($keys[55], $arr)) $this->setDbContributor($arr[$keys[55]]);
- if (array_key_exists($keys[56], $arr)) $this->setDbLanguage($arr[$keys[56]]);
- if (array_key_exists($keys[57], $arr)) $this->setDbFileExists($arr[$keys[57]]);
- if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudId($arr[$keys[58]]);
- if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[59]]);
- if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[60]]);
- if (array_key_exists($keys[61], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[61]]);
- if (array_key_exists($keys[62], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[62]]);
+ if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
+ if (array_key_exists($keys[2], $arr)) $this->setDbMime($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbFtype($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbDirectory($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbFilepath($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbState($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDbEditedby($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setDbMtime($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setDbUtime($arr[$keys[10]]);
+ if (array_key_exists($keys[11], $arr)) $this->setDbLPtime($arr[$keys[11]]);
+ if (array_key_exists($keys[12], $arr)) $this->setDbMd5($arr[$keys[12]]);
+ if (array_key_exists($keys[13], $arr)) $this->setDbTrackTitle($arr[$keys[13]]);
+ if (array_key_exists($keys[14], $arr)) $this->setDbArtistName($arr[$keys[14]]);
+ if (array_key_exists($keys[15], $arr)) $this->setDbBitRate($arr[$keys[15]]);
+ if (array_key_exists($keys[16], $arr)) $this->setDbSampleRate($arr[$keys[16]]);
+ if (array_key_exists($keys[17], $arr)) $this->setDbFormat($arr[$keys[17]]);
+ if (array_key_exists($keys[18], $arr)) $this->setDbLength($arr[$keys[18]]);
+ if (array_key_exists($keys[19], $arr)) $this->setDbAlbumTitle($arr[$keys[19]]);
+ if (array_key_exists($keys[20], $arr)) $this->setDbGenre($arr[$keys[20]]);
+ if (array_key_exists($keys[21], $arr)) $this->setDbComments($arr[$keys[21]]);
+ if (array_key_exists($keys[22], $arr)) $this->setDbYear($arr[$keys[22]]);
+ if (array_key_exists($keys[23], $arr)) $this->setDbTrackNumber($arr[$keys[23]]);
+ if (array_key_exists($keys[24], $arr)) $this->setDbChannels($arr[$keys[24]]);
+ if (array_key_exists($keys[25], $arr)) $this->setDbUrl($arr[$keys[25]]);
+ if (array_key_exists($keys[26], $arr)) $this->setDbBpm($arr[$keys[26]]);
+ if (array_key_exists($keys[27], $arr)) $this->setDbRating($arr[$keys[27]]);
+ if (array_key_exists($keys[28], $arr)) $this->setDbEncodedBy($arr[$keys[28]]);
+ if (array_key_exists($keys[29], $arr)) $this->setDbDiscNumber($arr[$keys[29]]);
+ if (array_key_exists($keys[30], $arr)) $this->setDbMood($arr[$keys[30]]);
+ if (array_key_exists($keys[31], $arr)) $this->setDbLabel($arr[$keys[31]]);
+ if (array_key_exists($keys[32], $arr)) $this->setDbComposer($arr[$keys[32]]);
+ if (array_key_exists($keys[33], $arr)) $this->setDbEncoder($arr[$keys[33]]);
+ if (array_key_exists($keys[34], $arr)) $this->setDbChecksum($arr[$keys[34]]);
+ if (array_key_exists($keys[35], $arr)) $this->setDbLyrics($arr[$keys[35]]);
+ if (array_key_exists($keys[36], $arr)) $this->setDbOrchestra($arr[$keys[36]]);
+ if (array_key_exists($keys[37], $arr)) $this->setDbConductor($arr[$keys[37]]);
+ if (array_key_exists($keys[38], $arr)) $this->setDbLyricist($arr[$keys[38]]);
+ if (array_key_exists($keys[39], $arr)) $this->setDbOriginalLyricist($arr[$keys[39]]);
+ if (array_key_exists($keys[40], $arr)) $this->setDbRadioStationName($arr[$keys[40]]);
+ if (array_key_exists($keys[41], $arr)) $this->setDbInfoUrl($arr[$keys[41]]);
+ if (array_key_exists($keys[42], $arr)) $this->setDbArtistUrl($arr[$keys[42]]);
+ if (array_key_exists($keys[43], $arr)) $this->setDbAudioSourceUrl($arr[$keys[43]]);
+ if (array_key_exists($keys[44], $arr)) $this->setDbRadioStationUrl($arr[$keys[44]]);
+ if (array_key_exists($keys[45], $arr)) $this->setDbBuyThisUrl($arr[$keys[45]]);
+ if (array_key_exists($keys[46], $arr)) $this->setDbIsrcNumber($arr[$keys[46]]);
+ if (array_key_exists($keys[47], $arr)) $this->setDbCatalogNumber($arr[$keys[47]]);
+ if (array_key_exists($keys[48], $arr)) $this->setDbOriginalArtist($arr[$keys[48]]);
+ if (array_key_exists($keys[49], $arr)) $this->setDbCopyright($arr[$keys[49]]);
+ if (array_key_exists($keys[50], $arr)) $this->setDbReportDatetime($arr[$keys[50]]);
+ if (array_key_exists($keys[51], $arr)) $this->setDbReportLocation($arr[$keys[51]]);
+ if (array_key_exists($keys[52], $arr)) $this->setDbReportOrganization($arr[$keys[52]]);
+ if (array_key_exists($keys[53], $arr)) $this->setDbSubject($arr[$keys[53]]);
+ if (array_key_exists($keys[54], $arr)) $this->setDbContributor($arr[$keys[54]]);
+ if (array_key_exists($keys[55], $arr)) $this->setDbLanguage($arr[$keys[55]]);
+ if (array_key_exists($keys[56], $arr)) $this->setDbFileExists($arr[$keys[56]]);
+ if (array_key_exists($keys[57], $arr)) $this->setDbSoundcloudId($arr[$keys[57]]);
+ if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[58]]);
+ if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[59]]);
+ if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[60]]);
+ if (array_key_exists($keys[61], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[61]]);
+ if (array_key_exists($keys[62], $arr)) $this->setDbReplayGain($arr[$keys[62]]);
+ if (array_key_exists($keys[63], $arr)) $this->setDbOwnerId($arr[$keys[63]]);
}
/**
@@ -3719,7 +3816,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$criteria = new Criteria(CcFilesPeer::DATABASE_NAME);
if ($this->isColumnModified(CcFilesPeer::ID)) $criteria->add(CcFilesPeer::ID, $this->id);
- if ($this->isColumnModified(CcFilesPeer::GUNID)) $criteria->add(CcFilesPeer::GUNID, $this->gunid);
if ($this->isColumnModified(CcFilesPeer::NAME)) $criteria->add(CcFilesPeer::NAME, $this->name);
if ($this->isColumnModified(CcFilesPeer::MIME)) $criteria->add(CcFilesPeer::MIME, $this->mime);
if ($this->isColumnModified(CcFilesPeer::FTYPE)) $criteria->add(CcFilesPeer::FTYPE, $this->ftype);
@@ -3781,6 +3877,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_MSG)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_MSG, $this->soundcloud_error_msg);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, $this->soundcloud_link_to_file);
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME)) $criteria->add(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $this->soundcloud_upload_time);
+ if ($this->isColumnModified(CcFilesPeer::REPLAY_GAIN)) $criteria->add(CcFilesPeer::REPLAY_GAIN, $this->replay_gain);
+ if ($this->isColumnModified(CcFilesPeer::OWNER_ID)) $criteria->add(CcFilesPeer::OWNER_ID, $this->owner_id);
return $criteria;
}
@@ -3842,7 +3940,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function copyInto($copyObj, $deepCopy = false)
{
- $copyObj->setDbGunid($this->gunid);
$copyObj->setDbName($this->name);
$copyObj->setDbMime($this->mime);
$copyObj->setDbFtype($this->ftype);
@@ -3904,6 +4001,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$copyObj->setDbSoundcloudErrorMsg($this->soundcloud_error_msg);
$copyObj->setDbSoundcloudLinkToFile($this->soundcloud_link_to_file);
$copyObj->setDbSoundCloundUploadTime($this->soundcloud_upload_time);
+ $copyObj->setDbReplayGain($this->replay_gain);
+ $copyObj->setDbOwnerId($this->owner_id);
if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of
@@ -3922,6 +4021,12 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
}
}
+ foreach ($this->getCcBlockcontentss() as $relObj) {
+ if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
+ $copyObj->addCcBlockcontents($relObj->copy($deepCopy));
+ }
+ }
+
foreach ($this->getCcSchedules() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcSchedule($relObj->copy($deepCopy));
@@ -3980,20 +4085,20 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
* @return CcFiles The current object (for fluent API support)
* @throws PropelException
*/
- public function setCcSubjs(CcSubjs $v = null)
+ public function setFkOwner(CcSubjs $v = null)
{
if ($v === null) {
- $this->setDbEditedby(NULL);
+ $this->setDbOwnerId(NULL);
} else {
- $this->setDbEditedby($v->getDbId());
+ $this->setDbOwnerId($v->getDbId());
}
- $this->aCcSubjs = $v;
+ $this->aFkOwner = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcSubjs object, it will not be re-added.
if ($v !== null) {
- $v->addCcFiles($this);
+ $v->addCcFilesRelatedByDbOwnerId($this);
}
return $this;
@@ -4007,19 +4112,68 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
* @return CcSubjs The associated CcSubjs object.
* @throws PropelException
*/
- public function getCcSubjs(PropelPDO $con = null)
+ public function getFkOwner(PropelPDO $con = null)
{
- if ($this->aCcSubjs === null && ($this->editedby !== null)) {
- $this->aCcSubjs = CcSubjsQuery::create()->findPk($this->editedby, $con);
+ if ($this->aFkOwner === null && ($this->owner_id !== null)) {
+ $this->aFkOwner = CcSubjsQuery::create()->findPk($this->owner_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->aCcSubjs->addCcFiless($this);
+ $this->aFkOwner->addCcFilessRelatedByDbOwnerId($this);
*/
}
- return $this->aCcSubjs;
+ return $this->aFkOwner;
+ }
+
+ /**
+ * Declares an association between this object and a CcSubjs object.
+ *
+ * @param CcSubjs $v
+ * @return CcFiles The current object (for fluent API support)
+ * @throws PropelException
+ */
+ public function setCcSubjsRelatedByDbEditedby(CcSubjs $v = null)
+ {
+ if ($v === null) {
+ $this->setDbEditedby(NULL);
+ } else {
+ $this->setDbEditedby($v->getDbId());
+ }
+
+ $this->aCcSubjsRelatedByDbEditedby = $v;
+
+ // Add binding for other direction of this n:n relationship.
+ // If this object has already been added to the CcSubjs object, it will not be re-added.
+ if ($v !== null) {
+ $v->addCcFilesRelatedByDbEditedby($this);
+ }
+
+ return $this;
+ }
+
+
+ /**
+ * Get the associated CcSubjs object
+ *
+ * @param PropelPDO Optional Connection object.
+ * @return CcSubjs The associated CcSubjs object.
+ * @throws PropelException
+ */
+ public function getCcSubjsRelatedByDbEditedby(PropelPDO $con = null)
+ {
+ if ($this->aCcSubjsRelatedByDbEditedby === null && ($this->editedby !== null)) {
+ $this->aCcSubjsRelatedByDbEditedby = CcSubjsQuery::create()->findPk($this->editedby, $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->aCcSubjsRelatedByDbEditedby->addCcFilessRelatedByDbEditedby($this);
+ */
+ }
+ return $this->aCcSubjsRelatedByDbEditedby;
}
/**
@@ -4340,6 +4494,31 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
}
+ /**
+ * 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 CcPlaylistcontentss 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 CcPlaylistcontents[] List of CcPlaylistcontents objects
+ */
+ public function getCcPlaylistcontentssJoinCcBlock($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcPlaylistcontentsQuery::create(null, $criteria);
+ $query->joinWith('CcBlock', $join_behavior);
+
+ return $this->getCcPlaylistcontentss($query, $con);
+ }
+
+
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
@@ -4364,6 +4543,140 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getCcPlaylistcontentss($query, $con);
}
+ /**
+ * Clears out the collCcBlockcontentss 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 addCcBlockcontentss()
+ */
+ public function clearCcBlockcontentss()
+ {
+ $this->collCcBlockcontentss = null; // important to set this to NULL since that means it is uninitialized
+ }
+
+ /**
+ * Initializes the collCcBlockcontentss collection.
+ *
+ * By default this just sets the collCcBlockcontentss collection to an empty array (like clearcollCcBlockcontentss());
+ * 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 initCcBlockcontentss()
+ {
+ $this->collCcBlockcontentss = new PropelObjectCollection();
+ $this->collCcBlockcontentss->setModel('CcBlockcontents');
+ }
+
+ /**
+ * Gets an array of CcBlockcontents 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 CcBlockcontents[] List of CcBlockcontents objects
+ * @throws PropelException
+ */
+ public function getCcBlockcontentss($criteria = null, PropelPDO $con = null)
+ {
+ if(null === $this->collCcBlockcontentss || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcBlockcontentss) {
+ // return empty collection
+ $this->initCcBlockcontentss();
+ } else {
+ $collCcBlockcontentss = CcBlockcontentsQuery::create(null, $criteria)
+ ->filterByCcFiles($this)
+ ->find($con);
+ if (null !== $criteria) {
+ return $collCcBlockcontentss;
+ }
+ $this->collCcBlockcontentss = $collCcBlockcontentss;
+ }
+ }
+ return $this->collCcBlockcontentss;
+ }
+
+ /**
+ * Returns the number of related CcBlockcontents objects.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param PropelPDO $con
+ * @return int Count of related CcBlockcontents objects.
+ * @throws PropelException
+ */
+ public function countCcBlockcontentss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
+ {
+ if(null === $this->collCcBlockcontentss || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcBlockcontentss) {
+ return 0;
+ } else {
+ $query = CcBlockcontentsQuery::create(null, $criteria);
+ if($distinct) {
+ $query->distinct();
+ }
+ return $query
+ ->filterByCcFiles($this)
+ ->count($con);
+ }
+ } else {
+ return count($this->collCcBlockcontentss);
+ }
+ }
+
+ /**
+ * Method called to associate a CcBlockcontents object to this object
+ * through the CcBlockcontents foreign key attribute.
+ *
+ * @param CcBlockcontents $l CcBlockcontents
+ * @return void
+ * @throws PropelException
+ */
+ public function addCcBlockcontents(CcBlockcontents $l)
+ {
+ if ($this->collCcBlockcontentss === null) {
+ $this->initCcBlockcontentss();
+ }
+ if (!$this->collCcBlockcontentss->contains($l)) { // only add it if the **same** object is not already associated
+ $this->collCcBlockcontentss[]= $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 CcBlockcontentss 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 CcBlockcontents[] List of CcBlockcontents objects
+ */
+ public function getCcBlockcontentssJoinCcBlock($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcBlockcontentsQuery::create(null, $criteria);
+ $query->joinWith('CcBlock', $join_behavior);
+
+ return $this->getCcBlockcontentss($query, $con);
+ }
+
/**
* Clears out the collCcSchedules collection
*
@@ -4498,13 +4811,37 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getCcSchedules($query, $con);
}
+
+ /**
+ * 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 CcSchedules 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 CcSchedule[] List of CcSchedule objects
+ */
+ public function getCcSchedulesJoinCcWebstream($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcScheduleQuery::create(null, $criteria);
+ $query->joinWith('CcWebstream', $join_behavior);
+
+ return $this->getCcSchedules($query, $con);
+ }
+
/**
* Clears the current object and sets all attributes to their default values
*/
public function clear()
{
$this->id = null;
- $this->gunid = null;
$this->name = null;
$this->mime = null;
$this->ftype = null;
@@ -4566,6 +4903,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->soundcloud_error_msg = null;
$this->soundcloud_link_to_file = null;
$this->soundcloud_upload_time = null;
+ $this->replay_gain = null;
+ $this->owner_id = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();
@@ -4597,6 +4936,11 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
+ if ($this->collCcBlockcontentss) {
+ foreach ((array) $this->collCcBlockcontentss as $o) {
+ $o->clearAllReferences($deep);
+ }
+ }
if ($this->collCcSchedules) {
foreach ((array) $this->collCcSchedules as $o) {
$o->clearAllReferences($deep);
@@ -4606,8 +4950,10 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->collCcShowInstancess = null;
$this->collCcPlaylistcontentss = null;
+ $this->collCcBlockcontentss = null;
$this->collCcSchedules = null;
- $this->aCcSubjs = null;
+ $this->aFkOwner = null;
+ $this->aCcSubjsRelatedByDbEditedby = null;
$this->aCcMusicDirs = null;
}
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php
index 6d35d597a..c155c3c2a 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php
@@ -26,7 +26,7 @@ abstract class BaseCcFilesPeer {
const TM_CLASS = 'CcFilesTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 63;
+ const NUM_COLUMNS = 64;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -34,9 +34,6 @@ abstract class BaseCcFilesPeer {
/** the column name for the ID field */
const ID = 'cc_files.ID';
- /** the column name for the GUNID field */
- const GUNID = 'cc_files.GUNID';
-
/** the column name for the NAME field */
const NAME = 'cc_files.NAME';
@@ -220,6 +217,12 @@ abstract class BaseCcFilesPeer {
/** the column name for the SOUNDCLOUD_UPLOAD_TIME field */
const SOUNDCLOUD_UPLOAD_TIME = 'cc_files.SOUNDCLOUD_UPLOAD_TIME';
+ /** the column name for the REPLAY_GAIN field */
+ const REPLAY_GAIN = 'cc_files.REPLAY_GAIN';
+
+ /** the column name for the OWNER_ID field */
+ const OWNER_ID = 'cc_files.OWNER_ID';
+
/**
* An identiy map to hold any loaded instances of CcFiles objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
@@ -236,12 +239,12 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbGunid', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbGunid', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', 'DbOwnerId', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', 'dbOwnerId', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, self::OWNER_ID, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', 'OWNER_ID', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', 'owner_id', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, )
);
/**
@@ -251,12 +254,12 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbGunid' => 1, 'DbName' => 2, 'DbMime' => 3, 'DbFtype' => 4, 'DbDirectory' => 5, 'DbFilepath' => 6, 'DbState' => 7, 'DbCurrentlyaccessing' => 8, 'DbEditedby' => 9, 'DbMtime' => 10, 'DbUtime' => 11, 'DbLPtime' => 12, 'DbMd5' => 13, 'DbTrackTitle' => 14, 'DbArtistName' => 15, 'DbBitRate' => 16, 'DbSampleRate' => 17, 'DbFormat' => 18, 'DbLength' => 19, 'DbAlbumTitle' => 20, 'DbGenre' => 21, 'DbComments' => 22, 'DbYear' => 23, 'DbTrackNumber' => 24, 'DbChannels' => 25, 'DbUrl' => 26, 'DbBpm' => 27, 'DbRating' => 28, 'DbEncodedBy' => 29, 'DbDiscNumber' => 30, 'DbMood' => 31, 'DbLabel' => 32, 'DbComposer' => 33, 'DbEncoder' => 34, 'DbChecksum' => 35, 'DbLyrics' => 36, 'DbOrchestra' => 37, 'DbConductor' => 38, 'DbLyricist' => 39, 'DbOriginalLyricist' => 40, 'DbRadioStationName' => 41, 'DbInfoUrl' => 42, 'DbArtistUrl' => 43, 'DbAudioSourceUrl' => 44, 'DbRadioStationUrl' => 45, 'DbBuyThisUrl' => 46, 'DbIsrcNumber' => 47, 'DbCatalogNumber' => 48, 'DbOriginalArtist' => 49, 'DbCopyright' => 50, 'DbReportDatetime' => 51, 'DbReportLocation' => 52, 'DbReportOrganization' => 53, 'DbSubject' => 54, 'DbContributor' => 55, 'DbLanguage' => 56, 'DbFileExists' => 57, 'DbSoundcloudId' => 58, 'DbSoundcloudErrorCode' => 59, 'DbSoundcloudErrorMsg' => 60, 'DbSoundcloudLinkToFile' => 61, 'DbSoundCloundUploadTime' => 62, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbGunid' => 1, 'dbName' => 2, 'dbMime' => 3, 'dbFtype' => 4, 'dbDirectory' => 5, 'dbFilepath' => 6, 'dbState' => 7, 'dbCurrentlyaccessing' => 8, 'dbEditedby' => 9, 'dbMtime' => 10, 'dbUtime' => 11, 'dbLPtime' => 12, 'dbMd5' => 13, 'dbTrackTitle' => 14, 'dbArtistName' => 15, 'dbBitRate' => 16, 'dbSampleRate' => 17, 'dbFormat' => 18, 'dbLength' => 19, 'dbAlbumTitle' => 20, 'dbGenre' => 21, 'dbComments' => 22, 'dbYear' => 23, 'dbTrackNumber' => 24, 'dbChannels' => 25, 'dbUrl' => 26, 'dbBpm' => 27, 'dbRating' => 28, 'dbEncodedBy' => 29, 'dbDiscNumber' => 30, 'dbMood' => 31, 'dbLabel' => 32, 'dbComposer' => 33, 'dbEncoder' => 34, 'dbChecksum' => 35, 'dbLyrics' => 36, 'dbOrchestra' => 37, 'dbConductor' => 38, 'dbLyricist' => 39, 'dbOriginalLyricist' => 40, 'dbRadioStationName' => 41, 'dbInfoUrl' => 42, 'dbArtistUrl' => 43, 'dbAudioSourceUrl' => 44, 'dbRadioStationUrl' => 45, 'dbBuyThisUrl' => 46, 'dbIsrcNumber' => 47, 'dbCatalogNumber' => 48, 'dbOriginalArtist' => 49, 'dbCopyright' => 50, 'dbReportDatetime' => 51, 'dbReportLocation' => 52, 'dbReportOrganization' => 53, 'dbSubject' => 54, 'dbContributor' => 55, 'dbLanguage' => 56, 'dbFileExists' => 57, 'dbSoundcloudId' => 58, 'dbSoundcloudErrorCode' => 59, 'dbSoundcloudErrorMsg' => 60, 'dbSoundcloudLinkToFile' => 61, 'dbSoundCloundUploadTime' => 62, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::DIRECTORY => 5, self::FILEPATH => 6, self::STATE => 7, self::CURRENTLYACCESSING => 8, self::EDITEDBY => 9, self::MTIME => 10, self::UTIME => 11, self::LPTIME => 12, self::MD5 => 13, self::TRACK_TITLE => 14, self::ARTIST_NAME => 15, self::BIT_RATE => 16, self::SAMPLE_RATE => 17, self::FORMAT => 18, self::LENGTH => 19, self::ALBUM_TITLE => 20, self::GENRE => 21, self::COMMENTS => 22, self::YEAR => 23, self::TRACK_NUMBER => 24, self::CHANNELS => 25, self::URL => 26, self::BPM => 27, self::RATING => 28, self::ENCODED_BY => 29, self::DISC_NUMBER => 30, self::MOOD => 31, self::LABEL => 32, self::COMPOSER => 33, self::ENCODER => 34, self::CHECKSUM => 35, self::LYRICS => 36, self::ORCHESTRA => 37, self::CONDUCTOR => 38, self::LYRICIST => 39, self::ORIGINAL_LYRICIST => 40, self::RADIO_STATION_NAME => 41, self::INFO_URL => 42, self::ARTIST_URL => 43, self::AUDIO_SOURCE_URL => 44, self::RADIO_STATION_URL => 45, self::BUY_THIS_URL => 46, self::ISRC_NUMBER => 47, self::CATALOG_NUMBER => 48, self::ORIGINAL_ARTIST => 49, self::COPYRIGHT => 50, self::REPORT_DATETIME => 51, self::REPORT_LOCATION => 52, self::REPORT_ORGANIZATION => 53, self::SUBJECT => 54, self::CONTRIBUTOR => 55, self::LANGUAGE => 56, self::FILE_EXISTS => 57, self::SOUNDCLOUD_ID => 58, self::SOUNDCLOUD_ERROR_CODE => 59, self::SOUNDCLOUD_ERROR_MSG => 60, self::SOUNDCLOUD_LINK_TO_FILE => 61, self::SOUNDCLOUD_UPLOAD_TIME => 62, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'DIRECTORY' => 5, 'FILEPATH' => 6, 'STATE' => 7, 'CURRENTLYACCESSING' => 8, 'EDITEDBY' => 9, 'MTIME' => 10, 'UTIME' => 11, 'LPTIME' => 12, 'MD5' => 13, 'TRACK_TITLE' => 14, 'ARTIST_NAME' => 15, 'BIT_RATE' => 16, 'SAMPLE_RATE' => 17, 'FORMAT' => 18, 'LENGTH' => 19, 'ALBUM_TITLE' => 20, 'GENRE' => 21, 'COMMENTS' => 22, 'YEAR' => 23, 'TRACK_NUMBER' => 24, 'CHANNELS' => 25, 'URL' => 26, 'BPM' => 27, 'RATING' => 28, 'ENCODED_BY' => 29, 'DISC_NUMBER' => 30, 'MOOD' => 31, 'LABEL' => 32, 'COMPOSER' => 33, 'ENCODER' => 34, 'CHECKSUM' => 35, 'LYRICS' => 36, 'ORCHESTRA' => 37, 'CONDUCTOR' => 38, 'LYRICIST' => 39, 'ORIGINAL_LYRICIST' => 40, 'RADIO_STATION_NAME' => 41, 'INFO_URL' => 42, 'ARTIST_URL' => 43, 'AUDIO_SOURCE_URL' => 44, 'RADIO_STATION_URL' => 45, 'BUY_THIS_URL' => 46, 'ISRC_NUMBER' => 47, 'CATALOG_NUMBER' => 48, 'ORIGINAL_ARTIST' => 49, 'COPYRIGHT' => 50, 'REPORT_DATETIME' => 51, 'REPORT_LOCATION' => 52, 'REPORT_ORGANIZATION' => 53, 'SUBJECT' => 54, 'CONTRIBUTOR' => 55, 'LANGUAGE' => 56, 'FILE_EXISTS' => 57, 'SOUNDCLOUD_ID' => 58, 'SOUNDCLOUD_ERROR_CODE' => 59, 'SOUNDCLOUD_ERROR_MSG' => 60, 'SOUNDCLOUD_LINK_TO_FILE' => 61, 'SOUNDCLOUD_UPLOAD_TIME' => 62, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'directory' => 5, 'filepath' => 6, 'state' => 7, 'currentlyaccessing' => 8, 'editedby' => 9, 'mtime' => 10, 'utime' => 11, 'lptime' => 12, 'md5' => 13, 'track_title' => 14, 'artist_name' => 15, 'bit_rate' => 16, 'sample_rate' => 17, 'format' => 18, 'length' => 19, 'album_title' => 20, 'genre' => 21, 'comments' => 22, 'year' => 23, 'track_number' => 24, 'channels' => 25, 'url' => 26, 'bpm' => 27, 'rating' => 28, 'encoded_by' => 29, 'disc_number' => 30, 'mood' => 31, 'label' => 32, 'composer' => 33, 'encoder' => 34, 'checksum' => 35, 'lyrics' => 36, 'orchestra' => 37, 'conductor' => 38, 'lyricist' => 39, 'original_lyricist' => 40, 'radio_station_name' => 41, 'info_url' => 42, 'artist_url' => 43, 'audio_source_url' => 44, 'radio_station_url' => 45, 'buy_this_url' => 46, 'isrc_number' => 47, 'catalog_number' => 48, 'original_artist' => 49, 'copyright' => 50, 'report_datetime' => 51, 'report_location' => 52, 'report_organization' => 53, 'subject' => 54, 'contributor' => 55, 'language' => 56, 'file_exists' => 57, 'soundcloud_id' => 58, 'soundcloud_error_code' => 59, 'soundcloud_error_msg' => 60, 'soundcloud_link_to_file' => 61, 'soundcloud_upload_time' => 62, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, 'DbOwnerId' => 63, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, 'dbOwnerId' => 63, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MIME => 2, self::FTYPE => 3, self::DIRECTORY => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::UTIME => 10, self::LPTIME => 11, self::MD5 => 12, self::TRACK_TITLE => 13, self::ARTIST_NAME => 14, self::BIT_RATE => 15, self::SAMPLE_RATE => 16, self::FORMAT => 17, self::LENGTH => 18, self::ALBUM_TITLE => 19, self::GENRE => 20, self::COMMENTS => 21, self::YEAR => 22, self::TRACK_NUMBER => 23, self::CHANNELS => 24, self::URL => 25, self::BPM => 26, self::RATING => 27, self::ENCODED_BY => 28, self::DISC_NUMBER => 29, self::MOOD => 30, self::LABEL => 31, self::COMPOSER => 32, self::ENCODER => 33, self::CHECKSUM => 34, self::LYRICS => 35, self::ORCHESTRA => 36, self::CONDUCTOR => 37, self::LYRICIST => 38, self::ORIGINAL_LYRICIST => 39, self::RADIO_STATION_NAME => 40, self::INFO_URL => 41, self::ARTIST_URL => 42, self::AUDIO_SOURCE_URL => 43, self::RADIO_STATION_URL => 44, self::BUY_THIS_URL => 45, self::ISRC_NUMBER => 46, self::CATALOG_NUMBER => 47, self::ORIGINAL_ARTIST => 48, self::COPYRIGHT => 49, self::REPORT_DATETIME => 50, self::REPORT_LOCATION => 51, self::REPORT_ORGANIZATION => 52, self::SUBJECT => 53, self::CONTRIBUTOR => 54, self::LANGUAGE => 55, self::FILE_EXISTS => 56, self::SOUNDCLOUD_ID => 57, self::SOUNDCLOUD_ERROR_CODE => 58, self::SOUNDCLOUD_ERROR_MSG => 59, self::SOUNDCLOUD_LINK_TO_FILE => 60, self::SOUNDCLOUD_UPLOAD_TIME => 61, self::REPLAY_GAIN => 62, self::OWNER_ID => 63, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, 'OWNER_ID' => 63, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, 'owner_id' => 63, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, )
);
/**
@@ -329,7 +332,6 @@ abstract class BaseCcFilesPeer {
{
if (null === $alias) {
$criteria->addSelectColumn(CcFilesPeer::ID);
- $criteria->addSelectColumn(CcFilesPeer::GUNID);
$criteria->addSelectColumn(CcFilesPeer::NAME);
$criteria->addSelectColumn(CcFilesPeer::MIME);
$criteria->addSelectColumn(CcFilesPeer::FTYPE);
@@ -391,9 +393,10 @@ abstract class BaseCcFilesPeer {
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_MSG);
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE);
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME);
+ $criteria->addSelectColumn(CcFilesPeer::REPLAY_GAIN);
+ $criteria->addSelectColumn(CcFilesPeer::OWNER_ID);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.GUNID');
$criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.MIME');
$criteria->addSelectColumn($alias . '.FTYPE');
@@ -455,6 +458,8 @@ abstract class BaseCcFilesPeer {
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_ERROR_MSG');
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_LINK_TO_FILE');
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_UPLOAD_TIME');
+ $criteria->addSelectColumn($alias . '.REPLAY_GAIN');
+ $criteria->addSelectColumn($alias . '.OWNER_ID');
}
}
@@ -654,6 +659,9 @@ abstract class BaseCcFilesPeer {
// Invalidate objects in CcPlaylistcontentsPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcPlaylistcontentsPeer::clearInstancePool();
+ // Invalidate objects in CcBlockcontentsPeer instance pool,
+ // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
+ CcBlockcontentsPeer::clearInstancePool();
// Invalidate objects in CcSchedulePeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcSchedulePeer::clearInstancePool();
@@ -750,7 +758,7 @@ abstract class BaseCcFilesPeer {
}
/**
- * Returns the number of rows matching criteria, joining the related CcSubjs table
+ * Returns the number of rows matching criteria, joining the related FkOwner table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@@ -758,7 +766,57 @@ abstract class BaseCcFilesPeer {
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
- public static function doCountJoinCcSubjs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doCountJoinFkOwner(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(CcFilesPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcFilesPeer::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(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::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 CcSubjsRelatedByDbEditedby 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 doCountJoinCcSubjsRelatedByDbEditedby(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;
@@ -858,7 +916,73 @@ abstract class BaseCcFilesPeer {
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public static function doSelectJoinCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doSelectJoinFkOwner(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);
+ }
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcSubjsPeer::addSelectColumns($criteria);
+
+ $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcFilesPeer::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 = CcFilesPeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcFilesPeer::addInstanceToPool($obj1, $key1);
+ } // if $obj1 already loaded
+
+ $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if ($key2 !== null) {
+ $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcSubjsPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol);
+ CcSubjsPeer::addInstanceToPool($obj2, $key2);
+ } // if obj2 already loaded
+
+ // Add the $obj1 (CcFiles) to $obj2 (CcSubjs)
+ $obj2->addCcFilesRelatedByDbOwnerId($obj1);
+
+ } // if joined row was not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of CcFiles objects pre-filled with their CcSubjs 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 CcFiles objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinCcSubjsRelatedByDbEditedby(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@@ -904,7 +1028,7 @@ abstract class BaseCcFilesPeer {
} // if obj2 already loaded
// Add the $obj1 (CcFiles) to $obj2 (CcSubjs)
- $obj2->addCcFiles($obj1);
+ $obj2->addCcFilesRelatedByDbEditedby($obj1);
} // if joined row was not null
@@ -1017,6 +1141,8 @@ abstract class BaseCcFilesPeer {
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
+ $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
+
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
$criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
@@ -1057,8 +1183,13 @@ abstract class BaseCcFilesPeer {
CcSubjsPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcSubjsPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
+
CcMusicDirsPeer::addSelectColumns($criteria);
- $startcol4 = $startcol3 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
+ $startcol5 = $startcol4 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
@@ -1096,25 +1227,43 @@ abstract class BaseCcFilesPeer {
} // if obj2 loaded
// Add the $obj1 (CcFiles) to the collection in $obj2 (CcSubjs)
- $obj2->addCcFiles($obj1);
+ $obj2->addCcFilesRelatedByDbOwnerId($obj1);
+ } // if joined row not null
+
+ // Add objects for joined CcSubjs rows
+
+ $key3 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcSubjsPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcSubjsPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcSubjsPeer::addInstanceToPool($obj3, $key3);
+ } // if obj3 loaded
+
+ // Add the $obj1 (CcFiles) to the collection in $obj3 (CcSubjs)
+ $obj3->addCcFilesRelatedByDbEditedby($obj1);
} // if joined row not null
// Add objects for joined CcMusicDirs rows
- $key3 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
- if ($key3 !== null) {
- $obj3 = CcMusicDirsPeer::getInstanceFromPool($key3);
- if (!$obj3) {
+ $key4 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol4);
+ if ($key4 !== null) {
+ $obj4 = CcMusicDirsPeer::getInstanceFromPool($key4);
+ if (!$obj4) {
$cls = CcMusicDirsPeer::getOMClass(false);
- $obj3 = new $cls();
- $obj3->hydrate($row, $startcol3);
- CcMusicDirsPeer::addInstanceToPool($obj3, $key3);
- } // if obj3 loaded
+ $obj4 = new $cls();
+ $obj4->hydrate($row, $startcol4);
+ CcMusicDirsPeer::addInstanceToPool($obj4, $key4);
+ } // if obj4 loaded
- // Add the $obj1 (CcFiles) to the collection in $obj3 (CcMusicDirs)
- $obj3->addCcFiles($obj1);
+ // Add the $obj1 (CcFiles) to the collection in $obj4 (CcMusicDirs)
+ $obj4->addCcFiles($obj1);
} // if joined row not null
$results[] = $obj1;
@@ -1125,7 +1274,7 @@ abstract class BaseCcFilesPeer {
/**
- * Returns the number of rows matching criteria, joining the related CcSubjs table
+ * Returns the number of rows matching criteria, joining the related FkOwner table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@@ -1133,7 +1282,57 @@ abstract class BaseCcFilesPeer {
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
- public static function doCountJoinAllExceptCcSubjs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doCountJoinAllExceptFkOwner(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(CcFilesPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcFilesPeer::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(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::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 CcSubjsRelatedByDbEditedby 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 doCountJoinAllExceptCcSubjsRelatedByDbEditedby(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;
@@ -1210,6 +1409,8 @@ abstract class BaseCcFilesPeer {
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
+ $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
+
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -1225,7 +1426,7 @@ abstract class BaseCcFilesPeer {
/**
- * Selects a collection of CcFiles objects pre-filled with all related objects except CcSubjs.
+ * Selects a collection of CcFiles objects pre-filled with all related objects except FkOwner.
*
* @param Criteria $criteria
* @param PropelPDO $con
@@ -1234,7 +1435,80 @@ abstract class BaseCcFilesPeer {
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public static function doSelectJoinAllExceptCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doSelectJoinAllExceptFkOwner(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);
+ }
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcMusicDirsPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
+
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcFilesPeer::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 = CcFilesPeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcFilesPeer::addInstanceToPool($obj1, $key1);
+ } // if obj1 already loaded
+
+ // Add objects for joined CcMusicDirs rows
+
+ $key2 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ if ($key2 !== null) {
+ $obj2 = CcMusicDirsPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcMusicDirsPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol2);
+ CcMusicDirsPeer::addInstanceToPool($obj2, $key2);
+ } // if $obj2 already loaded
+
+ // Add the $obj1 (CcFiles) to the collection in $obj2 (CcMusicDirs)
+ $obj2->addCcFiles($obj1);
+
+ } // if joined row is not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of CcFiles objects pre-filled with all related objects except CcSubjsRelatedByDbEditedby.
+ *
+ * @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 CcFiles objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptCcSubjsRelatedByDbEditedby(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@@ -1324,6 +1598,11 @@ abstract class BaseCcFilesPeer {
CcSubjsPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcSubjsPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
+
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
@@ -1359,7 +1638,26 @@ abstract class BaseCcFilesPeer {
} // if $obj2 already loaded
// Add the $obj1 (CcFiles) to the collection in $obj2 (CcSubjs)
- $obj2->addCcFiles($obj1);
+ $obj2->addCcFilesRelatedByDbOwnerId($obj1);
+
+ } // if joined row is not null
+
+ // Add objects for joined CcSubjs rows
+
+ $key3 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcSubjsPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcSubjsPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcSubjsPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcFiles) to the collection in $obj3 (CcSubjs)
+ $obj3->addCcFilesRelatedByDbEditedby($obj1);
} // if joined row is not null
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
index 0d31b43bd..0599719ac 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
@@ -7,7 +7,6 @@
*
*
* @method CcFilesQuery orderByDbId($order = Criteria::ASC) Order by the id column
- * @method CcFilesQuery orderByDbGunid($order = Criteria::ASC) Order by the gunid column
* @method CcFilesQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcFilesQuery orderByDbMime($order = Criteria::ASC) Order by the mime column
* @method CcFilesQuery orderByDbFtype($order = Criteria::ASC) Order by the ftype column
@@ -69,9 +68,10 @@
* @method CcFilesQuery orderByDbSoundcloudErrorMsg($order = Criteria::ASC) Order by the soundcloud_error_msg column
* @method CcFilesQuery orderByDbSoundcloudLinkToFile($order = Criteria::ASC) Order by the soundcloud_link_to_file column
* @method CcFilesQuery orderByDbSoundCloundUploadTime($order = Criteria::ASC) Order by the soundcloud_upload_time column
+ * @method CcFilesQuery orderByDbReplayGain($order = Criteria::ASC) Order by the replay_gain column
+ * @method CcFilesQuery orderByDbOwnerId($order = Criteria::ASC) Order by the owner_id column
*
* @method CcFilesQuery groupByDbId() Group by the id column
- * @method CcFilesQuery groupByDbGunid() Group by the gunid column
* @method CcFilesQuery groupByDbName() Group by the name column
* @method CcFilesQuery groupByDbMime() Group by the mime column
* @method CcFilesQuery groupByDbFtype() Group by the ftype column
@@ -133,14 +133,20 @@
* @method CcFilesQuery groupByDbSoundcloudErrorMsg() Group by the soundcloud_error_msg column
* @method CcFilesQuery groupByDbSoundcloudLinkToFile() Group by the soundcloud_link_to_file column
* @method CcFilesQuery groupByDbSoundCloundUploadTime() Group by the soundcloud_upload_time column
+ * @method CcFilesQuery groupByDbReplayGain() Group by the replay_gain column
+ * @method CcFilesQuery groupByDbOwnerId() Group by the owner_id column
*
* @method CcFilesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcFilesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcFilesQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
- * @method CcFilesQuery leftJoinCcSubjs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjs relation
- * @method CcFilesQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
- * @method CcFilesQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
+ * @method CcFilesQuery leftJoinFkOwner($relationAlias = '') Adds a LEFT JOIN clause to the query using the FkOwner relation
+ * @method CcFilesQuery rightJoinFkOwner($relationAlias = '') Adds a RIGHT JOIN clause to the query using the FkOwner relation
+ * @method CcFilesQuery innerJoinFkOwner($relationAlias = '') Adds a INNER JOIN clause to the query using the FkOwner relation
+ *
+ * @method CcFilesQuery leftJoinCcSubjsRelatedByDbEditedby($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjsRelatedByDbEditedby relation
+ * @method CcFilesQuery rightJoinCcSubjsRelatedByDbEditedby($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjsRelatedByDbEditedby relation
+ * @method CcFilesQuery innerJoinCcSubjsRelatedByDbEditedby($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjsRelatedByDbEditedby relation
*
* @method CcFilesQuery leftJoinCcMusicDirs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcMusicDirs relation
* @method CcFilesQuery rightJoinCcMusicDirs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcMusicDirs relation
@@ -154,6 +160,10 @@
* @method CcFilesQuery rightJoinCcPlaylistcontents($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlaylistcontents relation
* @method CcFilesQuery innerJoinCcPlaylistcontents($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlaylistcontents relation
*
+ * @method CcFilesQuery leftJoinCcBlockcontents($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcBlockcontents relation
+ * @method CcFilesQuery rightJoinCcBlockcontents($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcBlockcontents relation
+ * @method CcFilesQuery innerJoinCcBlockcontents($relationAlias = '') Adds a INNER JOIN clause to the query using the CcBlockcontents relation
+ *
* @method CcFilesQuery leftJoinCcSchedule($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSchedule relation
* @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
@@ -162,7 +172,6 @@
* @method CcFiles findOneOrCreate(PropelPDO $con = null) Return the first CcFiles matching the query, or a new CcFiles object populated from the query conditions when no match is found
*
* @method CcFiles findOneByDbId(int $id) Return the first CcFiles filtered by the id column
- * @method CcFiles findOneByDbGunid(string $gunid) Return the first CcFiles filtered by the gunid column
* @method CcFiles findOneByDbName(string $name) Return the first CcFiles filtered by the name column
* @method CcFiles findOneByDbMime(string $mime) Return the first CcFiles filtered by the mime column
* @method CcFiles findOneByDbFtype(string $ftype) Return the first CcFiles filtered by the ftype column
@@ -188,7 +197,7 @@
* @method CcFiles findOneByDbTrackNumber(int $track_number) Return the first CcFiles filtered by the track_number column
* @method CcFiles findOneByDbChannels(int $channels) Return the first CcFiles filtered by the channels column
* @method CcFiles findOneByDbUrl(string $url) Return the first CcFiles filtered by the url column
- * @method CcFiles findOneByDbBpm(string $bpm) Return the first CcFiles filtered by the bpm column
+ * @method CcFiles findOneByDbBpm(int $bpm) Return the first CcFiles filtered by the bpm column
* @method CcFiles findOneByDbRating(string $rating) Return the first CcFiles filtered by the rating column
* @method CcFiles findOneByDbEncodedBy(string $encoded_by) Return the first CcFiles filtered by the encoded_by column
* @method CcFiles findOneByDbDiscNumber(string $disc_number) Return the first CcFiles filtered by the disc_number column
@@ -224,9 +233,10 @@
* @method CcFiles findOneByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return the first CcFiles filtered by the soundcloud_error_msg column
* @method CcFiles findOneByDbSoundcloudLinkToFile(string $soundcloud_link_to_file) Return the first CcFiles filtered by the soundcloud_link_to_file column
* @method CcFiles findOneByDbSoundCloundUploadTime(string $soundcloud_upload_time) Return the first CcFiles filtered by the soundcloud_upload_time column
+ * @method CcFiles findOneByDbReplayGain(string $replay_gain) Return the first CcFiles filtered by the replay_gain column
+ * @method CcFiles findOneByDbOwnerId(int $owner_id) Return the first CcFiles filtered by the owner_id column
*
* @method array findByDbId(int $id) Return CcFiles objects filtered by the id column
- * @method array findByDbGunid(string $gunid) Return CcFiles objects filtered by the gunid column
* @method array findByDbName(string $name) Return CcFiles objects filtered by the name column
* @method array findByDbMime(string $mime) Return CcFiles objects filtered by the mime column
* @method array findByDbFtype(string $ftype) Return CcFiles objects filtered by the ftype column
@@ -252,7 +262,7 @@
* @method array findByDbTrackNumber(int $track_number) Return CcFiles objects filtered by the track_number column
* @method array findByDbChannels(int $channels) Return CcFiles objects filtered by the channels column
* @method array findByDbUrl(string $url) Return CcFiles objects filtered by the url column
- * @method array findByDbBpm(string $bpm) Return CcFiles objects filtered by the bpm column
+ * @method array findByDbBpm(int $bpm) Return CcFiles objects filtered by the bpm column
* @method array findByDbRating(string $rating) Return CcFiles objects filtered by the rating column
* @method array findByDbEncodedBy(string $encoded_by) Return CcFiles objects filtered by the encoded_by column
* @method array findByDbDiscNumber(string $disc_number) Return CcFiles objects filtered by the disc_number column
@@ -288,6 +298,8 @@
* @method array findByDbSoundcloudErrorMsg(string $soundcloud_error_msg) Return CcFiles objects filtered by the soundcloud_error_msg column
* @method array findByDbSoundcloudLinkToFile(string $soundcloud_link_to_file) Return CcFiles objects filtered by the soundcloud_link_to_file column
* @method array findByDbSoundCloundUploadTime(string $soundcloud_upload_time) Return CcFiles objects filtered by the soundcloud_upload_time column
+ * @method array findByDbReplayGain(string $replay_gain) Return CcFiles objects filtered by the replay_gain column
+ * @method array findByDbOwnerId(int $owner_id) Return CcFiles objects filtered by the owner_id column
*
* @package propel.generator.airtime.om
*/
@@ -414,28 +426,6 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::ID, $dbId, $comparison);
}
- /**
- * Filter the query on the gunid column
- *
- * @param string $dbGunid 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 CcFilesQuery The current query, for fluid interface
- */
- public function filterByDbGunid($dbGunid = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($dbGunid)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $dbGunid)) {
- $dbGunid = str_replace('*', '%', $dbGunid);
- $comparison = Criteria::LIKE;
- }
- }
- return $this->addUsingAlias(CcFilesPeer::GUNID, $dbGunid, $comparison);
- }
-
/**
* Filter the query on the name column
*
@@ -1079,20 +1069,29 @@ abstract class BaseCcFilesQuery extends ModelCriteria
/**
* Filter the query on the bpm column
*
- * @param string $dbBpm The value to use as filter.
- * Accepts wildcards (* and % trigger a LIKE)
+ * @param int|array $dbBpm 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 CcFilesQuery The current query, for fluid interface
*/
public function filterByDbBpm($dbBpm = null, $comparison = null)
{
- if (null === $comparison) {
- if (is_array($dbBpm)) {
+ if (is_array($dbBpm)) {
+ $useMinMax = false;
+ if (isset($dbBpm['min'])) {
+ $this->addUsingAlias(CcFilesPeer::BPM, $dbBpm['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbBpm['max'])) {
+ $this->addUsingAlias(CcFilesPeer::BPM, $dbBpm['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
$comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $dbBpm)) {
- $dbBpm = str_replace('*', '%', $dbBpm);
- $comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcFilesPeer::BPM, $dbBpm, $comparison);
@@ -1890,6 +1889,68 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $dbSoundCloundUploadTime, $comparison);
}
+ /**
+ * Filter the query on the replay_gain column
+ *
+ * @param string|array $dbReplayGain 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 CcFilesQuery The current query, for fluid interface
+ */
+ public function filterByDbReplayGain($dbReplayGain = null, $comparison = null)
+ {
+ if (is_array($dbReplayGain)) {
+ $useMinMax = false;
+ if (isset($dbReplayGain['min'])) {
+ $this->addUsingAlias(CcFilesPeer::REPLAY_GAIN, $dbReplayGain['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbReplayGain['max'])) {
+ $this->addUsingAlias(CcFilesPeer::REPLAY_GAIN, $dbReplayGain['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcFilesPeer::REPLAY_GAIN, $dbReplayGain, $comparison);
+ }
+
+ /**
+ * Filter the query on the owner_id column
+ *
+ * @param int|array $dbOwnerId 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 CcFilesQuery The current query, for fluid interface
+ */
+ public function filterByDbOwnerId($dbOwnerId = null, $comparison = null)
+ {
+ if (is_array($dbOwnerId)) {
+ $useMinMax = false;
+ if (isset($dbOwnerId['min'])) {
+ $this->addUsingAlias(CcFilesPeer::OWNER_ID, $dbOwnerId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbOwnerId['max'])) {
+ $this->addUsingAlias(CcFilesPeer::OWNER_ID, $dbOwnerId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcFilesPeer::OWNER_ID, $dbOwnerId, $comparison);
+ }
+
/**
* Filter the query by a related CcSubjs object
*
@@ -1898,24 +1959,24 @@ abstract class BaseCcFilesQuery extends ModelCriteria
*
* @return CcFilesQuery The current query, for fluid interface
*/
- public function filterByCcSubjs($ccSubjs, $comparison = null)
+ public function filterByFkOwner($ccSubjs, $comparison = null)
{
return $this
- ->addUsingAlias(CcFilesPeer::EDITEDBY, $ccSubjs->getDbId(), $comparison);
+ ->addUsingAlias(CcFilesPeer::OWNER_ID, $ccSubjs->getDbId(), $comparison);
}
/**
- * Adds a JOIN clause to the query using the CcSubjs relation
+ * Adds a JOIN clause to the query using the FkOwner 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 joinCcSubjs($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ public function joinFkOwner($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
- $relationMap = $tableMap->getRelation('CcSubjs');
+ $relationMap = $tableMap->getRelation('FkOwner');
// create a ModelJoin object for this join
$join = new ModelJoin();
@@ -1930,14 +1991,14 @@ abstract class BaseCcFilesQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
- $this->addJoinObject($join, 'CcSubjs');
+ $this->addJoinObject($join, 'FkOwner');
}
return $this;
}
/**
- * Use the CcSubjs relation CcSubjs object
+ * Use the FkOwner relation CcSubjs object
*
* @see useQuery()
*
@@ -1947,11 +2008,75 @@ abstract class BaseCcFilesQuery extends ModelCriteria
*
* @return CcSubjsQuery A secondary query class using the current class as primary query
*/
- public function useCcSubjsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ public function useFkOwnerQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
return $this
- ->joinCcSubjs($relationAlias, $joinType)
- ->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
+ ->joinFkOwner($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'FkOwner', 'CcSubjsQuery');
+ }
+
+ /**
+ * Filter the query by a related CcSubjs object
+ *
+ * @param CcSubjs $ccSubjs 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 filterByCcSubjsRelatedByDbEditedby($ccSubjs, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcFilesPeer::EDITEDBY, $ccSubjs->getDbId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcSubjsRelatedByDbEditedby 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 joinCcSubjsRelatedByDbEditedby($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcSubjsRelatedByDbEditedby');
+
+ // 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, 'CcSubjsRelatedByDbEditedby');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcSubjsRelatedByDbEditedby relation CcSubjs 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 CcSubjsQuery A secondary query class using the current class as primary query
+ */
+ public function useCcSubjsRelatedByDbEditedbyQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcSubjsRelatedByDbEditedby($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcSubjsRelatedByDbEditedby', 'CcSubjsQuery');
}
/**
@@ -2146,6 +2271,70 @@ abstract class BaseCcFilesQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'CcPlaylistcontents', 'CcPlaylistcontentsQuery');
}
+ /**
+ * Filter the query by a related CcBlockcontents object
+ *
+ * @param CcBlockcontents $ccBlockcontents 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 filterByCcBlockcontents($ccBlockcontents, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcFilesPeer::ID, $ccBlockcontents->getDbFileId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcBlockcontents 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 joinCcBlockcontents($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcBlockcontents');
+
+ // 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, 'CcBlockcontents');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcBlockcontents relation CcBlockcontents 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 CcBlockcontentsQuery A secondary query class using the current class as primary query
+ */
+ public function useCcBlockcontentsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcBlockcontents($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcBlockcontents', 'CcBlockcontentsQuery');
+ }
+
/**
* Filter the query by a related CcSchedule object
*
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php b/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php
index 4752a822e..f58915945 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcMusicDirs.php
@@ -999,10 +999,35 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelCollection|array CcFiles[] List of CcFiles objects
*/
- public function getCcFilessJoinCcSubjs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public function getCcFilessJoinFkOwner($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CcFilesQuery::create(null, $criteria);
- $query->joinWith('CcSubjs', $join_behavior);
+ $query->joinWith('FkOwner', $join_behavior);
+
+ return $this->getCcFiless($query, $con);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcMusicDirs is new, it will return
+ * an empty collection; or if this CcMusicDirs has previously
+ * been saved, it will retrieve related CcFiless 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 CcMusicDirs.
+ *
+ * @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 CcFiles[] List of CcFiles objects
+ */
+ public function getCcFilessJoinCcSubjsRelatedByDbEditedby($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcFilesQuery::create(null, $criteria);
+ $query->joinWith('CcSubjsRelatedByDbEditedby', $join_behavior);
return $this->getCcFiless($query, $con);
}
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php
index db4e4d222..73b081708 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylist.php
@@ -1297,6 +1297,31 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
return $this->getCcPlaylistcontentss($query, $con);
}
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcPlaylist is new, it will return
+ * an empty collection; or if this CcPlaylist has previously
+ * been saved, it will retrieve related CcPlaylistcontentss 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 CcPlaylist.
+ *
+ * @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 CcPlaylistcontents[] List of CcPlaylistcontents objects
+ */
+ public function getCcPlaylistcontentssJoinCcBlock($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcPlaylistcontentsQuery::create(null, $criteria);
+ $query->joinWith('CcBlock', $join_behavior);
+
+ return $this->getCcPlaylistcontentss($query, $con);
+ }
+
/**
* Clears the current object and sets all attributes to their default values
*/
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontents.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontents.php
index 8f823a25e..f8630b15b 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontents.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontents.php
@@ -42,6 +42,25 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
protected $file_id;
+ /**
+ * The value for the block_id field.
+ * @var int
+ */
+ protected $block_id;
+
+ /**
+ * The value for the stream_id field.
+ * @var int
+ */
+ protected $stream_id;
+
+ /**
+ * The value for the type field.
+ * Note: this column has a database default value of: 0
+ * @var int
+ */
+ protected $type;
+
/**
* The value for the position field.
* @var int
@@ -88,6 +107,11 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
protected $aCcFiles;
+ /**
+ * @var CcBlock
+ */
+ protected $aCcBlock;
+
/**
* @var CcPlaylist
*/
@@ -118,6 +142,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function applyDefaultValues()
{
+ $this->type = 0;
$this->cliplength = '00:00:00';
$this->cuein = '00:00:00';
$this->cueout = '00:00:00';
@@ -165,6 +190,36 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
return $this->file_id;
}
+ /**
+ * Get the [block_id] column value.
+ *
+ * @return int
+ */
+ public function getDbBlockId()
+ {
+ return $this->block_id;
+ }
+
+ /**
+ * Get the [stream_id] column value.
+ *
+ * @return int
+ */
+ public function getDbStreamId()
+ {
+ return $this->stream_id;
+ }
+
+ /**
+ * Get the [type] column value.
+ *
+ * @return int
+ */
+ public function getDbType()
+ {
+ return $this->type;
+ }
+
/**
* Get the [position] column value.
*
@@ -339,6 +394,70 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
return $this;
} // setDbFileId()
+ /**
+ * Set the value of [block_id] column.
+ *
+ * @param int $v new value
+ * @return CcPlaylistcontents The current object (for fluent API support)
+ */
+ public function setDbBlockId($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->block_id !== $v) {
+ $this->block_id = $v;
+ $this->modifiedColumns[] = CcPlaylistcontentsPeer::BLOCK_ID;
+ }
+
+ if ($this->aCcBlock !== null && $this->aCcBlock->getDbId() !== $v) {
+ $this->aCcBlock = null;
+ }
+
+ return $this;
+ } // setDbBlockId()
+
+ /**
+ * Set the value of [stream_id] column.
+ *
+ * @param int $v new value
+ * @return CcPlaylistcontents The current object (for fluent API support)
+ */
+ public function setDbStreamId($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->stream_id !== $v) {
+ $this->stream_id = $v;
+ $this->modifiedColumns[] = CcPlaylistcontentsPeer::STREAM_ID;
+ }
+
+ return $this;
+ } // setDbStreamId()
+
+ /**
+ * Set the value of [type] column.
+ *
+ * @param int $v new value
+ * @return CcPlaylistcontents The current object (for fluent API support)
+ */
+ public function setDbType($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->type !== $v || $this->isNew()) {
+ $this->type = $v;
+ $this->modifiedColumns[] = CcPlaylistcontentsPeer::TYPE;
+ }
+
+ return $this;
+ } // setDbType()
+
/**
* Set the value of [position] column.
*
@@ -529,6 +648,10 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function hasOnlyDefaultValues()
{
+ if ($this->type !== 0) {
+ return false;
+ }
+
if ($this->cliplength !== '00:00:00') {
return false;
}
@@ -574,12 +697,15 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->playlist_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->file_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
- $this->position = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
- $this->cliplength = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
- $this->cuein = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
- $this->cueout = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
- $this->fadein = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
- $this->fadeout = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
+ $this->block_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
+ $this->stream_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
+ $this->type = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
+ $this->position = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
+ $this->cliplength = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $this->cuein = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
+ $this->cueout = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
+ $this->fadein = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
+ $this->fadeout = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
$this->resetModified();
$this->setNew(false);
@@ -588,7 +714,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 9; // 9 = CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 12; // 12 = CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcPlaylistcontents object", $e);
@@ -617,6 +743,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) {
$this->aCcFiles = null;
}
+ if ($this->aCcBlock !== null && $this->block_id !== $this->aCcBlock->getDbId()) {
+ $this->aCcBlock = null;
+ }
} // ensureConsistency
/**
@@ -657,6 +786,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
$this->aCcFiles = null;
+ $this->aCcBlock = null;
$this->aCcPlaylist = null;
} // if (deep)
}
@@ -782,6 +912,13 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->setCcFiles($this->aCcFiles);
}
+ if ($this->aCcBlock !== null) {
+ if ($this->aCcBlock->isModified() || $this->aCcBlock->isNew()) {
+ $affectedRows += $this->aCcBlock->save($con);
+ }
+ $this->setCcBlock($this->aCcBlock);
+ }
+
if ($this->aCcPlaylist !== null) {
if ($this->aCcPlaylist->isModified() || $this->aCcPlaylist->isNew()) {
$affectedRows += $this->aCcPlaylist->save($con);
@@ -889,6 +1026,12 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
}
}
+ if ($this->aCcBlock !== null) {
+ if (!$this->aCcBlock->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcBlock->getValidationFailures());
+ }
+ }
+
if ($this->aCcPlaylist !== null) {
if (!$this->aCcPlaylist->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylist->getValidationFailures());
@@ -944,21 +1087,30 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
return $this->getDbFileId();
break;
case 3:
- return $this->getDbPosition();
+ return $this->getDbBlockId();
break;
case 4:
- return $this->getDbCliplength();
+ return $this->getDbStreamId();
break;
case 5:
- return $this->getDbCuein();
+ return $this->getDbType();
break;
case 6:
- return $this->getDbCueout();
+ return $this->getDbPosition();
break;
case 7:
- return $this->getDbFadein();
+ return $this->getDbCliplength();
break;
case 8:
+ return $this->getDbCuein();
+ break;
+ case 9:
+ return $this->getDbCueout();
+ break;
+ case 10:
+ return $this->getDbFadein();
+ break;
+ case 11:
return $this->getDbFadeout();
break;
default:
@@ -988,17 +1140,23 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$keys[0] => $this->getDbId(),
$keys[1] => $this->getDbPlaylistId(),
$keys[2] => $this->getDbFileId(),
- $keys[3] => $this->getDbPosition(),
- $keys[4] => $this->getDbCliplength(),
- $keys[5] => $this->getDbCuein(),
- $keys[6] => $this->getDbCueout(),
- $keys[7] => $this->getDbFadein(),
- $keys[8] => $this->getDbFadeout(),
+ $keys[3] => $this->getDbBlockId(),
+ $keys[4] => $this->getDbStreamId(),
+ $keys[5] => $this->getDbType(),
+ $keys[6] => $this->getDbPosition(),
+ $keys[7] => $this->getDbCliplength(),
+ $keys[8] => $this->getDbCuein(),
+ $keys[9] => $this->getDbCueout(),
+ $keys[10] => $this->getDbFadein(),
+ $keys[11] => $this->getDbFadeout(),
);
if ($includeForeignObjects) {
if (null !== $this->aCcFiles) {
$result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true);
}
+ if (null !== $this->aCcBlock) {
+ $result['CcBlock'] = $this->aCcBlock->toArray($keyType, $includeLazyLoadColumns, true);
+ }
if (null !== $this->aCcPlaylist) {
$result['CcPlaylist'] = $this->aCcPlaylist->toArray($keyType, $includeLazyLoadColumns, true);
}
@@ -1043,21 +1201,30 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->setDbFileId($value);
break;
case 3:
- $this->setDbPosition($value);
+ $this->setDbBlockId($value);
break;
case 4:
- $this->setDbCliplength($value);
+ $this->setDbStreamId($value);
break;
case 5:
- $this->setDbCuein($value);
+ $this->setDbType($value);
break;
case 6:
- $this->setDbCueout($value);
+ $this->setDbPosition($value);
break;
case 7:
- $this->setDbFadein($value);
+ $this->setDbCliplength($value);
break;
case 8:
+ $this->setDbCuein($value);
+ break;
+ case 9:
+ $this->setDbCueout($value);
+ break;
+ case 10:
+ $this->setDbFadein($value);
+ break;
+ case 11:
$this->setDbFadeout($value);
break;
} // switch()
@@ -1087,12 +1254,15 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setDbPlaylistId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDbFileId($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDbPosition($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setDbCliplength($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDbCuein($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setDbCueout($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setDbFadein($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setDbFadeout($arr[$keys[8]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbBlockId($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbStreamId($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbType($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbPosition($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbCliplength($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDbCuein($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setDbCueout($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setDbFadein($arr[$keys[10]]);
+ if (array_key_exists($keys[11], $arr)) $this->setDbFadeout($arr[$keys[11]]);
}
/**
@@ -1107,6 +1277,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
if ($this->isColumnModified(CcPlaylistcontentsPeer::ID)) $criteria->add(CcPlaylistcontentsPeer::ID, $this->id);
if ($this->isColumnModified(CcPlaylistcontentsPeer::PLAYLIST_ID)) $criteria->add(CcPlaylistcontentsPeer::PLAYLIST_ID, $this->playlist_id);
if ($this->isColumnModified(CcPlaylistcontentsPeer::FILE_ID)) $criteria->add(CcPlaylistcontentsPeer::FILE_ID, $this->file_id);
+ if ($this->isColumnModified(CcPlaylistcontentsPeer::BLOCK_ID)) $criteria->add(CcPlaylistcontentsPeer::BLOCK_ID, $this->block_id);
+ if ($this->isColumnModified(CcPlaylistcontentsPeer::STREAM_ID)) $criteria->add(CcPlaylistcontentsPeer::STREAM_ID, $this->stream_id);
+ if ($this->isColumnModified(CcPlaylistcontentsPeer::TYPE)) $criteria->add(CcPlaylistcontentsPeer::TYPE, $this->type);
if ($this->isColumnModified(CcPlaylistcontentsPeer::POSITION)) $criteria->add(CcPlaylistcontentsPeer::POSITION, $this->position);
if ($this->isColumnModified(CcPlaylistcontentsPeer::CLIPLENGTH)) $criteria->add(CcPlaylistcontentsPeer::CLIPLENGTH, $this->cliplength);
if ($this->isColumnModified(CcPlaylistcontentsPeer::CUEIN)) $criteria->add(CcPlaylistcontentsPeer::CUEIN, $this->cuein);
@@ -1176,6 +1349,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
{
$copyObj->setDbPlaylistId($this->playlist_id);
$copyObj->setDbFileId($this->file_id);
+ $copyObj->setDbBlockId($this->block_id);
+ $copyObj->setDbStreamId($this->stream_id);
+ $copyObj->setDbType($this->type);
$copyObj->setDbPosition($this->position);
$copyObj->setDbCliplength($this->cliplength);
$copyObj->setDbCuein($this->cuein);
@@ -1274,6 +1450,55 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
return $this->aCcFiles;
}
+ /**
+ * Declares an association between this object and a CcBlock object.
+ *
+ * @param CcBlock $v
+ * @return CcPlaylistcontents The current object (for fluent API support)
+ * @throws PropelException
+ */
+ public function setCcBlock(CcBlock $v = null)
+ {
+ if ($v === null) {
+ $this->setDbBlockId(NULL);
+ } else {
+ $this->setDbBlockId($v->getDbId());
+ }
+
+ $this->aCcBlock = $v;
+
+ // Add binding for other direction of this n:n relationship.
+ // If this object has already been added to the CcBlock object, it will not be re-added.
+ if ($v !== null) {
+ $v->addCcPlaylistcontents($this);
+ }
+
+ return $this;
+ }
+
+
+ /**
+ * Get the associated CcBlock object
+ *
+ * @param PropelPDO Optional Connection object.
+ * @return CcBlock The associated CcBlock object.
+ * @throws PropelException
+ */
+ public function getCcBlock(PropelPDO $con = null)
+ {
+ if ($this->aCcBlock === null && ($this->block_id !== null)) {
+ $this->aCcBlock = CcBlockQuery::create()->findPk($this->block_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->aCcBlock->addCcPlaylistcontentss($this);
+ */
+ }
+ return $this->aCcBlock;
+ }
+
/**
* Declares an association between this object and a CcPlaylist object.
*
@@ -1335,6 +1560,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
$this->id = null;
$this->playlist_id = null;
$this->file_id = null;
+ $this->block_id = null;
+ $this->stream_id = null;
+ $this->type = null;
$this->position = null;
$this->cliplength = null;
$this->cuein = null;
@@ -1365,6 +1593,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
} // if ($deep)
$this->aCcFiles = null;
+ $this->aCcBlock = null;
$this->aCcPlaylist = null;
}
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsPeer.php
index 0bb899b67..d90906568 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsPeer.php
@@ -26,7 +26,7 @@ abstract class BaseCcPlaylistcontentsPeer {
const TM_CLASS = 'CcPlaylistcontentsTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 9;
+ const NUM_COLUMNS = 12;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -40,6 +40,15 @@ abstract class BaseCcPlaylistcontentsPeer {
/** the column name for the FILE_ID field */
const FILE_ID = 'cc_playlistcontents.FILE_ID';
+ /** the column name for the BLOCK_ID field */
+ const BLOCK_ID = 'cc_playlistcontents.BLOCK_ID';
+
+ /** the column name for the STREAM_ID field */
+ const STREAM_ID = 'cc_playlistcontents.STREAM_ID';
+
+ /** the column name for the TYPE field */
+ const TYPE = 'cc_playlistcontents.TYPE';
+
/** the column name for the POSITION field */
const POSITION = 'cc_playlistcontents.POSITION';
@@ -74,12 +83,12 @@ abstract class BaseCcPlaylistcontentsPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbPlaylistId', 'DbFileId', 'DbPosition', 'DbCliplength', 'DbCuein', 'DbCueout', 'DbFadein', 'DbFadeout', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbPlaylistId', 'dbFileId', 'dbPosition', 'dbCliplength', 'dbCuein', 'dbCueout', 'dbFadein', 'dbFadeout', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::PLAYLIST_ID, self::FILE_ID, self::POSITION, self::CLIPLENGTH, self::CUEIN, self::CUEOUT, self::FADEIN, self::FADEOUT, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'PLAYLIST_ID', 'FILE_ID', 'POSITION', 'CLIPLENGTH', 'CUEIN', 'CUEOUT', 'FADEIN', 'FADEOUT', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'playlist_id', 'file_id', 'position', 'cliplength', 'cuein', 'cueout', 'fadein', 'fadeout', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbPlaylistId', 'DbFileId', 'DbBlockId', 'DbStreamId', 'DbType', 'DbPosition', 'DbCliplength', 'DbCuein', 'DbCueout', 'DbFadein', 'DbFadeout', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbPlaylistId', 'dbFileId', 'dbBlockId', 'dbStreamId', 'dbType', 'dbPosition', 'dbCliplength', 'dbCuein', 'dbCueout', 'dbFadein', 'dbFadeout', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::PLAYLIST_ID, self::FILE_ID, self::BLOCK_ID, self::STREAM_ID, self::TYPE, self::POSITION, self::CLIPLENGTH, self::CUEIN, self::CUEOUT, self::FADEIN, self::FADEOUT, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'PLAYLIST_ID', 'FILE_ID', 'BLOCK_ID', 'STREAM_ID', 'TYPE', 'POSITION', 'CLIPLENGTH', 'CUEIN', 'CUEOUT', 'FADEIN', 'FADEOUT', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'playlist_id', 'file_id', 'block_id', 'stream_id', 'type', 'position', 'cliplength', 'cuein', 'cueout', 'fadein', 'fadeout', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -89,12 +98,12 @@ abstract class BaseCcPlaylistcontentsPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbPlaylistId' => 1, 'DbFileId' => 2, 'DbPosition' => 3, 'DbCliplength' => 4, 'DbCuein' => 5, 'DbCueout' => 6, 'DbFadein' => 7, 'DbFadeout' => 8, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbPlaylistId' => 1, 'dbFileId' => 2, 'dbPosition' => 3, 'dbCliplength' => 4, 'dbCuein' => 5, 'dbCueout' => 6, 'dbFadein' => 7, 'dbFadeout' => 8, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::PLAYLIST_ID => 1, self::FILE_ID => 2, self::POSITION => 3, self::CLIPLENGTH => 4, self::CUEIN => 5, self::CUEOUT => 6, self::FADEIN => 7, self::FADEOUT => 8, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'PLAYLIST_ID' => 1, 'FILE_ID' => 2, 'POSITION' => 3, 'CLIPLENGTH' => 4, 'CUEIN' => 5, 'CUEOUT' => 6, 'FADEIN' => 7, 'FADEOUT' => 8, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'playlist_id' => 1, 'file_id' => 2, 'position' => 3, 'cliplength' => 4, 'cuein' => 5, 'cueout' => 6, 'fadein' => 7, 'fadeout' => 8, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbPlaylistId' => 1, 'DbFileId' => 2, 'DbBlockId' => 3, 'DbStreamId' => 4, 'DbType' => 5, 'DbPosition' => 6, 'DbCliplength' => 7, 'DbCuein' => 8, 'DbCueout' => 9, 'DbFadein' => 10, 'DbFadeout' => 11, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbPlaylistId' => 1, 'dbFileId' => 2, 'dbBlockId' => 3, 'dbStreamId' => 4, 'dbType' => 5, 'dbPosition' => 6, 'dbCliplength' => 7, 'dbCuein' => 8, 'dbCueout' => 9, 'dbFadein' => 10, 'dbFadeout' => 11, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::PLAYLIST_ID => 1, self::FILE_ID => 2, self::BLOCK_ID => 3, self::STREAM_ID => 4, self::TYPE => 5, self::POSITION => 6, self::CLIPLENGTH => 7, self::CUEIN => 8, self::CUEOUT => 9, self::FADEIN => 10, self::FADEOUT => 11, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'PLAYLIST_ID' => 1, 'FILE_ID' => 2, 'BLOCK_ID' => 3, 'STREAM_ID' => 4, 'TYPE' => 5, 'POSITION' => 6, 'CLIPLENGTH' => 7, 'CUEIN' => 8, 'CUEOUT' => 9, 'FADEIN' => 10, 'FADEOUT' => 11, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'playlist_id' => 1, 'file_id' => 2, 'block_id' => 3, 'stream_id' => 4, 'type' => 5, 'position' => 6, 'cliplength' => 7, 'cuein' => 8, 'cueout' => 9, 'fadein' => 10, 'fadeout' => 11, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -169,6 +178,9 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->addSelectColumn(CcPlaylistcontentsPeer::ID);
$criteria->addSelectColumn(CcPlaylistcontentsPeer::PLAYLIST_ID);
$criteria->addSelectColumn(CcPlaylistcontentsPeer::FILE_ID);
+ $criteria->addSelectColumn(CcPlaylistcontentsPeer::BLOCK_ID);
+ $criteria->addSelectColumn(CcPlaylistcontentsPeer::STREAM_ID);
+ $criteria->addSelectColumn(CcPlaylistcontentsPeer::TYPE);
$criteria->addSelectColumn(CcPlaylistcontentsPeer::POSITION);
$criteria->addSelectColumn(CcPlaylistcontentsPeer::CLIPLENGTH);
$criteria->addSelectColumn(CcPlaylistcontentsPeer::CUEIN);
@@ -179,6 +191,9 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.PLAYLIST_ID');
$criteria->addSelectColumn($alias . '.FILE_ID');
+ $criteria->addSelectColumn($alias . '.BLOCK_ID');
+ $criteria->addSelectColumn($alias . '.STREAM_ID');
+ $criteria->addSelectColumn($alias . '.TYPE');
$criteria->addSelectColumn($alias . '.POSITION');
$criteria->addSelectColumn($alias . '.CLIPLENGTH');
$criteria->addSelectColumn($alias . '.CUEIN');
@@ -520,6 +535,56 @@ abstract class BaseCcPlaylistcontentsPeer {
}
+ /**
+ * Returns the number of rows matching criteria, joining the related CcBlock 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 doCountJoinCcBlock(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(CcPlaylistcontentsPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcPlaylistcontentsPeer::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(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::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 CcPlaylist table
*
@@ -636,6 +701,72 @@ abstract class BaseCcPlaylistcontentsPeer {
}
+ /**
+ * Selects a collection of CcPlaylistcontents objects pre-filled with their CcBlock 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 CcPlaylistcontents objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinCcBlock(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);
+ }
+
+ CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ $startcol = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
+
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcPlaylistcontentsPeer::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 = CcPlaylistcontentsPeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
+ } // if $obj1 already loaded
+
+ $key2 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if ($key2 !== null) {
+ $obj2 = CcBlockPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcBlockPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol);
+ CcBlockPeer::addInstanceToPool($obj2, $key2);
+ } // if obj2 already loaded
+
+ // Add the $obj1 (CcPlaylistcontents) to $obj2 (CcBlock)
+ $obj2->addCcPlaylistcontents($obj1);
+
+ } // if joined row was not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
/**
* Selects a collection of CcPlaylistcontents objects pre-filled with their CcPlaylist objects.
* @param Criteria $criteria
@@ -740,6 +871,8 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
+
$criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -778,11 +911,16 @@ abstract class BaseCcPlaylistcontentsPeer {
CcFilesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcBlockPeer::NUM_COLUMNS - CcBlockPeer::NUM_LAZY_LOAD_COLUMNS);
+
CcPlaylistPeer::addSelectColumns($criteria);
- $startcol4 = $startcol3 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
+ $startcol5 = $startcol4 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
$criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
+
$criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
@@ -820,24 +958,42 @@ abstract class BaseCcPlaylistcontentsPeer {
$obj2->addCcPlaylistcontents($obj1);
} // if joined row not null
- // Add objects for joined CcPlaylist rows
+ // Add objects for joined CcBlock rows
- $key3 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ $key3 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) {
- $obj3 = CcPlaylistPeer::getInstanceFromPool($key3);
+ $obj3 = CcBlockPeer::getInstanceFromPool($key3);
if (!$obj3) {
- $cls = CcPlaylistPeer::getOMClass(false);
+ $cls = CcBlockPeer::getOMClass(false);
$obj3 = new $cls();
$obj3->hydrate($row, $startcol3);
- CcPlaylistPeer::addInstanceToPool($obj3, $key3);
+ CcBlockPeer::addInstanceToPool($obj3, $key3);
} // if obj3 loaded
- // Add the $obj1 (CcPlaylistcontents) to the collection in $obj3 (CcPlaylist)
+ // Add the $obj1 (CcPlaylistcontents) to the collection in $obj3 (CcBlock)
$obj3->addCcPlaylistcontents($obj1);
} // if joined row not null
+ // Add objects for joined CcPlaylist rows
+
+ $key4 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol4);
+ if ($key4 !== null) {
+ $obj4 = CcPlaylistPeer::getInstanceFromPool($key4);
+ if (!$obj4) {
+
+ $cls = CcPlaylistPeer::getOMClass(false);
+
+ $obj4 = new $cls();
+ $obj4->hydrate($row, $startcol4);
+ CcPlaylistPeer::addInstanceToPool($obj4, $key4);
+ } // if obj4 loaded
+
+ // Add the $obj1 (CcPlaylistcontents) to the collection in $obj4 (CcPlaylist)
+ $obj4->addCcPlaylistcontents($obj1);
+ } // if joined row not null
+
$results[] = $obj1;
}
$stmt->closeCursor();
@@ -881,6 +1037,60 @@ abstract class BaseCcPlaylistcontentsPeer {
$con = Propel::getConnection(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
+
+ $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::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 CcBlock 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 doCountJoinAllExceptCcBlock(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(CcPlaylistcontentsPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcPlaylistcontentsPeer::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(CcPlaylistcontentsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+
$criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -933,6 +1143,8 @@ abstract class BaseCcPlaylistcontentsPeer {
$criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -969,8 +1181,13 @@ abstract class BaseCcPlaylistcontentsPeer {
CcPlaylistcontentsPeer::addSelectColumns($criteria);
$startcol2 = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcBlockPeer::NUM_COLUMNS - CcBlockPeer::NUM_LAZY_LOAD_COLUMNS);
+
CcPlaylistPeer::addSelectColumns($criteria);
- $startcol3 = $startcol2 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
+ $startcol4 = $startcol3 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
$criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
@@ -992,23 +1209,139 @@ abstract class BaseCcPlaylistcontentsPeer {
CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
- // Add objects for joined CcPlaylist rows
+ // Add objects for joined CcBlock rows
- $key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ $key2 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
- $obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
+ $obj2 = CcBlockPeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcPlaylistPeer::getOMClass(false);
+ $cls = CcBlockPeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
- CcPlaylistPeer::addInstanceToPool($obj2, $key2);
+ CcBlockPeer::addInstanceToPool($obj2, $key2);
} // if $obj2 already loaded
- // Add the $obj1 (CcPlaylistcontents) to the collection in $obj2 (CcPlaylist)
+ // Add the $obj1 (CcPlaylistcontents) to the collection in $obj2 (CcBlock)
$obj2->addCcPlaylistcontents($obj1);
+ } // if joined row is not null
+
+ // Add objects for joined CcPlaylist rows
+
+ $key3 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcPlaylistPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcPlaylistPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcPlaylistPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcPlaylistcontents) to the collection in $obj3 (CcPlaylist)
+ $obj3->addCcPlaylistcontents($obj1);
+
+ } // if joined row is not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of CcPlaylistcontents objects pre-filled with all related objects except CcBlock.
+ *
+ * @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 CcPlaylistcontents objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptCcBlock(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);
+ }
+
+ CcPlaylistcontentsPeer::addSelectColumns($criteria);
+ $startcol2 = (CcPlaylistcontentsPeer::NUM_COLUMNS - CcPlaylistcontentsPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcPlaylistPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+
+ $criteria->addJoin(CcPlaylistcontentsPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
+
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcPlaylistcontentsPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcPlaylistcontentsPeer::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 = CcPlaylistcontentsPeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcPlaylistcontentsPeer::addInstanceToPool($obj1, $key1);
+ } // if obj1 already loaded
+
+ // Add objects for joined CcFiles rows
+
+ $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ if ($key2 !== null) {
+ $obj2 = CcFilesPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcFilesPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol2);
+ CcFilesPeer::addInstanceToPool($obj2, $key2);
+ } // if $obj2 already loaded
+
+ // Add the $obj1 (CcPlaylistcontents) to the collection in $obj2 (CcFiles)
+ $obj2->addCcPlaylistcontents($obj1);
+
+ } // if joined row is not null
+
+ // Add objects for joined CcPlaylist rows
+
+ $key3 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcPlaylistPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcPlaylistPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcPlaylistPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcPlaylistcontents) to the collection in $obj3 (CcPlaylist)
+ $obj3->addCcPlaylistcontents($obj1);
+
} // if joined row is not null
$results[] = $obj1;
@@ -1045,8 +1378,13 @@ abstract class BaseCcPlaylistcontentsPeer {
CcFilesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcBlockPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcBlockPeer::NUM_COLUMNS - CcBlockPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcPlaylistcontentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcontentsPeer::BLOCK_ID, CcBlockPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -1082,6 +1420,25 @@ abstract class BaseCcPlaylistcontentsPeer {
// Add the $obj1 (CcPlaylistcontents) to the collection in $obj2 (CcFiles)
$obj2->addCcPlaylistcontents($obj1);
+ } // if joined row is not null
+
+ // Add objects for joined CcBlock rows
+
+ $key3 = CcBlockPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcBlockPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcBlockPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcBlockPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcPlaylistcontents) to the collection in $obj3 (CcBlock)
+ $obj3->addCcPlaylistcontents($obj1);
+
} // if joined row is not null
$results[] = $obj1;
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsQuery.php
index 8769dfe60..25ea29378 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcontentsQuery.php
@@ -9,6 +9,9 @@
* @method CcPlaylistcontentsQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcPlaylistcontentsQuery orderByDbPlaylistId($order = Criteria::ASC) Order by the playlist_id column
* @method CcPlaylistcontentsQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column
+ * @method CcPlaylistcontentsQuery orderByDbBlockId($order = Criteria::ASC) Order by the block_id column
+ * @method CcPlaylistcontentsQuery orderByDbStreamId($order = Criteria::ASC) Order by the stream_id column
+ * @method CcPlaylistcontentsQuery orderByDbType($order = Criteria::ASC) Order by the type column
* @method CcPlaylistcontentsQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
* @method CcPlaylistcontentsQuery orderByDbCliplength($order = Criteria::ASC) Order by the cliplength column
* @method CcPlaylistcontentsQuery orderByDbCuein($order = Criteria::ASC) Order by the cuein column
@@ -19,6 +22,9 @@
* @method CcPlaylistcontentsQuery groupByDbId() Group by the id column
* @method CcPlaylistcontentsQuery groupByDbPlaylistId() Group by the playlist_id column
* @method CcPlaylistcontentsQuery groupByDbFileId() Group by the file_id column
+ * @method CcPlaylistcontentsQuery groupByDbBlockId() Group by the block_id column
+ * @method CcPlaylistcontentsQuery groupByDbStreamId() Group by the stream_id column
+ * @method CcPlaylistcontentsQuery groupByDbType() Group by the type column
* @method CcPlaylistcontentsQuery groupByDbPosition() Group by the position column
* @method CcPlaylistcontentsQuery groupByDbCliplength() Group by the cliplength column
* @method CcPlaylistcontentsQuery groupByDbCuein() Group by the cuein column
@@ -34,6 +40,10 @@
* @method CcPlaylistcontentsQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
* @method CcPlaylistcontentsQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
*
+ * @method CcPlaylistcontentsQuery leftJoinCcBlock($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcBlock relation
+ * @method CcPlaylistcontentsQuery rightJoinCcBlock($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcBlock relation
+ * @method CcPlaylistcontentsQuery innerJoinCcBlock($relationAlias = '') Adds a INNER JOIN clause to the query using the CcBlock relation
+ *
* @method CcPlaylistcontentsQuery leftJoinCcPlaylist($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlaylist relation
* @method CcPlaylistcontentsQuery rightJoinCcPlaylist($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlaylist relation
* @method CcPlaylistcontentsQuery innerJoinCcPlaylist($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlaylist relation
@@ -44,6 +54,9 @@
* @method CcPlaylistcontents findOneByDbId(int $id) Return the first CcPlaylistcontents filtered by the id column
* @method CcPlaylistcontents findOneByDbPlaylistId(int $playlist_id) Return the first CcPlaylistcontents filtered by the playlist_id column
* @method CcPlaylistcontents findOneByDbFileId(int $file_id) Return the first CcPlaylistcontents filtered by the file_id column
+ * @method CcPlaylistcontents findOneByDbBlockId(int $block_id) Return the first CcPlaylistcontents filtered by the block_id column
+ * @method CcPlaylistcontents findOneByDbStreamId(int $stream_id) Return the first CcPlaylistcontents filtered by the stream_id column
+ * @method CcPlaylistcontents findOneByDbType(int $type) Return the first CcPlaylistcontents filtered by the type column
* @method CcPlaylistcontents findOneByDbPosition(int $position) Return the first CcPlaylistcontents filtered by the position column
* @method CcPlaylistcontents findOneByDbCliplength(string $cliplength) Return the first CcPlaylistcontents filtered by the cliplength column
* @method CcPlaylistcontents findOneByDbCuein(string $cuein) Return the first CcPlaylistcontents filtered by the cuein column
@@ -54,6 +67,9 @@
* @method array findByDbId(int $id) Return CcPlaylistcontents objects filtered by the id column
* @method array findByDbPlaylistId(int $playlist_id) Return CcPlaylistcontents objects filtered by the playlist_id column
* @method array findByDbFileId(int $file_id) Return CcPlaylistcontents objects filtered by the file_id column
+ * @method array findByDbBlockId(int $block_id) Return CcPlaylistcontents objects filtered by the block_id column
+ * @method array findByDbStreamId(int $stream_id) Return CcPlaylistcontents objects filtered by the stream_id column
+ * @method array findByDbType(int $type) Return CcPlaylistcontents objects filtered by the type column
* @method array findByDbPosition(int $position) Return CcPlaylistcontents objects filtered by the position column
* @method array findByDbCliplength(string $cliplength) Return CcPlaylistcontents objects filtered by the cliplength column
* @method array findByDbCuein(string $cuein) Return CcPlaylistcontents objects filtered by the cuein column
@@ -248,6 +264,99 @@ abstract class BaseCcPlaylistcontentsQuery extends ModelCriteria
return $this->addUsingAlias(CcPlaylistcontentsPeer::FILE_ID, $dbFileId, $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 CcPlaylistcontentsQuery 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(CcPlaylistcontentsPeer::BLOCK_ID, $dbBlockId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbBlockId['max'])) {
+ $this->addUsingAlias(CcPlaylistcontentsPeer::BLOCK_ID, $dbBlockId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcontentsPeer::BLOCK_ID, $dbBlockId, $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 CcPlaylistcontentsQuery 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(CcPlaylistcontentsPeer::STREAM_ID, $dbStreamId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbStreamId['max'])) {
+ $this->addUsingAlias(CcPlaylistcontentsPeer::STREAM_ID, $dbStreamId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcontentsPeer::STREAM_ID, $dbStreamId, $comparison);
+ }
+
+ /**
+ * Filter the query on the type column
+ *
+ * @param int|array $dbType 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 CcPlaylistcontentsQuery The current query, for fluid interface
+ */
+ public function filterByDbType($dbType = null, $comparison = null)
+ {
+ if (is_array($dbType)) {
+ $useMinMax = false;
+ if (isset($dbType['min'])) {
+ $this->addUsingAlias(CcPlaylistcontentsPeer::TYPE, $dbType['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbType['max'])) {
+ $this->addUsingAlias(CcPlaylistcontentsPeer::TYPE, $dbType['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcontentsPeer::TYPE, $dbType, $comparison);
+ }
+
/**
* Filter the query on the position column
*
@@ -471,6 +580,70 @@ abstract class BaseCcPlaylistcontentsQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
}
+ /**
+ * 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 CcPlaylistcontentsQuery The current query, for fluid interface
+ */
+ public function filterByCcBlock($ccBlock, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcPlaylistcontentsPeer::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 CcPlaylistcontentsQuery 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
*
diff --git a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcShowSchedule.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteria.php
similarity index 65%
rename from install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcShowSchedule.php
rename to airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteria.php
index bf8b384e6..52359cc90 100644
--- a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcShowSchedule.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteria.php
@@ -2,25 +2,25 @@
/**
- * Base class that represents a row from the 'cc_show_schedule' table.
+ * Base class that represents a row from the 'cc_playlistcriteria' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcShowSchedule extends BaseObject implements Persistent
+abstract class BaseCcPlaylistcriteria extends BaseObject implements Persistent
{
/**
* Peer class name
*/
- const PEER = 'CcShowSchedulePeer';
+ const PEER = 'CcPlaylistcriteriaPeer';
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
- * @var CcShowSchedulePeer
+ * @var CcPlaylistcriteriaPeer
*/
protected static $peer;
@@ -31,27 +31,45 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
protected $id;
/**
- * The value for the instance_id field.
- * @var int
+ * The value for the criteria field.
+ * @var string
*/
- protected $instance_id;
+ protected $criteria;
/**
- * The value for the position field.
- * @var int
+ * The value for the modifier field.
+ * @var string
*/
- protected $position;
+ protected $modifier;
/**
- * The value for the group_id field.
- * @var int
+ * The value for the value field.
+ * @var string
*/
- protected $group_id;
+ protected $value;
/**
- * @var CcShowInstances
+ * The value for the extra field.
+ * @var string
*/
- protected $aCcShowInstances;
+ protected $extra;
+
+ /**
+ * The value for the playlist_id field.
+ * @var int
+ */
+ protected $playlist_id;
+
+ /**
+ * The value for the set_number field.
+ * @var int
+ */
+ protected $set_number;
+
+ /**
+ * @var CcPlaylist
+ */
+ protected $aCcPlaylist;
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -78,40 +96,70 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
/**
- * Get the [instance_id] column value.
+ * Get the [criteria] column value.
*
- * @return int
+ * @return string
*/
- public function getDbInstanceId()
+ public function getDbCriteria()
{
- return $this->instance_id;
+ return $this->criteria;
}
/**
- * Get the [position] column value.
+ * Get the [modifier] column value.
*
- * @return int
+ * @return string
*/
- public function getDbPosition()
+ public function getDbModifier()
{
- return $this->position;
+ return $this->modifier;
}
/**
- * Get the [group_id] column value.
+ * Get the [value] column value.
+ *
+ * @return string
+ */
+ public function getDbValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Get the [extra] column value.
+ *
+ * @return string
+ */
+ public function getDbExtra()
+ {
+ return $this->extra;
+ }
+
+ /**
+ * Get the [playlist_id] column value.
*
* @return int
*/
- public function getDbGroupId()
+ public function getDbPlaylistId()
{
- return $this->group_id;
+ return $this->playlist_id;
+ }
+
+ /**
+ * Get the [set_number] column value.
+ *
+ * @return int
+ */
+ public function getDbSetNumber()
+ {
+ return $this->set_number;
}
/**
* Set the value of [id] column.
*
* @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @return CcPlaylistcriteria The current object (for fluent API support)
*/
public function setDbId($v)
{
@@ -121,75 +169,135 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if ($this->id !== $v) {
$this->id = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::ID;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::ID;
}
return $this;
} // setDbId()
/**
- * Set the value of [instance_id] column.
+ * Set the value of [criteria] column.
*
- * @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcPlaylistcriteria The current object (for fluent API support)
*/
- public function setDbInstanceId($v)
+ public function setDbCriteria($v)
{
if ($v !== null) {
- $v = (int) $v;
+ $v = (string) $v;
}
- if ($this->instance_id !== $v) {
- $this->instance_id = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::INSTANCE_ID;
- }
-
- if ($this->aCcShowInstances !== null && $this->aCcShowInstances->getDbId() !== $v) {
- $this->aCcShowInstances = null;
+ if ($this->criteria !== $v) {
+ $this->criteria = $v;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::CRITERIA;
}
return $this;
- } // setDbInstanceId()
+ } // setDbCriteria()
/**
- * Set the value of [position] column.
+ * Set the value of [modifier] column.
*
- * @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcPlaylistcriteria The current object (for fluent API support)
*/
- public function setDbPosition($v)
+ public function setDbModifier($v)
{
if ($v !== null) {
- $v = (int) $v;
+ $v = (string) $v;
}
- if ($this->position !== $v) {
- $this->position = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::POSITION;
+ if ($this->modifier !== $v) {
+ $this->modifier = $v;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::MODIFIER;
}
return $this;
- } // setDbPosition()
+ } // setDbModifier()
/**
- * Set the value of [group_id] column.
+ * Set the value of [value] column.
+ *
+ * @param string $v new value
+ * @return CcPlaylistcriteria The current object (for fluent API support)
+ */
+ public function setDbValue($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->value !== $v) {
+ $this->value = $v;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::VALUE;
+ }
+
+ return $this;
+ } // setDbValue()
+
+ /**
+ * Set the value of [extra] column.
+ *
+ * @param string $v new value
+ * @return CcPlaylistcriteria The current object (for fluent API support)
+ */
+ public function setDbExtra($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->extra !== $v) {
+ $this->extra = $v;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::EXTRA;
+ }
+
+ return $this;
+ } // setDbExtra()
+
+ /**
+ * Set the value of [playlist_id] column.
*
* @param int $v new value
- * @return CcShowSchedule The current object (for fluent API support)
+ * @return CcPlaylistcriteria The current object (for fluent API support)
*/
- public function setDbGroupId($v)
+ public function setDbPlaylistId($v)
{
if ($v !== null) {
$v = (int) $v;
}
- if ($this->group_id !== $v) {
- $this->group_id = $v;
- $this->modifiedColumns[] = CcShowSchedulePeer::GROUP_ID;
+ if ($this->playlist_id !== $v) {
+ $this->playlist_id = $v;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::PLAYLIST_ID;
+ }
+
+ if ($this->aCcPlaylist !== null && $this->aCcPlaylist->getDbId() !== $v) {
+ $this->aCcPlaylist = null;
}
return $this;
- } // setDbGroupId()
+ } // setDbPlaylistId()
+
+ /**
+ * Set the value of [set_number] column.
+ *
+ * @param int $v new value
+ * @return CcPlaylistcriteria The current object (for fluent API support)
+ */
+ public function setDbSetNumber($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->set_number !== $v) {
+ $this->set_number = $v;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::SET_NUMBER;
+ }
+
+ return $this;
+ } // setDbSetNumber()
/**
* Indicates whether the columns in this object are only set to default values.
@@ -224,9 +332,12 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
- $this->instance_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
- $this->position = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
- $this->group_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
+ $this->criteria = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
+ $this->modifier = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
+ $this->value = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
+ $this->extra = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
+ $this->playlist_id = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
+ $this->set_number = ($row[$startcol + 6] !== null) ? (int) $row[$startcol + 6] : null;
$this->resetModified();
$this->setNew(false);
@@ -235,10 +346,10 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 4; // 4 = CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 7; // 7 = CcPlaylistcriteriaPeer::NUM_COLUMNS - CcPlaylistcriteriaPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
- throw new PropelException("Error populating CcShowSchedule object", $e);
+ throw new PropelException("Error populating CcPlaylistcriteria object", $e);
}
}
@@ -258,8 +369,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
public function ensureConsistency()
{
- if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) {
- $this->aCcShowInstances = null;
+ if ($this->aCcPlaylist !== null && $this->playlist_id !== $this->aCcPlaylist->getDbId()) {
+ $this->aCcPlaylist = null;
}
} // ensureConsistency
@@ -284,13 +395,13 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// We don't need to alter the object instance pool; we're just modifying this instance
// already in the pool.
- $stmt = CcShowSchedulePeer::doSelectStmt($this->buildPkeyCriteria(), $con);
+ $stmt = CcPlaylistcriteriaPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
$row = $stmt->fetch(PDO::FETCH_NUM);
$stmt->closeCursor();
if (!$row) {
@@ -300,7 +411,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
- $this->aCcShowInstances = null;
+ $this->aCcPlaylist = null;
} // if (deep)
}
@@ -320,14 +431,14 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
try {
$ret = $this->preDelete($con);
if ($ret) {
- CcShowScheduleQuery::create()
+ CcPlaylistcriteriaQuery::create()
->filterByPrimaryKey($this->getPrimaryKey())
->delete($con);
$this->postDelete($con);
@@ -362,7 +473,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
@@ -382,7 +493,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->postUpdate($con);
}
$this->postSave($con);
- CcShowSchedulePeer::addInstanceToPool($this);
+ CcPlaylistcriteriaPeer::addInstanceToPool($this);
} else {
$affectedRows = 0;
}
@@ -416,23 +527,23 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcShowInstances !== null) {
- if ($this->aCcShowInstances->isModified() || $this->aCcShowInstances->isNew()) {
- $affectedRows += $this->aCcShowInstances->save($con);
+ if ($this->aCcPlaylist !== null) {
+ if ($this->aCcPlaylist->isModified() || $this->aCcPlaylist->isNew()) {
+ $affectedRows += $this->aCcPlaylist->save($con);
}
- $this->setCcShowInstances($this->aCcShowInstances);
+ $this->setCcPlaylist($this->aCcPlaylist);
}
if ($this->isNew() ) {
- $this->modifiedColumns[] = CcShowSchedulePeer::ID;
+ $this->modifiedColumns[] = CcPlaylistcriteriaPeer::ID;
}
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$criteria = $this->buildCriteria();
- if ($criteria->keyContainsValue(CcShowSchedulePeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcShowSchedulePeer::ID.')');
+ if ($criteria->keyContainsValue(CcPlaylistcriteriaPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlaylistcriteriaPeer::ID.')');
}
$pk = BasePeer::doInsert($criteria, $con);
@@ -440,7 +551,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->setDbId($pk); //[IMV] update autoincrement primary key
$this->setNew(false);
} else {
- $affectedRows += CcShowSchedulePeer::doUpdate($this, $con);
+ $affectedRows += CcPlaylistcriteriaPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
@@ -517,14 +628,14 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcShowInstances !== null) {
- if (!$this->aCcShowInstances->validate($columns)) {
- $failureMap = array_merge($failureMap, $this->aCcShowInstances->getValidationFailures());
+ if ($this->aCcPlaylist !== null) {
+ if (!$this->aCcPlaylist->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcPlaylist->getValidationFailures());
}
}
- if (($retval = CcShowSchedulePeer::doValidate($this, $columns)) !== true) {
+ if (($retval = CcPlaylistcriteriaPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -547,7 +658,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcShowSchedulePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcPlaylistcriteriaPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$field = $this->getByPosition($pos);
return $field;
}
@@ -566,13 +677,22 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
return $this->getDbId();
break;
case 1:
- return $this->getDbInstanceId();
+ return $this->getDbCriteria();
break;
case 2:
- return $this->getDbPosition();
+ return $this->getDbModifier();
break;
case 3:
- return $this->getDbGroupId();
+ return $this->getDbValue();
+ break;
+ case 4:
+ return $this->getDbExtra();
+ break;
+ case 5:
+ return $this->getDbPlaylistId();
+ break;
+ case 6:
+ return $this->getDbSetNumber();
break;
default:
return null;
@@ -596,16 +716,19 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false)
{
- $keys = CcShowSchedulePeer::getFieldNames($keyType);
+ $keys = CcPlaylistcriteriaPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getDbId(),
- $keys[1] => $this->getDbInstanceId(),
- $keys[2] => $this->getDbPosition(),
- $keys[3] => $this->getDbGroupId(),
+ $keys[1] => $this->getDbCriteria(),
+ $keys[2] => $this->getDbModifier(),
+ $keys[3] => $this->getDbValue(),
+ $keys[4] => $this->getDbExtra(),
+ $keys[5] => $this->getDbPlaylistId(),
+ $keys[6] => $this->getDbSetNumber(),
);
if ($includeForeignObjects) {
- if (null !== $this->aCcShowInstances) {
- $result['CcShowInstances'] = $this->aCcShowInstances->toArray($keyType, $includeLazyLoadColumns, true);
+ if (null !== $this->aCcPlaylist) {
+ $result['CcPlaylist'] = $this->aCcPlaylist->toArray($keyType, $includeLazyLoadColumns, true);
}
}
return $result;
@@ -623,7 +746,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcShowSchedulePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcPlaylistcriteriaPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -642,13 +765,22 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
$this->setDbId($value);
break;
case 1:
- $this->setDbInstanceId($value);
+ $this->setDbCriteria($value);
break;
case 2:
- $this->setDbPosition($value);
+ $this->setDbModifier($value);
break;
case 3:
- $this->setDbGroupId($value);
+ $this->setDbValue($value);
+ break;
+ case 4:
+ $this->setDbExtra($value);
+ break;
+ case 5:
+ $this->setDbPlaylistId($value);
+ break;
+ case 6:
+ $this->setDbSetNumber($value);
break;
} // switch()
}
@@ -672,12 +804,15 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
- $keys = CcShowSchedulePeer::getFieldNames($keyType);
+ $keys = CcPlaylistcriteriaPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setDbInstanceId($arr[$keys[1]]);
- if (array_key_exists($keys[2], $arr)) $this->setDbPosition($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDbGroupId($arr[$keys[3]]);
+ if (array_key_exists($keys[1], $arr)) $this->setDbCriteria($arr[$keys[1]]);
+ if (array_key_exists($keys[2], $arr)) $this->setDbModifier($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbValue($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbExtra($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbPlaylistId($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbSetNumber($arr[$keys[6]]);
}
/**
@@ -687,12 +822,15 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function buildCriteria()
{
- $criteria = new Criteria(CcShowSchedulePeer::DATABASE_NAME);
+ $criteria = new Criteria(CcPlaylistcriteriaPeer::DATABASE_NAME);
- if ($this->isColumnModified(CcShowSchedulePeer::ID)) $criteria->add(CcShowSchedulePeer::ID, $this->id);
- if ($this->isColumnModified(CcShowSchedulePeer::INSTANCE_ID)) $criteria->add(CcShowSchedulePeer::INSTANCE_ID, $this->instance_id);
- if ($this->isColumnModified(CcShowSchedulePeer::POSITION)) $criteria->add(CcShowSchedulePeer::POSITION, $this->position);
- if ($this->isColumnModified(CcShowSchedulePeer::GROUP_ID)) $criteria->add(CcShowSchedulePeer::GROUP_ID, $this->group_id);
+ if ($this->isColumnModified(CcPlaylistcriteriaPeer::ID)) $criteria->add(CcPlaylistcriteriaPeer::ID, $this->id);
+ if ($this->isColumnModified(CcPlaylistcriteriaPeer::CRITERIA)) $criteria->add(CcPlaylistcriteriaPeer::CRITERIA, $this->criteria);
+ if ($this->isColumnModified(CcPlaylistcriteriaPeer::MODIFIER)) $criteria->add(CcPlaylistcriteriaPeer::MODIFIER, $this->modifier);
+ if ($this->isColumnModified(CcPlaylistcriteriaPeer::VALUE)) $criteria->add(CcPlaylistcriteriaPeer::VALUE, $this->value);
+ if ($this->isColumnModified(CcPlaylistcriteriaPeer::EXTRA)) $criteria->add(CcPlaylistcriteriaPeer::EXTRA, $this->extra);
+ if ($this->isColumnModified(CcPlaylistcriteriaPeer::PLAYLIST_ID)) $criteria->add(CcPlaylistcriteriaPeer::PLAYLIST_ID, $this->playlist_id);
+ if ($this->isColumnModified(CcPlaylistcriteriaPeer::SET_NUMBER)) $criteria->add(CcPlaylistcriteriaPeer::SET_NUMBER, $this->set_number);
return $criteria;
}
@@ -707,8 +845,8 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
- $criteria = new Criteria(CcShowSchedulePeer::DATABASE_NAME);
- $criteria->add(CcShowSchedulePeer::ID, $this->id);
+ $criteria = new Criteria(CcPlaylistcriteriaPeer::DATABASE_NAME);
+ $criteria->add(CcPlaylistcriteriaPeer::ID, $this->id);
return $criteria;
}
@@ -748,15 +886,18 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of CcShowSchedule (or compatible) type.
+ * @param object $copyObj An object of CcPlaylistcriteria (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
- $copyObj->setDbInstanceId($this->instance_id);
- $copyObj->setDbPosition($this->position);
- $copyObj->setDbGroupId($this->group_id);
+ $copyObj->setDbCriteria($this->criteria);
+ $copyObj->setDbModifier($this->modifier);
+ $copyObj->setDbValue($this->value);
+ $copyObj->setDbExtra($this->extra);
+ $copyObj->setDbPlaylistId($this->playlist_id);
+ $copyObj->setDbSetNumber($this->set_number);
$copyObj->setNew(true);
$copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
@@ -771,7 +912,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @return CcShowSchedule Clone of current object.
+ * @return CcPlaylistcriteria Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
@@ -790,37 +931,37 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
- * @return CcShowSchedulePeer
+ * @return CcPlaylistcriteriaPeer
*/
public function getPeer()
{
if (self::$peer === null) {
- self::$peer = new CcShowSchedulePeer();
+ self::$peer = new CcPlaylistcriteriaPeer();
}
return self::$peer;
}
/**
- * Declares an association between this object and a CcShowInstances object.
+ * Declares an association between this object and a CcPlaylist object.
*
- * @param CcShowInstances $v
- * @return CcShowSchedule The current object (for fluent API support)
+ * @param CcPlaylist $v
+ * @return CcPlaylistcriteria The current object (for fluent API support)
* @throws PropelException
*/
- public function setCcShowInstances(CcShowInstances $v = null)
+ public function setCcPlaylist(CcPlaylist $v = null)
{
if ($v === null) {
- $this->setDbInstanceId(NULL);
+ $this->setDbPlaylistId(NULL);
} else {
- $this->setDbInstanceId($v->getDbId());
+ $this->setDbPlaylistId($v->getDbId());
}
- $this->aCcShowInstances = $v;
+ $this->aCcPlaylist = $v;
// Add binding for other direction of this n:n relationship.
- // If this object has already been added to the CcShowInstances object, it will not be re-added.
+ // If this object has already been added to the CcPlaylist object, it will not be re-added.
if ($v !== null) {
- $v->addCcShowSchedule($this);
+ $v->addCcPlaylistcriteria($this);
}
return $this;
@@ -828,25 +969,25 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
/**
- * Get the associated CcShowInstances object
+ * Get the associated CcPlaylist object
*
* @param PropelPDO Optional Connection object.
- * @return CcShowInstances The associated CcShowInstances object.
+ * @return CcPlaylist The associated CcPlaylist object.
* @throws PropelException
*/
- public function getCcShowInstances(PropelPDO $con = null)
+ public function getCcPlaylist(PropelPDO $con = null)
{
- if ($this->aCcShowInstances === null && ($this->instance_id !== null)) {
- $this->aCcShowInstances = CcShowInstancesQuery::create()->findPk($this->instance_id, $con);
+ if ($this->aCcPlaylist === null && ($this->playlist_id !== null)) {
+ $this->aCcPlaylist = CcPlaylistQuery::create()->findPk($this->playlist_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->aCcShowInstances->addCcShowSchedules($this);
+ $this->aCcPlaylist->addCcPlaylistcriterias($this);
*/
}
- return $this->aCcShowInstances;
+ return $this->aCcPlaylist;
}
/**
@@ -855,9 +996,12 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
public function clear()
{
$this->id = null;
- $this->instance_id = null;
- $this->position = null;
- $this->group_id = null;
+ $this->criteria = null;
+ $this->modifier = null;
+ $this->value = null;
+ $this->extra = null;
+ $this->playlist_id = null;
+ $this->set_number = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();
@@ -880,7 +1024,7 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
if ($deep) {
} // if ($deep)
- $this->aCcShowInstances = null;
+ $this->aCcPlaylist = null;
}
/**
@@ -902,4 +1046,4 @@ abstract class BaseCcShowSchedule extends BaseObject implements Persistent
throw new PropelException('Call to undefined method: ' . $name);
}
-} // BaseCcShowSchedule
+} // BaseCcPlaylistcriteria
diff --git a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcPlaylistPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteriaPeer.php
similarity index 67%
rename from install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcPlaylistPeer.php
rename to airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteriaPeer.php
index 0e338bc39..8ab217965 100644
--- a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcPlaylistPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteriaPeer.php
@@ -2,64 +2,61 @@
/**
- * Base static class for performing query and update operations on the 'cc_playlist' table.
+ * Base static class for performing query and update operations on the 'cc_playlistcriteria' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcPlaylistPeer {
+abstract class BaseCcPlaylistcriteriaPeer {
/** the default database name for this class */
const DATABASE_NAME = 'airtime';
/** the table name for this class */
- const TABLE_NAME = 'cc_playlist';
+ const TABLE_NAME = 'cc_playlistcriteria';
/** the related Propel class for this table */
- const OM_CLASS = 'CcPlaylist';
+ const OM_CLASS = 'CcPlaylistcriteria';
/** A class that can be returned by this peer. */
- const CLASS_DEFAULT = 'airtime.CcPlaylist';
+ const CLASS_DEFAULT = 'airtime.CcPlaylistcriteria';
/** the related TableMap class for this table */
- const TM_CLASS = 'CcPlaylistTableMap';
+ const TM_CLASS = 'CcPlaylistcriteriaTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 8;
+ const NUM_COLUMNS = 7;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the ID field */
- const ID = 'cc_playlist.ID';
+ const ID = 'cc_playlistcriteria.ID';
- /** the column name for the NAME field */
- const NAME = 'cc_playlist.NAME';
+ /** the column name for the CRITERIA field */
+ const CRITERIA = 'cc_playlistcriteria.CRITERIA';
- /** the column name for the STATE field */
- const STATE = 'cc_playlist.STATE';
+ /** the column name for the MODIFIER field */
+ const MODIFIER = 'cc_playlistcriteria.MODIFIER';
- /** the column name for the CURRENTLYACCESSING field */
- const CURRENTLYACCESSING = 'cc_playlist.CURRENTLYACCESSING';
+ /** the column name for the VALUE field */
+ const VALUE = 'cc_playlistcriteria.VALUE';
- /** the column name for the EDITEDBY field */
- const EDITEDBY = 'cc_playlist.EDITEDBY';
+ /** the column name for the EXTRA field */
+ const EXTRA = 'cc_playlistcriteria.EXTRA';
- /** the column name for the MTIME field */
- const MTIME = 'cc_playlist.MTIME';
+ /** the column name for the PLAYLIST_ID field */
+ const PLAYLIST_ID = 'cc_playlistcriteria.PLAYLIST_ID';
- /** the column name for the CREATOR field */
- const CREATOR = 'cc_playlist.CREATOR';
-
- /** the column name for the DESCRIPTION field */
- const DESCRIPTION = 'cc_playlist.DESCRIPTION';
+ /** the column name for the SET_NUMBER field */
+ const SET_NUMBER = 'cc_playlistcriteria.SET_NUMBER';
/**
- * An identiy map to hold any loaded instances of CcPlaylist objects.
+ * An identiy map to hold any loaded instances of CcPlaylistcriteria objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
* queries.
- * @var array CcPlaylist[]
+ * @var array CcPlaylistcriteria[]
*/
public static $instances = array();
@@ -71,12 +68,12 @@ abstract class BaseCcPlaylistPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbCreator', 'DbDescription', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbCreator', 'dbDescription', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::CREATOR, self::DESCRIPTION, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'CREATOR', 'DESCRIPTION', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'creator', 'description', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbCriteria', 'DbModifier', 'DbValue', 'DbExtra', 'DbPlaylistId', 'DbSetNumber', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbCriteria', 'dbModifier', 'dbValue', 'dbExtra', 'dbPlaylistId', 'dbSetNumber', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::CRITERIA, self::MODIFIER, self::VALUE, self::EXTRA, self::PLAYLIST_ID, self::SET_NUMBER, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'CRITERIA', 'MODIFIER', 'VALUE', 'EXTRA', 'PLAYLIST_ID', 'SET_NUMBER', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'criteria', 'modifier', 'value', 'extra', 'playlist_id', 'set_number', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
/**
@@ -86,12 +83,12 @@ abstract class BaseCcPlaylistPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbState' => 2, 'DbCurrentlyaccessing' => 3, 'DbEditedby' => 4, 'DbMtime' => 5, 'DbCreator' => 6, 'DbDescription' => 7, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbState' => 2, 'dbCurrentlyaccessing' => 3, 'dbEditedby' => 4, 'dbMtime' => 5, 'dbCreator' => 6, 'dbDescription' => 7, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::STATE => 2, self::CURRENTLYACCESSING => 3, self::EDITEDBY => 4, self::MTIME => 5, self::CREATOR => 6, self::DESCRIPTION => 7, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'STATE' => 2, 'CURRENTLYACCESSING' => 3, 'EDITEDBY' => 4, 'MTIME' => 5, 'CREATOR' => 6, 'DESCRIPTION' => 7, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'state' => 2, 'currentlyaccessing' => 3, 'editedby' => 4, 'mtime' => 5, 'creator' => 6, 'description' => 7, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbCriteria' => 1, 'DbModifier' => 2, 'DbValue' => 3, 'DbExtra' => 4, 'DbPlaylistId' => 5, 'DbSetNumber' => 6, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbCriteria' => 1, 'dbModifier' => 2, 'dbValue' => 3, 'dbExtra' => 4, 'dbPlaylistId' => 5, 'dbSetNumber' => 6, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::CRITERIA => 1, self::MODIFIER => 2, self::VALUE => 3, self::EXTRA => 4, self::PLAYLIST_ID => 5, self::SET_NUMBER => 6, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'CRITERIA' => 1, 'MODIFIER' => 2, 'VALUE' => 3, 'EXTRA' => 4, 'PLAYLIST_ID' => 5, 'SET_NUMBER' => 6, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'criteria' => 1, 'modifier' => 2, 'value' => 3, 'extra' => 4, 'playlist_id' => 5, 'set_number' => 6, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
/**
@@ -140,12 +137,12 @@ abstract class BaseCcPlaylistPeer {
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
*
* @param string $alias The alias for the current table.
- * @param string $column The column name for current table. (i.e. CcPlaylistPeer::COLUMN_NAME).
+ * @param string $column The column name for current table. (i.e. CcPlaylistcriteriaPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
- return str_replace(CcPlaylistPeer::TABLE_NAME.'.', $alias.'.', $column);
+ return str_replace(CcPlaylistcriteriaPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -163,23 +160,21 @@ abstract class BaseCcPlaylistPeer {
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
- $criteria->addSelectColumn(CcPlaylistPeer::ID);
- $criteria->addSelectColumn(CcPlaylistPeer::NAME);
- $criteria->addSelectColumn(CcPlaylistPeer::STATE);
- $criteria->addSelectColumn(CcPlaylistPeer::CURRENTLYACCESSING);
- $criteria->addSelectColumn(CcPlaylistPeer::EDITEDBY);
- $criteria->addSelectColumn(CcPlaylistPeer::MTIME);
- $criteria->addSelectColumn(CcPlaylistPeer::CREATOR);
- $criteria->addSelectColumn(CcPlaylistPeer::DESCRIPTION);
+ $criteria->addSelectColumn(CcPlaylistcriteriaPeer::ID);
+ $criteria->addSelectColumn(CcPlaylistcriteriaPeer::CRITERIA);
+ $criteria->addSelectColumn(CcPlaylistcriteriaPeer::MODIFIER);
+ $criteria->addSelectColumn(CcPlaylistcriteriaPeer::VALUE);
+ $criteria->addSelectColumn(CcPlaylistcriteriaPeer::EXTRA);
+ $criteria->addSelectColumn(CcPlaylistcriteriaPeer::PLAYLIST_ID);
+ $criteria->addSelectColumn(CcPlaylistcriteriaPeer::SET_NUMBER);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.NAME');
- $criteria->addSelectColumn($alias . '.STATE');
- $criteria->addSelectColumn($alias . '.CURRENTLYACCESSING');
- $criteria->addSelectColumn($alias . '.EDITEDBY');
- $criteria->addSelectColumn($alias . '.MTIME');
- $criteria->addSelectColumn($alias . '.CREATOR');
- $criteria->addSelectColumn($alias . '.DESCRIPTION');
+ $criteria->addSelectColumn($alias . '.CRITERIA');
+ $criteria->addSelectColumn($alias . '.MODIFIER');
+ $criteria->addSelectColumn($alias . '.VALUE');
+ $criteria->addSelectColumn($alias . '.EXTRA');
+ $criteria->addSelectColumn($alias . '.PLAYLIST_ID');
+ $criteria->addSelectColumn($alias . '.SET_NUMBER');
}
}
@@ -199,21 +194,21 @@ abstract class BaseCcPlaylistPeer {
// 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(CcPlaylistPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcPlaylistcriteriaPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistPeer::addSelectColumns($criteria);
+ CcPlaylistcriteriaPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
$criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// BasePeer returns a PDOStatement
$stmt = BasePeer::doCount($criteria, $con);
@@ -231,7 +226,7 @@ abstract class BaseCcPlaylistPeer {
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param PropelPDO $con
- * @return CcPlaylist
+ * @return CcPlaylistcriteria
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -239,7 +234,7 @@ abstract class BaseCcPlaylistPeer {
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
- $objects = CcPlaylistPeer::doSelect($critcopy, $con);
+ $objects = CcPlaylistcriteriaPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -256,7 +251,7 @@ abstract class BaseCcPlaylistPeer {
*/
public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
- return CcPlaylistPeer::populateObjects(CcPlaylistPeer::doSelectStmt($criteria, $con));
+ return CcPlaylistcriteriaPeer::populateObjects(CcPlaylistcriteriaPeer::doSelectStmt($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
@@ -274,12 +269,12 @@ abstract class BaseCcPlaylistPeer {
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
if (!$criteria->hasSelectClause()) {
$criteria = clone $criteria;
- CcPlaylistPeer::addSelectColumns($criteria);
+ CcPlaylistcriteriaPeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -297,10 +292,10 @@ abstract class BaseCcPlaylistPeer {
* to the cache in order to ensure that the same objects are always returned by doSelect*()
* and retrieveByPK*() calls.
*
- * @param CcPlaylist $value A CcPlaylist object.
+ * @param CcPlaylistcriteria $value A CcPlaylistcriteria object.
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
*/
- public static function addInstanceToPool(CcPlaylist $obj, $key = null)
+ public static function addInstanceToPool(CcPlaylistcriteria $obj, $key = null)
{
if (Propel::isInstancePoolingEnabled()) {
if ($key === null) {
@@ -318,18 +313,18 @@ abstract class BaseCcPlaylistPeer {
* methods in your stub classes -- you may need to explicitly remove objects
* from the cache in order to prevent returning objects that no longer exist.
*
- * @param mixed $value A CcPlaylist object or a primary key value.
+ * @param mixed $value A CcPlaylistcriteria object or a primary key value.
*/
public static function removeInstanceFromPool($value)
{
if (Propel::isInstancePoolingEnabled() && $value !== null) {
- if (is_object($value) && $value instanceof CcPlaylist) {
+ if (is_object($value) && $value instanceof CcPlaylistcriteria) {
$key = (string) $value->getDbId();
} elseif (is_scalar($value)) {
// assume we've been passed a primary key
$key = (string) $value;
} else {
- $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlaylist object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
+ $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcPlaylistcriteria object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
throw $e;
}
@@ -344,7 +339,7 @@ abstract class BaseCcPlaylistPeer {
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param string $key The key (@see getPrimaryKeyHash()) for this instance.
- * @return CcPlaylist Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
+ * @return CcPlaylistcriteria Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
* @see getPrimaryKeyHash()
*/
public static function getInstanceFromPool($key)
@@ -368,14 +363,11 @@ abstract class BaseCcPlaylistPeer {
}
/**
- * Method to invalidate the instance pool of all tables related to cc_playlist
+ * Method to invalidate the instance pool of all tables related to cc_playlistcriteria
* by a foreign key with ON DELETE CASCADE
*/
public static function clearRelatedInstancePool()
{
- // Invalidate objects in CcPlaylistcontentsPeer instance pool,
- // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
- CcPlaylistcontentsPeer::clearInstancePool();
}
/**
@@ -423,11 +415,11 @@ abstract class BaseCcPlaylistPeer {
$results = array();
// set the class once to avoid overhead in the loop
- $cls = CcPlaylistPeer::getOMClass(false);
+ $cls = CcPlaylistcriteriaPeer::getOMClass(false);
// populate the object(s)
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj = CcPlaylistPeer::getInstanceFromPool($key))) {
+ $key = CcPlaylistcriteriaPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj = CcPlaylistcriteriaPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
@@ -436,7 +428,7 @@ abstract class BaseCcPlaylistPeer {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
- CcPlaylistPeer::addInstanceToPool($obj, $key);
+ CcPlaylistcriteriaPeer::addInstanceToPool($obj, $key);
} // if key exists
}
$stmt->closeCursor();
@@ -449,27 +441,27 @@ abstract class BaseCcPlaylistPeer {
* @param int $startcol The 0-based offset for reading from the resultset row.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
- * @return array (CcPlaylist object, last column rank)
+ * @return array (CcPlaylistcriteria object, last column rank)
*/
public static function populateObject($row, $startcol = 0)
{
- $key = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol);
- if (null !== ($obj = CcPlaylistPeer::getInstanceFromPool($key))) {
+ $key = CcPlaylistcriteriaPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if (null !== ($obj = CcPlaylistcriteriaPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $startcol, true); // rehydrate
- $col = $startcol + CcPlaylistPeer::NUM_COLUMNS;
+ $col = $startcol + CcPlaylistcriteriaPeer::NUM_COLUMNS;
} else {
- $cls = CcPlaylistPeer::OM_CLASS;
+ $cls = CcPlaylistcriteriaPeer::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $startcol);
- CcPlaylistPeer::addInstanceToPool($obj, $key);
+ CcPlaylistcriteriaPeer::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
/**
- * Returns the number of rows matching criteria, joining the related CcSubjs table
+ * Returns the number of rows matching criteria, joining the related CcPlaylist table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@@ -477,7 +469,7 @@ abstract class BaseCcPlaylistPeer {
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
- public static function doCountJoinCcSubjs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doCountJoinCcPlaylist(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;
@@ -485,14 +477,14 @@ abstract class BaseCcPlaylistPeer {
// 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(CcPlaylistPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcPlaylistcriteriaPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistPeer::addSelectColumns($criteria);
+ CcPlaylistcriteriaPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -501,10 +493,10 @@ abstract class BaseCcPlaylistPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcriteriaPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -519,15 +511,15 @@ abstract class BaseCcPlaylistPeer {
/**
- * Selects a collection of CcPlaylist objects pre-filled with their CcSubjs objects.
+ * Selects a collection of CcPlaylistcriteria objects pre-filled with their CcPlaylist 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 CcPlaylist objects.
+ * @return array Array of CcPlaylistcriteria objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public static function doSelectJoinCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doSelectJoinCcPlaylist(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@@ -536,44 +528,44 @@ abstract class BaseCcPlaylistPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
+ CcPlaylistcriteriaPeer::addSelectColumns($criteria);
+ $startcol = (CcPlaylistcriteriaPeer::NUM_COLUMNS - CcPlaylistcriteriaPeer::NUM_LAZY_LOAD_COLUMNS);
CcPlaylistPeer::addSelectColumns($criteria);
- $startcol = (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
- CcSubjsPeer::addSelectColumns($criteria);
- $criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcriteriaPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcPlaylistPeer::getInstanceFromPool($key1))) {
+ $key1 = CcPlaylistcriteriaPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcPlaylistcriteriaPeer::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 = CcPlaylistPeer::getOMClass(false);
+ $cls = CcPlaylistcriteriaPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcPlaylistPeer::addInstanceToPool($obj1, $key1);
+ CcPlaylistcriteriaPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
- $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ $key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
- $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
+ $obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcSubjsPeer::getOMClass(false);
+ $cls = CcPlaylistPeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
- CcSubjsPeer::addInstanceToPool($obj2, $key2);
+ CcPlaylistPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
- // Add the $obj1 (CcPlaylist) to $obj2 (CcSubjs)
- $obj2->addCcPlaylist($obj1);
+ // Add the $obj1 (CcPlaylistcriteria) to $obj2 (CcPlaylist)
+ $obj2->addCcPlaylistcriteria($obj1);
} // if joined row was not null
@@ -601,14 +593,14 @@ abstract class BaseCcPlaylistPeer {
// 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(CcPlaylistPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcPlaylistcriteriaPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcPlaylistPeer::addSelectColumns($criteria);
+ CcPlaylistcriteriaPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -617,10 +609,10 @@ abstract class BaseCcPlaylistPeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcriteriaPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -634,12 +626,12 @@ abstract class BaseCcPlaylistPeer {
}
/**
- * Selects a collection of CcPlaylist objects pre-filled with all related objects.
+ * Selects a collection of CcPlaylistcriteria objects pre-filled with all related 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 CcPlaylist objects.
+ * @return array Array of CcPlaylistcriteria objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -652,47 +644,47 @@ abstract class BaseCcPlaylistPeer {
$criteria->setDbName(self::DATABASE_NAME);
}
+ CcPlaylistcriteriaPeer::addSelectColumns($criteria);
+ $startcol2 = (CcPlaylistcriteriaPeer::NUM_COLUMNS - CcPlaylistcriteriaPeer::NUM_LAZY_LOAD_COLUMNS);
+
CcPlaylistPeer::addSelectColumns($criteria);
- $startcol2 = (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
+ $startcol3 = $startcol2 + (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
- CcSubjsPeer::addSelectColumns($criteria);
- $startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
-
- $criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
+ $criteria->addJoin(CcPlaylistcriteriaPeer::PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcPlaylistPeer::getInstanceFromPool($key1))) {
+ $key1 = CcPlaylistcriteriaPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcPlaylistcriteriaPeer::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 = CcPlaylistPeer::getOMClass(false);
+ $cls = CcPlaylistcriteriaPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcPlaylistPeer::addInstanceToPool($obj1, $key1);
+ CcPlaylistcriteriaPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
- // Add objects for joined CcSubjs rows
+ // Add objects for joined CcPlaylist rows
- $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ $key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
- $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
+ $obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcSubjsPeer::getOMClass(false);
+ $cls = CcPlaylistPeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
- CcSubjsPeer::addInstanceToPool($obj2, $key2);
+ CcPlaylistPeer::addInstanceToPool($obj2, $key2);
} // if obj2 loaded
- // Add the $obj1 (CcPlaylist) to the collection in $obj2 (CcSubjs)
- $obj2->addCcPlaylist($obj1);
+ // Add the $obj1 (CcPlaylistcriteria) to the collection in $obj2 (CcPlaylist)
+ $obj2->addCcPlaylistcriteria($obj1);
} // if joined row not null
$results[] = $obj1;
@@ -718,10 +710,10 @@ abstract class BaseCcPlaylistPeer {
*/
public static function buildTableMap()
{
- $dbMap = Propel::getDatabaseMap(BaseCcPlaylistPeer::DATABASE_NAME);
- if (!$dbMap->hasTable(BaseCcPlaylistPeer::TABLE_NAME))
+ $dbMap = Propel::getDatabaseMap(BaseCcPlaylistcriteriaPeer::DATABASE_NAME);
+ if (!$dbMap->hasTable(BaseCcPlaylistcriteriaPeer::TABLE_NAME))
{
- $dbMap->addTableObject(new CcPlaylistTableMap());
+ $dbMap->addTableObject(new CcPlaylistcriteriaTableMap());
}
}
@@ -738,13 +730,13 @@ abstract class BaseCcPlaylistPeer {
*/
public static function getOMClass($withPrefix = true)
{
- return $withPrefix ? CcPlaylistPeer::CLASS_DEFAULT : CcPlaylistPeer::OM_CLASS;
+ return $withPrefix ? CcPlaylistcriteriaPeer::CLASS_DEFAULT : CcPlaylistcriteriaPeer::OM_CLASS;
}
/**
- * Method perform an INSERT on the database, given a CcPlaylist or Criteria object.
+ * Method perform an INSERT on the database, given a CcPlaylistcriteria or Criteria object.
*
- * @param mixed $values Criteria or CcPlaylist object containing data that is used to create the INSERT statement.
+ * @param mixed $values Criteria or CcPlaylistcriteria object containing data that is used to create the INSERT statement.
* @param PropelPDO $con the PropelPDO connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
@@ -753,17 +745,17 @@ abstract class BaseCcPlaylistPeer {
public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
- $criteria = $values->buildCriteria(); // build Criteria from CcPlaylist object
+ $criteria = $values->buildCriteria(); // build Criteria from CcPlaylistcriteria object
}
- if ($criteria->containsKey(CcPlaylistPeer::ID) && $criteria->keyContainsValue(CcPlaylistPeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlaylistPeer::ID.')');
+ if ($criteria->containsKey(CcPlaylistcriteriaPeer::ID) && $criteria->keyContainsValue(CcPlaylistcriteriaPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlaylistcriteriaPeer::ID.')');
}
@@ -785,9 +777,9 @@ abstract class BaseCcPlaylistPeer {
}
/**
- * Method perform an UPDATE on the database, given a CcPlaylist or Criteria object.
+ * Method perform an UPDATE on the database, given a CcPlaylistcriteria or Criteria object.
*
- * @param mixed $values Criteria or CcPlaylist object containing data that is used to create the UPDATE statement.
+ * @param mixed $values Criteria or CcPlaylistcriteria object containing data that is used to create the UPDATE statement.
* @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
@@ -796,7 +788,7 @@ abstract class BaseCcPlaylistPeer {
public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
@@ -804,15 +796,15 @@ abstract class BaseCcPlaylistPeer {
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
- $comparison = $criteria->getComparison(CcPlaylistPeer::ID);
- $value = $criteria->remove(CcPlaylistPeer::ID);
+ $comparison = $criteria->getComparison(CcPlaylistcriteriaPeer::ID);
+ $value = $criteria->remove(CcPlaylistcriteriaPeer::ID);
if ($value) {
- $selectCriteria->add(CcPlaylistPeer::ID, $value, $comparison);
+ $selectCriteria->add(CcPlaylistcriteriaPeer::ID, $value, $comparison);
} else {
- $selectCriteria->setPrimaryTableName(CcPlaylistPeer::TABLE_NAME);
+ $selectCriteria->setPrimaryTableName(CcPlaylistcriteriaPeer::TABLE_NAME);
}
- } else { // $values is CcPlaylist object
+ } else { // $values is CcPlaylistcriteria object
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
@@ -824,26 +816,26 @@ abstract class BaseCcPlaylistPeer {
}
/**
- * Method to DELETE all rows from the cc_playlist table.
+ * Method to DELETE all rows from the cc_playlistcriteria table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
- $affectedRows += BasePeer::doDeleteAll(CcPlaylistPeer::TABLE_NAME, $con, CcPlaylistPeer::DATABASE_NAME);
+ $affectedRows += BasePeer::doDeleteAll(CcPlaylistcriteriaPeer::TABLE_NAME, $con, CcPlaylistcriteriaPeer::DATABASE_NAME);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
- CcPlaylistPeer::clearInstancePool();
- CcPlaylistPeer::clearRelatedInstancePool();
+ CcPlaylistcriteriaPeer::clearInstancePool();
+ CcPlaylistcriteriaPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -853,9 +845,9 @@ abstract class BaseCcPlaylistPeer {
}
/**
- * Method perform a DELETE on the database, given a CcPlaylist or Criteria object OR a primary key value.
+ * Method perform a DELETE on the database, given a CcPlaylistcriteria or Criteria object OR a primary key value.
*
- * @param mixed $values Criteria or CcPlaylist object or primary key or array of primary keys
+ * @param mixed $values Criteria or CcPlaylistcriteria object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
@@ -866,27 +858,27 @@ abstract class BaseCcPlaylistPeer {
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
- CcPlaylistPeer::clearInstancePool();
+ CcPlaylistcriteriaPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
- } elseif ($values instanceof CcPlaylist) { // it's a model object
+ } elseif ($values instanceof CcPlaylistcriteria) { // it's a model object
// invalidate the cache for this single object
- CcPlaylistPeer::removeInstanceFromPool($values);
+ CcPlaylistcriteriaPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(self::DATABASE_NAME);
- $criteria->add(CcPlaylistPeer::ID, (array) $values, Criteria::IN);
+ $criteria->add(CcPlaylistcriteriaPeer::ID, (array) $values, Criteria::IN);
// invalidate the cache for this object(s)
foreach ((array) $values as $singleval) {
- CcPlaylistPeer::removeInstanceFromPool($singleval);
+ CcPlaylistcriteriaPeer::removeInstanceFromPool($singleval);
}
}
@@ -901,7 +893,7 @@ abstract class BaseCcPlaylistPeer {
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
- CcPlaylistPeer::clearRelatedInstancePool();
+ CcPlaylistcriteriaPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -911,24 +903,24 @@ abstract class BaseCcPlaylistPeer {
}
/**
- * Validates all modified columns of given CcPlaylist object.
+ * Validates all modified columns of given CcPlaylistcriteria object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
- * @param CcPlaylist $obj The object to validate.
+ * @param CcPlaylistcriteria $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
- public static function doValidate(CcPlaylist $obj, $cols = null)
+ public static function doValidate(CcPlaylistcriteria $obj, $cols = null)
{
$columns = array();
if ($cols) {
- $dbMap = Propel::getDatabaseMap(CcPlaylistPeer::DATABASE_NAME);
- $tableMap = $dbMap->getTable(CcPlaylistPeer::TABLE_NAME);
+ $dbMap = Propel::getDatabaseMap(CcPlaylistcriteriaPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(CcPlaylistcriteriaPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -944,7 +936,7 @@ abstract class BaseCcPlaylistPeer {
}
- return BasePeer::doValidate(CcPlaylistPeer::DATABASE_NAME, CcPlaylistPeer::TABLE_NAME, $columns);
+ return BasePeer::doValidate(CcPlaylistcriteriaPeer::DATABASE_NAME, CcPlaylistcriteriaPeer::TABLE_NAME, $columns);
}
/**
@@ -952,23 +944,23 @@ abstract class BaseCcPlaylistPeer {
*
* @param int $pk the primary key.
* @param PropelPDO $con the connection to use
- * @return CcPlaylist
+ * @return CcPlaylistcriteria
*/
public static function retrieveByPK($pk, PropelPDO $con = null)
{
- if (null !== ($obj = CcPlaylistPeer::getInstanceFromPool((string) $pk))) {
+ if (null !== ($obj = CcPlaylistcriteriaPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria = new Criteria(CcPlaylistPeer::DATABASE_NAME);
- $criteria->add(CcPlaylistPeer::ID, $pk);
+ $criteria = new Criteria(CcPlaylistcriteriaPeer::DATABASE_NAME);
+ $criteria->add(CcPlaylistcriteriaPeer::ID, $pk);
- $v = CcPlaylistPeer::doSelect($criteria, $con);
+ $v = CcPlaylistcriteriaPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -984,23 +976,23 @@ abstract class BaseCcPlaylistPeer {
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcPlaylistcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
- $criteria = new Criteria(CcPlaylistPeer::DATABASE_NAME);
- $criteria->add(CcPlaylistPeer::ID, $pks, Criteria::IN);
- $objs = CcPlaylistPeer::doSelect($criteria, $con);
+ $criteria = new Criteria(CcPlaylistcriteriaPeer::DATABASE_NAME);
+ $criteria->add(CcPlaylistcriteriaPeer::ID, $pks, Criteria::IN);
+ $objs = CcPlaylistcriteriaPeer::doSelect($criteria, $con);
}
return $objs;
}
-} // BaseCcPlaylistPeer
+} // BaseCcPlaylistcriteriaPeer
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
-BaseCcPlaylistPeer::buildTableMap();
+BaseCcPlaylistcriteriaPeer::buildTableMap();
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteriaQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteriaQuery.php
new file mode 100644
index 000000000..42cd8ecbd
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcPlaylistcriteriaQuery.php
@@ -0,0 +1,407 @@
+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
+ *
+ * $obj = $c->findPk(12, $con);
+ *
+ * @param mixed $key Primary key to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return CcPlaylistcriteria|array|mixed the result, formatted by the current formatter
+ */
+ public function findPk($key, $con = null)
+ {
+ if ((null !== ($obj = CcPlaylistcriteriaPeer::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
+ *
+ * $objs = $c->findPks(array(12, 56, 832), $con);
+ *
+ * @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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKey($key)
+ {
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKeys($keys)
+ {
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::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 CcPlaylistcriteriaQuery 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(CcPlaylistcriteriaPeer::ID, $dbId, $comparison);
+ }
+
+ /**
+ * Filter the query on the criteria column
+ *
+ * @param string $dbCriteria 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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbCriteria($dbCriteria = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbCriteria)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbCriteria)) {
+ $dbCriteria = str_replace('*', '%', $dbCriteria);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::CRITERIA, $dbCriteria, $comparison);
+ }
+
+ /**
+ * Filter the query on the modifier column
+ *
+ * @param string $dbModifier 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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbModifier($dbModifier = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbModifier)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbModifier)) {
+ $dbModifier = str_replace('*', '%', $dbModifier);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::MODIFIER, $dbModifier, $comparison);
+ }
+
+ /**
+ * Filter the query on the value column
+ *
+ * @param string $dbValue 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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbValue($dbValue = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbValue)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbValue)) {
+ $dbValue = str_replace('*', '%', $dbValue);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::VALUE, $dbValue, $comparison);
+ }
+
+ /**
+ * Filter the query on the extra column
+ *
+ * @param string $dbExtra 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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbExtra($dbExtra = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbExtra)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbExtra)) {
+ $dbExtra = str_replace('*', '%', $dbExtra);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::EXTRA, $dbExtra, $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 CcPlaylistcriteriaQuery 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(CcPlaylistcriteriaPeer::PLAYLIST_ID, $dbPlaylistId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbPlaylistId['max'])) {
+ $this->addUsingAlias(CcPlaylistcriteriaPeer::PLAYLIST_ID, $dbPlaylistId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::PLAYLIST_ID, $dbPlaylistId, $comparison);
+ }
+
+ /**
+ * Filter the query on the set_number column
+ *
+ * @param int|array $dbSetNumber 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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByDbSetNumber($dbSetNumber = null, $comparison = null)
+ {
+ if (is_array($dbSetNumber)) {
+ $useMinMax = false;
+ if (isset($dbSetNumber['min'])) {
+ $this->addUsingAlias(CcPlaylistcriteriaPeer::SET_NUMBER, $dbSetNumber['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbSetNumber['max'])) {
+ $this->addUsingAlias(CcPlaylistcriteriaPeer::SET_NUMBER, $dbSetNumber['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcPlaylistcriteriaPeer::SET_NUMBER, $dbSetNumber, $comparison);
+ }
+
+ /**
+ * 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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function filterByCcPlaylist($ccPlaylist, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcPlaylistcriteriaPeer::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 CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function joinCcPlaylist($relationAlias = '', $joinType = Criteria::INNER_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::INNER_JOIN)
+ {
+ return $this
+ ->joinCcPlaylist($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcPlaylist', 'CcPlaylistQuery');
+ }
+
+ /**
+ * Exclude object from result
+ *
+ * @param CcPlaylistcriteria $ccPlaylistcriteria Object to remove from the list of results
+ *
+ * @return CcPlaylistcriteriaQuery The current query, for fluid interface
+ */
+ public function prune($ccPlaylistcriteria = null)
+ {
+ if ($ccPlaylistcriteria) {
+ $this->addUsingAlias(CcPlaylistcriteriaPeer::ID, $ccPlaylistcriteria->getDbId(), Criteria::NOT_EQUAL);
+ }
+
+ return $this;
+ }
+
+} // BaseCcPlaylistcriteriaQuery
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php b/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php
index 9556499bb..4f7edcebf 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php
@@ -48,6 +48,12 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
protected $file_id;
+ /**
+ * The value for the stream_id field.
+ * @var int
+ */
+ protected $stream_id;
+
/**
* The value for the clip_length field.
* Note: this column has a database default value of: '00:00:00'
@@ -120,6 +126,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
protected $aCcFiles;
+ /**
+ * @var CcWebstream
+ */
+ protected $aCcWebstream;
+
+ /**
+ * @var array CcWebstreamMetadata[] Collection to store aggregation of CcWebstreamMetadata objects.
+ */
+ protected $collCcWebstreamMetadatas;
+
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -248,6 +264,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this->file_id;
}
+ /**
+ * Get the [stream_id] column value.
+ *
+ * @return int
+ */
+ public function getDbStreamId()
+ {
+ return $this->stream_id;
+ }
+
/**
* Get the [clip_length] column value.
*
@@ -526,6 +552,30 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this;
} // setDbFileId()
+ /**
+ * Set the value of [stream_id] column.
+ *
+ * @param int $v new value
+ * @return CcSchedule The current object (for fluent API support)
+ */
+ public function setDbStreamId($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->stream_id !== $v) {
+ $this->stream_id = $v;
+ $this->modifiedColumns[] = CcSchedulePeer::STREAM_ID;
+ }
+
+ if ($this->aCcWebstream !== null && $this->aCcWebstream->getDbId() !== $v) {
+ $this->aCcWebstream = null;
+ }
+
+ return $this;
+ } // setDbStreamId()
+
/**
* Set the value of [clip_length] column.
*
@@ -838,15 +888,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->starts = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->ends = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->file_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
- $this->clip_length = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
- $this->fade_in = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
- $this->fade_out = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
- $this->cue_in = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
- $this->cue_out = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
- $this->media_item_played = ($row[$startcol + 9] !== null) ? (boolean) $row[$startcol + 9] : null;
- $this->instance_id = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
- $this->playout_status = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
- $this->broadcasted = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
+ $this->stream_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
+ $this->clip_length = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
+ $this->fade_in = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
+ $this->fade_out = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $this->cue_in = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
+ $this->cue_out = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
+ $this->media_item_played = ($row[$startcol + 10] !== null) ? (boolean) $row[$startcol + 10] : null;
+ $this->instance_id = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
+ $this->playout_status = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
+ $this->broadcasted = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null;
$this->resetModified();
$this->setNew(false);
@@ -855,7 +906,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 13; // 13 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 14; // 14 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcSchedule object", $e);
@@ -881,6 +932,9 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) {
$this->aCcFiles = null;
}
+ if ($this->aCcWebstream !== null && $this->stream_id !== $this->aCcWebstream->getDbId()) {
+ $this->aCcWebstream = null;
+ }
if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) {
$this->aCcShowInstances = null;
}
@@ -925,6 +979,9 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->aCcShowInstances = null;
$this->aCcFiles = null;
+ $this->aCcWebstream = null;
+ $this->collCcWebstreamMetadatas = null;
+
} // if (deep)
}
@@ -1054,6 +1111,13 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->setCcFiles($this->aCcFiles);
}
+ if ($this->aCcWebstream !== null) {
+ if ($this->aCcWebstream->isModified() || $this->aCcWebstream->isNew()) {
+ $affectedRows += $this->aCcWebstream->save($con);
+ }
+ $this->setCcWebstream($this->aCcWebstream);
+ }
+
if ($this->isNew() ) {
$this->modifiedColumns[] = CcSchedulePeer::ID;
}
@@ -1077,6 +1141,14 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
+ if ($this->collCcWebstreamMetadatas !== null) {
+ foreach ($this->collCcWebstreamMetadatas as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
$this->alreadyInSave = false;
}
@@ -1160,12 +1232,26 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
}
}
+ if ($this->aCcWebstream !== null) {
+ if (!$this->aCcWebstream->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcWebstream->getValidationFailures());
+ }
+ }
+
if (($retval = CcSchedulePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
+ if ($this->collCcWebstreamMetadatas !== null) {
+ foreach ($this->collCcWebstreamMetadatas as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
$this->alreadyInValidation = false;
}
@@ -1212,30 +1298,33 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this->getDbFileId();
break;
case 4:
- return $this->getDbClipLength();
+ return $this->getDbStreamId();
break;
case 5:
- return $this->getDbFadeIn();
+ return $this->getDbClipLength();
break;
case 6:
- return $this->getDbFadeOut();
+ return $this->getDbFadeIn();
break;
case 7:
- return $this->getDbCueIn();
+ return $this->getDbFadeOut();
break;
case 8:
- return $this->getDbCueOut();
+ return $this->getDbCueIn();
break;
case 9:
- return $this->getDbMediaItemPlayed();
+ return $this->getDbCueOut();
break;
case 10:
- return $this->getDbInstanceId();
+ return $this->getDbMediaItemPlayed();
break;
case 11:
- return $this->getDbPlayoutStatus();
+ return $this->getDbInstanceId();
break;
case 12:
+ return $this->getDbPlayoutStatus();
+ break;
+ case 13:
return $this->getDbBroadcasted();
break;
default:
@@ -1266,15 +1355,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$keys[1] => $this->getDbStarts(),
$keys[2] => $this->getDbEnds(),
$keys[3] => $this->getDbFileId(),
- $keys[4] => $this->getDbClipLength(),
- $keys[5] => $this->getDbFadeIn(),
- $keys[6] => $this->getDbFadeOut(),
- $keys[7] => $this->getDbCueIn(),
- $keys[8] => $this->getDbCueOut(),
- $keys[9] => $this->getDbMediaItemPlayed(),
- $keys[10] => $this->getDbInstanceId(),
- $keys[11] => $this->getDbPlayoutStatus(),
- $keys[12] => $this->getDbBroadcasted(),
+ $keys[4] => $this->getDbStreamId(),
+ $keys[5] => $this->getDbClipLength(),
+ $keys[6] => $this->getDbFadeIn(),
+ $keys[7] => $this->getDbFadeOut(),
+ $keys[8] => $this->getDbCueIn(),
+ $keys[9] => $this->getDbCueOut(),
+ $keys[10] => $this->getDbMediaItemPlayed(),
+ $keys[11] => $this->getDbInstanceId(),
+ $keys[12] => $this->getDbPlayoutStatus(),
+ $keys[13] => $this->getDbBroadcasted(),
);
if ($includeForeignObjects) {
if (null !== $this->aCcShowInstances) {
@@ -1283,6 +1373,9 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if (null !== $this->aCcFiles) {
$result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true);
}
+ if (null !== $this->aCcWebstream) {
+ $result['CcWebstream'] = $this->aCcWebstream->toArray($keyType, $includeLazyLoadColumns, true);
+ }
}
return $result;
}
@@ -1327,30 +1420,33 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->setDbFileId($value);
break;
case 4:
- $this->setDbClipLength($value);
+ $this->setDbStreamId($value);
break;
case 5:
- $this->setDbFadeIn($value);
+ $this->setDbClipLength($value);
break;
case 6:
- $this->setDbFadeOut($value);
+ $this->setDbFadeIn($value);
break;
case 7:
- $this->setDbCueIn($value);
+ $this->setDbFadeOut($value);
break;
case 8:
- $this->setDbCueOut($value);
+ $this->setDbCueIn($value);
break;
case 9:
- $this->setDbMediaItemPlayed($value);
+ $this->setDbCueOut($value);
break;
case 10:
- $this->setDbInstanceId($value);
+ $this->setDbMediaItemPlayed($value);
break;
case 11:
- $this->setDbPlayoutStatus($value);
+ $this->setDbInstanceId($value);
break;
case 12:
+ $this->setDbPlayoutStatus($value);
+ break;
+ case 13:
$this->setDbBroadcasted($value);
break;
} // switch()
@@ -1381,15 +1477,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if (array_key_exists($keys[1], $arr)) $this->setDbStarts($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDbEnds($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setDbFileId($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setDbClipLength($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDbFadeIn($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setDbFadeOut($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setDbCueIn($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setDbCueOut($arr[$keys[8]]);
- if (array_key_exists($keys[9], $arr)) $this->setDbMediaItemPlayed($arr[$keys[9]]);
- if (array_key_exists($keys[10], $arr)) $this->setDbInstanceId($arr[$keys[10]]);
- if (array_key_exists($keys[11], $arr)) $this->setDbPlayoutStatus($arr[$keys[11]]);
- if (array_key_exists($keys[12], $arr)) $this->setDbBroadcasted($arr[$keys[12]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbStreamId($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbClipLength($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbFadeIn($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbFadeOut($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDbCueIn($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setDbCueOut($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setDbMediaItemPlayed($arr[$keys[10]]);
+ if (array_key_exists($keys[11], $arr)) $this->setDbInstanceId($arr[$keys[11]]);
+ if (array_key_exists($keys[12], $arr)) $this->setDbPlayoutStatus($arr[$keys[12]]);
+ if (array_key_exists($keys[13], $arr)) $this->setDbBroadcasted($arr[$keys[13]]);
}
/**
@@ -1405,6 +1502,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if ($this->isColumnModified(CcSchedulePeer::STARTS)) $criteria->add(CcSchedulePeer::STARTS, $this->starts);
if ($this->isColumnModified(CcSchedulePeer::ENDS)) $criteria->add(CcSchedulePeer::ENDS, $this->ends);
if ($this->isColumnModified(CcSchedulePeer::FILE_ID)) $criteria->add(CcSchedulePeer::FILE_ID, $this->file_id);
+ if ($this->isColumnModified(CcSchedulePeer::STREAM_ID)) $criteria->add(CcSchedulePeer::STREAM_ID, $this->stream_id);
if ($this->isColumnModified(CcSchedulePeer::CLIP_LENGTH)) $criteria->add(CcSchedulePeer::CLIP_LENGTH, $this->clip_length);
if ($this->isColumnModified(CcSchedulePeer::FADE_IN)) $criteria->add(CcSchedulePeer::FADE_IN, $this->fade_in);
if ($this->isColumnModified(CcSchedulePeer::FADE_OUT)) $criteria->add(CcSchedulePeer::FADE_OUT, $this->fade_out);
@@ -1478,6 +1576,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$copyObj->setDbStarts($this->starts);
$copyObj->setDbEnds($this->ends);
$copyObj->setDbFileId($this->file_id);
+ $copyObj->setDbStreamId($this->stream_id);
$copyObj->setDbClipLength($this->clip_length);
$copyObj->setDbFadeIn($this->fade_in);
$copyObj->setDbFadeOut($this->fade_out);
@@ -1488,6 +1587,20 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$copyObj->setDbPlayoutStatus($this->playout_status);
$copyObj->setDbBroadcasted($this->broadcasted);
+ if ($deepCopy) {
+ // important: temporarily setNew(false) because this affects the behavior of
+ // the getter/setter methods for fkey referrer objects.
+ $copyObj->setNew(false);
+
+ foreach ($this->getCcWebstreamMetadatas() as $relObj) {
+ if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
+ $copyObj->addCcWebstreamMetadata($relObj->copy($deepCopy));
+ }
+ }
+
+ } // if ($deepCopy)
+
+
$copyObj->setNew(true);
$copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
}
@@ -1628,6 +1741,164 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this->aCcFiles;
}
+ /**
+ * Declares an association between this object and a CcWebstream object.
+ *
+ * @param CcWebstream $v
+ * @return CcSchedule The current object (for fluent API support)
+ * @throws PropelException
+ */
+ public function setCcWebstream(CcWebstream $v = null)
+ {
+ if ($v === null) {
+ $this->setDbStreamId(NULL);
+ } else {
+ $this->setDbStreamId($v->getDbId());
+ }
+
+ $this->aCcWebstream = $v;
+
+ // Add binding for other direction of this n:n relationship.
+ // If this object has already been added to the CcWebstream object, it will not be re-added.
+ if ($v !== null) {
+ $v->addCcSchedule($this);
+ }
+
+ return $this;
+ }
+
+
+ /**
+ * Get the associated CcWebstream object
+ *
+ * @param PropelPDO Optional Connection object.
+ * @return CcWebstream The associated CcWebstream object.
+ * @throws PropelException
+ */
+ public function getCcWebstream(PropelPDO $con = null)
+ {
+ if ($this->aCcWebstream === null && ($this->stream_id !== null)) {
+ $this->aCcWebstream = CcWebstreamQuery::create()->findPk($this->stream_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->aCcWebstream->addCcSchedules($this);
+ */
+ }
+ return $this->aCcWebstream;
+ }
+
+ /**
+ * Clears out the collCcWebstreamMetadatas 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 addCcWebstreamMetadatas()
+ */
+ public function clearCcWebstreamMetadatas()
+ {
+ $this->collCcWebstreamMetadatas = null; // important to set this to NULL since that means it is uninitialized
+ }
+
+ /**
+ * Initializes the collCcWebstreamMetadatas collection.
+ *
+ * By default this just sets the collCcWebstreamMetadatas collection to an empty array (like clearcollCcWebstreamMetadatas());
+ * 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 initCcWebstreamMetadatas()
+ {
+ $this->collCcWebstreamMetadatas = new PropelObjectCollection();
+ $this->collCcWebstreamMetadatas->setModel('CcWebstreamMetadata');
+ }
+
+ /**
+ * Gets an array of CcWebstreamMetadata 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 CcSchedule 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 CcWebstreamMetadata[] List of CcWebstreamMetadata objects
+ * @throws PropelException
+ */
+ public function getCcWebstreamMetadatas($criteria = null, PropelPDO $con = null)
+ {
+ if(null === $this->collCcWebstreamMetadatas || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcWebstreamMetadatas) {
+ // return empty collection
+ $this->initCcWebstreamMetadatas();
+ } else {
+ $collCcWebstreamMetadatas = CcWebstreamMetadataQuery::create(null, $criteria)
+ ->filterByCcSchedule($this)
+ ->find($con);
+ if (null !== $criteria) {
+ return $collCcWebstreamMetadatas;
+ }
+ $this->collCcWebstreamMetadatas = $collCcWebstreamMetadatas;
+ }
+ }
+ return $this->collCcWebstreamMetadatas;
+ }
+
+ /**
+ * Returns the number of related CcWebstreamMetadata objects.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param PropelPDO $con
+ * @return int Count of related CcWebstreamMetadata objects.
+ * @throws PropelException
+ */
+ public function countCcWebstreamMetadatas(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
+ {
+ if(null === $this->collCcWebstreamMetadatas || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcWebstreamMetadatas) {
+ return 0;
+ } else {
+ $query = CcWebstreamMetadataQuery::create(null, $criteria);
+ if($distinct) {
+ $query->distinct();
+ }
+ return $query
+ ->filterByCcSchedule($this)
+ ->count($con);
+ }
+ } else {
+ return count($this->collCcWebstreamMetadatas);
+ }
+ }
+
+ /**
+ * Method called to associate a CcWebstreamMetadata object to this object
+ * through the CcWebstreamMetadata foreign key attribute.
+ *
+ * @param CcWebstreamMetadata $l CcWebstreamMetadata
+ * @return void
+ * @throws PropelException
+ */
+ public function addCcWebstreamMetadata(CcWebstreamMetadata $l)
+ {
+ if ($this->collCcWebstreamMetadatas === null) {
+ $this->initCcWebstreamMetadatas();
+ }
+ if (!$this->collCcWebstreamMetadatas->contains($l)) { // only add it if the **same** object is not already associated
+ $this->collCcWebstreamMetadatas[]= $l;
+ $l->setCcSchedule($this);
+ }
+ }
+
/**
* Clears the current object and sets all attributes to their default values
*/
@@ -1637,6 +1908,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->starts = null;
$this->ends = null;
$this->file_id = null;
+ $this->stream_id = null;
$this->clip_length = null;
$this->fade_in = null;
$this->fade_out = null;
@@ -1667,10 +1939,17 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
public function clearAllReferences($deep = false)
{
if ($deep) {
+ if ($this->collCcWebstreamMetadatas) {
+ foreach ((array) $this->collCcWebstreamMetadatas as $o) {
+ $o->clearAllReferences($deep);
+ }
+ }
} // if ($deep)
+ $this->collCcWebstreamMetadatas = null;
$this->aCcShowInstances = null;
$this->aCcFiles = null;
+ $this->aCcWebstream = null;
}
/**
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php
index c73ee915d..8cca53863 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php
@@ -26,7 +26,7 @@ abstract class BaseCcSchedulePeer {
const TM_CLASS = 'CcScheduleTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 13;
+ const NUM_COLUMNS = 14;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -43,6 +43,9 @@ abstract class BaseCcSchedulePeer {
/** the column name for the FILE_ID field */
const FILE_ID = 'cc_schedule.FILE_ID';
+ /** the column name for the STREAM_ID field */
+ const STREAM_ID = 'cc_schedule.STREAM_ID';
+
/** the column name for the CLIP_LENGTH field */
const CLIP_LENGTH = 'cc_schedule.CLIP_LENGTH';
@@ -86,12 +89,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', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', 'DbMediaItemPlayed', 'DbInstanceId', 'DbPlayoutStatus', 'DbBroadcasted', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbStarts', 'dbEnds', 'dbFileId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', 'dbMediaItemPlayed', 'dbInstanceId', 'dbPlayoutStatus', 'dbBroadcasted', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::STARTS, self::ENDS, self::FILE_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, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'STARTS', 'ENDS', 'FILE_ID', 'CLIP_LENGTH', 'FADE_IN', 'FADE_OUT', 'CUE_IN', 'CUE_OUT', 'MEDIA_ITEM_PLAYED', 'INSTANCE_ID', 'PLAYOUT_STATUS', 'BROADCASTED', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'starts', 'ends', 'file_id', 'clip_length', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'media_item_played', 'instance_id', 'playout_status', 'broadcasted', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbStarts', 'DbEnds', 'DbFileId', 'DbStreamId', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', 'DbMediaItemPlayed', 'DbInstanceId', 'DbPlayoutStatus', 'DbBroadcasted', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbStarts', 'dbEnds', 'dbFileId', 'dbStreamId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', 'dbMediaItemPlayed', 'dbInstanceId', 'dbPlayoutStatus', 'dbBroadcasted', ),
+ 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, ),
+ 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', ),
+ 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', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
@@ -101,12 +104,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, 'DbClipLength' => 4, 'DbFadeIn' => 5, 'DbFadeOut' => 6, 'DbCueIn' => 7, 'DbCueOut' => 8, 'DbMediaItemPlayed' => 9, 'DbInstanceId' => 10, 'DbPlayoutStatus' => 11, 'DbBroadcasted' => 12, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbStarts' => 1, 'dbEnds' => 2, 'dbFileId' => 3, 'dbClipLength' => 4, 'dbFadeIn' => 5, 'dbFadeOut' => 6, 'dbCueIn' => 7, 'dbCueOut' => 8, 'dbMediaItemPlayed' => 9, 'dbInstanceId' => 10, 'dbPlayoutStatus' => 11, 'dbBroadcasted' => 12, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::STARTS => 1, self::ENDS => 2, self::FILE_ID => 3, self::CLIP_LENGTH => 4, self::FADE_IN => 5, self::FADE_OUT => 6, self::CUE_IN => 7, self::CUE_OUT => 8, self::MEDIA_ITEM_PLAYED => 9, self::INSTANCE_ID => 10, self::PLAYOUT_STATUS => 11, self::BROADCASTED => 12, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'STARTS' => 1, 'ENDS' => 2, 'FILE_ID' => 3, 'CLIP_LENGTH' => 4, 'FADE_IN' => 5, 'FADE_OUT' => 6, 'CUE_IN' => 7, 'CUE_OUT' => 8, 'MEDIA_ITEM_PLAYED' => 9, 'INSTANCE_ID' => 10, 'PLAYOUT_STATUS' => 11, 'BROADCASTED' => 12, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'starts' => 1, 'ends' => 2, 'file_id' => 3, 'clip_length' => 4, 'fade_in' => 5, 'fade_out' => 6, 'cue_in' => 7, 'cue_out' => 8, 'media_item_played' => 9, 'instance_id' => 10, 'playout_status' => 11, 'broadcasted' => 12, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ 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, ),
+ 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, ),
+ 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, ),
+ 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, ),
+ 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, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
@@ -182,6 +185,7 @@ abstract class BaseCcSchedulePeer {
$criteria->addSelectColumn(CcSchedulePeer::STARTS);
$criteria->addSelectColumn(CcSchedulePeer::ENDS);
$criteria->addSelectColumn(CcSchedulePeer::FILE_ID);
+ $criteria->addSelectColumn(CcSchedulePeer::STREAM_ID);
$criteria->addSelectColumn(CcSchedulePeer::CLIP_LENGTH);
$criteria->addSelectColumn(CcSchedulePeer::FADE_IN);
$criteria->addSelectColumn(CcSchedulePeer::FADE_OUT);
@@ -196,6 +200,7 @@ abstract class BaseCcSchedulePeer {
$criteria->addSelectColumn($alias . '.STARTS');
$criteria->addSelectColumn($alias . '.ENDS');
$criteria->addSelectColumn($alias . '.FILE_ID');
+ $criteria->addSelectColumn($alias . '.STREAM_ID');
$criteria->addSelectColumn($alias . '.CLIP_LENGTH');
$criteria->addSelectColumn($alias . '.FADE_IN');
$criteria->addSelectColumn($alias . '.FADE_OUT');
@@ -398,6 +403,9 @@ abstract class BaseCcSchedulePeer {
*/
public static function clearRelatedInstancePool()
{
+ // Invalidate objects in CcWebstreamMetadataPeer instance pool,
+ // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
+ CcWebstreamMetadataPeer::clearInstancePool();
}
/**
@@ -590,6 +598,56 @@ abstract class BaseCcSchedulePeer {
}
+ /**
+ * Returns the number of rows matching criteria, joining the related CcWebstream 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 doCountJoinCcWebstream(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(CcSchedulePeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcSchedulePeer::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(CcSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::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 CcSchedule objects pre-filled with their CcShowInstances objects.
* @param Criteria $criteria
@@ -722,6 +780,72 @@ abstract class BaseCcSchedulePeer {
}
+ /**
+ * Selects a collection of CcSchedule objects pre-filled with their CcWebstream 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 CcSchedule objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinCcWebstream(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);
+ }
+
+ CcSchedulePeer::addSelectColumns($criteria);
+ $startcol = (CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcSchedulePeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcSchedulePeer::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 = CcSchedulePeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcSchedulePeer::addInstanceToPool($obj1, $key1);
+ } // if $obj1 already loaded
+
+ $key2 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if ($key2 !== null) {
+ $obj2 = CcWebstreamPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol);
+ CcWebstreamPeer::addInstanceToPool($obj2, $key2);
+ } // if obj2 already loaded
+
+ // Add the $obj1 (CcSchedule) to $obj2 (CcWebstream)
+ $obj2->addCcSchedule($obj1);
+
+ } // if joined row was not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
/**
* Returns the number of rows matching criteria, joining all related tables
*
@@ -762,6 +886,8 @@ abstract class BaseCcSchedulePeer {
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -801,10 +927,15 @@ abstract class BaseCcSchedulePeer {
CcFilesPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+ $startcol5 = $startcol4 + (CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -858,6 +989,24 @@ abstract class BaseCcSchedulePeer {
$obj3->addCcSchedule($obj1);
} // if joined row not null
+ // Add objects for joined CcWebstream rows
+
+ $key4 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol4);
+ if ($key4 !== null) {
+ $obj4 = CcWebstreamPeer::getInstanceFromPool($key4);
+ if (!$obj4) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj4 = new $cls();
+ $obj4->hydrate($row, $startcol4);
+ CcWebstreamPeer::addInstanceToPool($obj4, $key4);
+ } // if obj4 loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj4 (CcWebstream)
+ $obj4->addCcSchedule($obj1);
+ } // if joined row not null
+
$results[] = $obj1;
}
$stmt->closeCursor();
@@ -903,6 +1052,8 @@ abstract class BaseCcSchedulePeer {
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -953,6 +1104,60 @@ abstract class BaseCcSchedulePeer {
$criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::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 CcWebstream 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 doCountJoinAllExceptCcWebstream(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(CcSchedulePeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcSchedulePeer::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(CcSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+
+ $criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -992,8 +1197,13 @@ abstract class BaseCcSchedulePeer {
CcFilesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -1029,6 +1239,25 @@ abstract class BaseCcSchedulePeer {
// Add the $obj1 (CcSchedule) to the collection in $obj2 (CcFiles)
$obj2->addCcSchedule($obj1);
+ } // if joined row is not null
+
+ // Add objects for joined CcWebstream rows
+
+ $key3 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcWebstreamPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcWebstreamPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj3 (CcWebstream)
+ $obj3->addCcSchedule($obj1);
+
} // if joined row is not null
$results[] = $obj1;
@@ -1065,8 +1294,13 @@ abstract class BaseCcSchedulePeer {
CcShowInstancesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -1102,6 +1336,122 @@ abstract class BaseCcSchedulePeer {
// Add the $obj1 (CcSchedule) to the collection in $obj2 (CcShowInstances)
$obj2->addCcSchedule($obj1);
+ } // if joined row is not null
+
+ // Add objects for joined CcWebstream rows
+
+ $key3 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcWebstreamPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcWebstreamPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj3 (CcWebstream)
+ $obj3->addCcSchedule($obj1);
+
+ } // if joined row is not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of CcSchedule objects pre-filled with all related objects except CcWebstream.
+ *
+ * @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 CcSchedule objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptCcWebstream(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);
+ }
+
+ CcSchedulePeer::addSelectColumns($criteria);
+ $startcol2 = (CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcShowInstancesPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+
+ $criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcSchedulePeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcSchedulePeer::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 = CcSchedulePeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcSchedulePeer::addInstanceToPool($obj1, $key1);
+ } // if obj1 already loaded
+
+ // Add objects for joined CcShowInstances rows
+
+ $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ if ($key2 !== null) {
+ $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcShowInstancesPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol2);
+ CcShowInstancesPeer::addInstanceToPool($obj2, $key2);
+ } // if $obj2 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj2 (CcShowInstances)
+ $obj2->addCcSchedule($obj1);
+
+ } // if joined row is not null
+
+ // Add objects for joined CcFiles rows
+
+ $key3 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcFilesPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcFilesPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcFilesPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj3 (CcFiles)
+ $obj3->addCcSchedule($obj1);
+
} // if joined row is not null
$results[] = $obj1;
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php
index 236e3cb26..890a8cab9 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php
@@ -10,6 +10,7 @@
* @method CcScheduleQuery orderByDbStarts($order = Criteria::ASC) Order by the starts column
* @method CcScheduleQuery orderByDbEnds($order = Criteria::ASC) Order by the ends column
* @method CcScheduleQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column
+ * @method CcScheduleQuery orderByDbStreamId($order = Criteria::ASC) Order by the stream_id column
* @method CcScheduleQuery orderByDbClipLength($order = Criteria::ASC) Order by the clip_length column
* @method CcScheduleQuery orderByDbFadeIn($order = Criteria::ASC) Order by the fade_in column
* @method CcScheduleQuery orderByDbFadeOut($order = Criteria::ASC) Order by the fade_out column
@@ -24,6 +25,7 @@
* @method CcScheduleQuery groupByDbStarts() Group by the starts column
* @method CcScheduleQuery groupByDbEnds() Group by the ends column
* @method CcScheduleQuery groupByDbFileId() Group by the file_id column
+ * @method CcScheduleQuery groupByDbStreamId() Group by the stream_id column
* @method CcScheduleQuery groupByDbClipLength() Group by the clip_length column
* @method CcScheduleQuery groupByDbFadeIn() Group by the fade_in column
* @method CcScheduleQuery groupByDbFadeOut() Group by the fade_out column
@@ -46,6 +48,14 @@
* @method CcScheduleQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
* @method CcScheduleQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
*
+ * @method CcScheduleQuery leftJoinCcWebstream($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcWebstream relation
+ * @method CcScheduleQuery rightJoinCcWebstream($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcWebstream relation
+ * @method CcScheduleQuery innerJoinCcWebstream($relationAlias = '') Adds a INNER JOIN clause to the query using the CcWebstream relation
+ *
+ * @method CcScheduleQuery leftJoinCcWebstreamMetadata($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcWebstreamMetadata relation
+ * @method CcScheduleQuery rightJoinCcWebstreamMetadata($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcWebstreamMetadata relation
+ * @method CcScheduleQuery innerJoinCcWebstreamMetadata($relationAlias = '') Adds a INNER JOIN clause to the query using the CcWebstreamMetadata relation
+ *
* @method CcSchedule findOne(PropelPDO $con = null) Return the first CcSchedule matching the query
* @method CcSchedule findOneOrCreate(PropelPDO $con = null) Return the first CcSchedule matching the query, or a new CcSchedule object populated from the query conditions when no match is found
*
@@ -53,6 +63,7 @@
* @method CcSchedule findOneByDbStarts(string $starts) Return the first CcSchedule filtered by the starts column
* @method CcSchedule findOneByDbEnds(string $ends) Return the first CcSchedule filtered by the ends column
* @method CcSchedule findOneByDbFileId(int $file_id) Return the first CcSchedule filtered by the file_id column
+ * @method CcSchedule findOneByDbStreamId(int $stream_id) Return the first CcSchedule filtered by the stream_id column
* @method CcSchedule findOneByDbClipLength(string $clip_length) Return the first CcSchedule filtered by the clip_length column
* @method CcSchedule findOneByDbFadeIn(string $fade_in) Return the first CcSchedule filtered by the fade_in column
* @method CcSchedule findOneByDbFadeOut(string $fade_out) Return the first CcSchedule filtered by the fade_out column
@@ -67,6 +78,7 @@
* @method array findByDbStarts(string $starts) Return CcSchedule objects filtered by the starts column
* @method array findByDbEnds(string $ends) Return CcSchedule objects filtered by the ends column
* @method array findByDbFileId(int $file_id) Return CcSchedule objects filtered by the file_id column
+ * @method array findByDbStreamId(int $stream_id) Return CcSchedule objects filtered by the stream_id column
* @method array findByDbClipLength(string $clip_length) Return CcSchedule objects filtered by the clip_length column
* @method array findByDbFadeIn(string $fade_in) Return CcSchedule objects filtered by the fade_in column
* @method array findByDbFadeOut(string $fade_out) Return CcSchedule objects filtered by the fade_out column
@@ -295,6 +307,37 @@ abstract class BaseCcScheduleQuery extends ModelCriteria
return $this->addUsingAlias(CcSchedulePeer::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 CcScheduleQuery 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(CcSchedulePeer::STREAM_ID, $dbStreamId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbStreamId['max'])) {
+ $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId, $comparison);
+ }
+
/**
* Filter the query on the clip_length column
*
@@ -661,6 +704,134 @@ abstract class BaseCcScheduleQuery extends ModelCriteria
->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 CcScheduleQuery The current query, for fluid interface
+ */
+ public function filterByCcWebstream($ccWebstream, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcSchedulePeer::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 CcScheduleQuery 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 CcWebstreamMetadata object
+ *
+ * @param CcWebstreamMetadata $ccWebstreamMetadata the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcScheduleQuery The current query, for fluid interface
+ */
+ public function filterByCcWebstreamMetadata($ccWebstreamMetadata, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcSchedulePeer::ID, $ccWebstreamMetadata->getDbInstanceId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcWebstreamMetadata relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcScheduleQuery The current query, for fluid interface
+ */
+ public function joinCcWebstreamMetadata($relationAlias = '', $joinType = Criteria::INNER_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcWebstreamMetadata');
+
+ // 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, 'CcWebstreamMetadata');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcWebstreamMetadata relation CcWebstreamMetadata 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 CcWebstreamMetadataQuery A secondary query class using the current class as primary query
+ */
+ public function useCcWebstreamMetadataQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
+ {
+ return $this
+ ->joinCcWebstreamMetadata($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcWebstreamMetadata', 'CcWebstreamMetadataQuery');
+ }
+
/**
* Exclude object from result
*
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php
index 7bea16463..1caf7df62 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php
@@ -1992,6 +1992,31 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
return $this->getCcSchedules($query, $con);
}
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcShowInstances is new, it will return
+ * an empty collection; or if this CcShowInstances has previously
+ * been saved, it will retrieve related CcSchedules 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 CcShowInstances.
+ *
+ * @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 CcSchedule[] List of CcSchedule objects
+ */
+ public function getCcSchedulesJoinCcWebstream($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcScheduleQuery::create(null, $criteria);
+ $query->joinWith('CcWebstream', $join_behavior);
+
+ return $this->getCcSchedules($query, $con);
+ }
+
/**
* Clears the current object and sets all attributes to their default values
*/
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php b/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php
index 40cd181bf..c335d7158 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php
@@ -109,14 +109,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
protected $login_attempts;
/**
- * @var array CcAccess[] Collection to store aggregation of CcAccess objects.
+ * @var array CcFiles[] Collection to store aggregation of CcFiles objects.
*/
- protected $collCcAccesss;
+ protected $collCcFilessRelatedByDbOwnerId;
/**
* @var array CcFiles[] Collection to store aggregation of CcFiles objects.
*/
- protected $collCcFiless;
+ protected $collCcFilessRelatedByDbEditedby;
/**
* @var array CcPerms[] Collection to store aggregation of CcPerms objects.
@@ -133,6 +133,11 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
protected $collCcPlaylists;
+ /**
+ * @var array CcBlock[] Collection to store aggregation of CcBlock objects.
+ */
+ protected $collCcBlocks;
+
/**
* @var array CcPref[] Collection to store aggregation of CcPref objects.
*/
@@ -821,9 +826,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
- $this->collCcAccesss = null;
+ $this->collCcFilessRelatedByDbOwnerId = null;
- $this->collCcFiless = null;
+ $this->collCcFilessRelatedByDbEditedby = null;
$this->collCcPermss = null;
@@ -831,6 +836,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->collCcPlaylists = null;
+ $this->collCcBlocks = null;
+
$this->collCcPrefs = null;
$this->collCcSesss = null;
@@ -970,16 +977,16 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
- if ($this->collCcAccesss !== null) {
- foreach ($this->collCcAccesss as $referrerFK) {
+ if ($this->collCcFilessRelatedByDbOwnerId !== null) {
+ foreach ($this->collCcFilessRelatedByDbOwnerId as $referrerFK) {
if (!$referrerFK->isDeleted()) {
$affectedRows += $referrerFK->save($con);
}
}
}
- if ($this->collCcFiless !== null) {
- foreach ($this->collCcFiless as $referrerFK) {
+ if ($this->collCcFilessRelatedByDbEditedby !== null) {
+ foreach ($this->collCcFilessRelatedByDbEditedby as $referrerFK) {
if (!$referrerFK->isDeleted()) {
$affectedRows += $referrerFK->save($con);
}
@@ -1010,6 +1017,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
}
+ if ($this->collCcBlocks !== null) {
+ foreach ($this->collCcBlocks as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
if ($this->collCcPrefs !== null) {
foreach ($this->collCcPrefs as $referrerFK) {
if (!$referrerFK->isDeleted()) {
@@ -1105,16 +1120,16 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
- if ($this->collCcAccesss !== null) {
- foreach ($this->collCcAccesss as $referrerFK) {
+ if ($this->collCcFilessRelatedByDbOwnerId !== null) {
+ foreach ($this->collCcFilessRelatedByDbOwnerId as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
- if ($this->collCcFiless !== null) {
- foreach ($this->collCcFiless as $referrerFK) {
+ if ($this->collCcFilessRelatedByDbEditedby !== null) {
+ foreach ($this->collCcFilessRelatedByDbEditedby as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
@@ -1145,6 +1160,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
}
+ if ($this->collCcBlocks !== null) {
+ foreach ($this->collCcBlocks as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
if ($this->collCcPrefs !== null) {
foreach ($this->collCcPrefs as $referrerFK) {
if (!$referrerFK->validate($columns)) {
@@ -1487,15 +1510,15 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
// the getter/setter methods for fkey referrer objects.
$copyObj->setNew(false);
- foreach ($this->getCcAccesss() as $relObj) {
+ foreach ($this->getCcFilessRelatedByDbOwnerId() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
- $copyObj->addCcAccess($relObj->copy($deepCopy));
+ $copyObj->addCcFilesRelatedByDbOwnerId($relObj->copy($deepCopy));
}
}
- foreach ($this->getCcFiless() as $relObj) {
+ foreach ($this->getCcFilessRelatedByDbEditedby() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
- $copyObj->addCcFiles($relObj->copy($deepCopy));
+ $copyObj->addCcFilesRelatedByDbEditedby($relObj->copy($deepCopy));
}
}
@@ -1517,6 +1540,12 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
}
+ foreach ($this->getCcBlocks() as $relObj) {
+ if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
+ $copyObj->addCcBlock($relObj->copy($deepCopy));
+ }
+ }
+
foreach ($this->getCcPrefs() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcPref($relObj->copy($deepCopy));
@@ -1581,141 +1610,32 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
/**
- * Clears out the collCcAccesss collection
+ * Clears out the collCcFilessRelatedByDbOwnerId 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 addCcAccesss()
+ * @see addCcFilessRelatedByDbOwnerId()
*/
- public function clearCcAccesss()
+ public function clearCcFilessRelatedByDbOwnerId()
{
- $this->collCcAccesss = null; // important to set this to NULL since that means it is uninitialized
+ $this->collCcFilessRelatedByDbOwnerId = null; // important to set this to NULL since that means it is uninitialized
}
/**
- * Initializes the collCcAccesss collection.
+ * Initializes the collCcFilessRelatedByDbOwnerId collection.
*
- * By default this just sets the collCcAccesss collection to an empty array (like clearcollCcAccesss());
+ * By default this just sets the collCcFilessRelatedByDbOwnerId collection to an empty array (like clearcollCcFilessRelatedByDbOwnerId());
* 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 initCcAccesss()
+ public function initCcFilessRelatedByDbOwnerId()
{
- $this->collCcAccesss = new PropelObjectCollection();
- $this->collCcAccesss->setModel('CcAccess');
- }
-
- /**
- * Gets an array of CcAccess 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 CcSubjs 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 CcAccess[] List of CcAccess objects
- * @throws PropelException
- */
- public function getCcAccesss($criteria = null, PropelPDO $con = null)
- {
- if(null === $this->collCcAccesss || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcAccesss) {
- // return empty collection
- $this->initCcAccesss();
- } else {
- $collCcAccesss = CcAccessQuery::create(null, $criteria)
- ->filterByCcSubjs($this)
- ->find($con);
- if (null !== $criteria) {
- return $collCcAccesss;
- }
- $this->collCcAccesss = $collCcAccesss;
- }
- }
- return $this->collCcAccesss;
- }
-
- /**
- * Returns the number of related CcAccess objects.
- *
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param PropelPDO $con
- * @return int Count of related CcAccess objects.
- * @throws PropelException
- */
- public function countCcAccesss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
- {
- if(null === $this->collCcAccesss || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcAccesss) {
- return 0;
- } else {
- $query = CcAccessQuery::create(null, $criteria);
- if($distinct) {
- $query->distinct();
- }
- return $query
- ->filterByCcSubjs($this)
- ->count($con);
- }
- } else {
- return count($this->collCcAccesss);
- }
- }
-
- /**
- * Method called to associate a CcAccess object to this object
- * through the CcAccess foreign key attribute.
- *
- * @param CcAccess $l CcAccess
- * @return void
- * @throws PropelException
- */
- public function addCcAccess(CcAccess $l)
- {
- if ($this->collCcAccesss === null) {
- $this->initCcAccesss();
- }
- if (!$this->collCcAccesss->contains($l)) { // only add it if the **same** object is not already associated
- $this->collCcAccesss[]= $l;
- $l->setCcSubjs($this);
- }
- }
-
- /**
- * Clears out the collCcFiless 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 addCcFiless()
- */
- public function clearCcFiless()
- {
- $this->collCcFiless = null; // important to set this to NULL since that means it is uninitialized
- }
-
- /**
- * Initializes the collCcFiless collection.
- *
- * By default this just sets the collCcFiless collection to an empty array (like clearcollCcFiless());
- * 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 initCcFiless()
- {
- $this->collCcFiless = new PropelObjectCollection();
- $this->collCcFiless->setModel('CcFiles');
+ $this->collCcFilessRelatedByDbOwnerId = new PropelObjectCollection();
+ $this->collCcFilessRelatedByDbOwnerId->setModel('CcFiles');
}
/**
@@ -1732,23 +1652,23 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @return PropelCollection|array CcFiles[] List of CcFiles objects
* @throws PropelException
*/
- public function getCcFiless($criteria = null, PropelPDO $con = null)
+ public function getCcFilessRelatedByDbOwnerId($criteria = null, PropelPDO $con = null)
{
- if(null === $this->collCcFiless || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcFiless) {
+ if(null === $this->collCcFilessRelatedByDbOwnerId || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcFilessRelatedByDbOwnerId) {
// return empty collection
- $this->initCcFiless();
+ $this->initCcFilessRelatedByDbOwnerId();
} else {
- $collCcFiless = CcFilesQuery::create(null, $criteria)
- ->filterByCcSubjs($this)
+ $collCcFilessRelatedByDbOwnerId = CcFilesQuery::create(null, $criteria)
+ ->filterByFkOwner($this)
->find($con);
if (null !== $criteria) {
- return $collCcFiless;
+ return $collCcFilessRelatedByDbOwnerId;
}
- $this->collCcFiless = $collCcFiless;
+ $this->collCcFilessRelatedByDbOwnerId = $collCcFilessRelatedByDbOwnerId;
}
}
- return $this->collCcFiless;
+ return $this->collCcFilessRelatedByDbOwnerId;
}
/**
@@ -1760,10 +1680,10 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @return int Count of related CcFiles objects.
* @throws PropelException
*/
- public function countCcFiless(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
+ public function countCcFilessRelatedByDbOwnerId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
- if(null === $this->collCcFiless || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcFiless) {
+ if(null === $this->collCcFilessRelatedByDbOwnerId || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcFilessRelatedByDbOwnerId) {
return 0;
} else {
$query = CcFilesQuery::create(null, $criteria);
@@ -1771,11 +1691,11 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$query->distinct();
}
return $query
- ->filterByCcSubjs($this)
+ ->filterByFkOwner($this)
->count($con);
}
} else {
- return count($this->collCcFiless);
+ return count($this->collCcFilessRelatedByDbOwnerId);
}
}
@@ -1787,14 +1707,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @return void
* @throws PropelException
*/
- public function addCcFiles(CcFiles $l)
+ public function addCcFilesRelatedByDbOwnerId(CcFiles $l)
{
- if ($this->collCcFiless === null) {
- $this->initCcFiless();
+ if ($this->collCcFilessRelatedByDbOwnerId === null) {
+ $this->initCcFilessRelatedByDbOwnerId();
}
- if (!$this->collCcFiless->contains($l)) { // only add it if the **same** object is not already associated
- $this->collCcFiless[]= $l;
- $l->setCcSubjs($this);
+ if (!$this->collCcFilessRelatedByDbOwnerId->contains($l)) { // only add it if the **same** object is not already associated
+ $this->collCcFilessRelatedByDbOwnerId[]= $l;
+ $l->setFkOwner($this);
}
}
@@ -1804,7 +1724,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* an identical criteria, it returns the collection.
* Otherwise if this CcSubjs is new, it will return
* an empty collection; or if this CcSubjs has previously
- * been saved, it will retrieve related CcFiless from storage.
+ * been saved, it will retrieve related CcFilessRelatedByDbOwnerId from storage.
*
* This method is protected by default in order to keep the public
* api reasonable. You can provide public methods for those you
@@ -1815,12 +1735,146 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
* @return PropelCollection|array CcFiles[] List of CcFiles objects
*/
- public function getCcFilessJoinCcMusicDirs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public function getCcFilessRelatedByDbOwnerIdJoinCcMusicDirs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = CcFilesQuery::create(null, $criteria);
$query->joinWith('CcMusicDirs', $join_behavior);
- return $this->getCcFiless($query, $con);
+ return $this->getCcFilessRelatedByDbOwnerId($query, $con);
+ }
+
+ /**
+ * Clears out the collCcFilessRelatedByDbEditedby 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 addCcFilessRelatedByDbEditedby()
+ */
+ public function clearCcFilessRelatedByDbEditedby()
+ {
+ $this->collCcFilessRelatedByDbEditedby = null; // important to set this to NULL since that means it is uninitialized
+ }
+
+ /**
+ * Initializes the collCcFilessRelatedByDbEditedby collection.
+ *
+ * By default this just sets the collCcFilessRelatedByDbEditedby collection to an empty array (like clearcollCcFilessRelatedByDbEditedby());
+ * 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 initCcFilessRelatedByDbEditedby()
+ {
+ $this->collCcFilessRelatedByDbEditedby = new PropelObjectCollection();
+ $this->collCcFilessRelatedByDbEditedby->setModel('CcFiles');
+ }
+
+ /**
+ * Gets an array of CcFiles 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 CcSubjs 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 CcFiles[] List of CcFiles objects
+ * @throws PropelException
+ */
+ public function getCcFilessRelatedByDbEditedby($criteria = null, PropelPDO $con = null)
+ {
+ if(null === $this->collCcFilessRelatedByDbEditedby || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcFilessRelatedByDbEditedby) {
+ // return empty collection
+ $this->initCcFilessRelatedByDbEditedby();
+ } else {
+ $collCcFilessRelatedByDbEditedby = CcFilesQuery::create(null, $criteria)
+ ->filterByCcSubjsRelatedByDbEditedby($this)
+ ->find($con);
+ if (null !== $criteria) {
+ return $collCcFilessRelatedByDbEditedby;
+ }
+ $this->collCcFilessRelatedByDbEditedby = $collCcFilessRelatedByDbEditedby;
+ }
+ }
+ return $this->collCcFilessRelatedByDbEditedby;
+ }
+
+ /**
+ * Returns the number of related CcFiles objects.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param PropelPDO $con
+ * @return int Count of related CcFiles objects.
+ * @throws PropelException
+ */
+ public function countCcFilessRelatedByDbEditedby(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
+ {
+ if(null === $this->collCcFilessRelatedByDbEditedby || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcFilessRelatedByDbEditedby) {
+ return 0;
+ } else {
+ $query = CcFilesQuery::create(null, $criteria);
+ if($distinct) {
+ $query->distinct();
+ }
+ return $query
+ ->filterByCcSubjsRelatedByDbEditedby($this)
+ ->count($con);
+ }
+ } else {
+ return count($this->collCcFilessRelatedByDbEditedby);
+ }
+ }
+
+ /**
+ * Method called to associate a CcFiles object to this object
+ * through the CcFiles foreign key attribute.
+ *
+ * @param CcFiles $l CcFiles
+ * @return void
+ * @throws PropelException
+ */
+ public function addCcFilesRelatedByDbEditedby(CcFiles $l)
+ {
+ if ($this->collCcFilessRelatedByDbEditedby === null) {
+ $this->initCcFilessRelatedByDbEditedby();
+ }
+ if (!$this->collCcFilessRelatedByDbEditedby->contains($l)) { // only add it if the **same** object is not already associated
+ $this->collCcFilessRelatedByDbEditedby[]= $l;
+ $l->setCcSubjsRelatedByDbEditedby($this);
+ }
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcSubjs is new, it will return
+ * an empty collection; or if this CcSubjs has previously
+ * been saved, it will retrieve related CcFilessRelatedByDbEditedby 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 CcSubjs.
+ *
+ * @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 CcFiles[] List of CcFiles objects
+ */
+ public function getCcFilessRelatedByDbEditedbyJoinCcMusicDirs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcFilesQuery::create(null, $criteria);
+ $query->joinWith('CcMusicDirs', $join_behavior);
+
+ return $this->getCcFilessRelatedByDbEditedby($query, $con);
}
/**
@@ -2175,6 +2229,115 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
}
+ /**
+ * Clears out the collCcBlocks 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 addCcBlocks()
+ */
+ public function clearCcBlocks()
+ {
+ $this->collCcBlocks = null; // important to set this to NULL since that means it is uninitialized
+ }
+
+ /**
+ * Initializes the collCcBlocks collection.
+ *
+ * By default this just sets the collCcBlocks collection to an empty array (like clearcollCcBlocks());
+ * 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 initCcBlocks()
+ {
+ $this->collCcBlocks = new PropelObjectCollection();
+ $this->collCcBlocks->setModel('CcBlock');
+ }
+
+ /**
+ * Gets an array of CcBlock 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 CcSubjs 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 CcBlock[] List of CcBlock objects
+ * @throws PropelException
+ */
+ public function getCcBlocks($criteria = null, PropelPDO $con = null)
+ {
+ if(null === $this->collCcBlocks || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcBlocks) {
+ // return empty collection
+ $this->initCcBlocks();
+ } else {
+ $collCcBlocks = CcBlockQuery::create(null, $criteria)
+ ->filterByCcSubjs($this)
+ ->find($con);
+ if (null !== $criteria) {
+ return $collCcBlocks;
+ }
+ $this->collCcBlocks = $collCcBlocks;
+ }
+ }
+ return $this->collCcBlocks;
+ }
+
+ /**
+ * Returns the number of related CcBlock objects.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param PropelPDO $con
+ * @return int Count of related CcBlock objects.
+ * @throws PropelException
+ */
+ public function countCcBlocks(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
+ {
+ if(null === $this->collCcBlocks || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcBlocks) {
+ return 0;
+ } else {
+ $query = CcBlockQuery::create(null, $criteria);
+ if($distinct) {
+ $query->distinct();
+ }
+ return $query
+ ->filterByCcSubjs($this)
+ ->count($con);
+ }
+ } else {
+ return count($this->collCcBlocks);
+ }
+ }
+
+ /**
+ * Method called to associate a CcBlock object to this object
+ * through the CcBlock foreign key attribute.
+ *
+ * @param CcBlock $l CcBlock
+ * @return void
+ * @throws PropelException
+ */
+ public function addCcBlock(CcBlock $l)
+ {
+ if ($this->collCcBlocks === null) {
+ $this->initCcBlocks();
+ }
+ if (!$this->collCcBlocks->contains($l)) { // only add it if the **same** object is not already associated
+ $this->collCcBlocks[]= $l;
+ $l->setCcSubjs($this);
+ }
+ }
+
/**
* Clears out the collCcPrefs collection
*
@@ -2541,13 +2704,13 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
public function clearAllReferences($deep = false)
{
if ($deep) {
- if ($this->collCcAccesss) {
- foreach ((array) $this->collCcAccesss as $o) {
+ if ($this->collCcFilessRelatedByDbOwnerId) {
+ foreach ((array) $this->collCcFilessRelatedByDbOwnerId as $o) {
$o->clearAllReferences($deep);
}
}
- if ($this->collCcFiless) {
- foreach ((array) $this->collCcFiless as $o) {
+ if ($this->collCcFilessRelatedByDbEditedby) {
+ foreach ((array) $this->collCcFilessRelatedByDbEditedby as $o) {
$o->clearAllReferences($deep);
}
}
@@ -2566,6 +2729,11 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$o->clearAllReferences($deep);
}
}
+ if ($this->collCcBlocks) {
+ foreach ((array) $this->collCcBlocks as $o) {
+ $o->clearAllReferences($deep);
+ }
+ }
if ($this->collCcPrefs) {
foreach ((array) $this->collCcPrefs as $o) {
$o->clearAllReferences($deep);
@@ -2583,11 +2751,12 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
} // if ($deep)
- $this->collCcAccesss = null;
- $this->collCcFiless = null;
+ $this->collCcFilessRelatedByDbOwnerId = null;
+ $this->collCcFilessRelatedByDbEditedby = null;
$this->collCcPermss = null;
$this->collCcShowHostss = null;
$this->collCcPlaylists = null;
+ $this->collCcBlocks = null;
$this->collCcPrefs = null;
$this->collCcSesss = null;
$this->collCcSubjsTokens = null;
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSubjsPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcSubjsPeer.php
index 68403579f..dbd9978d7 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSubjsPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSubjsPeer.php
@@ -404,6 +404,9 @@ abstract class BaseCcSubjsPeer {
// Invalidate objects in CcShowHostsPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcShowHostsPeer::clearInstancePool();
+ // Invalidate objects in CcPlaylistPeer instance pool,
+ // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
+ CcPlaylistPeer::clearInstancePool();
// Invalidate objects in CcPrefPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcPrefPeer::clearInstancePool();
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php
index c76e2a1f8..38703d208 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php
@@ -38,13 +38,13 @@
* @method CcSubjsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSubjsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
- * @method CcSubjsQuery leftJoinCcAccess($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcAccess relation
- * @method CcSubjsQuery rightJoinCcAccess($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcAccess relation
- * @method CcSubjsQuery innerJoinCcAccess($relationAlias = '') Adds a INNER JOIN clause to the query using the CcAccess relation
+ * @method CcSubjsQuery leftJoinCcFilesRelatedByDbOwnerId($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
+ * @method CcSubjsQuery rightJoinCcFilesRelatedByDbOwnerId($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
+ * @method CcSubjsQuery innerJoinCcFilesRelatedByDbOwnerId($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
*
- * @method CcSubjsQuery leftJoinCcFiles($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFiles relation
- * @method CcSubjsQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
- * @method CcSubjsQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
+ * @method CcSubjsQuery leftJoinCcFilesRelatedByDbEditedby($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
+ * @method CcSubjsQuery rightJoinCcFilesRelatedByDbEditedby($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
+ * @method CcSubjsQuery innerJoinCcFilesRelatedByDbEditedby($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
*
* @method CcSubjsQuery leftJoinCcPerms($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPerms relation
* @method CcSubjsQuery rightJoinCcPerms($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPerms relation
@@ -58,6 +58,10 @@
* @method CcSubjsQuery rightJoinCcPlaylist($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlaylist relation
* @method CcSubjsQuery innerJoinCcPlaylist($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlaylist relation
*
+ * @method CcSubjsQuery leftJoinCcBlock($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcBlock relation
+ * @method CcSubjsQuery rightJoinCcBlock($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcBlock relation
+ * @method CcSubjsQuery innerJoinCcBlock($relationAlias = '') Adds a INNER JOIN clause to the query using the CcBlock relation
+ *
* @method CcSubjsQuery leftJoinCcPref($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPref relation
* @method CcSubjsQuery rightJoinCcPref($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPref relation
* @method CcSubjsQuery innerJoinCcPref($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPref relation
@@ -518,31 +522,31 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
}
/**
- * Filter the query by a related CcAccess object
+ * Filter the query by a related CcFiles object
*
- * @param CcAccess $ccAccess the related object to use as filter
+ * @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 CcSubjsQuery The current query, for fluid interface
*/
- public function filterByCcAccess($ccAccess, $comparison = null)
+ public function filterByCcFilesRelatedByDbOwnerId($ccFiles, $comparison = null)
{
return $this
- ->addUsingAlias(CcSubjsPeer::ID, $ccAccess->getOwner(), $comparison);
+ ->addUsingAlias(CcSubjsPeer::ID, $ccFiles->getDbOwnerId(), $comparison);
}
/**
- * Adds a JOIN clause to the query using the CcAccess relation
+ * Adds a JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcSubjsQuery The current query, for fluid interface
*/
- public function joinCcAccess($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ public function joinCcFilesRelatedByDbOwnerId($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
- $relationMap = $tableMap->getRelation('CcAccess');
+ $relationMap = $tableMap->getRelation('CcFilesRelatedByDbOwnerId');
// create a ModelJoin object for this join
$join = new ModelJoin();
@@ -557,14 +561,14 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
- $this->addJoinObject($join, 'CcAccess');
+ $this->addJoinObject($join, 'CcFilesRelatedByDbOwnerId');
}
return $this;
}
/**
- * Use the CcAccess relation CcAccess object
+ * Use the CcFilesRelatedByDbOwnerId relation CcFiles object
*
* @see useQuery()
*
@@ -572,13 +576,13 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
- * @return CcAccessQuery A secondary query class using the current class as primary query
+ * @return CcFilesQuery A secondary query class using the current class as primary query
*/
- public function useCcAccessQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ public function useCcFilesRelatedByDbOwnerIdQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
return $this
- ->joinCcAccess($relationAlias, $joinType)
- ->useQuery($relationAlias ? $relationAlias : 'CcAccess', 'CcAccessQuery');
+ ->joinCcFilesRelatedByDbOwnerId($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcFilesRelatedByDbOwnerId', 'CcFilesQuery');
}
/**
@@ -589,24 +593,24 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
*
* @return CcSubjsQuery The current query, for fluid interface
*/
- public function filterByCcFiles($ccFiles, $comparison = null)
+ public function filterByCcFilesRelatedByDbEditedby($ccFiles, $comparison = null)
{
return $this
->addUsingAlias(CcSubjsPeer::ID, $ccFiles->getDbEditedby(), $comparison);
}
/**
- * Adds a JOIN clause to the query using the CcFiles relation
+ * Adds a JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcSubjsQuery The current query, for fluid interface
*/
- public function joinCcFiles($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ public function joinCcFilesRelatedByDbEditedby($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
- $relationMap = $tableMap->getRelation('CcFiles');
+ $relationMap = $tableMap->getRelation('CcFilesRelatedByDbEditedby');
// create a ModelJoin object for this join
$join = new ModelJoin();
@@ -621,14 +625,14 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
- $this->addJoinObject($join, 'CcFiles');
+ $this->addJoinObject($join, 'CcFilesRelatedByDbEditedby');
}
return $this;
}
/**
- * Use the CcFiles relation CcFiles object
+ * Use the CcFilesRelatedByDbEditedby relation CcFiles object
*
* @see useQuery()
*
@@ -638,11 +642,11 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
*
* @return CcFilesQuery A secondary query class using the current class as primary query
*/
- public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ public function useCcFilesRelatedByDbEditedbyQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
return $this
- ->joinCcFiles($relationAlias, $joinType)
- ->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
+ ->joinCcFilesRelatedByDbEditedby($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcFilesRelatedByDbEditedby', 'CcFilesQuery');
}
/**
@@ -837,6 +841,70 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'CcPlaylist', 'CcPlaylistQuery');
}
+ /**
+ * 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 CcSubjsQuery The current query, for fluid interface
+ */
+ public function filterByCcBlock($ccBlock, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcSubjsPeer::ID, $ccBlock->getDbCreatorId(), $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 CcSubjsQuery 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 CcPref object
*
diff --git a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylist.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstream.php
similarity index 59%
rename from install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylist.php
rename to airtime_mvc/application/models/airtime/om/BaseCcWebstream.php
index 222c1c6f4..6f6e16e2b 100644
--- a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcPlaylist.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstream.php
@@ -2,25 +2,25 @@
/**
- * Base class that represents a row from the 'cc_playlist' table.
+ * Base class that represents a row from the 'cc_webstream' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcPlaylist extends BaseObject implements Persistent
+abstract class BaseCcWebstream extends BaseObject implements Persistent
{
/**
* Peer class name
*/
- const PEER = 'CcPlaylistPeer';
+ const PEER = 'CcWebstreamPeer';
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
- * @var CcPlaylistPeer
+ * @var CcWebstreamPeer
*/
protected static $peer;
@@ -32,43 +32,10 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
/**
* The value for the name field.
- * Note: this column has a database default value of: ''
* @var string
*/
protected $name;
- /**
- * The value for the state field.
- * Note: this column has a database default value of: 'empty'
- * @var string
- */
- protected $state;
-
- /**
- * The value for the currentlyaccessing field.
- * Note: this column has a database default value of: 0
- * @var int
- */
- protected $currentlyaccessing;
-
- /**
- * The value for the editedby field.
- * @var int
- */
- protected $editedby;
-
- /**
- * The value for the mtime field.
- * @var string
- */
- protected $mtime;
-
- /**
- * The value for the creator field.
- * @var string
- */
- protected $creator;
-
/**
* The value for the description field.
* @var string
@@ -76,14 +43,52 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
protected $description;
/**
- * @var CcSubjs
+ * The value for the url field.
+ * @var string
*/
- protected $aCcSubjs;
+ protected $url;
/**
- * @var array CcPlaylistcontents[] Collection to store aggregation of CcPlaylistcontents objects.
+ * The value for the length field.
+ * Note: this column has a database default value of: '00:00:00'
+ * @var string
*/
- protected $collCcPlaylistcontentss;
+ protected $length;
+
+ /**
+ * The value for the creator_id field.
+ * @var int
+ */
+ protected $creator_id;
+
+ /**
+ * The value for the mtime field.
+ * @var string
+ */
+ protected $mtime;
+
+ /**
+ * The value for the utime field.
+ * @var string
+ */
+ protected $utime;
+
+ /**
+ * The value for the lptime field.
+ * @var string
+ */
+ protected $lptime;
+
+ /**
+ * The value for the mime field.
+ * @var string
+ */
+ protected $mime;
+
+ /**
+ * @var array CcSchedule[] Collection to store aggregation of CcSchedule objects.
+ */
+ protected $collCcSchedules;
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -107,13 +112,11 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function applyDefaultValues()
{
- $this->name = '';
- $this->state = 'empty';
- $this->currentlyaccessing = 0;
+ $this->length = '00:00:00';
}
/**
- * Initializes internal state of BaseCcPlaylist object.
+ * Initializes internal state of BaseCcWebstream object.
* @see applyDefaults()
*/
public function __construct()
@@ -143,33 +146,43 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
/**
- * Get the [state] column value.
+ * Get the [description] column value.
*
* @return string
*/
- public function getDbState()
+ public function getDbDescription()
{
- return $this->state;
+ return $this->description;
}
/**
- * Get the [currentlyaccessing] column value.
+ * Get the [url] column value.
*
- * @return int
+ * @return string
*/
- public function getDbCurrentlyaccessing()
+ public function getDbUrl()
{
- return $this->currentlyaccessing;
+ return $this->url;
}
/**
- * Get the [editedby] column value.
+ * Get the [length] column value.
+ *
+ * @return string
+ */
+ public function getDbLength()
+ {
+ return $this->length;
+ }
+
+ /**
+ * Get the [creator_id] column value.
*
* @return int
*/
- public function getDbEditedby()
+ public function getDbCreatorId()
{
- return $this->editedby;
+ return $this->creator_id;
}
/**
@@ -206,30 +219,86 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
/**
- * Get the [creator] column value.
+ * Get the [optionally formatted] temporal [utime] column value.
*
- * @return string
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
+ * @throws PropelException - if unable to parse/validate the date/time value.
*/
- public function getDbCreator()
+ public function getDbUtime($format = 'Y-m-d H:i:s')
{
- return $this->creator;
+ if ($this->utime === null) {
+ return null;
+ }
+
+
+
+ try {
+ $dt = new DateTime($this->utime);
+ } catch (Exception $x) {
+ throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->utime, true), $x);
+ }
+
+ if ($format === null) {
+ // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
+ return $dt;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $dt->format('U'));
+ } else {
+ return $dt->format($format);
+ }
}
/**
- * Get the [description] column value.
+ * Get the [optionally formatted] temporal [lptime] column value.
+ *
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
+ * @throws PropelException - if unable to parse/validate the date/time value.
+ */
+ public function getDbLPtime($format = 'Y-m-d H:i:s')
+ {
+ if ($this->lptime === null) {
+ return null;
+ }
+
+
+
+ try {
+ $dt = new DateTime($this->lptime);
+ } catch (Exception $x) {
+ throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->lptime, true), $x);
+ }
+
+ if ($format === null) {
+ // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
+ return $dt;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $dt->format('U'));
+ } else {
+ return $dt->format($format);
+ }
+ }
+
+ /**
+ * Get the [mime] column value.
*
* @return string
*/
- public function getDbDescription()
+ public function getDbMime()
{
- return $this->description;
+ return $this->mime;
}
/**
* Set the value of [id] column.
*
* @param int $v new value
- * @return CcPlaylist The current object (for fluent API support)
+ * @return CcWebstream The current object (for fluent API support)
*/
public function setDbId($v)
{
@@ -239,7 +308,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if ($this->id !== $v) {
$this->id = $v;
- $this->modifiedColumns[] = CcPlaylistPeer::ID;
+ $this->modifiedColumns[] = CcWebstreamPeer::ID;
}
return $this;
@@ -249,7 +318,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* Set the value of [name] column.
*
* @param string $v new value
- * @return CcPlaylist The current object (for fluent API support)
+ * @return CcWebstream The current object (for fluent API support)
*/
public function setDbName($v)
{
@@ -257,84 +326,100 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$v = (string) $v;
}
- if ($this->name !== $v || $this->isNew()) {
+ if ($this->name !== $v) {
$this->name = $v;
- $this->modifiedColumns[] = CcPlaylistPeer::NAME;
+ $this->modifiedColumns[] = CcWebstreamPeer::NAME;
}
return $this;
} // setDbName()
/**
- * Set the value of [state] column.
+ * Set the value of [description] column.
*
* @param string $v new value
- * @return CcPlaylist The current object (for fluent API support)
+ * @return CcWebstream The current object (for fluent API support)
*/
- public function setDbState($v)
+ public function setDbDescription($v)
{
if ($v !== null) {
$v = (string) $v;
}
- if ($this->state !== $v || $this->isNew()) {
- $this->state = $v;
- $this->modifiedColumns[] = CcPlaylistPeer::STATE;
+ if ($this->description !== $v) {
+ $this->description = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::DESCRIPTION;
}
return $this;
- } // setDbState()
+ } // setDbDescription()
/**
- * Set the value of [currentlyaccessing] column.
+ * Set the value of [url] column.
+ *
+ * @param string $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbUrl($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->url !== $v) {
+ $this->url = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::URL;
+ }
+
+ return $this;
+ } // setDbUrl()
+
+ /**
+ * Set the value of [length] column.
+ *
+ * @param string $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbLength($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->length !== $v || $this->isNew()) {
+ $this->length = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::LENGTH;
+ }
+
+ return $this;
+ } // setDbLength()
+
+ /**
+ * Set the value of [creator_id] column.
*
* @param int $v new value
- * @return CcPlaylist The current object (for fluent API support)
+ * @return CcWebstream The current object (for fluent API support)
*/
- public function setDbCurrentlyaccessing($v)
+ public function setDbCreatorId($v)
{
if ($v !== null) {
$v = (int) $v;
}
- if ($this->currentlyaccessing !== $v || $this->isNew()) {
- $this->currentlyaccessing = $v;
- $this->modifiedColumns[] = CcPlaylistPeer::CURRENTLYACCESSING;
+ if ($this->creator_id !== $v) {
+ $this->creator_id = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::CREATOR_ID;
}
return $this;
- } // setDbCurrentlyaccessing()
-
- /**
- * Set the value of [editedby] column.
- *
- * @param int $v new value
- * @return CcPlaylist The current object (for fluent API support)
- */
- public function setDbEditedby($v)
- {
- if ($v !== null) {
- $v = (int) $v;
- }
-
- if ($this->editedby !== $v) {
- $this->editedby = $v;
- $this->modifiedColumns[] = CcPlaylistPeer::EDITEDBY;
- }
-
- if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
- $this->aCcSubjs = null;
- }
-
- return $this;
- } // setDbEditedby()
+ } // setDbCreatorId()
/**
* Sets the value of [mtime] column to a normalized version of the date/time value specified.
*
* @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
* be treated as NULL for temporal objects.
- * @return CcPlaylist The current object (for fluent API support)
+ * @return CcWebstream The current object (for fluent API support)
*/
public function setDbMtime($v)
{
@@ -371,7 +456,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
)
{
$this->mtime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
- $this->modifiedColumns[] = CcPlaylistPeer::MTIME;
+ $this->modifiedColumns[] = CcWebstreamPeer::MTIME;
}
} // if either are not null
@@ -379,44 +464,122 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
} // setDbMtime()
/**
- * Set the value of [creator] column.
+ * Sets the value of [utime] column to a normalized version of the date/time value specified.
*
- * @param string $v new value
- * @return CcPlaylist The current object (for fluent API support)
+ * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
+ * be treated as NULL for temporal objects.
+ * @return CcWebstream The current object (for fluent API support)
*/
- public function setDbCreator($v)
+ public function setDbUtime($v)
{
- if ($v !== null) {
- $v = (string) $v;
+ // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
+ // -- which is unexpected, to say the least.
+ if ($v === null || $v === '') {
+ $dt = null;
+ } elseif ($v instanceof DateTime) {
+ $dt = $v;
+ } else {
+ // some string/numeric value passed; we normalize that so that we can
+ // validate it.
+ try {
+ if (is_numeric($v)) { // if it's a unix timestamp
+ $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
+ // We have to explicitly specify and then change the time zone because of a
+ // DateTime bug: http://bugs.php.net/bug.php?id=43003
+ $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
+ } else {
+ $dt = new DateTime($v);
+ }
+ } catch (Exception $x) {
+ throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
+ }
}
- if ($this->creator !== $v) {
- $this->creator = $v;
- $this->modifiedColumns[] = CcPlaylistPeer::CREATOR;
- }
+ if ( $this->utime !== null || $dt !== null ) {
+ // (nested ifs are a little easier to read in this case)
+
+ $currNorm = ($this->utime !== null && $tmpDt = new DateTime($this->utime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
+ $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
+
+ if ( ($currNorm !== $newNorm) // normalized values don't match
+ )
+ {
+ $this->utime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
+ $this->modifiedColumns[] = CcWebstreamPeer::UTIME;
+ }
+ } // if either are not null
return $this;
- } // setDbCreator()
+ } // setDbUtime()
/**
- * Set the value of [description] column.
+ * Sets the value of [lptime] column to a normalized version of the date/time value specified.
+ *
+ * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
+ * be treated as NULL for temporal objects.
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbLPtime($v)
+ {
+ // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
+ // -- which is unexpected, to say the least.
+ if ($v === null || $v === '') {
+ $dt = null;
+ } elseif ($v instanceof DateTime) {
+ $dt = $v;
+ } else {
+ // some string/numeric value passed; we normalize that so that we can
+ // validate it.
+ try {
+ if (is_numeric($v)) { // if it's a unix timestamp
+ $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
+ // We have to explicitly specify and then change the time zone because of a
+ // DateTime bug: http://bugs.php.net/bug.php?id=43003
+ $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
+ } else {
+ $dt = new DateTime($v);
+ }
+ } catch (Exception $x) {
+ throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
+ }
+ }
+
+ if ( $this->lptime !== null || $dt !== null ) {
+ // (nested ifs are a little easier to read in this case)
+
+ $currNorm = ($this->lptime !== null && $tmpDt = new DateTime($this->lptime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
+ $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
+
+ if ( ($currNorm !== $newNorm) // normalized values don't match
+ )
+ {
+ $this->lptime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
+ $this->modifiedColumns[] = CcWebstreamPeer::LPTIME;
+ }
+ } // if either are not null
+
+ return $this;
+ } // setDbLPtime()
+
+ /**
+ * Set the value of [mime] column.
*
* @param string $v new value
- * @return CcPlaylist The current object (for fluent API support)
+ * @return CcWebstream The current object (for fluent API support)
*/
- public function setDbDescription($v)
+ public function setDbMime($v)
{
if ($v !== null) {
$v = (string) $v;
}
- if ($this->description !== $v) {
- $this->description = $v;
- $this->modifiedColumns[] = CcPlaylistPeer::DESCRIPTION;
+ if ($this->mime !== $v) {
+ $this->mime = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::MIME;
}
return $this;
- } // setDbDescription()
+ } // setDbMime()
/**
* Indicates whether the columns in this object are only set to default values.
@@ -428,15 +591,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function hasOnlyDefaultValues()
{
- if ($this->name !== '') {
- return false;
- }
-
- if ($this->state !== 'empty') {
- return false;
- }
-
- if ($this->currentlyaccessing !== 0) {
+ if ($this->length !== '00:00:00') {
return false;
}
@@ -464,12 +619,14 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
- $this->state = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
- $this->currentlyaccessing = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
- $this->editedby = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
- $this->mtime = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
- $this->creator = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
- $this->description = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $this->description = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
+ $this->url = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
+ $this->length = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
+ $this->creator_id = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
+ $this->mtime = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
+ $this->utime = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $this->lptime = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
+ $this->mime = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
$this->resetModified();
$this->setNew(false);
@@ -478,10 +635,10 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 8; // 8 = CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 10; // 10 = CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
- throw new PropelException("Error populating CcPlaylist object", $e);
+ throw new PropelException("Error populating CcWebstream object", $e);
}
}
@@ -501,9 +658,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
public function ensureConsistency()
{
- if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getDbId()) {
- $this->aCcSubjs = null;
- }
} // ensureConsistency
/**
@@ -527,13 +681,13 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// We don't need to alter the object instance pool; we're just modifying this instance
// already in the pool.
- $stmt = CcPlaylistPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
+ $stmt = CcWebstreamPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
$row = $stmt->fetch(PDO::FETCH_NUM);
$stmt->closeCursor();
if (!$row) {
@@ -543,8 +697,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
- $this->aCcSubjs = null;
- $this->collCcPlaylistcontentss = null;
+ $this->collCcSchedules = null;
} // if (deep)
}
@@ -565,14 +718,14 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
try {
$ret = $this->preDelete($con);
if ($ret) {
- CcPlaylistQuery::create()
+ CcWebstreamQuery::create()
->filterByPrimaryKey($this->getPrimaryKey())
->delete($con);
$this->postDelete($con);
@@ -607,7 +760,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
@@ -627,7 +780,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->postUpdate($con);
}
$this->postSave($con);
- CcPlaylistPeer::addInstanceToPool($this);
+ CcWebstreamPeer::addInstanceToPool($this);
} else {
$affectedRows = 0;
}
@@ -656,43 +809,31 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
- // We call the save method on the following object(s) if they
- // were passed to this object by their coresponding set
- // method. This object relates to these object(s) by a
- // foreign key reference.
-
- if ($this->aCcSubjs !== null) {
- if ($this->aCcSubjs->isModified() || $this->aCcSubjs->isNew()) {
- $affectedRows += $this->aCcSubjs->save($con);
- }
- $this->setCcSubjs($this->aCcSubjs);
- }
-
if ($this->isNew() ) {
- $this->modifiedColumns[] = CcPlaylistPeer::ID;
+ $this->modifiedColumns[] = CcWebstreamPeer::ID;
}
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$criteria = $this->buildCriteria();
- if ($criteria->keyContainsValue(CcPlaylistPeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcPlaylistPeer::ID.')');
+ if ($criteria->keyContainsValue(CcWebstreamPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcWebstreamPeer::ID.')');
}
$pk = BasePeer::doInsert($criteria, $con);
- $affectedRows += 1;
+ $affectedRows = 1;
$this->setDbId($pk); //[IMV] update autoincrement primary key
$this->setNew(false);
} else {
- $affectedRows += CcPlaylistPeer::doUpdate($this, $con);
+ $affectedRows = CcWebstreamPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
- if ($this->collCcPlaylistcontentss !== null) {
- foreach ($this->collCcPlaylistcontentss as $referrerFK) {
+ if ($this->collCcSchedules !== null) {
+ foreach ($this->collCcSchedules as $referrerFK) {
if (!$referrerFK->isDeleted()) {
$affectedRows += $referrerFK->save($con);
}
@@ -765,25 +906,13 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$failureMap = array();
- // We call the validate method on the following object(s) if they
- // were passed to this object by their coresponding set
- // method. This object relates to these object(s) by a
- // foreign key reference.
-
- if ($this->aCcSubjs !== null) {
- if (!$this->aCcSubjs->validate($columns)) {
- $failureMap = array_merge($failureMap, $this->aCcSubjs->getValidationFailures());
- }
- }
-
-
- if (($retval = CcPlaylistPeer::doValidate($this, $columns)) !== true) {
+ if (($retval = CcWebstreamPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
- if ($this->collCcPlaylistcontentss !== null) {
- foreach ($this->collCcPlaylistcontentss as $referrerFK) {
+ if ($this->collCcSchedules !== null) {
+ foreach ($this->collCcSchedules as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
@@ -808,7 +937,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcPlaylistPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcWebstreamPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$field = $this->getByPosition($pos);
return $field;
}
@@ -830,22 +959,28 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
return $this->getDbName();
break;
case 2:
- return $this->getDbState();
+ return $this->getDbDescription();
break;
case 3:
- return $this->getDbCurrentlyaccessing();
+ return $this->getDbUrl();
break;
case 4:
- return $this->getDbEditedby();
+ return $this->getDbLength();
break;
case 5:
- return $this->getDbMtime();
+ return $this->getDbCreatorId();
break;
case 6:
- return $this->getDbCreator();
+ return $this->getDbMtime();
break;
case 7:
- return $this->getDbDescription();
+ return $this->getDbUtime();
+ break;
+ case 8:
+ return $this->getDbLPtime();
+ break;
+ case 9:
+ return $this->getDbMime();
break;
default:
return null;
@@ -863,28 +998,24 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
* Defaults to BasePeer::TYPE_PHPNAME.
* @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
- * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
* @return array an associative array containing the field names (as keys) and field values
*/
- public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false)
+ public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)
{
- $keys = CcPlaylistPeer::getFieldNames($keyType);
+ $keys = CcWebstreamPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getDbId(),
$keys[1] => $this->getDbName(),
- $keys[2] => $this->getDbState(),
- $keys[3] => $this->getDbCurrentlyaccessing(),
- $keys[4] => $this->getDbEditedby(),
- $keys[5] => $this->getDbMtime(),
- $keys[6] => $this->getDbCreator(),
- $keys[7] => $this->getDbDescription(),
+ $keys[2] => $this->getDbDescription(),
+ $keys[3] => $this->getDbUrl(),
+ $keys[4] => $this->getDbLength(),
+ $keys[5] => $this->getDbCreatorId(),
+ $keys[6] => $this->getDbMtime(),
+ $keys[7] => $this->getDbUtime(),
+ $keys[8] => $this->getDbLPtime(),
+ $keys[9] => $this->getDbMime(),
);
- if ($includeForeignObjects) {
- if (null !== $this->aCcSubjs) {
- $result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, true);
- }
- }
return $result;
}
@@ -900,7 +1031,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcPlaylistPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcWebstreamPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -922,22 +1053,28 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->setDbName($value);
break;
case 2:
- $this->setDbState($value);
+ $this->setDbDescription($value);
break;
case 3:
- $this->setDbCurrentlyaccessing($value);
+ $this->setDbUrl($value);
break;
case 4:
- $this->setDbEditedby($value);
+ $this->setDbLength($value);
break;
case 5:
- $this->setDbMtime($value);
+ $this->setDbCreatorId($value);
break;
case 6:
- $this->setDbCreator($value);
+ $this->setDbMtime($value);
break;
case 7:
- $this->setDbDescription($value);
+ $this->setDbUtime($value);
+ break;
+ case 8:
+ $this->setDbLPtime($value);
+ break;
+ case 9:
+ $this->setDbMime($value);
break;
} // switch()
}
@@ -961,16 +1098,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
- $keys = CcPlaylistPeer::getFieldNames($keyType);
+ $keys = CcWebstreamPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
- if (array_key_exists($keys[2], $arr)) $this->setDbState($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setDbEditedby($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDbMtime($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setDbCreator($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setDbDescription($arr[$keys[7]]);
+ if (array_key_exists($keys[2], $arr)) $this->setDbDescription($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbUrl($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbLength($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbCreatorId($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbMtime($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbUtime($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDbLPtime($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setDbMime($arr[$keys[9]]);
}
/**
@@ -980,16 +1119,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function buildCriteria()
{
- $criteria = new Criteria(CcPlaylistPeer::DATABASE_NAME);
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
- if ($this->isColumnModified(CcPlaylistPeer::ID)) $criteria->add(CcPlaylistPeer::ID, $this->id);
- if ($this->isColumnModified(CcPlaylistPeer::NAME)) $criteria->add(CcPlaylistPeer::NAME, $this->name);
- if ($this->isColumnModified(CcPlaylistPeer::STATE)) $criteria->add(CcPlaylistPeer::STATE, $this->state);
- if ($this->isColumnModified(CcPlaylistPeer::CURRENTLYACCESSING)) $criteria->add(CcPlaylistPeer::CURRENTLYACCESSING, $this->currentlyaccessing);
- if ($this->isColumnModified(CcPlaylistPeer::EDITEDBY)) $criteria->add(CcPlaylistPeer::EDITEDBY, $this->editedby);
- if ($this->isColumnModified(CcPlaylistPeer::MTIME)) $criteria->add(CcPlaylistPeer::MTIME, $this->mtime);
- if ($this->isColumnModified(CcPlaylistPeer::CREATOR)) $criteria->add(CcPlaylistPeer::CREATOR, $this->creator);
- if ($this->isColumnModified(CcPlaylistPeer::DESCRIPTION)) $criteria->add(CcPlaylistPeer::DESCRIPTION, $this->description);
+ if ($this->isColumnModified(CcWebstreamPeer::ID)) $criteria->add(CcWebstreamPeer::ID, $this->id);
+ if ($this->isColumnModified(CcWebstreamPeer::NAME)) $criteria->add(CcWebstreamPeer::NAME, $this->name);
+ if ($this->isColumnModified(CcWebstreamPeer::DESCRIPTION)) $criteria->add(CcWebstreamPeer::DESCRIPTION, $this->description);
+ if ($this->isColumnModified(CcWebstreamPeer::URL)) $criteria->add(CcWebstreamPeer::URL, $this->url);
+ if ($this->isColumnModified(CcWebstreamPeer::LENGTH)) $criteria->add(CcWebstreamPeer::LENGTH, $this->length);
+ if ($this->isColumnModified(CcWebstreamPeer::CREATOR_ID)) $criteria->add(CcWebstreamPeer::CREATOR_ID, $this->creator_id);
+ if ($this->isColumnModified(CcWebstreamPeer::MTIME)) $criteria->add(CcWebstreamPeer::MTIME, $this->mtime);
+ if ($this->isColumnModified(CcWebstreamPeer::UTIME)) $criteria->add(CcWebstreamPeer::UTIME, $this->utime);
+ if ($this->isColumnModified(CcWebstreamPeer::LPTIME)) $criteria->add(CcWebstreamPeer::LPTIME, $this->lptime);
+ if ($this->isColumnModified(CcWebstreamPeer::MIME)) $criteria->add(CcWebstreamPeer::MIME, $this->mime);
return $criteria;
}
@@ -1004,8 +1145,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
- $criteria = new Criteria(CcPlaylistPeer::DATABASE_NAME);
- $criteria->add(CcPlaylistPeer::ID, $this->id);
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamPeer::ID, $this->id);
return $criteria;
}
@@ -1045,28 +1186,30 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of CcPlaylist (or compatible) type.
+ * @param object $copyObj An object of CcWebstream (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setDbName($this->name);
- $copyObj->setDbState($this->state);
- $copyObj->setDbCurrentlyaccessing($this->currentlyaccessing);
- $copyObj->setDbEditedby($this->editedby);
- $copyObj->setDbMtime($this->mtime);
- $copyObj->setDbCreator($this->creator);
$copyObj->setDbDescription($this->description);
+ $copyObj->setDbUrl($this->url);
+ $copyObj->setDbLength($this->length);
+ $copyObj->setDbCreatorId($this->creator_id);
+ $copyObj->setDbMtime($this->mtime);
+ $copyObj->setDbUtime($this->utime);
+ $copyObj->setDbLPtime($this->lptime);
+ $copyObj->setDbMime($this->mime);
if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of
// the getter/setter methods for fkey referrer objects.
$copyObj->setNew(false);
- foreach ($this->getCcPlaylistcontentss() as $relObj) {
+ foreach ($this->getCcSchedules() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
- $copyObj->addCcPlaylistcontents($relObj->copy($deepCopy));
+ $copyObj->addCcSchedule($relObj->copy($deepCopy));
}
}
@@ -1086,7 +1229,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @return CcPlaylist Clone of current object.
+ * @return CcWebstream Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
@@ -1105,171 +1248,122 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
- * @return CcPlaylistPeer
+ * @return CcWebstreamPeer
*/
public function getPeer()
{
if (self::$peer === null) {
- self::$peer = new CcPlaylistPeer();
+ self::$peer = new CcWebstreamPeer();
}
return self::$peer;
}
/**
- * Declares an association between this object and a CcSubjs object.
- *
- * @param CcSubjs $v
- * @return CcPlaylist The current object (for fluent API support)
- * @throws PropelException
- */
- public function setCcSubjs(CcSubjs $v = null)
- {
- if ($v === null) {
- $this->setDbEditedby(NULL);
- } else {
- $this->setDbEditedby($v->getDbId());
- }
-
- $this->aCcSubjs = $v;
-
- // Add binding for other direction of this n:n relationship.
- // If this object has already been added to the CcSubjs object, it will not be re-added.
- if ($v !== null) {
- $v->addCcPlaylist($this);
- }
-
- return $this;
- }
-
-
- /**
- * Get the associated CcSubjs object
- *
- * @param PropelPDO Optional Connection object.
- * @return CcSubjs The associated CcSubjs object.
- * @throws PropelException
- */
- public function getCcSubjs(PropelPDO $con = null)
- {
- if ($this->aCcSubjs === null && ($this->editedby !== null)) {
- $this->aCcSubjs = CcSubjsQuery::create()->findPk($this->editedby, $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->aCcSubjs->addCcPlaylists($this);
- */
- }
- return $this->aCcSubjs;
- }
-
- /**
- * Clears out the collCcPlaylistcontentss collection
+ * Clears out the collCcSchedules 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 addCcPlaylistcontentss()
+ * @see addCcSchedules()
*/
- public function clearCcPlaylistcontentss()
+ public function clearCcSchedules()
{
- $this->collCcPlaylistcontentss = null; // important to set this to NULL since that means it is uninitialized
+ $this->collCcSchedules = null; // important to set this to NULL since that means it is uninitialized
}
/**
- * Initializes the collCcPlaylistcontentss collection.
+ * Initializes the collCcSchedules collection.
*
- * By default this just sets the collCcPlaylistcontentss collection to an empty array (like clearcollCcPlaylistcontentss());
+ * By default this just sets the collCcSchedules collection to an empty array (like clearcollCcSchedules());
* 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 initCcPlaylistcontentss()
+ public function initCcSchedules()
{
- $this->collCcPlaylistcontentss = new PropelObjectCollection();
- $this->collCcPlaylistcontentss->setModel('CcPlaylistcontents');
+ $this->collCcSchedules = new PropelObjectCollection();
+ $this->collCcSchedules->setModel('CcSchedule');
}
/**
- * Gets an array of CcPlaylistcontents objects which contain a foreign key that references this object.
+ * Gets an array of CcSchedule 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 CcPlaylist is new, it will return
+ * If this CcWebstream 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 CcPlaylistcontents[] List of CcPlaylistcontents objects
+ * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
* @throws PropelException
*/
- public function getCcPlaylistcontentss($criteria = null, PropelPDO $con = null)
+ public function getCcSchedules($criteria = null, PropelPDO $con = null)
{
- if(null === $this->collCcPlaylistcontentss || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcPlaylistcontentss) {
+ if(null === $this->collCcSchedules || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcSchedules) {
// return empty collection
- $this->initCcPlaylistcontentss();
+ $this->initCcSchedules();
} else {
- $collCcPlaylistcontentss = CcPlaylistcontentsQuery::create(null, $criteria)
- ->filterByCcPlaylist($this)
+ $collCcSchedules = CcScheduleQuery::create(null, $criteria)
+ ->filterByCcWebstream($this)
->find($con);
if (null !== $criteria) {
- return $collCcPlaylistcontentss;
+ return $collCcSchedules;
}
- $this->collCcPlaylistcontentss = $collCcPlaylistcontentss;
+ $this->collCcSchedules = $collCcSchedules;
}
}
- return $this->collCcPlaylistcontentss;
+ return $this->collCcSchedules;
}
/**
- * Returns the number of related CcPlaylistcontents objects.
+ * Returns the number of related CcSchedule objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
- * @return int Count of related CcPlaylistcontents objects.
+ * @return int Count of related CcSchedule objects.
* @throws PropelException
*/
- public function countCcPlaylistcontentss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
+ public function countCcSchedules(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
- if(null === $this->collCcPlaylistcontentss || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcPlaylistcontentss) {
+ if(null === $this->collCcSchedules || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcSchedules) {
return 0;
} else {
- $query = CcPlaylistcontentsQuery::create(null, $criteria);
+ $query = CcScheduleQuery::create(null, $criteria);
if($distinct) {
$query->distinct();
}
return $query
- ->filterByCcPlaylist($this)
+ ->filterByCcWebstream($this)
->count($con);
}
} else {
- return count($this->collCcPlaylistcontentss);
+ return count($this->collCcSchedules);
}
}
/**
- * Method called to associate a CcPlaylistcontents object to this object
- * through the CcPlaylistcontents foreign key attribute.
+ * Method called to associate a CcSchedule object to this object
+ * through the CcSchedule foreign key attribute.
*
- * @param CcPlaylistcontents $l CcPlaylistcontents
+ * @param CcSchedule $l CcSchedule
* @return void
* @throws PropelException
*/
- public function addCcPlaylistcontents(CcPlaylistcontents $l)
+ public function addCcSchedule(CcSchedule $l)
{
- if ($this->collCcPlaylistcontentss === null) {
- $this->initCcPlaylistcontentss();
+ if ($this->collCcSchedules === null) {
+ $this->initCcSchedules();
}
- if (!$this->collCcPlaylistcontentss->contains($l)) { // only add it if the **same** object is not already associated
- $this->collCcPlaylistcontentss[]= $l;
- $l->setCcPlaylist($this);
+ if (!$this->collCcSchedules->contains($l)) { // only add it if the **same** object is not already associated
+ $this->collCcSchedules[]= $l;
+ $l->setCcWebstream($this);
}
}
@@ -1277,25 +1371,50 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
/**
* If this collection has already been initialized with
* an identical criteria, it returns the collection.
- * Otherwise if this CcPlaylist is new, it will return
- * an empty collection; or if this CcPlaylist has previously
- * been saved, it will retrieve related CcPlaylistcontentss from storage.
+ * Otherwise if this CcWebstream is new, it will return
+ * an empty collection; or if this CcWebstream has previously
+ * been saved, it will retrieve related CcSchedules 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 CcPlaylist.
+ * actually need in CcWebstream.
*
* @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 CcPlaylistcontents[] List of CcPlaylistcontents objects
+ * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
*/
- public function getCcPlaylistcontentssJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public function getCcSchedulesJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
- $query = CcPlaylistcontentsQuery::create(null, $criteria);
+ $query = CcScheduleQuery::create(null, $criteria);
+ $query->joinWith('CcShowInstances', $join_behavior);
+
+ return $this->getCcSchedules($query, $con);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcWebstream is new, it will return
+ * an empty collection; or if this CcWebstream has previously
+ * been saved, it will retrieve related CcSchedules 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 CcWebstream.
+ *
+ * @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 CcSchedule[] List of CcSchedule objects
+ */
+ public function getCcSchedulesJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcScheduleQuery::create(null, $criteria);
$query->joinWith('CcFiles', $join_behavior);
- return $this->getCcPlaylistcontentss($query, $con);
+ return $this->getCcSchedules($query, $con);
}
/**
@@ -1305,12 +1424,14 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
{
$this->id = null;
$this->name = null;
- $this->state = null;
- $this->currentlyaccessing = null;
- $this->editedby = null;
- $this->mtime = null;
- $this->creator = null;
$this->description = null;
+ $this->url = null;
+ $this->length = null;
+ $this->creator_id = null;
+ $this->mtime = null;
+ $this->utime = null;
+ $this->lptime = null;
+ $this->mime = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();
@@ -1332,15 +1453,14 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
public function clearAllReferences($deep = false)
{
if ($deep) {
- if ($this->collCcPlaylistcontentss) {
- foreach ((array) $this->collCcPlaylistcontentss as $o) {
+ if ($this->collCcSchedules) {
+ foreach ((array) $this->collCcSchedules as $o) {
$o->clearAllReferences($deep);
}
}
} // if ($deep)
- $this->collCcPlaylistcontentss = null;
- $this->aCcSubjs = null;
+ $this->collCcSchedules = null;
}
/**
@@ -1362,4 +1482,4 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
throw new PropelException('Call to undefined method: ' . $name);
}
-} // BaseCcPlaylist
+} // BaseCcWebstream
diff --git a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcShowRebroadcast.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadata.php
similarity index 76%
rename from install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcShowRebroadcast.php
rename to airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadata.php
index aabd37d79..f5730573c 100644
--- a/install_minimal/upgrades/airtime-2.0.0/propel/airtime/om/BaseCcShowRebroadcast.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadata.php
@@ -2,25 +2,25 @@
/**
- * Base class that represents a row from the 'cc_show_rebroadcast' table.
+ * Base class that represents a row from the 'cc_webstream_metadata' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
+abstract class BaseCcWebstreamMetadata extends BaseObject implements Persistent
{
/**
* Peer class name
*/
- const PEER = 'CcShowRebroadcastPeer';
+ const PEER = 'CcWebstreamMetadataPeer';
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
- * @var CcShowRebroadcastPeer
+ * @var CcWebstreamMetadataPeer
*/
protected static $peer;
@@ -31,10 +31,10 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
protected $id;
/**
- * The value for the day_offset field.
- * @var string
+ * The value for the instance_id field.
+ * @var int
*/
- protected $day_offset;
+ protected $instance_id;
/**
* The value for the start_time field.
@@ -43,15 +43,15 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
protected $start_time;
/**
- * The value for the show_id field.
- * @var int
+ * The value for the liquidsoap_data field.
+ * @var string
*/
- protected $show_id;
+ protected $liquidsoap_data;
/**
- * @var CcShow
+ * @var CcSchedule
*/
- protected $aCcShow;
+ protected $aCcSchedule;
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -78,13 +78,13 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
}
/**
- * Get the [day_offset] column value.
+ * Get the [instance_id] column value.
*
- * @return string
+ * @return int
*/
- public function getDbDayOffset()
+ public function getDbInstanceId()
{
- return $this->day_offset;
+ return $this->instance_id;
}
/**
@@ -96,7 +96,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
* @throws PropelException - if unable to parse/validate the date/time value.
*/
- public function getDbStartTime($format = '%X')
+ public function getDbStartTime($format = 'Y-m-d H:i:s')
{
if ($this->start_time === null) {
return null;
@@ -121,20 +121,20 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
}
/**
- * Get the [show_id] column value.
+ * Get the [liquidsoap_data] column value.
*
- * @return int
+ * @return string
*/
- public function getDbShowId()
+ public function getDbLiquidsoapData()
{
- return $this->show_id;
+ return $this->liquidsoap_data;
}
/**
* Set the value of [id] column.
*
* @param int $v new value
- * @return CcShowRebroadcast The current object (for fluent API support)
+ * @return CcWebstreamMetadata The current object (for fluent API support)
*/
public function setDbId($v)
{
@@ -144,38 +144,42 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
if ($this->id !== $v) {
$this->id = $v;
- $this->modifiedColumns[] = CcShowRebroadcastPeer::ID;
+ $this->modifiedColumns[] = CcWebstreamMetadataPeer::ID;
}
return $this;
} // setDbId()
/**
- * Set the value of [day_offset] column.
+ * Set the value of [instance_id] column.
*
- * @param string $v new value
- * @return CcShowRebroadcast The current object (for fluent API support)
+ * @param int $v new value
+ * @return CcWebstreamMetadata The current object (for fluent API support)
*/
- public function setDbDayOffset($v)
+ public function setDbInstanceId($v)
{
if ($v !== null) {
- $v = (string) $v;
+ $v = (int) $v;
}
- if ($this->day_offset !== $v) {
- $this->day_offset = $v;
- $this->modifiedColumns[] = CcShowRebroadcastPeer::DAY_OFFSET;
+ if ($this->instance_id !== $v) {
+ $this->instance_id = $v;
+ $this->modifiedColumns[] = CcWebstreamMetadataPeer::INSTANCE_ID;
+ }
+
+ if ($this->aCcSchedule !== null && $this->aCcSchedule->getDbId() !== $v) {
+ $this->aCcSchedule = null;
}
return $this;
- } // setDbDayOffset()
+ } // setDbInstanceId()
/**
* Sets the value of [start_time] column to a normalized version of the date/time value specified.
*
* @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
* be treated as NULL for temporal objects.
- * @return CcShowRebroadcast The current object (for fluent API support)
+ * @return CcWebstreamMetadata The current object (for fluent API support)
*/
public function setDbStartTime($v)
{
@@ -205,14 +209,14 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
if ( $this->start_time !== null || $dt !== null ) {
// (nested ifs are a little easier to read in this case)
- $currNorm = ($this->start_time !== null && $tmpDt = new DateTime($this->start_time)) ? $tmpDt->format('H:i:s') : null;
- $newNorm = ($dt !== null) ? $dt->format('H:i:s') : null;
+ $currNorm = ($this->start_time !== null && $tmpDt = new DateTime($this->start_time)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
+ $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
if ( ($currNorm !== $newNorm) // normalized values don't match
)
{
- $this->start_time = ($dt ? $dt->format('H:i:s') : null);
- $this->modifiedColumns[] = CcShowRebroadcastPeer::START_TIME;
+ $this->start_time = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
+ $this->modifiedColumns[] = CcWebstreamMetadataPeer::START_TIME;
}
} // if either are not null
@@ -220,28 +224,24 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
} // setDbStartTime()
/**
- * Set the value of [show_id] column.
+ * Set the value of [liquidsoap_data] column.
*
- * @param int $v new value
- * @return CcShowRebroadcast The current object (for fluent API support)
+ * @param string $v new value
+ * @return CcWebstreamMetadata The current object (for fluent API support)
*/
- public function setDbShowId($v)
+ public function setDbLiquidsoapData($v)
{
if ($v !== null) {
- $v = (int) $v;
+ $v = (string) $v;
}
- if ($this->show_id !== $v) {
- $this->show_id = $v;
- $this->modifiedColumns[] = CcShowRebroadcastPeer::SHOW_ID;
- }
-
- if ($this->aCcShow !== null && $this->aCcShow->getDbId() !== $v) {
- $this->aCcShow = null;
+ if ($this->liquidsoap_data !== $v) {
+ $this->liquidsoap_data = $v;
+ $this->modifiedColumns[] = CcWebstreamMetadataPeer::LIQUIDSOAP_DATA;
}
return $this;
- } // setDbShowId()
+ } // setDbLiquidsoapData()
/**
* Indicates whether the columns in this object are only set to default values.
@@ -276,9 +276,9 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
- $this->day_offset = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
+ $this->instance_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
$this->start_time = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
- $this->show_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
+ $this->liquidsoap_data = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
$this->resetModified();
$this->setNew(false);
@@ -287,10 +287,10 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 4; // 4 = CcShowRebroadcastPeer::NUM_COLUMNS - CcShowRebroadcastPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 4; // 4 = CcWebstreamMetadataPeer::NUM_COLUMNS - CcWebstreamMetadataPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
- throw new PropelException("Error populating CcShowRebroadcast object", $e);
+ throw new PropelException("Error populating CcWebstreamMetadata object", $e);
}
}
@@ -310,8 +310,8 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
public function ensureConsistency()
{
- if ($this->aCcShow !== null && $this->show_id !== $this->aCcShow->getDbId()) {
- $this->aCcShow = null;
+ if ($this->aCcSchedule !== null && $this->instance_id !== $this->aCcSchedule->getDbId()) {
+ $this->aCcSchedule = null;
}
} // ensureConsistency
@@ -336,13 +336,13 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowRebroadcastPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// We don't need to alter the object instance pool; we're just modifying this instance
// already in the pool.
- $stmt = CcShowRebroadcastPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
+ $stmt = CcWebstreamMetadataPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
$row = $stmt->fetch(PDO::FETCH_NUM);
$stmt->closeCursor();
if (!$row) {
@@ -352,7 +352,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
- $this->aCcShow = null;
+ $this->aCcSchedule = null;
} // if (deep)
}
@@ -372,14 +372,14 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowRebroadcastPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
try {
$ret = $this->preDelete($con);
if ($ret) {
- CcShowRebroadcastQuery::create()
+ CcWebstreamMetadataQuery::create()
->filterByPrimaryKey($this->getPrimaryKey())
->delete($con);
$this->postDelete($con);
@@ -414,7 +414,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CcShowRebroadcastPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$con->beginTransaction();
@@ -434,7 +434,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
$this->postUpdate($con);
}
$this->postSave($con);
- CcShowRebroadcastPeer::addInstanceToPool($this);
+ CcWebstreamMetadataPeer::addInstanceToPool($this);
} else {
$affectedRows = 0;
}
@@ -468,23 +468,23 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcShow !== null) {
- if ($this->aCcShow->isModified() || $this->aCcShow->isNew()) {
- $affectedRows += $this->aCcShow->save($con);
+ if ($this->aCcSchedule !== null) {
+ if ($this->aCcSchedule->isModified() || $this->aCcSchedule->isNew()) {
+ $affectedRows += $this->aCcSchedule->save($con);
}
- $this->setCcShow($this->aCcShow);
+ $this->setCcSchedule($this->aCcSchedule);
}
if ($this->isNew() ) {
- $this->modifiedColumns[] = CcShowRebroadcastPeer::ID;
+ $this->modifiedColumns[] = CcWebstreamMetadataPeer::ID;
}
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$criteria = $this->buildCriteria();
- if ($criteria->keyContainsValue(CcShowRebroadcastPeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcShowRebroadcastPeer::ID.')');
+ if ($criteria->keyContainsValue(CcWebstreamMetadataPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcWebstreamMetadataPeer::ID.')');
}
$pk = BasePeer::doInsert($criteria, $con);
@@ -492,7 +492,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
$this->setDbId($pk); //[IMV] update autoincrement primary key
$this->setNew(false);
} else {
- $affectedRows += CcShowRebroadcastPeer::doUpdate($this, $con);
+ $affectedRows += CcWebstreamMetadataPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
@@ -569,14 +569,14 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
// method. This object relates to these object(s) by a
// foreign key reference.
- if ($this->aCcShow !== null) {
- if (!$this->aCcShow->validate($columns)) {
- $failureMap = array_merge($failureMap, $this->aCcShow->getValidationFailures());
+ if ($this->aCcSchedule !== null) {
+ if (!$this->aCcSchedule->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcSchedule->getValidationFailures());
}
}
- if (($retval = CcShowRebroadcastPeer::doValidate($this, $columns)) !== true) {
+ if (($retval = CcWebstreamMetadataPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -599,7 +599,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcShowRebroadcastPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcWebstreamMetadataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$field = $this->getByPosition($pos);
return $field;
}
@@ -618,13 +618,13 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
return $this->getDbId();
break;
case 1:
- return $this->getDbDayOffset();
+ return $this->getDbInstanceId();
break;
case 2:
return $this->getDbStartTime();
break;
case 3:
- return $this->getDbShowId();
+ return $this->getDbLiquidsoapData();
break;
default:
return null;
@@ -648,16 +648,16 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false)
{
- $keys = CcShowRebroadcastPeer::getFieldNames($keyType);
+ $keys = CcWebstreamMetadataPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getDbId(),
- $keys[1] => $this->getDbDayOffset(),
+ $keys[1] => $this->getDbInstanceId(),
$keys[2] => $this->getDbStartTime(),
- $keys[3] => $this->getDbShowId(),
+ $keys[3] => $this->getDbLiquidsoapData(),
);
if ($includeForeignObjects) {
- if (null !== $this->aCcShow) {
- $result['CcShow'] = $this->aCcShow->toArray($keyType, $includeLazyLoadColumns, true);
+ if (null !== $this->aCcSchedule) {
+ $result['CcSchedule'] = $this->aCcSchedule->toArray($keyType, $includeLazyLoadColumns, true);
}
}
return $result;
@@ -675,7 +675,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CcShowRebroadcastPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CcWebstreamMetadataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -694,13 +694,13 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
$this->setDbId($value);
break;
case 1:
- $this->setDbDayOffset($value);
+ $this->setDbInstanceId($value);
break;
case 2:
$this->setDbStartTime($value);
break;
case 3:
- $this->setDbShowId($value);
+ $this->setDbLiquidsoapData($value);
break;
} // switch()
}
@@ -724,12 +724,12 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
- $keys = CcShowRebroadcastPeer::getFieldNames($keyType);
+ $keys = CcWebstreamMetadataPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setDbDayOffset($arr[$keys[1]]);
+ if (array_key_exists($keys[1], $arr)) $this->setDbInstanceId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDbStartTime($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDbShowId($arr[$keys[3]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbLiquidsoapData($arr[$keys[3]]);
}
/**
@@ -739,12 +739,12 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
*/
public function buildCriteria()
{
- $criteria = new Criteria(CcShowRebroadcastPeer::DATABASE_NAME);
+ $criteria = new Criteria(CcWebstreamMetadataPeer::DATABASE_NAME);
- if ($this->isColumnModified(CcShowRebroadcastPeer::ID)) $criteria->add(CcShowRebroadcastPeer::ID, $this->id);
- if ($this->isColumnModified(CcShowRebroadcastPeer::DAY_OFFSET)) $criteria->add(CcShowRebroadcastPeer::DAY_OFFSET, $this->day_offset);
- if ($this->isColumnModified(CcShowRebroadcastPeer::START_TIME)) $criteria->add(CcShowRebroadcastPeer::START_TIME, $this->start_time);
- if ($this->isColumnModified(CcShowRebroadcastPeer::SHOW_ID)) $criteria->add(CcShowRebroadcastPeer::SHOW_ID, $this->show_id);
+ if ($this->isColumnModified(CcWebstreamMetadataPeer::ID)) $criteria->add(CcWebstreamMetadataPeer::ID, $this->id);
+ if ($this->isColumnModified(CcWebstreamMetadataPeer::INSTANCE_ID)) $criteria->add(CcWebstreamMetadataPeer::INSTANCE_ID, $this->instance_id);
+ if ($this->isColumnModified(CcWebstreamMetadataPeer::START_TIME)) $criteria->add(CcWebstreamMetadataPeer::START_TIME, $this->start_time);
+ if ($this->isColumnModified(CcWebstreamMetadataPeer::LIQUIDSOAP_DATA)) $criteria->add(CcWebstreamMetadataPeer::LIQUIDSOAP_DATA, $this->liquidsoap_data);
return $criteria;
}
@@ -759,8 +759,8 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
- $criteria = new Criteria(CcShowRebroadcastPeer::DATABASE_NAME);
- $criteria->add(CcShowRebroadcastPeer::ID, $this->id);
+ $criteria = new Criteria(CcWebstreamMetadataPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamMetadataPeer::ID, $this->id);
return $criteria;
}
@@ -800,15 +800,15 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of CcShowRebroadcast (or compatible) type.
+ * @param object $copyObj An object of CcWebstreamMetadata (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
- $copyObj->setDbDayOffset($this->day_offset);
+ $copyObj->setDbInstanceId($this->instance_id);
$copyObj->setDbStartTime($this->start_time);
- $copyObj->setDbShowId($this->show_id);
+ $copyObj->setDbLiquidsoapData($this->liquidsoap_data);
$copyObj->setNew(true);
$copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
@@ -823,7 +823,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @return CcShowRebroadcast Clone of current object.
+ * @return CcWebstreamMetadata Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
@@ -842,37 +842,37 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
- * @return CcShowRebroadcastPeer
+ * @return CcWebstreamMetadataPeer
*/
public function getPeer()
{
if (self::$peer === null) {
- self::$peer = new CcShowRebroadcastPeer();
+ self::$peer = new CcWebstreamMetadataPeer();
}
return self::$peer;
}
/**
- * Declares an association between this object and a CcShow object.
+ * Declares an association between this object and a CcSchedule object.
*
- * @param CcShow $v
- * @return CcShowRebroadcast The current object (for fluent API support)
+ * @param CcSchedule $v
+ * @return CcWebstreamMetadata The current object (for fluent API support)
* @throws PropelException
*/
- public function setCcShow(CcShow $v = null)
+ public function setCcSchedule(CcSchedule $v = null)
{
if ($v === null) {
- $this->setDbShowId(NULL);
+ $this->setDbInstanceId(NULL);
} else {
- $this->setDbShowId($v->getDbId());
+ $this->setDbInstanceId($v->getDbId());
}
- $this->aCcShow = $v;
+ $this->aCcSchedule = $v;
// Add binding for other direction of this n:n relationship.
- // If this object has already been added to the CcShow object, it will not be re-added.
+ // If this object has already been added to the CcSchedule object, it will not be re-added.
if ($v !== null) {
- $v->addCcShowRebroadcast($this);
+ $v->addCcWebstreamMetadata($this);
}
return $this;
@@ -880,25 +880,25 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
/**
- * Get the associated CcShow object
+ * Get the associated CcSchedule object
*
* @param PropelPDO Optional Connection object.
- * @return CcShow The associated CcShow object.
+ * @return CcSchedule The associated CcSchedule object.
* @throws PropelException
*/
- public function getCcShow(PropelPDO $con = null)
+ public function getCcSchedule(PropelPDO $con = null)
{
- if ($this->aCcShow === null && ($this->show_id !== null)) {
- $this->aCcShow = CcShowQuery::create()->findPk($this->show_id, $con);
+ if ($this->aCcSchedule === null && ($this->instance_id !== null)) {
+ $this->aCcSchedule = CcScheduleQuery::create()->findPk($this->instance_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->aCcShow->addCcShowRebroadcasts($this);
+ $this->aCcSchedule->addCcWebstreamMetadatas($this);
*/
}
- return $this->aCcShow;
+ return $this->aCcSchedule;
}
/**
@@ -907,9 +907,9 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
public function clear()
{
$this->id = null;
- $this->day_offset = null;
+ $this->instance_id = null;
$this->start_time = null;
- $this->show_id = null;
+ $this->liquidsoap_data = null;
$this->alreadyInSave = false;
$this->alreadyInValidation = false;
$this->clearAllReferences();
@@ -932,7 +932,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
if ($deep) {
} // if ($deep)
- $this->aCcShow = null;
+ $this->aCcSchedule = null;
}
/**
@@ -954,4 +954,4 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
throw new PropelException('Call to undefined method: ' . $name);
}
-} // BaseCcShowRebroadcast
+} // BaseCcWebstreamMetadata
diff --git a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcShowSchedulePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadataPeer.php
similarity index 70%
rename from install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcShowSchedulePeer.php
rename to airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadataPeer.php
index 677ff8447..445e9793c 100644
--- a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcShowSchedulePeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadataPeer.php
@@ -2,28 +2,28 @@
/**
- * Base static class for performing query and update operations on the 'cc_show_schedule' table.
+ * Base static class for performing query and update operations on the 'cc_webstream_metadata' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcShowSchedulePeer {
+abstract class BaseCcWebstreamMetadataPeer {
/** the default database name for this class */
const DATABASE_NAME = 'airtime';
/** the table name for this class */
- const TABLE_NAME = 'cc_show_schedule';
+ const TABLE_NAME = 'cc_webstream_metadata';
/** the related Propel class for this table */
- const OM_CLASS = 'CcShowSchedule';
+ const OM_CLASS = 'CcWebstreamMetadata';
/** A class that can be returned by this peer. */
- const CLASS_DEFAULT = 'airtime.CcShowSchedule';
+ const CLASS_DEFAULT = 'airtime.CcWebstreamMetadata';
/** the related TableMap class for this table */
- const TM_CLASS = 'CcShowScheduleTableMap';
+ const TM_CLASS = 'CcWebstreamMetadataTableMap';
/** The total number of columns. */
const NUM_COLUMNS = 4;
@@ -32,22 +32,22 @@ abstract class BaseCcShowSchedulePeer {
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the ID field */
- const ID = 'cc_show_schedule.ID';
+ const ID = 'cc_webstream_metadata.ID';
/** the column name for the INSTANCE_ID field */
- const INSTANCE_ID = 'cc_show_schedule.INSTANCE_ID';
+ const INSTANCE_ID = 'cc_webstream_metadata.INSTANCE_ID';
- /** the column name for the POSITION field */
- const POSITION = 'cc_show_schedule.POSITION';
+ /** the column name for the START_TIME field */
+ const START_TIME = 'cc_webstream_metadata.START_TIME';
- /** the column name for the GROUP_ID field */
- const GROUP_ID = 'cc_show_schedule.GROUP_ID';
+ /** the column name for the LIQUIDSOAP_DATA field */
+ const LIQUIDSOAP_DATA = 'cc_webstream_metadata.LIQUIDSOAP_DATA';
/**
- * An identiy map to hold any loaded instances of CcShowSchedule objects.
+ * An identiy map to hold any loaded instances of CcWebstreamMetadata objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
* queries.
- * @var array CcShowSchedule[]
+ * @var array CcWebstreamMetadata[]
*/
public static $instances = array();
@@ -59,11 +59,11 @@ abstract class BaseCcShowSchedulePeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbInstanceId', 'DbPosition', 'DbGroupId', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbInstanceId', 'dbPosition', 'dbGroupId', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::INSTANCE_ID, self::POSITION, self::GROUP_ID, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'INSTANCE_ID', 'POSITION', 'GROUP_ID', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'instance_id', 'position', 'group_id', ),
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbInstanceId', 'DbStartTime', 'DbLiquidsoapData', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbInstanceId', 'dbStartTime', 'dbLiquidsoapData', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::INSTANCE_ID, self::START_TIME, self::LIQUIDSOAP_DATA, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'INSTANCE_ID', 'START_TIME', 'LIQUIDSOAP_DATA', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'instance_id', 'start_time', 'liquidsoap_data', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
@@ -74,11 +74,11 @@ abstract class BaseCcShowSchedulePeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbInstanceId' => 1, 'DbPosition' => 2, 'DbGroupId' => 3, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbInstanceId' => 1, 'dbPosition' => 2, 'dbGroupId' => 3, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::INSTANCE_ID => 1, self::POSITION => 2, self::GROUP_ID => 3, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'INSTANCE_ID' => 1, 'POSITION' => 2, 'GROUP_ID' => 3, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'instance_id' => 1, 'position' => 2, 'group_id' => 3, ),
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbInstanceId' => 1, 'DbStartTime' => 2, 'DbLiquidsoapData' => 3, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbInstanceId' => 1, 'dbStartTime' => 2, 'dbLiquidsoapData' => 3, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::INSTANCE_ID => 1, self::START_TIME => 2, self::LIQUIDSOAP_DATA => 3, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'INSTANCE_ID' => 1, 'START_TIME' => 2, 'LIQUIDSOAP_DATA' => 3, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'instance_id' => 1, 'start_time' => 2, 'liquidsoap_data' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
@@ -128,12 +128,12 @@ abstract class BaseCcShowSchedulePeer {
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
*
* @param string $alias The alias for the current table.
- * @param string $column The column name for current table. (i.e. CcShowSchedulePeer::COLUMN_NAME).
+ * @param string $column The column name for current table. (i.e. CcWebstreamMetadataPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
- return str_replace(CcShowSchedulePeer::TABLE_NAME.'.', $alias.'.', $column);
+ return str_replace(CcWebstreamMetadataPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -151,15 +151,15 @@ abstract class BaseCcShowSchedulePeer {
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
- $criteria->addSelectColumn(CcShowSchedulePeer::ID);
- $criteria->addSelectColumn(CcShowSchedulePeer::INSTANCE_ID);
- $criteria->addSelectColumn(CcShowSchedulePeer::POSITION);
- $criteria->addSelectColumn(CcShowSchedulePeer::GROUP_ID);
+ $criteria->addSelectColumn(CcWebstreamMetadataPeer::ID);
+ $criteria->addSelectColumn(CcWebstreamMetadataPeer::INSTANCE_ID);
+ $criteria->addSelectColumn(CcWebstreamMetadataPeer::START_TIME);
+ $criteria->addSelectColumn(CcWebstreamMetadataPeer::LIQUIDSOAP_DATA);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.INSTANCE_ID');
- $criteria->addSelectColumn($alias . '.POSITION');
- $criteria->addSelectColumn($alias . '.GROUP_ID');
+ $criteria->addSelectColumn($alias . '.START_TIME');
+ $criteria->addSelectColumn($alias . '.LIQUIDSOAP_DATA');
}
}
@@ -179,21 +179,21 @@ abstract class BaseCcShowSchedulePeer {
// 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(CcShowSchedulePeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcWebstreamMetadataPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcShowSchedulePeer::addSelectColumns($criteria);
+ CcWebstreamMetadataPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
$criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// BasePeer returns a PDOStatement
$stmt = BasePeer::doCount($criteria, $con);
@@ -211,7 +211,7 @@ abstract class BaseCcShowSchedulePeer {
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param PropelPDO $con
- * @return CcShowSchedule
+ * @return CcWebstreamMetadata
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -219,7 +219,7 @@ abstract class BaseCcShowSchedulePeer {
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
- $objects = CcShowSchedulePeer::doSelect($critcopy, $con);
+ $objects = CcWebstreamMetadataPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -236,7 +236,7 @@ abstract class BaseCcShowSchedulePeer {
*/
public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
- return CcShowSchedulePeer::populateObjects(CcShowSchedulePeer::doSelectStmt($criteria, $con));
+ return CcWebstreamMetadataPeer::populateObjects(CcWebstreamMetadataPeer::doSelectStmt($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
@@ -254,12 +254,12 @@ abstract class BaseCcShowSchedulePeer {
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
if (!$criteria->hasSelectClause()) {
$criteria = clone $criteria;
- CcShowSchedulePeer::addSelectColumns($criteria);
+ CcWebstreamMetadataPeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -277,10 +277,10 @@ abstract class BaseCcShowSchedulePeer {
* to the cache in order to ensure that the same objects are always returned by doSelect*()
* and retrieveByPK*() calls.
*
- * @param CcShowSchedule $value A CcShowSchedule object.
+ * @param CcWebstreamMetadata $value A CcWebstreamMetadata object.
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
*/
- public static function addInstanceToPool(CcShowSchedule $obj, $key = null)
+ public static function addInstanceToPool(CcWebstreamMetadata $obj, $key = null)
{
if (Propel::isInstancePoolingEnabled()) {
if ($key === null) {
@@ -298,18 +298,18 @@ abstract class BaseCcShowSchedulePeer {
* methods in your stub classes -- you may need to explicitly remove objects
* from the cache in order to prevent returning objects that no longer exist.
*
- * @param mixed $value A CcShowSchedule object or a primary key value.
+ * @param mixed $value A CcWebstreamMetadata object or a primary key value.
*/
public static function removeInstanceFromPool($value)
{
if (Propel::isInstancePoolingEnabled() && $value !== null) {
- if (is_object($value) && $value instanceof CcShowSchedule) {
+ if (is_object($value) && $value instanceof CcWebstreamMetadata) {
$key = (string) $value->getDbId();
} elseif (is_scalar($value)) {
// assume we've been passed a primary key
$key = (string) $value;
} else {
- $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcShowSchedule object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
+ $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcWebstreamMetadata object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
throw $e;
}
@@ -324,7 +324,7 @@ abstract class BaseCcShowSchedulePeer {
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param string $key The key (@see getPrimaryKeyHash()) for this instance.
- * @return CcShowSchedule Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
+ * @return CcWebstreamMetadata Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
* @see getPrimaryKeyHash()
*/
public static function getInstanceFromPool($key)
@@ -348,7 +348,7 @@ abstract class BaseCcShowSchedulePeer {
}
/**
- * Method to invalidate the instance pool of all tables related to cc_show_schedule
+ * Method to invalidate the instance pool of all tables related to cc_webstream_metadata
* by a foreign key with ON DELETE CASCADE
*/
public static function clearRelatedInstancePool()
@@ -400,11 +400,11 @@ abstract class BaseCcShowSchedulePeer {
$results = array();
// set the class once to avoid overhead in the loop
- $cls = CcShowSchedulePeer::getOMClass(false);
+ $cls = CcWebstreamMetadataPeer::getOMClass(false);
// populate the object(s)
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key = CcShowSchedulePeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj = CcShowSchedulePeer::getInstanceFromPool($key))) {
+ $key = CcWebstreamMetadataPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj = CcWebstreamMetadataPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
@@ -413,7 +413,7 @@ abstract class BaseCcShowSchedulePeer {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
- CcShowSchedulePeer::addInstanceToPool($obj, $key);
+ CcWebstreamMetadataPeer::addInstanceToPool($obj, $key);
} // if key exists
}
$stmt->closeCursor();
@@ -426,27 +426,27 @@ abstract class BaseCcShowSchedulePeer {
* @param int $startcol The 0-based offset for reading from the resultset row.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
- * @return array (CcShowSchedule object, last column rank)
+ * @return array (CcWebstreamMetadata object, last column rank)
*/
public static function populateObject($row, $startcol = 0)
{
- $key = CcShowSchedulePeer::getPrimaryKeyHashFromRow($row, $startcol);
- if (null !== ($obj = CcShowSchedulePeer::getInstanceFromPool($key))) {
+ $key = CcWebstreamMetadataPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if (null !== ($obj = CcWebstreamMetadataPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $startcol, true); // rehydrate
- $col = $startcol + CcShowSchedulePeer::NUM_COLUMNS;
+ $col = $startcol + CcWebstreamMetadataPeer::NUM_COLUMNS;
} else {
- $cls = CcShowSchedulePeer::OM_CLASS;
+ $cls = CcWebstreamMetadataPeer::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $startcol);
- CcShowSchedulePeer::addInstanceToPool($obj, $key);
+ CcWebstreamMetadataPeer::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
/**
- * Returns the number of rows matching criteria, joining the related CcShowInstances table
+ * Returns the number of rows matching criteria, joining the related CcSchedule table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@@ -454,7 +454,7 @@ abstract class BaseCcShowSchedulePeer {
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
- public static function doCountJoinCcShowInstances(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doCountJoinCcSchedule(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;
@@ -462,14 +462,14 @@ abstract class BaseCcShowSchedulePeer {
// 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(CcShowSchedulePeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcWebstreamMetadataPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcShowSchedulePeer::addSelectColumns($criteria);
+ CcWebstreamMetadataPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -478,10 +478,10 @@ abstract class BaseCcShowSchedulePeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcWebstreamMetadataPeer::INSTANCE_ID, CcSchedulePeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -496,15 +496,15 @@ abstract class BaseCcShowSchedulePeer {
/**
- * Selects a collection of CcShowSchedule objects pre-filled with their CcShowInstances objects.
+ * Selects a collection of CcWebstreamMetadata objects pre-filled with their CcSchedule 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 CcShowSchedule objects.
+ * @return array Array of CcWebstreamMetadata objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
- public static function doSelectJoinCcShowInstances(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ public static function doSelectJoinCcSchedule(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
@@ -513,44 +513,44 @@ abstract class BaseCcShowSchedulePeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcShowSchedulePeer::addSelectColumns($criteria);
- $startcol = (CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
- CcShowInstancesPeer::addSelectColumns($criteria);
+ CcWebstreamMetadataPeer::addSelectColumns($criteria);
+ $startcol = (CcWebstreamMetadataPeer::NUM_COLUMNS - CcWebstreamMetadataPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcSchedulePeer::addSelectColumns($criteria);
- $criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcWebstreamMetadataPeer::INSTANCE_ID, CcSchedulePeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcShowSchedulePeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcShowSchedulePeer::getInstanceFromPool($key1))) {
+ $key1 = CcWebstreamMetadataPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcWebstreamMetadataPeer::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 = CcShowSchedulePeer::getOMClass(false);
+ $cls = CcWebstreamMetadataPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcShowSchedulePeer::addInstanceToPool($obj1, $key1);
+ CcWebstreamMetadataPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
- $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ $key2 = CcSchedulePeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
- $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2);
+ $obj2 = CcSchedulePeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcShowInstancesPeer::getOMClass(false);
+ $cls = CcSchedulePeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
- CcShowInstancesPeer::addInstanceToPool($obj2, $key2);
+ CcSchedulePeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
- // Add the $obj1 (CcShowSchedule) to $obj2 (CcShowInstances)
- $obj2->addCcShowSchedule($obj1);
+ // Add the $obj1 (CcWebstreamMetadata) to $obj2 (CcSchedule)
+ $obj2->addCcWebstreamMetadata($obj1);
} // if joined row was not null
@@ -578,14 +578,14 @@ abstract class BaseCcShowSchedulePeer {
// 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(CcShowSchedulePeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcWebstreamMetadataPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcShowSchedulePeer::addSelectColumns($criteria);
+ CcWebstreamMetadataPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
@@ -594,10 +594,10 @@ abstract class BaseCcShowSchedulePeer {
$criteria->setDbName(self::DATABASE_NAME);
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcWebstreamMetadataPeer::INSTANCE_ID, CcSchedulePeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
@@ -611,12 +611,12 @@ abstract class BaseCcShowSchedulePeer {
}
/**
- * Selects a collection of CcShowSchedule objects pre-filled with all related objects.
+ * Selects a collection of CcWebstreamMetadata objects pre-filled with all related 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 CcShowSchedule objects.
+ * @return array Array of CcWebstreamMetadata objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -629,47 +629,47 @@ abstract class BaseCcShowSchedulePeer {
$criteria->setDbName(self::DATABASE_NAME);
}
- CcShowSchedulePeer::addSelectColumns($criteria);
- $startcol2 = (CcShowSchedulePeer::NUM_COLUMNS - CcShowSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamMetadataPeer::addSelectColumns($criteria);
+ $startcol2 = (CcWebstreamMetadataPeer::NUM_COLUMNS - CcWebstreamMetadataPeer::NUM_LAZY_LOAD_COLUMNS);
- CcShowInstancesPeer::addSelectColumns($criteria);
- $startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcSchedulePeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
- $criteria->addJoin(CcShowSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcWebstreamMetadataPeer::INSTANCE_ID, CcSchedulePeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key1 = CcShowSchedulePeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj1 = CcShowSchedulePeer::getInstanceFromPool($key1))) {
+ $key1 = CcWebstreamMetadataPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcWebstreamMetadataPeer::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 = CcShowSchedulePeer::getOMClass(false);
+ $cls = CcWebstreamMetadataPeer::getOMClass(false);
$obj1 = new $cls();
$obj1->hydrate($row);
- CcShowSchedulePeer::addInstanceToPool($obj1, $key1);
+ CcWebstreamMetadataPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
- // Add objects for joined CcShowInstances rows
+ // Add objects for joined CcSchedule rows
- $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ $key2 = CcSchedulePeer::getPrimaryKeyHashFromRow($row, $startcol2);
if ($key2 !== null) {
- $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2);
+ $obj2 = CcSchedulePeer::getInstanceFromPool($key2);
if (!$obj2) {
- $cls = CcShowInstancesPeer::getOMClass(false);
+ $cls = CcSchedulePeer::getOMClass(false);
$obj2 = new $cls();
$obj2->hydrate($row, $startcol2);
- CcShowInstancesPeer::addInstanceToPool($obj2, $key2);
+ CcSchedulePeer::addInstanceToPool($obj2, $key2);
} // if obj2 loaded
- // Add the $obj1 (CcShowSchedule) to the collection in $obj2 (CcShowInstances)
- $obj2->addCcShowSchedule($obj1);
+ // Add the $obj1 (CcWebstreamMetadata) to the collection in $obj2 (CcSchedule)
+ $obj2->addCcWebstreamMetadata($obj1);
} // if joined row not null
$results[] = $obj1;
@@ -695,10 +695,10 @@ abstract class BaseCcShowSchedulePeer {
*/
public static function buildTableMap()
{
- $dbMap = Propel::getDatabaseMap(BaseCcShowSchedulePeer::DATABASE_NAME);
- if (!$dbMap->hasTable(BaseCcShowSchedulePeer::TABLE_NAME))
+ $dbMap = Propel::getDatabaseMap(BaseCcWebstreamMetadataPeer::DATABASE_NAME);
+ if (!$dbMap->hasTable(BaseCcWebstreamMetadataPeer::TABLE_NAME))
{
- $dbMap->addTableObject(new CcShowScheduleTableMap());
+ $dbMap->addTableObject(new CcWebstreamMetadataTableMap());
}
}
@@ -715,13 +715,13 @@ abstract class BaseCcShowSchedulePeer {
*/
public static function getOMClass($withPrefix = true)
{
- return $withPrefix ? CcShowSchedulePeer::CLASS_DEFAULT : CcShowSchedulePeer::OM_CLASS;
+ return $withPrefix ? CcWebstreamMetadataPeer::CLASS_DEFAULT : CcWebstreamMetadataPeer::OM_CLASS;
}
/**
- * Method perform an INSERT on the database, given a CcShowSchedule or Criteria object.
+ * Method perform an INSERT on the database, given a CcWebstreamMetadata or Criteria object.
*
- * @param mixed $values Criteria or CcShowSchedule object containing data that is used to create the INSERT statement.
+ * @param mixed $values Criteria or CcWebstreamMetadata object containing data that is used to create the INSERT statement.
* @param PropelPDO $con the PropelPDO connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
@@ -730,17 +730,17 @@ abstract class BaseCcShowSchedulePeer {
public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
- $criteria = $values->buildCriteria(); // build Criteria from CcShowSchedule object
+ $criteria = $values->buildCriteria(); // build Criteria from CcWebstreamMetadata object
}
- if ($criteria->containsKey(CcShowSchedulePeer::ID) && $criteria->keyContainsValue(CcShowSchedulePeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcShowSchedulePeer::ID.')');
+ if ($criteria->containsKey(CcWebstreamMetadataPeer::ID) && $criteria->keyContainsValue(CcWebstreamMetadataPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcWebstreamMetadataPeer::ID.')');
}
@@ -762,9 +762,9 @@ abstract class BaseCcShowSchedulePeer {
}
/**
- * Method perform an UPDATE on the database, given a CcShowSchedule or Criteria object.
+ * Method perform an UPDATE on the database, given a CcWebstreamMetadata or Criteria object.
*
- * @param mixed $values Criteria or CcShowSchedule object containing data that is used to create the UPDATE statement.
+ * @param mixed $values Criteria or CcWebstreamMetadata object containing data that is used to create the UPDATE statement.
* @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
@@ -773,7 +773,7 @@ abstract class BaseCcShowSchedulePeer {
public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
@@ -781,15 +781,15 @@ abstract class BaseCcShowSchedulePeer {
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
- $comparison = $criteria->getComparison(CcShowSchedulePeer::ID);
- $value = $criteria->remove(CcShowSchedulePeer::ID);
+ $comparison = $criteria->getComparison(CcWebstreamMetadataPeer::ID);
+ $value = $criteria->remove(CcWebstreamMetadataPeer::ID);
if ($value) {
- $selectCriteria->add(CcShowSchedulePeer::ID, $value, $comparison);
+ $selectCriteria->add(CcWebstreamMetadataPeer::ID, $value, $comparison);
} else {
- $selectCriteria->setPrimaryTableName(CcShowSchedulePeer::TABLE_NAME);
+ $selectCriteria->setPrimaryTableName(CcWebstreamMetadataPeer::TABLE_NAME);
}
- } else { // $values is CcShowSchedule object
+ } else { // $values is CcWebstreamMetadata object
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
@@ -801,26 +801,26 @@ abstract class BaseCcShowSchedulePeer {
}
/**
- * Method to DELETE all rows from the cc_show_schedule table.
+ * Method to DELETE all rows from the cc_webstream_metadata table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
- $affectedRows += BasePeer::doDeleteAll(CcShowSchedulePeer::TABLE_NAME, $con, CcShowSchedulePeer::DATABASE_NAME);
+ $affectedRows += BasePeer::doDeleteAll(CcWebstreamMetadataPeer::TABLE_NAME, $con, CcWebstreamMetadataPeer::DATABASE_NAME);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
- CcShowSchedulePeer::clearInstancePool();
- CcShowSchedulePeer::clearRelatedInstancePool();
+ CcWebstreamMetadataPeer::clearInstancePool();
+ CcWebstreamMetadataPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -830,9 +830,9 @@ abstract class BaseCcShowSchedulePeer {
}
/**
- * Method perform a DELETE on the database, given a CcShowSchedule or Criteria object OR a primary key value.
+ * Method perform a DELETE on the database, given a CcWebstreamMetadata or Criteria object OR a primary key value.
*
- * @param mixed $values Criteria or CcShowSchedule object or primary key or array of primary keys
+ * @param mixed $values Criteria or CcWebstreamMetadata object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
@@ -843,27 +843,27 @@ abstract class BaseCcShowSchedulePeer {
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
- CcShowSchedulePeer::clearInstancePool();
+ CcWebstreamMetadataPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
- } elseif ($values instanceof CcShowSchedule) { // it's a model object
+ } elseif ($values instanceof CcWebstreamMetadata) { // it's a model object
// invalidate the cache for this single object
- CcShowSchedulePeer::removeInstanceFromPool($values);
+ CcWebstreamMetadataPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(self::DATABASE_NAME);
- $criteria->add(CcShowSchedulePeer::ID, (array) $values, Criteria::IN);
+ $criteria->add(CcWebstreamMetadataPeer::ID, (array) $values, Criteria::IN);
// invalidate the cache for this object(s)
foreach ((array) $values as $singleval) {
- CcShowSchedulePeer::removeInstanceFromPool($singleval);
+ CcWebstreamMetadataPeer::removeInstanceFromPool($singleval);
}
}
@@ -878,7 +878,7 @@ abstract class BaseCcShowSchedulePeer {
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
- CcShowSchedulePeer::clearRelatedInstancePool();
+ CcWebstreamMetadataPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -888,24 +888,24 @@ abstract class BaseCcShowSchedulePeer {
}
/**
- * Validates all modified columns of given CcShowSchedule object.
+ * Validates all modified columns of given CcWebstreamMetadata object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
- * @param CcShowSchedule $obj The object to validate.
+ * @param CcWebstreamMetadata $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
- public static function doValidate(CcShowSchedule $obj, $cols = null)
+ public static function doValidate(CcWebstreamMetadata $obj, $cols = null)
{
$columns = array();
if ($cols) {
- $dbMap = Propel::getDatabaseMap(CcShowSchedulePeer::DATABASE_NAME);
- $tableMap = $dbMap->getTable(CcShowSchedulePeer::TABLE_NAME);
+ $dbMap = Propel::getDatabaseMap(CcWebstreamMetadataPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(CcWebstreamMetadataPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -921,7 +921,7 @@ abstract class BaseCcShowSchedulePeer {
}
- return BasePeer::doValidate(CcShowSchedulePeer::DATABASE_NAME, CcShowSchedulePeer::TABLE_NAME, $columns);
+ return BasePeer::doValidate(CcWebstreamMetadataPeer::DATABASE_NAME, CcWebstreamMetadataPeer::TABLE_NAME, $columns);
}
/**
@@ -929,23 +929,23 @@ abstract class BaseCcShowSchedulePeer {
*
* @param int $pk the primary key.
* @param PropelPDO $con the connection to use
- * @return CcShowSchedule
+ * @return CcWebstreamMetadata
*/
public static function retrieveByPK($pk, PropelPDO $con = null)
{
- if (null !== ($obj = CcShowSchedulePeer::getInstanceFromPool((string) $pk))) {
+ if (null !== ($obj = CcWebstreamMetadataPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria = new Criteria(CcShowSchedulePeer::DATABASE_NAME);
- $criteria->add(CcShowSchedulePeer::ID, $pk);
+ $criteria = new Criteria(CcWebstreamMetadataPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamMetadataPeer::ID, $pk);
- $v = CcShowSchedulePeer::doSelect($criteria, $con);
+ $v = CcWebstreamMetadataPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -961,23 +961,23 @@ abstract class BaseCcShowSchedulePeer {
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcShowSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamMetadataPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
- $criteria = new Criteria(CcShowSchedulePeer::DATABASE_NAME);
- $criteria->add(CcShowSchedulePeer::ID, $pks, Criteria::IN);
- $objs = CcShowSchedulePeer::doSelect($criteria, $con);
+ $criteria = new Criteria(CcWebstreamMetadataPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamMetadataPeer::ID, $pks, Criteria::IN);
+ $objs = CcWebstreamMetadataPeer::doSelect($criteria, $con);
}
return $objs;
}
-} // BaseCcShowSchedulePeer
+} // BaseCcWebstreamMetadataPeer
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
-BaseCcShowSchedulePeer::buildTableMap();
+BaseCcWebstreamMetadataPeer::buildTableMap();
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadataQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadataQuery.php
new file mode 100644
index 000000000..ba5bfcb12
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamMetadataQuery.php
@@ -0,0 +1,329 @@
+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
+ *
+ * $obj = $c->findPk(12, $con);
+ *
+ * @param mixed $key Primary key to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return CcWebstreamMetadata|array|mixed the result, formatted by the current formatter
+ */
+ public function findPk($key, $con = null)
+ {
+ if ((null !== ($obj = CcWebstreamMetadataPeer::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
+ *
+ * $objs = $c->findPks(array(12, 56, 832), $con);
+ *
+ * @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 CcWebstreamMetadataQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKey($key)
+ {
+ return $this->addUsingAlias(CcWebstreamMetadataPeer::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 CcWebstreamMetadataQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKeys($keys)
+ {
+ return $this->addUsingAlias(CcWebstreamMetadataPeer::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 CcWebstreamMetadataQuery 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(CcWebstreamMetadataPeer::ID, $dbId, $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 CcWebstreamMetadataQuery 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(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbInstanceId['max'])) {
+ $this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId, $comparison);
+ }
+
+ /**
+ * Filter the query on the start_time column
+ *
+ * @param string|array $dbStartTime 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 CcWebstreamMetadataQuery The current query, for fluid interface
+ */
+ public function filterByDbStartTime($dbStartTime = null, $comparison = null)
+ {
+ if (is_array($dbStartTime)) {
+ $useMinMax = false;
+ if (isset($dbStartTime['min'])) {
+ $this->addUsingAlias(CcWebstreamMetadataPeer::START_TIME, $dbStartTime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbStartTime['max'])) {
+ $this->addUsingAlias(CcWebstreamMetadataPeer::START_TIME, $dbStartTime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamMetadataPeer::START_TIME, $dbStartTime, $comparison);
+ }
+
+ /**
+ * Filter the query on the liquidsoap_data column
+ *
+ * @param string $dbLiquidsoapData 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 CcWebstreamMetadataQuery The current query, for fluid interface
+ */
+ public function filterByDbLiquidsoapData($dbLiquidsoapData = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbLiquidsoapData)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbLiquidsoapData)) {
+ $dbLiquidsoapData = str_replace('*', '%', $dbLiquidsoapData);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamMetadataPeer::LIQUIDSOAP_DATA, $dbLiquidsoapData, $comparison);
+ }
+
+ /**
+ * Filter the query by a related CcSchedule object
+ *
+ * @param CcSchedule $ccSchedule the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamMetadataQuery The current query, for fluid interface
+ */
+ public function filterByCcSchedule($ccSchedule, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $ccSchedule->getDbId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcSchedule relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcWebstreamMetadataQuery The current query, for fluid interface
+ */
+ public function joinCcSchedule($relationAlias = '', $joinType = Criteria::INNER_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcSchedule');
+
+ // 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, 'CcSchedule');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcSchedule relation CcSchedule 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 CcScheduleQuery A secondary query class using the current class as primary query
+ */
+ public function useCcScheduleQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
+ {
+ return $this
+ ->joinCcSchedule($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery');
+ }
+
+ /**
+ * Exclude object from result
+ *
+ * @param CcWebstreamMetadata $ccWebstreamMetadata Object to remove from the list of results
+ *
+ * @return CcWebstreamMetadataQuery The current query, for fluid interface
+ */
+ public function prune($ccWebstreamMetadata = null)
+ {
+ if ($ccWebstreamMetadata) {
+ $this->addUsingAlias(CcWebstreamMetadataPeer::ID, $ccWebstreamMetadata->getDbId(), Criteria::NOT_EQUAL);
+ }
+
+ return $this;
+ }
+
+} // BaseCcWebstreamMetadataQuery
diff --git a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcMusicDirsPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamPeer.php
similarity index 70%
rename from install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcMusicDirsPeer.php
rename to airtime_mvc/application/models/airtime/om/BaseCcWebstreamPeer.php
index 5d06e270d..c1b2f7221 100644
--- a/install_minimal/upgrades/airtime-1.9.0/propel/airtime/om/BaseCcMusicDirsPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamPeer.php
@@ -2,49 +2,70 @@
/**
- * Base static class for performing query and update operations on the 'cc_music_dirs' table.
+ * Base static class for performing query and update operations on the 'cc_webstream' table.
*
*
*
* @package propel.generator.airtime.om
*/
-abstract class BaseCcMusicDirsPeer {
+abstract class BaseCcWebstreamPeer {
/** the default database name for this class */
const DATABASE_NAME = 'airtime';
/** the table name for this class */
- const TABLE_NAME = 'cc_music_dirs';
+ const TABLE_NAME = 'cc_webstream';
/** the related Propel class for this table */
- const OM_CLASS = 'CcMusicDirs';
+ const OM_CLASS = 'CcWebstream';
/** A class that can be returned by this peer. */
- const CLASS_DEFAULT = 'airtime.CcMusicDirs';
+ const CLASS_DEFAULT = 'airtime.CcWebstream';
/** the related TableMap class for this table */
- const TM_CLASS = 'CcMusicDirsTableMap';
+ const TM_CLASS = 'CcWebstreamTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 3;
+ const NUM_COLUMNS = 10;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the ID field */
- const ID = 'cc_music_dirs.ID';
+ const ID = 'cc_webstream.ID';
- /** the column name for the DIRECTORY field */
- const DIRECTORY = 'cc_music_dirs.DIRECTORY';
+ /** the column name for the NAME field */
+ const NAME = 'cc_webstream.NAME';
- /** the column name for the TYPE field */
- const TYPE = 'cc_music_dirs.TYPE';
+ /** the column name for the DESCRIPTION field */
+ const DESCRIPTION = 'cc_webstream.DESCRIPTION';
+
+ /** the column name for the URL field */
+ const URL = 'cc_webstream.URL';
+
+ /** the column name for the LENGTH field */
+ const LENGTH = 'cc_webstream.LENGTH';
+
+ /** the column name for the CREATOR_ID field */
+ const CREATOR_ID = 'cc_webstream.CREATOR_ID';
+
+ /** the column name for the MTIME field */
+ const MTIME = 'cc_webstream.MTIME';
+
+ /** the column name for the UTIME field */
+ const UTIME = 'cc_webstream.UTIME';
+
+ /** the column name for the LPTIME field */
+ const LPTIME = 'cc_webstream.LPTIME';
+
+ /** the column name for the MIME field */
+ const MIME = 'cc_webstream.MIME';
/**
- * An identiy map to hold any loaded instances of CcMusicDirs objects.
+ * An identiy map to hold any loaded instances of CcWebstream objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
* queries.
- * @var array CcMusicDirs[]
+ * @var array CcWebstream[]
*/
public static $instances = array();
@@ -56,12 +77,12 @@ abstract class BaseCcMusicDirsPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('Id', 'Directory', 'Type', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'directory', 'type', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::DIRECTORY, self::TYPE, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'DIRECTORY', 'TYPE', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'directory', 'type', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbDescription', 'DbUrl', 'DbLength', 'DbCreatorId', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMime', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbDescription', 'dbUrl', 'dbLength', 'dbCreatorId', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMime', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::DESCRIPTION, self::URL, self::LENGTH, self::CREATOR_ID, self::MTIME, self::UTIME, self::LPTIME, self::MIME, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'DESCRIPTION', 'URL', 'LENGTH', 'CREATOR_ID', 'MTIME', 'UTIME', 'LPTIME', 'MIME', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'description', 'url', 'length', 'creator_id', 'mtime', 'utime', 'lptime', 'mime', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
);
/**
@@ -71,12 +92,12 @@ abstract class BaseCcMusicDirsPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Directory' => 1, 'Type' => 2, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'directory' => 1, 'type' => 2, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::DIRECTORY => 1, self::TYPE => 2, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'DIRECTORY' => 1, 'TYPE' => 2, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'directory' => 1, 'type' => 2, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbDescription' => 2, 'DbUrl' => 3, 'DbLength' => 4, 'DbCreatorId' => 5, 'DbMtime' => 6, 'DbUtime' => 7, 'DbLPtime' => 8, 'DbMime' => 9, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbDescription' => 2, 'dbUrl' => 3, 'dbLength' => 4, 'dbCreatorId' => 5, 'dbMtime' => 6, 'dbUtime' => 7, 'dbLPtime' => 8, 'dbMime' => 9, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::DESCRIPTION => 2, self::URL => 3, self::LENGTH => 4, self::CREATOR_ID => 5, self::MTIME => 6, self::UTIME => 7, self::LPTIME => 8, self::MIME => 9, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'DESCRIPTION' => 2, 'URL' => 3, 'LENGTH' => 4, 'CREATOR_ID' => 5, 'MTIME' => 6, 'UTIME' => 7, 'LPTIME' => 8, 'MIME' => 9, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'description' => 2, 'url' => 3, 'length' => 4, 'creator_id' => 5, 'mtime' => 6, 'utime' => 7, 'lptime' => 8, 'mime' => 9, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
);
/**
@@ -125,12 +146,12 @@ abstract class BaseCcMusicDirsPeer {
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
*
* @param string $alias The alias for the current table.
- * @param string $column The column name for current table. (i.e. CcMusicDirsPeer::COLUMN_NAME).
+ * @param string $column The column name for current table. (i.e. CcWebstreamPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
- return str_replace(CcMusicDirsPeer::TABLE_NAME.'.', $alias.'.', $column);
+ return str_replace(CcWebstreamPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -148,13 +169,27 @@ abstract class BaseCcMusicDirsPeer {
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
- $criteria->addSelectColumn(CcMusicDirsPeer::ID);
- $criteria->addSelectColumn(CcMusicDirsPeer::DIRECTORY);
- $criteria->addSelectColumn(CcMusicDirsPeer::TYPE);
+ $criteria->addSelectColumn(CcWebstreamPeer::ID);
+ $criteria->addSelectColumn(CcWebstreamPeer::NAME);
+ $criteria->addSelectColumn(CcWebstreamPeer::DESCRIPTION);
+ $criteria->addSelectColumn(CcWebstreamPeer::URL);
+ $criteria->addSelectColumn(CcWebstreamPeer::LENGTH);
+ $criteria->addSelectColumn(CcWebstreamPeer::CREATOR_ID);
+ $criteria->addSelectColumn(CcWebstreamPeer::MTIME);
+ $criteria->addSelectColumn(CcWebstreamPeer::UTIME);
+ $criteria->addSelectColumn(CcWebstreamPeer::LPTIME);
+ $criteria->addSelectColumn(CcWebstreamPeer::MIME);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.DIRECTORY');
- $criteria->addSelectColumn($alias . '.TYPE');
+ $criteria->addSelectColumn($alias . '.NAME');
+ $criteria->addSelectColumn($alias . '.DESCRIPTION');
+ $criteria->addSelectColumn($alias . '.URL');
+ $criteria->addSelectColumn($alias . '.LENGTH');
+ $criteria->addSelectColumn($alias . '.CREATOR_ID');
+ $criteria->addSelectColumn($alias . '.MTIME');
+ $criteria->addSelectColumn($alias . '.UTIME');
+ $criteria->addSelectColumn($alias . '.LPTIME');
+ $criteria->addSelectColumn($alias . '.MIME');
}
}
@@ -174,21 +209,21 @@ abstract class BaseCcMusicDirsPeer {
// 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(CcMusicDirsPeer::TABLE_NAME);
+ $criteria->setPrimaryTableName(CcWebstreamPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
- CcMusicDirsPeer::addSelectColumns($criteria);
+ CcWebstreamPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
$criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
// BasePeer returns a PDOStatement
$stmt = BasePeer::doCount($criteria, $con);
@@ -206,7 +241,7 @@ abstract class BaseCcMusicDirsPeer {
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param PropelPDO $con
- * @return CcMusicDirs
+ * @return CcWebstream
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -214,7 +249,7 @@ abstract class BaseCcMusicDirsPeer {
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
- $objects = CcMusicDirsPeer::doSelect($critcopy, $con);
+ $objects = CcWebstreamPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -231,7 +266,7 @@ abstract class BaseCcMusicDirsPeer {
*/
public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
- return CcMusicDirsPeer::populateObjects(CcMusicDirsPeer::doSelectStmt($criteria, $con));
+ return CcWebstreamPeer::populateObjects(CcWebstreamPeer::doSelectStmt($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
@@ -249,12 +284,12 @@ abstract class BaseCcMusicDirsPeer {
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
if (!$criteria->hasSelectClause()) {
$criteria = clone $criteria;
- CcMusicDirsPeer::addSelectColumns($criteria);
+ CcWebstreamPeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -272,14 +307,14 @@ abstract class BaseCcMusicDirsPeer {
* to the cache in order to ensure that the same objects are always returned by doSelect*()
* and retrieveByPK*() calls.
*
- * @param CcMusicDirs $value A CcMusicDirs object.
+ * @param CcWebstream $value A CcWebstream object.
* @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
*/
- public static function addInstanceToPool(CcMusicDirs $obj, $key = null)
+ public static function addInstanceToPool(CcWebstream $obj, $key = null)
{
if (Propel::isInstancePoolingEnabled()) {
if ($key === null) {
- $key = (string) $obj->getId();
+ $key = (string) $obj->getDbId();
} // if key === null
self::$instances[$key] = $obj;
}
@@ -293,18 +328,18 @@ abstract class BaseCcMusicDirsPeer {
* methods in your stub classes -- you may need to explicitly remove objects
* from the cache in order to prevent returning objects that no longer exist.
*
- * @param mixed $value A CcMusicDirs object or a primary key value.
+ * @param mixed $value A CcWebstream object or a primary key value.
*/
public static function removeInstanceFromPool($value)
{
if (Propel::isInstancePoolingEnabled() && $value !== null) {
- if (is_object($value) && $value instanceof CcMusicDirs) {
- $key = (string) $value->getId();
+ if (is_object($value) && $value instanceof CcWebstream) {
+ $key = (string) $value->getDbId();
} elseif (is_scalar($value)) {
// assume we've been passed a primary key
$key = (string) $value;
} else {
- $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcMusicDirs object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
+ $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcWebstream object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
throw $e;
}
@@ -319,7 +354,7 @@ abstract class BaseCcMusicDirsPeer {
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param string $key The key (@see getPrimaryKeyHash()) for this instance.
- * @return CcMusicDirs Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
+ * @return CcWebstream Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
* @see getPrimaryKeyHash()
*/
public static function getInstanceFromPool($key)
@@ -343,14 +378,14 @@ abstract class BaseCcMusicDirsPeer {
}
/**
- * Method to invalidate the instance pool of all tables related to cc_music_dirs
+ * Method to invalidate the instance pool of all tables related to cc_webstream
* by a foreign key with ON DELETE CASCADE
*/
public static function clearRelatedInstancePool()
{
- // Invalidate objects in CcFilesPeer instance pool,
+ // Invalidate objects in CcSchedulePeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
- CcFilesPeer::clearInstancePool();
+ CcSchedulePeer::clearInstancePool();
}
/**
@@ -398,11 +433,11 @@ abstract class BaseCcMusicDirsPeer {
$results = array();
// set the class once to avoid overhead in the loop
- $cls = CcMusicDirsPeer::getOMClass(false);
+ $cls = CcWebstreamPeer::getOMClass(false);
// populate the object(s)
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
- $key = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, 0);
- if (null !== ($obj = CcMusicDirsPeer::getInstanceFromPool($key))) {
+ $key = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj = CcWebstreamPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
@@ -411,7 +446,7 @@ abstract class BaseCcMusicDirsPeer {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
- CcMusicDirsPeer::addInstanceToPool($obj, $key);
+ CcWebstreamPeer::addInstanceToPool($obj, $key);
} // if key exists
}
$stmt->closeCursor();
@@ -424,21 +459,21 @@ abstract class BaseCcMusicDirsPeer {
* @param int $startcol The 0-based offset for reading from the resultset row.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
- * @return array (CcMusicDirs object, last column rank)
+ * @return array (CcWebstream object, last column rank)
*/
public static function populateObject($row, $startcol = 0)
{
- $key = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol);
- if (null !== ($obj = CcMusicDirsPeer::getInstanceFromPool($key))) {
+ $key = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if (null !== ($obj = CcWebstreamPeer::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $startcol, true); // rehydrate
- $col = $startcol + CcMusicDirsPeer::NUM_COLUMNS;
+ $col = $startcol + CcWebstreamPeer::NUM_COLUMNS;
} else {
- $cls = CcMusicDirsPeer::OM_CLASS;
+ $cls = CcWebstreamPeer::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $startcol);
- CcMusicDirsPeer::addInstanceToPool($obj, $key);
+ CcWebstreamPeer::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
@@ -459,10 +494,10 @@ abstract class BaseCcMusicDirsPeer {
*/
public static function buildTableMap()
{
- $dbMap = Propel::getDatabaseMap(BaseCcMusicDirsPeer::DATABASE_NAME);
- if (!$dbMap->hasTable(BaseCcMusicDirsPeer::TABLE_NAME))
+ $dbMap = Propel::getDatabaseMap(BaseCcWebstreamPeer::DATABASE_NAME);
+ if (!$dbMap->hasTable(BaseCcWebstreamPeer::TABLE_NAME))
{
- $dbMap->addTableObject(new CcMusicDirsTableMap());
+ $dbMap->addTableObject(new CcWebstreamTableMap());
}
}
@@ -479,13 +514,13 @@ abstract class BaseCcMusicDirsPeer {
*/
public static function getOMClass($withPrefix = true)
{
- return $withPrefix ? CcMusicDirsPeer::CLASS_DEFAULT : CcMusicDirsPeer::OM_CLASS;
+ return $withPrefix ? CcWebstreamPeer::CLASS_DEFAULT : CcWebstreamPeer::OM_CLASS;
}
/**
- * Method perform an INSERT on the database, given a CcMusicDirs or Criteria object.
+ * Method perform an INSERT on the database, given a CcWebstream or Criteria object.
*
- * @param mixed $values Criteria or CcMusicDirs object containing data that is used to create the INSERT statement.
+ * @param mixed $values Criteria or CcWebstream object containing data that is used to create the INSERT statement.
* @param PropelPDO $con the PropelPDO connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
@@ -494,17 +529,17 @@ abstract class BaseCcMusicDirsPeer {
public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
- $criteria = $values->buildCriteria(); // build Criteria from CcMusicDirs object
+ $criteria = $values->buildCriteria(); // build Criteria from CcWebstream object
}
- if ($criteria->containsKey(CcMusicDirsPeer::ID) && $criteria->keyContainsValue(CcMusicDirsPeer::ID) ) {
- throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcMusicDirsPeer::ID.')');
+ if ($criteria->containsKey(CcWebstreamPeer::ID) && $criteria->keyContainsValue(CcWebstreamPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcWebstreamPeer::ID.')');
}
@@ -526,9 +561,9 @@ abstract class BaseCcMusicDirsPeer {
}
/**
- * Method perform an UPDATE on the database, given a CcMusicDirs or Criteria object.
+ * Method perform an UPDATE on the database, given a CcWebstream or Criteria object.
*
- * @param mixed $values Criteria or CcMusicDirs object containing data that is used to create the UPDATE statement.
+ * @param mixed $values Criteria or CcWebstream object containing data that is used to create the UPDATE statement.
* @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
@@ -537,7 +572,7 @@ abstract class BaseCcMusicDirsPeer {
public static function doUpdate($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
@@ -545,15 +580,15 @@ abstract class BaseCcMusicDirsPeer {
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
- $comparison = $criteria->getComparison(CcMusicDirsPeer::ID);
- $value = $criteria->remove(CcMusicDirsPeer::ID);
+ $comparison = $criteria->getComparison(CcWebstreamPeer::ID);
+ $value = $criteria->remove(CcWebstreamPeer::ID);
if ($value) {
- $selectCriteria->add(CcMusicDirsPeer::ID, $value, $comparison);
+ $selectCriteria->add(CcWebstreamPeer::ID, $value, $comparison);
} else {
- $selectCriteria->setPrimaryTableName(CcMusicDirsPeer::TABLE_NAME);
+ $selectCriteria->setPrimaryTableName(CcWebstreamPeer::TABLE_NAME);
}
- } else { // $values is CcMusicDirs object
+ } else { // $values is CcWebstream object
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
@@ -565,26 +600,26 @@ abstract class BaseCcMusicDirsPeer {
}
/**
- * Method to DELETE all rows from the cc_music_dirs table.
+ * Method to DELETE all rows from the cc_webstream table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->beginTransaction();
- $affectedRows += BasePeer::doDeleteAll(CcMusicDirsPeer::TABLE_NAME, $con, CcMusicDirsPeer::DATABASE_NAME);
+ $affectedRows += BasePeer::doDeleteAll(CcWebstreamPeer::TABLE_NAME, $con, CcWebstreamPeer::DATABASE_NAME);
// Because this db requires some delete cascade/set null emulation, we have to
// clear the cached instance *after* the emulation has happened (since
// instances get re-added by the select statement contained therein).
- CcMusicDirsPeer::clearInstancePool();
- CcMusicDirsPeer::clearRelatedInstancePool();
+ CcWebstreamPeer::clearInstancePool();
+ CcWebstreamPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -594,9 +629,9 @@ abstract class BaseCcMusicDirsPeer {
}
/**
- * Method perform a DELETE on the database, given a CcMusicDirs or Criteria object OR a primary key value.
+ * Method perform a DELETE on the database, given a CcWebstream or Criteria object OR a primary key value.
*
- * @param mixed $values Criteria or CcMusicDirs object or primary key or array of primary keys
+ * @param mixed $values Criteria or CcWebstream object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param PropelPDO $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
@@ -607,27 +642,27 @@ abstract class BaseCcMusicDirsPeer {
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of this type, since we have no
// way of knowing (without running a query) what objects should be invalidated
// from the cache based on this Criteria.
- CcMusicDirsPeer::clearInstancePool();
+ CcWebstreamPeer::clearInstancePool();
// rename for clarity
$criteria = clone $values;
- } elseif ($values instanceof CcMusicDirs) { // it's a model object
+ } elseif ($values instanceof CcWebstream) { // it's a model object
// invalidate the cache for this single object
- CcMusicDirsPeer::removeInstanceFromPool($values);
+ CcWebstreamPeer::removeInstanceFromPool($values);
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(self::DATABASE_NAME);
- $criteria->add(CcMusicDirsPeer::ID, (array) $values, Criteria::IN);
+ $criteria->add(CcWebstreamPeer::ID, (array) $values, Criteria::IN);
// invalidate the cache for this object(s)
foreach ((array) $values as $singleval) {
- CcMusicDirsPeer::removeInstanceFromPool($singleval);
+ CcWebstreamPeer::removeInstanceFromPool($singleval);
}
}
@@ -642,7 +677,7 @@ abstract class BaseCcMusicDirsPeer {
$con->beginTransaction();
$affectedRows += BasePeer::doDelete($criteria, $con);
- CcMusicDirsPeer::clearRelatedInstancePool();
+ CcWebstreamPeer::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -652,24 +687,24 @@ abstract class BaseCcMusicDirsPeer {
}
/**
- * Validates all modified columns of given CcMusicDirs object.
+ * Validates all modified columns of given CcWebstream object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
- * @param CcMusicDirs $obj The object to validate.
+ * @param CcWebstream $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
- public static function doValidate(CcMusicDirs $obj, $cols = null)
+ public static function doValidate(CcWebstream $obj, $cols = null)
{
$columns = array();
if ($cols) {
- $dbMap = Propel::getDatabaseMap(CcMusicDirsPeer::DATABASE_NAME);
- $tableMap = $dbMap->getTable(CcMusicDirsPeer::TABLE_NAME);
+ $dbMap = Propel::getDatabaseMap(CcWebstreamPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(CcWebstreamPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -685,7 +720,7 @@ abstract class BaseCcMusicDirsPeer {
}
- return BasePeer::doValidate(CcMusicDirsPeer::DATABASE_NAME, CcMusicDirsPeer::TABLE_NAME, $columns);
+ return BasePeer::doValidate(CcWebstreamPeer::DATABASE_NAME, CcWebstreamPeer::TABLE_NAME, $columns);
}
/**
@@ -693,23 +728,23 @@ abstract class BaseCcMusicDirsPeer {
*
* @param int $pk the primary key.
* @param PropelPDO $con the connection to use
- * @return CcMusicDirs
+ * @return CcWebstream
*/
public static function retrieveByPK($pk, PropelPDO $con = null)
{
- if (null !== ($obj = CcMusicDirsPeer::getInstanceFromPool((string) $pk))) {
+ if (null !== ($obj = CcWebstreamPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
- $criteria = new Criteria(CcMusicDirsPeer::DATABASE_NAME);
- $criteria->add(CcMusicDirsPeer::ID, $pk);
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamPeer::ID, $pk);
- $v = CcMusicDirsPeer::doSelect($criteria, $con);
+ $v = CcWebstreamPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -725,23 +760,23 @@ abstract class BaseCcMusicDirsPeer {
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
- $criteria = new Criteria(CcMusicDirsPeer::DATABASE_NAME);
- $criteria->add(CcMusicDirsPeer::ID, $pks, Criteria::IN);
- $objs = CcMusicDirsPeer::doSelect($criteria, $con);
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamPeer::ID, $pks, Criteria::IN);
+ $objs = CcWebstreamPeer::doSelect($criteria, $con);
}
return $objs;
}
-} // BaseCcMusicDirsPeer
+} // BaseCcWebstreamPeer
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
-BaseCcMusicDirsPeer::buildTableMap();
+BaseCcWebstreamPeer::buildTableMap();
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcWebstreamQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamQuery.php
new file mode 100644
index 000000000..6f5becfb6
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamQuery.php
@@ -0,0 +1,503 @@
+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
+ *
+ * $obj = $c->findPk(12, $con);
+ *
+ * @param mixed $key Primary key to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return CcWebstream|array|mixed the result, formatted by the current formatter
+ */
+ public function findPk($key, $con = null)
+ {
+ if ((null !== ($obj = CcWebstreamPeer::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
+ *
+ * $objs = $c->findPks(array(12, 56, 832), $con);
+ *
+ * @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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKey($key)
+ {
+ return $this->addUsingAlias(CcWebstreamPeer::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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKeys($keys)
+ {
+ return $this->addUsingAlias(CcWebstreamPeer::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 CcWebstreamQuery 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(CcWebstreamPeer::ID, $dbId, $comparison);
+ }
+
+ /**
+ * Filter the query on the name column
+ *
+ * @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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbName($dbName = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbName)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbName)) {
+ $dbName = str_replace('*', '%', $dbName);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::NAME, $dbName, $comparison);
+ }
+
+ /**
+ * Filter the query on the description column
+ *
+ * @param string $dbDescription 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbDescription($dbDescription = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbDescription)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbDescription)) {
+ $dbDescription = str_replace('*', '%', $dbDescription);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::DESCRIPTION, $dbDescription, $comparison);
+ }
+
+ /**
+ * Filter the query on the url column
+ *
+ * @param string $dbUrl 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbUrl($dbUrl = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbUrl)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbUrl)) {
+ $dbUrl = str_replace('*', '%', $dbUrl);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::URL, $dbUrl, $comparison);
+ }
+
+ /**
+ * Filter the query on the length column
+ *
+ * @param string $dbLength 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbLength($dbLength = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbLength)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbLength)) {
+ $dbLength = str_replace('*', '%', $dbLength);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::LENGTH, $dbLength, $comparison);
+ }
+
+ /**
+ * Filter the query on the creator_id column
+ *
+ * @param int|array $dbCreatorId 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbCreatorId($dbCreatorId = null, $comparison = null)
+ {
+ if (is_array($dbCreatorId)) {
+ $useMinMax = false;
+ if (isset($dbCreatorId['min'])) {
+ $this->addUsingAlias(CcWebstreamPeer::CREATOR_ID, $dbCreatorId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbCreatorId['max'])) {
+ $this->addUsingAlias(CcWebstreamPeer::CREATOR_ID, $dbCreatorId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::CREATOR_ID, $dbCreatorId, $comparison);
+ }
+
+ /**
+ * Filter the query on the mtime column
+ *
+ * @param string|array $dbMtime 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbMtime($dbMtime = null, $comparison = null)
+ {
+ if (is_array($dbMtime)) {
+ $useMinMax = false;
+ if (isset($dbMtime['min'])) {
+ $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbMtime['max'])) {
+ $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime, $comparison);
+ }
+
+ /**
+ * Filter the query on the utime column
+ *
+ * @param string|array $dbUtime 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbUtime($dbUtime = null, $comparison = null)
+ {
+ if (is_array($dbUtime)) {
+ $useMinMax = false;
+ if (isset($dbUtime['min'])) {
+ $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbUtime['max'])) {
+ $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime, $comparison);
+ }
+
+ /**
+ * Filter the query on the lptime column
+ *
+ * @param string|array $dbLPtime 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbLPtime($dbLPtime = null, $comparison = null)
+ {
+ if (is_array($dbLPtime)) {
+ $useMinMax = false;
+ if (isset($dbLPtime['min'])) {
+ $this->addUsingAlias(CcWebstreamPeer::LPTIME, $dbLPtime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbLPtime['max'])) {
+ $this->addUsingAlias(CcWebstreamPeer::LPTIME, $dbLPtime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::LPTIME, $dbLPtime, $comparison);
+ }
+
+ /**
+ * Filter the query on the mime column
+ *
+ * @param string $dbMime 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 CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbMime($dbMime = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbMime)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbMime)) {
+ $dbMime = str_replace('*', '%', $dbMime);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::MIME, $dbMime, $comparison);
+ }
+
+ /**
+ * Filter the query by a related CcSchedule object
+ *
+ * @param CcSchedule $ccSchedule the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByCcSchedule($ccSchedule, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcWebstreamPeer::ID, $ccSchedule->getDbStreamId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcSchedule relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function joinCcSchedule($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcSchedule');
+
+ // 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, 'CcSchedule');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcSchedule relation CcSchedule 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 CcScheduleQuery A secondary query class using the current class as primary query
+ */
+ public function useCcScheduleQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcSchedule($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery');
+ }
+
+ /**
+ * Exclude object from result
+ *
+ * @param CcWebstream $ccWebstream Object to remove from the list of results
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function prune($ccWebstream = null)
+ {
+ if ($ccWebstream) {
+ $this->addUsingAlias(CcWebstreamPeer::ID, $ccWebstream->getDbId(), Criteria::NOT_EQUAL);
+ }
+
+ return $this;
+ }
+
+} // BaseCcWebstreamQuery
diff --git a/airtime_mvc/application/models/formatters/BitrateFormatter.php b/airtime_mvc/application/models/formatters/BitrateFormatter.php
index 00828a672..f1455ca74 100644
--- a/airtime_mvc/application/models/formatters/BitrateFormatter.php
+++ b/airtime_mvc/application/models/formatters/BitrateFormatter.php
@@ -1,7 +1,7 @@
_bitrate, 1000, 0);
+ $kbps = bcdiv($this->_bitrate, 1000, 0);
- return "{$Kbps} Kbps";
+ if ($kbps == 0) {
+ return "";
+ } else {
+ return "$kbps Kbps";
+ }
}
-}
\ No newline at end of file
+}
diff --git a/airtime_mvc/application/models/formatters/LengthFormatter.php b/airtime_mvc/application/models/formatters/LengthFormatter.php
index 4551e4680..140d69b1c 100644
--- a/airtime_mvc/application/models/formatters/LengthFormatter.php
+++ b/airtime_mvc/application/models/formatters/LengthFormatter.php
@@ -1,7 +1,7 @@
_length = $length;
}
- public function format() {
+ public function format()
+ {
+ if (!preg_match("/^[0-9]{2}:[0-9]{2}:[0-9]{2}/", $this->_length)) {
+ return $this->_length;
+ }
$pieces = explode(":", $this->_length);
@@ -42,15 +46,13 @@ class LengthFormatter {
if (isset($hours) && isset($minutes) && isset($seconds)) {
$time = sprintf("%d:%02d:%02d.%s", $hours, $minutes, $seconds, $milliStr);
- }
- else if (isset($minutes) && isset($seconds)) {
+ } elseif (isset($minutes) && isset($seconds)) {
$time = sprintf("%d:%02d.%s", $minutes, $seconds, $milliStr);
- }
- else {
+ } else {
$time = sprintf("%d.%s", $seconds, $milliStr);
}
return $time;
}
-}
\ No newline at end of file
+}
diff --git a/airtime_mvc/application/models/formatters/SamplerateFormatter.php b/airtime_mvc/application/models/formatters/SamplerateFormatter.php
index aeabe8c2f..f3c436f30 100644
--- a/airtime_mvc/application/models/formatters/SamplerateFormatter.php
+++ b/airtime_mvc/application/models/formatters/SamplerateFormatter.php
@@ -1,7 +1,7 @@
_seconds < 0) ? "-" : "+";
$perfect = true;
- $time = Application_Model_Playlist::secondsToPlaylistTime(abs($this->_seconds));
+ $time = Application_Common_DateHelper::secondsToPlaylistTime(abs($this->_seconds));
$info = explode(":", $time);
$formatted .= $sign;
@@ -51,4 +51,4 @@ class TimeFilledFormatter {
return $formatted;
}
-}
\ No newline at end of file
+}
diff --git a/airtime_mvc/application/models/tests/SchedulerTests.php b/airtime_mvc/application/models/tests/SchedulerTests.php
index 40235e786..0122ee981 100644
--- a/airtime_mvc/application/models/tests/SchedulerTests.php
+++ b/airtime_mvc/application/models/tests/SchedulerTests.php
@@ -104,7 +104,7 @@ class SchedulerTests extends PHPUnit_TestCase {
$groupId1 = $i1->add('2008-01-01 12:00:00.000', $this->storedFile->getId());
$i2 = new Application_Model_ScheduleGroup();
$i2->addAfter($groupId1, $this->storedFile->getId());
- $items = Application_Model_Schedule::GetItems("2008-01-01", "2008-01-02");
+ $items = Application_Model_Schedule::getItems("2008-01-01", "2008-01-02");
if (count($items) != 2) {
$this->fail("Wrong number of items returned.");
return;
diff --git a/airtime_mvc/application/models/tests/StoredFileTests.php b/airtime_mvc/application/models/tests/StoredFileTests.php
index 851c62741..a41163bda 100644
--- a/airtime_mvc/application/models/tests/StoredFileTests.php
+++ b/airtime_mvc/application/models/tests/StoredFileTests.php
@@ -17,8 +17,8 @@ class StoredFileTest extends PHPUnit_TestCase {
|| ($metadata["audio"]["dataformat"] != "mp3")
|| ($metadata["dc:type"] != "Speech")) {
$str = " [dc:description] = " . $metadata["dc:description"] ."\n"
- . " [audio][dataformat] = " . $metadata["audio"]["dataformat"]."\n"
- . " [dc:type] = ".$metadata["dc:type"]."\n";
+ . " [audio][dataformat] = " . $metadata["audio"]["dataformat"]."\n"
+ . " [dc:type] = ".$metadata["dc:type"]."\n";
$this->fail("Metadata has unexpected values:\n".$str);
}
//var_dump($metadata);
diff --git a/airtime_mvc/application/models/tests/populator.php b/airtime_mvc/application/models/tests/populator.php
index 1ad1b2806..3b85d76bb 100644
--- a/airtime_mvc/application/models/tests/populator.php
+++ b/airtime_mvc/application/models/tests/populator.php
@@ -99,7 +99,7 @@ while ($showTime < $endDate) {
}
if (Application_Model_RabbitMq::$doPush) {
- $md = array('schedule' => Application_Model_Schedule::GetScheduledPlaylists());
+ $md = array('schedule' => Application_Model_Schedule::getSchedule());
Application_Model_RabbitMq::SendMessageToPypo("update_schedule", $md);
}
diff --git a/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml b/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml
index d5d1b2dc4..f76249b9f 100644
--- a/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml
+++ b/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml
@@ -3,8 +3,12 @@
playlistID)): ?>
playlistID" ?>
playlistIndex" ?>
-audioFileID)): ?>
- audioFileID" ?>
+blockId)): ?>
+
+
+uri)): ?>
+
+
audioFileTitle" ?>
audioFileArtist" ?>
showID)): ?>
@@ -38,7 +42,7 @@
Here's how you can get started using Airtime to automate your broadcasts: