diff --git a/airtime_mvc/application/configs/classmap-airtime-conf.php b/airtime_mvc/application/configs/classmap-airtime-conf.php index 70ce01337..7dbf7597d 100644 --- a/airtime_mvc/application/configs/classmap-airtime-conf.php +++ b/airtime_mvc/application/configs/classmap-airtime-conf.php @@ -107,9 +107,9 @@ return array ( 'BaseCloudFilePeer' => 'airtime/om/BaseCloudFilePeer.php', 'BaseCloudFileQuery' => 'airtime/om/BaseCloudFileQuery.php', 'BasePodcast' => 'airtime/om/BasePodcast.php', - 'BasePodcastContents' => 'airtime/om/BasePodcastContents.php', - 'BasePodcastContentsPeer' => 'airtime/om/BasePodcastContentsPeer.php', - 'BasePodcastContentsQuery' => 'airtime/om/BasePodcastContentsQuery.php', + 'BasePodcastEpisodes' => 'airtime/om/BasePodcastEpisodes.php', + 'BasePodcastEpisodesPeer' => 'airtime/om/BasePodcastEpisodesPeer.php', + 'BasePodcastEpisodesQuery' => 'airtime/om/BasePodcastEpisodesQuery.php', 'BasePodcastPeer' => 'airtime/om/BasePodcastPeer.php', 'BasePodcastQuery' => 'airtime/om/BasePodcastQuery.php', 'BaseThirdPartyTrackReferences' => 'airtime/om/BaseThirdPartyTrackReferences.php', @@ -256,10 +256,10 @@ return array ( 'CloudFileQuery' => 'airtime/CloudFileQuery.php', 'CloudFileTableMap' => 'airtime/map/CloudFileTableMap.php', 'Podcast' => 'airtime/Podcast.php', - 'PodcastContents' => 'airtime/PodcastContents.php', - 'PodcastContentsPeer' => 'airtime/PodcastContentsPeer.php', - 'PodcastContentsQuery' => 'airtime/PodcastContentsQuery.php', - 'PodcastContentsTableMap' => 'airtime/map/PodcastContentsTableMap.php', + 'PodcastEpisodes' => 'airtime/PodcastEpisodes.php', + 'PodcastEpisodesPeer' => 'airtime/PodcastEpisodesPeer.php', + 'PodcastEpisodesQuery' => 'airtime/PodcastEpisodesQuery.php', + 'PodcastEpisodesTableMap' => 'airtime/map/PodcastEpisodesTableMap.php', 'PodcastPeer' => 'airtime/PodcastPeer.php', 'PodcastQuery' => 'airtime/PodcastQuery.php', 'PodcastTableMap' => 'airtime/map/PodcastTableMap.php', diff --git a/airtime_mvc/application/models/airtime/PodcastContents.php b/airtime_mvc/application/models/airtime/PodcastEpisodes.php similarity index 67% rename from airtime_mvc/application/models/airtime/PodcastContents.php rename to airtime_mvc/application/models/airtime/PodcastEpisodes.php index 70fe6f779..36019ff88 100644 --- a/airtime_mvc/application/models/airtime/PodcastContents.php +++ b/airtime_mvc/application/models/airtime/PodcastEpisodes.php @@ -3,7 +3,7 @@ /** - * Skeleton subclass for representing a row from the 'podcast_contents' table. + * Skeleton subclass for representing a row from the 'podcast_episodes' table. * * * @@ -13,6 +13,6 @@ * * @package propel.generator.airtime */ -class PodcastContents extends BasePodcastContents +class PodcastEpisodes extends BasePodcastEpisodes { } diff --git a/airtime_mvc/application/models/airtime/PodcastContentsPeer.php b/airtime_mvc/application/models/airtime/PodcastEpisodesPeer.php similarity index 78% rename from airtime_mvc/application/models/airtime/PodcastContentsPeer.php rename to airtime_mvc/application/models/airtime/PodcastEpisodesPeer.php index 59c84ce1d..082d056cd 100644 --- a/airtime_mvc/application/models/airtime/PodcastContentsPeer.php +++ b/airtime_mvc/application/models/airtime/PodcastEpisodesPeer.php @@ -3,7 +3,7 @@ /** - * Skeleton subclass for performing query and update operations on the 'podcast_contents' table. + * Skeleton subclass for performing query and update operations on the 'podcast_episodes' table. * * * @@ -13,6 +13,6 @@ * * @package propel.generator.airtime */ -class PodcastContentsPeer extends BasePodcastContentsPeer +class PodcastEpisodesPeer extends BasePodcastEpisodesPeer { } diff --git a/airtime_mvc/application/models/airtime/PodcastContentsQuery.php b/airtime_mvc/application/models/airtime/PodcastEpisodesQuery.php similarity index 77% rename from airtime_mvc/application/models/airtime/PodcastContentsQuery.php rename to airtime_mvc/application/models/airtime/PodcastEpisodesQuery.php index b461b6765..d4a82a507 100644 --- a/airtime_mvc/application/models/airtime/PodcastContentsQuery.php +++ b/airtime_mvc/application/models/airtime/PodcastEpisodesQuery.php @@ -3,7 +3,7 @@ /** - * Skeleton subclass for performing query and update operations on the 'podcast_contents' table. + * Skeleton subclass for performing query and update operations on the 'podcast_episodes' table. * * * @@ -13,6 +13,6 @@ * * @package propel.generator.airtime */ -class PodcastContentsQuery extends BasePodcastContentsQuery +class PodcastEpisodesQuery extends BasePodcastEpisodesQuery { } diff --git a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php index bac85e951..a6c91bf09 100644 --- a/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php +++ b/airtime_mvc/application/models/airtime/map/CcFilesTableMap.php @@ -129,7 +129,7 @@ class CcFilesTableMap extends TableMap $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcSchedules'); $this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcPlayoutHistorys'); $this->addRelation('ThirdPartyTrackReferences', 'ThirdPartyTrackReferences', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'ThirdPartyTrackReferencess'); - $this->addRelation('PodcastContents', 'PodcastContents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'PodcastContentss'); + $this->addRelation('PodcastEpisodes', 'PodcastEpisodes', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'PodcastEpisodess'); } // buildRelations() } // CcFilesTableMap diff --git a/airtime_mvc/application/models/airtime/map/PodcastEpisodesTableMap.php b/airtime_mvc/application/models/airtime/map/PodcastEpisodesTableMap.php new file mode 100644 index 000000000..a9609542b --- /dev/null +++ b/airtime_mvc/application/models/airtime/map/PodcastEpisodesTableMap.php @@ -0,0 +1,60 @@ +setName('podcast_episodes'); + $this->setPhpName('PodcastEpisodes'); + $this->setClassname('PodcastEpisodes'); + $this->setPackage('airtime'); + $this->setUseIdGenerator(true); + $this->setPrimaryKeyMethodInfo('podcast_episodes_id_seq'); + // columns + $this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null); + $this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_files', 'id', true, null, null); + $this->addForeignKey('podcast_id', 'DbPodcastId', 'INTEGER', 'podcast', 'id', true, null, null); + $this->addColumn('publication_date', 'DbPublicationDate', 'TIMESTAMP', true, null, null); + $this->addColumn('download_url', 'DbDownloadUrl', 'VARCHAR', true, 512, null); + $this->addColumn('episode_guid', 'DbEpisodeGuid', 'VARCHAR', true, 512, null); + // validators + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null); + $this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_ONE, array('podcast_id' => 'id', ), 'CASCADE', null); + } // buildRelations() + +} // PodcastEpisodesTableMap diff --git a/airtime_mvc/application/models/airtime/map/PodcastTableMap.php b/airtime_mvc/application/models/airtime/map/PodcastTableMap.php index 8407bb68f..b8cd44c2b 100644 --- a/airtime_mvc/application/models/airtime/map/PodcastTableMap.php +++ b/airtime_mvc/application/models/airtime/map/PodcastTableMap.php @@ -56,7 +56,7 @@ class PodcastTableMap extends TableMap public function buildRelations() { $this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner' => 'id', ), 'CASCADE', null); - $this->addRelation('PodcastContents', 'PodcastContents', RelationMap::ONE_TO_MANY, array('id' => 'podcast_id', ), 'CASCADE', null, 'PodcastContentss'); + $this->addRelation('PodcastEpisodes', 'PodcastEpisodes', RelationMap::ONE_TO_MANY, array('id' => 'podcast_id', ), 'CASCADE', null, 'PodcastEpisodess'); } // buildRelations() } // PodcastTableMap diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php index 92017b279..3ae31ac58 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php @@ -534,10 +534,10 @@ abstract class BaseCcFiles extends BaseObject implements Persistent protected $collThirdPartyTrackReferencessPartial; /** - * @var PropelObjectCollection|PodcastContents[] Collection to store aggregation of PodcastContents objects. + * @var PropelObjectCollection|PodcastEpisodes[] Collection to store aggregation of PodcastEpisodes objects. */ - protected $collPodcastContentss; - protected $collPodcastContentssPartial; + protected $collPodcastEpisodess; + protected $collPodcastEpisodessPartial; /** * Flag to prevent endless save loop, if this object is referenced @@ -605,7 +605,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent * An array of objects scheduled for deletion. * @var PropelObjectCollection */ - protected $podcastContentssScheduledForDeletion = null; + protected $podcastEpisodessScheduledForDeletion = null; /** * Applies default values to this object. @@ -3363,7 +3363,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->collThirdPartyTrackReferencess = null; - $this->collPodcastContentss = null; + $this->collPodcastEpisodess = null; } // if (deep) } @@ -3634,17 +3634,17 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } - if ($this->podcastContentssScheduledForDeletion !== null) { - if (!$this->podcastContentssScheduledForDeletion->isEmpty()) { - PodcastContentsQuery::create() - ->filterByPrimaryKeys($this->podcastContentssScheduledForDeletion->getPrimaryKeys(false)) + if ($this->podcastEpisodessScheduledForDeletion !== null) { + if (!$this->podcastEpisodessScheduledForDeletion->isEmpty()) { + PodcastEpisodesQuery::create() + ->filterByPrimaryKeys($this->podcastEpisodessScheduledForDeletion->getPrimaryKeys(false)) ->delete($con); - $this->podcastContentssScheduledForDeletion = null; + $this->podcastEpisodessScheduledForDeletion = null; } } - if ($this->collPodcastContentss !== null) { - foreach ($this->collPodcastContentss as $referrerFK) { + if ($this->collPodcastEpisodess !== null) { + foreach ($this->collPodcastEpisodess as $referrerFK) { if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { $affectedRows += $referrerFK->save($con); } @@ -4302,8 +4302,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } - if ($this->collPodcastContentss !== null) { - foreach ($this->collPodcastContentss as $referrerFK) { + if ($this->collPodcastEpisodess !== null) { + foreach ($this->collPodcastEpisodess as $referrerFK) { if (!$referrerFK->validate($columns)) { $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); } @@ -4699,8 +4699,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent if (null !== $this->collThirdPartyTrackReferencess) { $result['ThirdPartyTrackReferencess'] = $this->collThirdPartyTrackReferencess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); } - if (null !== $this->collPodcastContentss) { - $result['PodcastContentss'] = $this->collPodcastContentss->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + if (null !== $this->collPodcastEpisodess) { + $result['PodcastEpisodess'] = $this->collPodcastEpisodess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); } } @@ -5315,9 +5315,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } } - foreach ($this->getPodcastContentss() as $relObj) { + foreach ($this->getPodcastEpisodess() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addPodcastContents($relObj->copy($deepCopy)); + $copyObj->addPodcastEpisodes($relObj->copy($deepCopy)); } } @@ -5559,8 +5559,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent if ('ThirdPartyTrackReferences' == $relationName) { $this->initThirdPartyTrackReferencess(); } - if ('PodcastContents' == $relationName) { - $this->initPodcastContentss(); + if ('PodcastEpisodes' == $relationName) { + $this->initPodcastEpisodess(); } } @@ -7340,36 +7340,36 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } /** - * Clears out the collPodcastContentss collection + * Clears out the collPodcastEpisodess 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 CcFiles The current object (for fluent API support) - * @see addPodcastContentss() + * @see addPodcastEpisodess() */ - public function clearPodcastContentss() + public function clearPodcastEpisodess() { - $this->collPodcastContentss = null; // important to set this to null since that means it is uninitialized - $this->collPodcastContentssPartial = null; + $this->collPodcastEpisodess = null; // important to set this to null since that means it is uninitialized + $this->collPodcastEpisodessPartial = null; return $this; } /** - * reset is the collPodcastContentss collection loaded partially + * reset is the collPodcastEpisodess collection loaded partially * * @return void */ - public function resetPartialPodcastContentss($v = true) + public function resetPartialPodcastEpisodess($v = true) { - $this->collPodcastContentssPartial = $v; + $this->collPodcastEpisodessPartial = $v; } /** - * Initializes the collPodcastContentss collection. + * Initializes the collPodcastEpisodess collection. * - * By default this just sets the collPodcastContentss collection to an empty array (like clearcollPodcastContentss()); + * By default this just sets the collPodcastEpisodess collection to an empty array (like clearcollPodcastEpisodess()); * 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. * @@ -7378,17 +7378,17 @@ abstract class BaseCcFiles extends BaseObject implements Persistent * * @return void */ - public function initPodcastContentss($overrideExisting = true) + public function initPodcastEpisodess($overrideExisting = true) { - if (null !== $this->collPodcastContentss && !$overrideExisting) { + if (null !== $this->collPodcastEpisodess && !$overrideExisting) { return; } - $this->collPodcastContentss = new PropelObjectCollection(); - $this->collPodcastContentss->setModel('PodcastContents'); + $this->collPodcastEpisodess = new PropelObjectCollection(); + $this->collPodcastEpisodess->setModel('PodcastEpisodes'); } /** - * Gets an array of PodcastContents objects which contain a foreign key that references this object. + * Gets an array of PodcastEpisodes 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. @@ -7398,107 +7398,107 @@ abstract class BaseCcFiles extends BaseObject implements Persistent * * @param Criteria $criteria optional Criteria object to narrow the query * @param PropelPDO $con optional connection object - * @return PropelObjectCollection|PodcastContents[] List of PodcastContents objects + * @return PropelObjectCollection|PodcastEpisodes[] List of PodcastEpisodes objects * @throws PropelException */ - public function getPodcastContentss($criteria = null, PropelPDO $con = null) + public function getPodcastEpisodess($criteria = null, PropelPDO $con = null) { - $partial = $this->collPodcastContentssPartial && !$this->isNew(); - if (null === $this->collPodcastContentss || null !== $criteria || $partial) { - if ($this->isNew() && null === $this->collPodcastContentss) { + $partial = $this->collPodcastEpisodessPartial && !$this->isNew(); + if (null === $this->collPodcastEpisodess || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collPodcastEpisodess) { // return empty collection - $this->initPodcastContentss(); + $this->initPodcastEpisodess(); } else { - $collPodcastContentss = PodcastContentsQuery::create(null, $criteria) + $collPodcastEpisodess = PodcastEpisodesQuery::create(null, $criteria) ->filterByCcFiles($this) ->find($con); if (null !== $criteria) { - if (false !== $this->collPodcastContentssPartial && count($collPodcastContentss)) { - $this->initPodcastContentss(false); + if (false !== $this->collPodcastEpisodessPartial && count($collPodcastEpisodess)) { + $this->initPodcastEpisodess(false); - foreach ($collPodcastContentss as $obj) { - if (false == $this->collPodcastContentss->contains($obj)) { - $this->collPodcastContentss->append($obj); + foreach ($collPodcastEpisodess as $obj) { + if (false == $this->collPodcastEpisodess->contains($obj)) { + $this->collPodcastEpisodess->append($obj); } } - $this->collPodcastContentssPartial = true; + $this->collPodcastEpisodessPartial = true; } - $collPodcastContentss->getInternalIterator()->rewind(); + $collPodcastEpisodess->getInternalIterator()->rewind(); - return $collPodcastContentss; + return $collPodcastEpisodess; } - if ($partial && $this->collPodcastContentss) { - foreach ($this->collPodcastContentss as $obj) { + if ($partial && $this->collPodcastEpisodess) { + foreach ($this->collPodcastEpisodess as $obj) { if ($obj->isNew()) { - $collPodcastContentss[] = $obj; + $collPodcastEpisodess[] = $obj; } } } - $this->collPodcastContentss = $collPodcastContentss; - $this->collPodcastContentssPartial = false; + $this->collPodcastEpisodess = $collPodcastEpisodess; + $this->collPodcastEpisodessPartial = false; } } - return $this->collPodcastContentss; + return $this->collPodcastEpisodess; } /** - * Sets a collection of PodcastContents objects related by a one-to-many relationship + * Sets a collection of PodcastEpisodes objects related by a one-to-many relationship * to the current object. * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param PropelCollection $podcastContentss A Propel collection. + * @param PropelCollection $podcastEpisodess A Propel collection. * @param PropelPDO $con Optional connection object * @return CcFiles The current object (for fluent API support) */ - public function setPodcastContentss(PropelCollection $podcastContentss, PropelPDO $con = null) + public function setPodcastEpisodess(PropelCollection $podcastEpisodess, PropelPDO $con = null) { - $podcastContentssToDelete = $this->getPodcastContentss(new Criteria(), $con)->diff($podcastContentss); + $podcastEpisodessToDelete = $this->getPodcastEpisodess(new Criteria(), $con)->diff($podcastEpisodess); - $this->podcastContentssScheduledForDeletion = $podcastContentssToDelete; + $this->podcastEpisodessScheduledForDeletion = $podcastEpisodessToDelete; - foreach ($podcastContentssToDelete as $podcastContentsRemoved) { - $podcastContentsRemoved->setCcFiles(null); + foreach ($podcastEpisodessToDelete as $podcastEpisodesRemoved) { + $podcastEpisodesRemoved->setCcFiles(null); } - $this->collPodcastContentss = null; - foreach ($podcastContentss as $podcastContents) { - $this->addPodcastContents($podcastContents); + $this->collPodcastEpisodess = null; + foreach ($podcastEpisodess as $podcastEpisodes) { + $this->addPodcastEpisodes($podcastEpisodes); } - $this->collPodcastContentss = $podcastContentss; - $this->collPodcastContentssPartial = false; + $this->collPodcastEpisodess = $podcastEpisodess; + $this->collPodcastEpisodessPartial = false; return $this; } /** - * Returns the number of related PodcastContents objects. + * Returns the number of related PodcastEpisodes objects. * * @param Criteria $criteria * @param boolean $distinct * @param PropelPDO $con - * @return int Count of related PodcastContents objects. + * @return int Count of related PodcastEpisodes objects. * @throws PropelException */ - public function countPodcastContentss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + public function countPodcastEpisodess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { - $partial = $this->collPodcastContentssPartial && !$this->isNew(); - if (null === $this->collPodcastContentss || null !== $criteria || $partial) { - if ($this->isNew() && null === $this->collPodcastContentss) { + $partial = $this->collPodcastEpisodessPartial && !$this->isNew(); + if (null === $this->collPodcastEpisodess || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collPodcastEpisodess) { return 0; } if ($partial && !$criteria) { - return count($this->getPodcastContentss()); + return count($this->getPodcastEpisodess()); } - $query = PodcastContentsQuery::create(null, $criteria); + $query = PodcastEpisodesQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } @@ -7508,28 +7508,28 @@ abstract class BaseCcFiles extends BaseObject implements Persistent ->count($con); } - return count($this->collPodcastContentss); + return count($this->collPodcastEpisodess); } /** - * Method called to associate a PodcastContents object to this object - * through the PodcastContents foreign key attribute. + * Method called to associate a PodcastEpisodes object to this object + * through the PodcastEpisodes foreign key attribute. * - * @param PodcastContents $l PodcastContents + * @param PodcastEpisodes $l PodcastEpisodes * @return CcFiles The current object (for fluent API support) */ - public function addPodcastContents(PodcastContents $l) + public function addPodcastEpisodes(PodcastEpisodes $l) { - if ($this->collPodcastContentss === null) { - $this->initPodcastContentss(); - $this->collPodcastContentssPartial = true; + if ($this->collPodcastEpisodess === null) { + $this->initPodcastEpisodess(); + $this->collPodcastEpisodessPartial = true; } - if (!in_array($l, $this->collPodcastContentss->getArrayCopy(), true)) { // only add it if the **same** object is not already associated - $this->doAddPodcastContents($l); + if (!in_array($l, $this->collPodcastEpisodess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddPodcastEpisodes($l); - if ($this->podcastContentssScheduledForDeletion and $this->podcastContentssScheduledForDeletion->contains($l)) { - $this->podcastContentssScheduledForDeletion->remove($this->podcastContentssScheduledForDeletion->search($l)); + if ($this->podcastEpisodessScheduledForDeletion and $this->podcastEpisodessScheduledForDeletion->contains($l)) { + $this->podcastEpisodessScheduledForDeletion->remove($this->podcastEpisodessScheduledForDeletion->search($l)); } } @@ -7537,28 +7537,28 @@ abstract class BaseCcFiles extends BaseObject implements Persistent } /** - * @param PodcastContents $podcastContents The podcastContents object to add. + * @param PodcastEpisodes $podcastEpisodes The podcastEpisodes object to add. */ - protected function doAddPodcastContents($podcastContents) + protected function doAddPodcastEpisodes($podcastEpisodes) { - $this->collPodcastContentss[]= $podcastContents; - $podcastContents->setCcFiles($this); + $this->collPodcastEpisodess[]= $podcastEpisodes; + $podcastEpisodes->setCcFiles($this); } /** - * @param PodcastContents $podcastContents The podcastContents object to remove. + * @param PodcastEpisodes $podcastEpisodes The podcastEpisodes object to remove. * @return CcFiles The current object (for fluent API support) */ - public function removePodcastContents($podcastContents) + public function removePodcastEpisodes($podcastEpisodes) { - if ($this->getPodcastContentss()->contains($podcastContents)) { - $this->collPodcastContentss->remove($this->collPodcastContentss->search($podcastContents)); - if (null === $this->podcastContentssScheduledForDeletion) { - $this->podcastContentssScheduledForDeletion = clone $this->collPodcastContentss; - $this->podcastContentssScheduledForDeletion->clear(); + if ($this->getPodcastEpisodess()->contains($podcastEpisodes)) { + $this->collPodcastEpisodess->remove($this->collPodcastEpisodess->search($podcastEpisodes)); + if (null === $this->podcastEpisodessScheduledForDeletion) { + $this->podcastEpisodessScheduledForDeletion = clone $this->collPodcastEpisodess; + $this->podcastEpisodessScheduledForDeletion->clear(); } - $this->podcastContentssScheduledForDeletion[]= clone $podcastContents; - $podcastContents->setCcFiles(null); + $this->podcastEpisodessScheduledForDeletion[]= clone $podcastEpisodes; + $podcastEpisodes->setCcFiles(null); } return $this; @@ -7570,7 +7570,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent * 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 PodcastContentss from storage. + * been saved, it will retrieve related PodcastEpisodess from storage. * * This method is protected by default in order to keep the public * api reasonable. You can provide public methods for those you @@ -7579,14 +7579,14 @@ abstract class BaseCcFiles extends BaseObject implements Persistent * @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 PropelObjectCollection|PodcastContents[] List of PodcastContents objects + * @return PropelObjectCollection|PodcastEpisodes[] List of PodcastEpisodes objects */ - public function getPodcastContentssJoinPodcast($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public function getPodcastEpisodessJoinPodcast($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) { - $query = PodcastContentsQuery::create(null, $criteria); + $query = PodcastEpisodesQuery::create(null, $criteria); $query->joinWith('Podcast', $join_behavior); - return $this->getPodcastContentss($query, $con); + return $this->getPodcastEpisodess($query, $con); } /** @@ -7724,8 +7724,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $o->clearAllReferences($deep); } } - if ($this->collPodcastContentss) { - foreach ($this->collPodcastContentss as $o) { + if ($this->collPodcastEpisodess) { + foreach ($this->collPodcastEpisodess as $o) { $o->clearAllReferences($deep); } } @@ -7770,10 +7770,10 @@ abstract class BaseCcFiles extends BaseObject implements Persistent $this->collThirdPartyTrackReferencess->clearIterator(); } $this->collThirdPartyTrackReferencess = null; - if ($this->collPodcastContentss instanceof PropelCollection) { - $this->collPodcastContentss->clearIterator(); + if ($this->collPodcastEpisodess instanceof PropelCollection) { + $this->collPodcastEpisodess->clearIterator(); } - $this->collPodcastContentss = null; + $this->collPodcastEpisodess = 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 e1100a5a1..f7e2a5fd6 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php @@ -731,9 +731,9 @@ abstract class BaseCcFilesPeer // Invalidate objects in ThirdPartyTrackReferencesPeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. ThirdPartyTrackReferencesPeer::clearInstancePool(); - // Invalidate objects in PodcastContentsPeer instance pool, + // Invalidate objects in PodcastEpisodesPeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - PodcastContentsPeer::clearInstancePool(); + PodcastEpisodesPeer::clearInstancePool(); } /** diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php index ded34dc58..d1b46bc7e 100644 --- a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php +++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php @@ -196,9 +196,9 @@ * @method CcFilesQuery rightJoinThirdPartyTrackReferences($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ThirdPartyTrackReferences relation * @method CcFilesQuery innerJoinThirdPartyTrackReferences($relationAlias = null) Adds a INNER JOIN clause to the query using the ThirdPartyTrackReferences relation * - * @method CcFilesQuery leftJoinPodcastContents($relationAlias = null) Adds a LEFT JOIN clause to the query using the PodcastContents relation - * @method CcFilesQuery rightJoinPodcastContents($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PodcastContents relation - * @method CcFilesQuery innerJoinPodcastContents($relationAlias = null) Adds a INNER JOIN clause to the query using the PodcastContents relation + * @method CcFilesQuery leftJoinPodcastEpisodes($relationAlias = null) Adds a LEFT JOIN clause to the query using the PodcastEpisodes relation + * @method CcFilesQuery rightJoinPodcastEpisodes($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PodcastEpisodes relation + * @method CcFilesQuery innerJoinPodcastEpisodes($relationAlias = null) Adds a INNER JOIN clause to the query using the PodcastEpisodes relation * * @method CcFiles findOne(PropelPDO $con = null) Return the first CcFiles matching the query * @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 @@ -3625,41 +3625,41 @@ abstract class BaseCcFilesQuery extends ModelCriteria } /** - * Filter the query by a related PodcastContents object + * Filter the query by a related PodcastEpisodes object * - * @param PodcastContents|PropelObjectCollection $podcastContents the related object to use as filter + * @param PodcastEpisodes|PropelObjectCollection $podcastEpisodes 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 * @throws PropelException - if the provided filter is invalid. */ - public function filterByPodcastContents($podcastContents, $comparison = null) + public function filterByPodcastEpisodes($podcastEpisodes, $comparison = null) { - if ($podcastContents instanceof PodcastContents) { + if ($podcastEpisodes instanceof PodcastEpisodes) { return $this - ->addUsingAlias(CcFilesPeer::ID, $podcastContents->getDbFileId(), $comparison); - } elseif ($podcastContents instanceof PropelObjectCollection) { + ->addUsingAlias(CcFilesPeer::ID, $podcastEpisodes->getDbFileId(), $comparison); + } elseif ($podcastEpisodes instanceof PropelObjectCollection) { return $this - ->usePodcastContentsQuery() - ->filterByPrimaryKeys($podcastContents->getPrimaryKeys()) + ->usePodcastEpisodesQuery() + ->filterByPrimaryKeys($podcastEpisodes->getPrimaryKeys()) ->endUse(); } else { - throw new PropelException('filterByPodcastContents() only accepts arguments of type PodcastContents or PropelCollection'); + throw new PropelException('filterByPodcastEpisodes() only accepts arguments of type PodcastEpisodes or PropelCollection'); } } /** - * Adds a JOIN clause to the query using the PodcastContents relation + * Adds a JOIN clause to the query using the PodcastEpisodes 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 joinPodcastContents($relationAlias = null, $joinType = Criteria::INNER_JOIN) + public function joinPodcastEpisodes($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('PodcastContents'); + $relationMap = $tableMap->getRelation('PodcastEpisodes'); // create a ModelJoin object for this join $join = new ModelJoin(); @@ -3674,14 +3674,14 @@ abstract class BaseCcFilesQuery extends ModelCriteria $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { - $this->addJoinObject($join, 'PodcastContents'); + $this->addJoinObject($join, 'PodcastEpisodes'); } return $this; } /** - * Use the PodcastContents relation PodcastContents object + * Use the PodcastEpisodes relation PodcastEpisodes object * * @see useQuery() * @@ -3689,13 +3689,13 @@ abstract class BaseCcFilesQuery 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 PodcastContentsQuery A secondary query class using the current class as primary query + * @return PodcastEpisodesQuery A secondary query class using the current class as primary query */ - public function usePodcastContentsQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + public function usePodcastEpisodesQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this - ->joinPodcastContents($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'PodcastContents', 'PodcastContentsQuery'); + ->joinPodcastEpisodes($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'PodcastEpisodes', 'PodcastEpisodesQuery'); } /** diff --git a/airtime_mvc/application/models/airtime/om/BasePodcast.php b/airtime_mvc/application/models/airtime/om/BasePodcast.php index b3dffd83c..a2f2f6ba7 100644 --- a/airtime_mvc/application/models/airtime/om/BasePodcast.php +++ b/airtime_mvc/application/models/airtime/om/BasePodcast.php @@ -85,10 +85,10 @@ abstract class BasePodcast extends BaseObject implements Persistent protected $aCcSubjs; /** - * @var PropelObjectCollection|PodcastContents[] Collection to store aggregation of PodcastContents objects. + * @var PropelObjectCollection|PodcastEpisodes[] Collection to store aggregation of PodcastEpisodes objects. */ - protected $collPodcastContentss; - protected $collPodcastContentssPartial; + protected $collPodcastEpisodess; + protected $collPodcastEpisodessPartial; /** * Flag to prevent endless save loop, if this object is referenced @@ -114,7 +114,7 @@ abstract class BasePodcast extends BaseObject implements Persistent * An array of objects scheduled for deletion. * @var PropelObjectCollection */ - protected $podcastContentssScheduledForDeletion = null; + protected $podcastEpisodessScheduledForDeletion = null; /** * Applies default values to this object. @@ -529,7 +529,7 @@ abstract class BasePodcast extends BaseObject implements Persistent if ($deep) { // also de-associate any related objects? $this->aCcSubjs = null; - $this->collPodcastContentss = null; + $this->collPodcastEpisodess = null; } // if (deep) } @@ -667,17 +667,17 @@ abstract class BasePodcast extends BaseObject implements Persistent $this->resetModified(); } - if ($this->podcastContentssScheduledForDeletion !== null) { - if (!$this->podcastContentssScheduledForDeletion->isEmpty()) { - PodcastContentsQuery::create() - ->filterByPrimaryKeys($this->podcastContentssScheduledForDeletion->getPrimaryKeys(false)) + if ($this->podcastEpisodessScheduledForDeletion !== null) { + if (!$this->podcastEpisodessScheduledForDeletion->isEmpty()) { + PodcastEpisodesQuery::create() + ->filterByPrimaryKeys($this->podcastEpisodessScheduledForDeletion->getPrimaryKeys(false)) ->delete($con); - $this->podcastContentssScheduledForDeletion = null; + $this->podcastEpisodessScheduledForDeletion = null; } } - if ($this->collPodcastContentss !== null) { - foreach ($this->collPodcastContentss as $referrerFK) { + if ($this->collPodcastEpisodess !== null) { + foreach ($this->collPodcastEpisodess as $referrerFK) { if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { $affectedRows += $referrerFK->save($con); } @@ -883,8 +883,8 @@ abstract class BasePodcast extends BaseObject implements Persistent } - if ($this->collPodcastContentss !== null) { - foreach ($this->collPodcastContentss as $referrerFK) { + if ($this->collPodcastEpisodess !== null) { + foreach ($this->collPodcastEpisodess as $referrerFK) { if (!$referrerFK->validate($columns)) { $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); } @@ -997,8 +997,8 @@ abstract class BasePodcast extends BaseObject implements Persistent if (null !== $this->aCcSubjs) { $result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); } - if (null !== $this->collPodcastContentss) { - $result['PodcastContentss'] = $this->collPodcastContentss->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + if (null !== $this->collPodcastEpisodess) { + $result['PodcastEpisodess'] = $this->collPodcastEpisodess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); } } @@ -1187,9 +1187,9 @@ abstract class BasePodcast extends BaseObject implements Persistent // store object hash to prevent cycle $this->startCopy = true; - foreach ($this->getPodcastContentss() as $relObj) { + foreach ($this->getPodcastEpisodess() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves - $copyObj->addPodcastContents($relObj->copy($deepCopy)); + $copyObj->addPodcastEpisodes($relObj->copy($deepCopy)); } } @@ -1306,42 +1306,42 @@ abstract class BasePodcast extends BaseObject implements Persistent */ public function initRelation($relationName) { - if ('PodcastContents' == $relationName) { - $this->initPodcastContentss(); + if ('PodcastEpisodes' == $relationName) { + $this->initPodcastEpisodess(); } } /** - * Clears out the collPodcastContentss collection + * Clears out the collPodcastEpisodess 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 Podcast The current object (for fluent API support) - * @see addPodcastContentss() + * @see addPodcastEpisodess() */ - public function clearPodcastContentss() + public function clearPodcastEpisodess() { - $this->collPodcastContentss = null; // important to set this to null since that means it is uninitialized - $this->collPodcastContentssPartial = null; + $this->collPodcastEpisodess = null; // important to set this to null since that means it is uninitialized + $this->collPodcastEpisodessPartial = null; return $this; } /** - * reset is the collPodcastContentss collection loaded partially + * reset is the collPodcastEpisodess collection loaded partially * * @return void */ - public function resetPartialPodcastContentss($v = true) + public function resetPartialPodcastEpisodess($v = true) { - $this->collPodcastContentssPartial = $v; + $this->collPodcastEpisodessPartial = $v; } /** - * Initializes the collPodcastContentss collection. + * Initializes the collPodcastEpisodess collection. * - * By default this just sets the collPodcastContentss collection to an empty array (like clearcollPodcastContentss()); + * By default this just sets the collPodcastEpisodess collection to an empty array (like clearcollPodcastEpisodess()); * 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. * @@ -1350,17 +1350,17 @@ abstract class BasePodcast extends BaseObject implements Persistent * * @return void */ - public function initPodcastContentss($overrideExisting = true) + public function initPodcastEpisodess($overrideExisting = true) { - if (null !== $this->collPodcastContentss && !$overrideExisting) { + if (null !== $this->collPodcastEpisodess && !$overrideExisting) { return; } - $this->collPodcastContentss = new PropelObjectCollection(); - $this->collPodcastContentss->setModel('PodcastContents'); + $this->collPodcastEpisodess = new PropelObjectCollection(); + $this->collPodcastEpisodess->setModel('PodcastEpisodes'); } /** - * Gets an array of PodcastContents objects which contain a foreign key that references this object. + * Gets an array of PodcastEpisodes 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. @@ -1370,107 +1370,107 @@ abstract class BasePodcast extends BaseObject implements Persistent * * @param Criteria $criteria optional Criteria object to narrow the query * @param PropelPDO $con optional connection object - * @return PropelObjectCollection|PodcastContents[] List of PodcastContents objects + * @return PropelObjectCollection|PodcastEpisodes[] List of PodcastEpisodes objects * @throws PropelException */ - public function getPodcastContentss($criteria = null, PropelPDO $con = null) + public function getPodcastEpisodess($criteria = null, PropelPDO $con = null) { - $partial = $this->collPodcastContentssPartial && !$this->isNew(); - if (null === $this->collPodcastContentss || null !== $criteria || $partial) { - if ($this->isNew() && null === $this->collPodcastContentss) { + $partial = $this->collPodcastEpisodessPartial && !$this->isNew(); + if (null === $this->collPodcastEpisodess || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collPodcastEpisodess) { // return empty collection - $this->initPodcastContentss(); + $this->initPodcastEpisodess(); } else { - $collPodcastContentss = PodcastContentsQuery::create(null, $criteria) + $collPodcastEpisodess = PodcastEpisodesQuery::create(null, $criteria) ->filterByPodcast($this) ->find($con); if (null !== $criteria) { - if (false !== $this->collPodcastContentssPartial && count($collPodcastContentss)) { - $this->initPodcastContentss(false); + if (false !== $this->collPodcastEpisodessPartial && count($collPodcastEpisodess)) { + $this->initPodcastEpisodess(false); - foreach ($collPodcastContentss as $obj) { - if (false == $this->collPodcastContentss->contains($obj)) { - $this->collPodcastContentss->append($obj); + foreach ($collPodcastEpisodess as $obj) { + if (false == $this->collPodcastEpisodess->contains($obj)) { + $this->collPodcastEpisodess->append($obj); } } - $this->collPodcastContentssPartial = true; + $this->collPodcastEpisodessPartial = true; } - $collPodcastContentss->getInternalIterator()->rewind(); + $collPodcastEpisodess->getInternalIterator()->rewind(); - return $collPodcastContentss; + return $collPodcastEpisodess; } - if ($partial && $this->collPodcastContentss) { - foreach ($this->collPodcastContentss as $obj) { + if ($partial && $this->collPodcastEpisodess) { + foreach ($this->collPodcastEpisodess as $obj) { if ($obj->isNew()) { - $collPodcastContentss[] = $obj; + $collPodcastEpisodess[] = $obj; } } } - $this->collPodcastContentss = $collPodcastContentss; - $this->collPodcastContentssPartial = false; + $this->collPodcastEpisodess = $collPodcastEpisodess; + $this->collPodcastEpisodessPartial = false; } } - return $this->collPodcastContentss; + return $this->collPodcastEpisodess; } /** - * Sets a collection of PodcastContents objects related by a one-to-many relationship + * Sets a collection of PodcastEpisodes objects related by a one-to-many relationship * to the current object. * It will also schedule objects for deletion based on a diff between old objects (aka persisted) * and new objects from the given Propel collection. * - * @param PropelCollection $podcastContentss A Propel collection. + * @param PropelCollection $podcastEpisodess A Propel collection. * @param PropelPDO $con Optional connection object * @return Podcast The current object (for fluent API support) */ - public function setPodcastContentss(PropelCollection $podcastContentss, PropelPDO $con = null) + public function setPodcastEpisodess(PropelCollection $podcastEpisodess, PropelPDO $con = null) { - $podcastContentssToDelete = $this->getPodcastContentss(new Criteria(), $con)->diff($podcastContentss); + $podcastEpisodessToDelete = $this->getPodcastEpisodess(new Criteria(), $con)->diff($podcastEpisodess); - $this->podcastContentssScheduledForDeletion = $podcastContentssToDelete; + $this->podcastEpisodessScheduledForDeletion = $podcastEpisodessToDelete; - foreach ($podcastContentssToDelete as $podcastContentsRemoved) { - $podcastContentsRemoved->setPodcast(null); + foreach ($podcastEpisodessToDelete as $podcastEpisodesRemoved) { + $podcastEpisodesRemoved->setPodcast(null); } - $this->collPodcastContentss = null; - foreach ($podcastContentss as $podcastContents) { - $this->addPodcastContents($podcastContents); + $this->collPodcastEpisodess = null; + foreach ($podcastEpisodess as $podcastEpisodes) { + $this->addPodcastEpisodes($podcastEpisodes); } - $this->collPodcastContentss = $podcastContentss; - $this->collPodcastContentssPartial = false; + $this->collPodcastEpisodess = $podcastEpisodess; + $this->collPodcastEpisodessPartial = false; return $this; } /** - * Returns the number of related PodcastContents objects. + * Returns the number of related PodcastEpisodes objects. * * @param Criteria $criteria * @param boolean $distinct * @param PropelPDO $con - * @return int Count of related PodcastContents objects. + * @return int Count of related PodcastEpisodes objects. * @throws PropelException */ - public function countPodcastContentss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) + public function countPodcastEpisodess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { - $partial = $this->collPodcastContentssPartial && !$this->isNew(); - if (null === $this->collPodcastContentss || null !== $criteria || $partial) { - if ($this->isNew() && null === $this->collPodcastContentss) { + $partial = $this->collPodcastEpisodessPartial && !$this->isNew(); + if (null === $this->collPodcastEpisodess || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collPodcastEpisodess) { return 0; } if ($partial && !$criteria) { - return count($this->getPodcastContentss()); + return count($this->getPodcastEpisodess()); } - $query = PodcastContentsQuery::create(null, $criteria); + $query = PodcastEpisodesQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } @@ -1480,28 +1480,28 @@ abstract class BasePodcast extends BaseObject implements Persistent ->count($con); } - return count($this->collPodcastContentss); + return count($this->collPodcastEpisodess); } /** - * Method called to associate a PodcastContents object to this object - * through the PodcastContents foreign key attribute. + * Method called to associate a PodcastEpisodes object to this object + * through the PodcastEpisodes foreign key attribute. * - * @param PodcastContents $l PodcastContents + * @param PodcastEpisodes $l PodcastEpisodes * @return Podcast The current object (for fluent API support) */ - public function addPodcastContents(PodcastContents $l) + public function addPodcastEpisodes(PodcastEpisodes $l) { - if ($this->collPodcastContentss === null) { - $this->initPodcastContentss(); - $this->collPodcastContentssPartial = true; + if ($this->collPodcastEpisodess === null) { + $this->initPodcastEpisodess(); + $this->collPodcastEpisodessPartial = true; } - if (!in_array($l, $this->collPodcastContentss->getArrayCopy(), true)) { // only add it if the **same** object is not already associated - $this->doAddPodcastContents($l); + if (!in_array($l, $this->collPodcastEpisodess->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddPodcastEpisodes($l); - if ($this->podcastContentssScheduledForDeletion and $this->podcastContentssScheduledForDeletion->contains($l)) { - $this->podcastContentssScheduledForDeletion->remove($this->podcastContentssScheduledForDeletion->search($l)); + if ($this->podcastEpisodessScheduledForDeletion and $this->podcastEpisodessScheduledForDeletion->contains($l)) { + $this->podcastEpisodessScheduledForDeletion->remove($this->podcastEpisodessScheduledForDeletion->search($l)); } } @@ -1509,28 +1509,28 @@ abstract class BasePodcast extends BaseObject implements Persistent } /** - * @param PodcastContents $podcastContents The podcastContents object to add. + * @param PodcastEpisodes $podcastEpisodes The podcastEpisodes object to add. */ - protected function doAddPodcastContents($podcastContents) + protected function doAddPodcastEpisodes($podcastEpisodes) { - $this->collPodcastContentss[]= $podcastContents; - $podcastContents->setPodcast($this); + $this->collPodcastEpisodess[]= $podcastEpisodes; + $podcastEpisodes->setPodcast($this); } /** - * @param PodcastContents $podcastContents The podcastContents object to remove. + * @param PodcastEpisodes $podcastEpisodes The podcastEpisodes object to remove. * @return Podcast The current object (for fluent API support) */ - public function removePodcastContents($podcastContents) + public function removePodcastEpisodes($podcastEpisodes) { - if ($this->getPodcastContentss()->contains($podcastContents)) { - $this->collPodcastContentss->remove($this->collPodcastContentss->search($podcastContents)); - if (null === $this->podcastContentssScheduledForDeletion) { - $this->podcastContentssScheduledForDeletion = clone $this->collPodcastContentss; - $this->podcastContentssScheduledForDeletion->clear(); + if ($this->getPodcastEpisodess()->contains($podcastEpisodes)) { + $this->collPodcastEpisodess->remove($this->collPodcastEpisodess->search($podcastEpisodes)); + if (null === $this->podcastEpisodessScheduledForDeletion) { + $this->podcastEpisodessScheduledForDeletion = clone $this->collPodcastEpisodess; + $this->podcastEpisodessScheduledForDeletion->clear(); } - $this->podcastContentssScheduledForDeletion[]= clone $podcastContents; - $podcastContents->setPodcast(null); + $this->podcastEpisodessScheduledForDeletion[]= clone $podcastEpisodes; + $podcastEpisodes->setPodcast(null); } return $this; @@ -1542,7 +1542,7 @@ abstract class BasePodcast extends BaseObject implements Persistent * an identical criteria, it returns the collection. * Otherwise if this Podcast is new, it will return * an empty collection; or if this Podcast has previously - * been saved, it will retrieve related PodcastContentss from storage. + * been saved, it will retrieve related PodcastEpisodess from storage. * * This method is protected by default in order to keep the public * api reasonable. You can provide public methods for those you @@ -1551,14 +1551,14 @@ abstract class BasePodcast extends BaseObject implements Persistent * @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 PropelObjectCollection|PodcastContents[] List of PodcastContents objects + * @return PropelObjectCollection|PodcastEpisodes[] List of PodcastEpisodes objects */ - public function getPodcastContentssJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) + public function getPodcastEpisodessJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) { - $query = PodcastContentsQuery::create(null, $criteria); + $query = PodcastEpisodesQuery::create(null, $criteria); $query->joinWith('CcFiles', $join_behavior); - return $this->getPodcastContentss($query, $con); + return $this->getPodcastEpisodess($query, $con); } /** @@ -1597,8 +1597,8 @@ abstract class BasePodcast extends BaseObject implements Persistent { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; - if ($this->collPodcastContentss) { - foreach ($this->collPodcastContentss as $o) { + if ($this->collPodcastEpisodess) { + foreach ($this->collPodcastEpisodess as $o) { $o->clearAllReferences($deep); } } @@ -1609,10 +1609,10 @@ abstract class BasePodcast extends BaseObject implements Persistent $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) - if ($this->collPodcastContentss instanceof PropelCollection) { - $this->collPodcastContentss->clearIterator(); + if ($this->collPodcastEpisodess instanceof PropelCollection) { + $this->collPodcastEpisodess->clearIterator(); } - $this->collPodcastContentss = null; + $this->collPodcastEpisodess = null; $this->aCcSubjs = null; } diff --git a/airtime_mvc/application/models/airtime/om/BasePodcastContents.php b/airtime_mvc/application/models/airtime/om/BasePodcastEpisodes.php similarity index 83% rename from airtime_mvc/application/models/airtime/om/BasePodcastContents.php rename to airtime_mvc/application/models/airtime/om/BasePodcastEpisodes.php index a2e871bd5..e39015230 100644 --- a/airtime_mvc/application/models/airtime/om/BasePodcastContents.php +++ b/airtime_mvc/application/models/airtime/om/BasePodcastEpisodes.php @@ -2,24 +2,24 @@ /** - * Base class that represents a row from the 'podcast_contents' table. + * Base class that represents a row from the 'podcast_episodes' table. * * * * @package propel.generator.airtime.om */ -abstract class BasePodcastContents extends BaseObject implements Persistent +abstract class BasePodcastEpisodes extends BaseObject implements Persistent { /** * Peer class name */ - const PEER = 'PodcastContentsPeer'; + const PEER = 'PodcastEpisodesPeer'; /** * 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 PodcastContentsPeer + * @var PodcastEpisodesPeer */ protected static $peer; @@ -53,6 +53,18 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ protected $publication_date; + /** + * The value for the download_url field. + * @var string + */ + protected $download_url; + + /** + * The value for the episode_guid field. + * @var string + */ + protected $episode_guid; + /** * @var CcFiles */ @@ -151,11 +163,33 @@ abstract class BasePodcastContents extends BaseObject implements Persistent } + /** + * Get the [download_url] column value. + * + * @return string + */ + public function getDbDownloadUrl() + { + + return $this->download_url; + } + + /** + * Get the [episode_guid] column value. + * + * @return string + */ + public function getDbEpisodeGuid() + { + + return $this->episode_guid; + } + /** * Set the value of [id] column. * * @param int $v new value - * @return PodcastContents The current object (for fluent API support) + * @return PodcastEpisodes The current object (for fluent API support) */ public function setDbId($v) { @@ -165,7 +199,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent if ($this->id !== $v) { $this->id = $v; - $this->modifiedColumns[] = PodcastContentsPeer::ID; + $this->modifiedColumns[] = PodcastEpisodesPeer::ID; } @@ -176,7 +210,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent * Set the value of [file_id] column. * * @param int $v new value - * @return PodcastContents The current object (for fluent API support) + * @return PodcastEpisodes The current object (for fluent API support) */ public function setDbFileId($v) { @@ -186,7 +220,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent if ($this->file_id !== $v) { $this->file_id = $v; - $this->modifiedColumns[] = PodcastContentsPeer::FILE_ID; + $this->modifiedColumns[] = PodcastEpisodesPeer::FILE_ID; } if ($this->aCcFiles !== null && $this->aCcFiles->getDbId() !== $v) { @@ -201,7 +235,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent * Set the value of [podcast_id] column. * * @param int $v new value - * @return PodcastContents The current object (for fluent API support) + * @return PodcastEpisodes The current object (for fluent API support) */ public function setDbPodcastId($v) { @@ -211,7 +245,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent if ($this->podcast_id !== $v) { $this->podcast_id = $v; - $this->modifiedColumns[] = PodcastContentsPeer::PODCAST_ID; + $this->modifiedColumns[] = PodcastEpisodesPeer::PODCAST_ID; } if ($this->aPodcast !== null && $this->aPodcast->getDbId() !== $v) { @@ -227,7 +261,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent * * @param mixed $v string, integer (timestamp), or DateTime value. * Empty strings are treated as null. - * @return PodcastContents The current object (for fluent API support) + * @return PodcastEpisodes The current object (for fluent API support) */ public function setDbPublicationDate($v) { @@ -237,7 +271,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null; if ($currentDateAsString !== $newDateAsString) { $this->publication_date = $newDateAsString; - $this->modifiedColumns[] = PodcastContentsPeer::PUBLICATION_DATE; + $this->modifiedColumns[] = PodcastEpisodesPeer::PUBLICATION_DATE; } } // if either are not null @@ -245,6 +279,48 @@ abstract class BasePodcastContents extends BaseObject implements Persistent return $this; } // setDbPublicationDate() + /** + * Set the value of [download_url] column. + * + * @param string $v new value + * @return PodcastEpisodes The current object (for fluent API support) + */ + public function setDbDownloadUrl($v) + { + if ($v !== null && is_numeric($v)) { + $v = (string) $v; + } + + if ($this->download_url !== $v) { + $this->download_url = $v; + $this->modifiedColumns[] = PodcastEpisodesPeer::DOWNLOAD_URL; + } + + + return $this; + } // setDbDownloadUrl() + + /** + * Set the value of [episode_guid] column. + * + * @param string $v new value + * @return PodcastEpisodes The current object (for fluent API support) + */ + public function setDbEpisodeGuid($v) + { + if ($v !== null && is_numeric($v)) { + $v = (string) $v; + } + + if ($this->episode_guid !== $v) { + $this->episode_guid = $v; + $this->modifiedColumns[] = PodcastEpisodesPeer::EPISODE_GUID; + } + + + return $this; + } // setDbEpisodeGuid() + /** * Indicates whether the columns in this object are only set to default values. * @@ -281,6 +357,8 @@ abstract class BasePodcastContents extends BaseObject implements Persistent $this->file_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null; $this->podcast_id = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null; $this->publication_date = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; + $this->download_url = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null; + $this->episode_guid = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null; $this->resetModified(); $this->setNew(false); @@ -290,10 +368,10 @@ abstract class BasePodcastContents extends BaseObject implements Persistent } $this->postHydrate($row, $startcol, $rehydrate); - return $startcol + 4; // 4 = PodcastContentsPeer::NUM_HYDRATE_COLUMNS. + return $startcol + 6; // 6 = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS. } catch (Exception $e) { - throw new PropelException("Error populating PodcastContents object", $e); + throw new PropelException("Error populating PodcastEpisodes object", $e); } } @@ -342,13 +420,13 @@ abstract class BasePodcastContents extends BaseObject implements Persistent } if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::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 = PodcastContentsPeer::doSelectStmt($this->buildPkeyCriteria(), $con); + $stmt = PodcastEpisodesPeer::doSelectStmt($this->buildPkeyCriteria(), $con); $row = $stmt->fetch(PDO::FETCH_NUM); $stmt->closeCursor(); if (!$row) { @@ -380,12 +458,12 @@ abstract class BasePodcastContents extends BaseObject implements Persistent } if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $con->beginTransaction(); try { - $deleteQuery = PodcastContentsQuery::create() + $deleteQuery = PodcastEpisodesQuery::create() ->filterByPrimaryKey($this->getPrimaryKey()); $ret = $this->preDelete($con); if ($ret) { @@ -423,7 +501,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent } if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $con->beginTransaction(); @@ -443,7 +521,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent $this->postUpdate($con); } $this->postSave($con); - PodcastContentsPeer::addInstanceToPool($this); + PodcastEpisodesPeer::addInstanceToPool($this); } else { $affectedRows = 0; } @@ -523,13 +601,13 @@ abstract class BasePodcastContents extends BaseObject implements Persistent $modifiedColumns = array(); $index = 0; - $this->modifiedColumns[] = PodcastContentsPeer::ID; + $this->modifiedColumns[] = PodcastEpisodesPeer::ID; if (null !== $this->id) { - throw new PropelException('Cannot insert a value for auto-increment primary key (' . PodcastContentsPeer::ID . ')'); + throw new PropelException('Cannot insert a value for auto-increment primary key (' . PodcastEpisodesPeer::ID . ')'); } if (null === $this->id) { try { - $stmt = $con->query("SELECT nextval('podcast_contents_id_seq')"); + $stmt = $con->query("SELECT nextval('podcast_episodes_id_seq')"); $row = $stmt->fetch(PDO::FETCH_NUM); $this->id = $row[0]; } catch (Exception $e) { @@ -539,21 +617,27 @@ abstract class BasePodcastContents extends BaseObject implements Persistent // check the columns in natural order for more readable SQL queries - if ($this->isColumnModified(PodcastContentsPeer::ID)) { + if ($this->isColumnModified(PodcastEpisodesPeer::ID)) { $modifiedColumns[':p' . $index++] = '"id"'; } - if ($this->isColumnModified(PodcastContentsPeer::FILE_ID)) { + if ($this->isColumnModified(PodcastEpisodesPeer::FILE_ID)) { $modifiedColumns[':p' . $index++] = '"file_id"'; } - if ($this->isColumnModified(PodcastContentsPeer::PODCAST_ID)) { + if ($this->isColumnModified(PodcastEpisodesPeer::PODCAST_ID)) { $modifiedColumns[':p' . $index++] = '"podcast_id"'; } - if ($this->isColumnModified(PodcastContentsPeer::PUBLICATION_DATE)) { + if ($this->isColumnModified(PodcastEpisodesPeer::PUBLICATION_DATE)) { $modifiedColumns[':p' . $index++] = '"publication_date"'; } + if ($this->isColumnModified(PodcastEpisodesPeer::DOWNLOAD_URL)) { + $modifiedColumns[':p' . $index++] = '"download_url"'; + } + if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_GUID)) { + $modifiedColumns[':p' . $index++] = '"episode_guid"'; + } $sql = sprintf( - 'INSERT INTO "podcast_contents" (%s) VALUES (%s)', + 'INSERT INTO "podcast_episodes" (%s) VALUES (%s)', implode(', ', $modifiedColumns), implode(', ', array_keys($modifiedColumns)) ); @@ -574,6 +658,12 @@ abstract class BasePodcastContents extends BaseObject implements Persistent case '"publication_date"': $stmt->bindValue($identifier, $this->publication_date, PDO::PARAM_STR); break; + case '"download_url"': + $stmt->bindValue($identifier, $this->download_url, PDO::PARAM_STR); + break; + case '"episode_guid"': + $stmt->bindValue($identifier, $this->episode_guid, PDO::PARAM_STR); + break; } } $stmt->execute(); @@ -679,7 +769,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent } - if (($retval = PodcastContentsPeer::doValidate($this, $columns)) !== true) { + if (($retval = PodcastEpisodesPeer::doValidate($this, $columns)) !== true) { $failureMap = array_merge($failureMap, $retval); } @@ -703,7 +793,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ public function getByName($name, $type = BasePeer::TYPE_PHPNAME) { - $pos = PodcastContentsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $pos = PodcastEpisodesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); $field = $this->getByPosition($pos); return $field; @@ -731,6 +821,12 @@ abstract class BasePodcastContents extends BaseObject implements Persistent case 3: return $this->getDbPublicationDate(); break; + case 4: + return $this->getDbDownloadUrl(); + break; + case 5: + return $this->getDbEpisodeGuid(); + break; default: return null; break; @@ -754,16 +850,18 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) { - if (isset($alreadyDumpedObjects['PodcastContents'][$this->getPrimaryKey()])) { + if (isset($alreadyDumpedObjects['PodcastEpisodes'][$this->getPrimaryKey()])) { return '*RECURSION*'; } - $alreadyDumpedObjects['PodcastContents'][$this->getPrimaryKey()] = true; - $keys = PodcastContentsPeer::getFieldNames($keyType); + $alreadyDumpedObjects['PodcastEpisodes'][$this->getPrimaryKey()] = true; + $keys = PodcastEpisodesPeer::getFieldNames($keyType); $result = array( $keys[0] => $this->getDbId(), $keys[1] => $this->getDbFileId(), $keys[2] => $this->getDbPodcastId(), $keys[3] => $this->getDbPublicationDate(), + $keys[4] => $this->getDbDownloadUrl(), + $keys[5] => $this->getDbEpisodeGuid(), ); $virtualColumns = $this->virtualColumns; foreach ($virtualColumns as $key => $virtualColumn) { @@ -795,7 +893,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) { - $pos = PodcastContentsPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + $pos = PodcastEpisodesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); $this->setByPosition($pos, $value); } @@ -823,6 +921,12 @@ abstract class BasePodcastContents extends BaseObject implements Persistent case 3: $this->setDbPublicationDate($value); break; + case 4: + $this->setDbDownloadUrl($value); + break; + case 5: + $this->setDbEpisodeGuid($value); + break; } // switch() } @@ -845,12 +949,14 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { - $keys = PodcastContentsPeer::getFieldNames($keyType); + $keys = PodcastEpisodesPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]); if (array_key_exists($keys[1], $arr)) $this->setDbFileId($arr[$keys[1]]); if (array_key_exists($keys[2], $arr)) $this->setDbPodcastId($arr[$keys[2]]); if (array_key_exists($keys[3], $arr)) $this->setDbPublicationDate($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setDbDownloadUrl($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setDbEpisodeGuid($arr[$keys[5]]); } /** @@ -860,12 +966,14 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ public function buildCriteria() { - $criteria = new Criteria(PodcastContentsPeer::DATABASE_NAME); + $criteria = new Criteria(PodcastEpisodesPeer::DATABASE_NAME); - if ($this->isColumnModified(PodcastContentsPeer::ID)) $criteria->add(PodcastContentsPeer::ID, $this->id); - if ($this->isColumnModified(PodcastContentsPeer::FILE_ID)) $criteria->add(PodcastContentsPeer::FILE_ID, $this->file_id); - if ($this->isColumnModified(PodcastContentsPeer::PODCAST_ID)) $criteria->add(PodcastContentsPeer::PODCAST_ID, $this->podcast_id); - if ($this->isColumnModified(PodcastContentsPeer::PUBLICATION_DATE)) $criteria->add(PodcastContentsPeer::PUBLICATION_DATE, $this->publication_date); + if ($this->isColumnModified(PodcastEpisodesPeer::ID)) $criteria->add(PodcastEpisodesPeer::ID, $this->id); + if ($this->isColumnModified(PodcastEpisodesPeer::FILE_ID)) $criteria->add(PodcastEpisodesPeer::FILE_ID, $this->file_id); + if ($this->isColumnModified(PodcastEpisodesPeer::PODCAST_ID)) $criteria->add(PodcastEpisodesPeer::PODCAST_ID, $this->podcast_id); + if ($this->isColumnModified(PodcastEpisodesPeer::PUBLICATION_DATE)) $criteria->add(PodcastEpisodesPeer::PUBLICATION_DATE, $this->publication_date); + if ($this->isColumnModified(PodcastEpisodesPeer::DOWNLOAD_URL)) $criteria->add(PodcastEpisodesPeer::DOWNLOAD_URL, $this->download_url); + if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_GUID)) $criteria->add(PodcastEpisodesPeer::EPISODE_GUID, $this->episode_guid); return $criteria; } @@ -880,8 +988,8 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ public function buildPkeyCriteria() { - $criteria = new Criteria(PodcastContentsPeer::DATABASE_NAME); - $criteria->add(PodcastContentsPeer::ID, $this->id); + $criteria = new Criteria(PodcastEpisodesPeer::DATABASE_NAME); + $criteria->add(PodcastEpisodesPeer::ID, $this->id); return $criteria; } @@ -922,7 +1030,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent * If desired, this method can also make copies of all associated (fkey referrers) * objects. * - * @param object $copyObj An object of PodcastContents (or compatible) type. + * @param object $copyObj An object of PodcastEpisodes (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. * @throws PropelException @@ -932,6 +1040,8 @@ abstract class BasePodcastContents extends BaseObject implements Persistent $copyObj->setDbFileId($this->getDbFileId()); $copyObj->setDbPodcastId($this->getDbPodcastId()); $copyObj->setDbPublicationDate($this->getDbPublicationDate()); + $copyObj->setDbDownloadUrl($this->getDbDownloadUrl()); + $copyObj->setDbEpisodeGuid($this->getDbEpisodeGuid()); if ($deepCopy && !$this->startCopy) { // important: temporarily setNew(false) because this affects the behavior of @@ -959,7 +1069,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent * objects. * * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. - * @return PodcastContents Clone of current object. + * @return PodcastEpisodes Clone of current object. * @throws PropelException */ public function copy($deepCopy = false) @@ -979,12 +1089,12 @@ abstract class BasePodcastContents 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 PodcastContentsPeer + * @return PodcastEpisodesPeer */ public function getPeer() { if (self::$peer === null) { - self::$peer = new PodcastContentsPeer(); + self::$peer = new PodcastEpisodesPeer(); } return self::$peer; @@ -994,7 +1104,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent * Declares an association between this object and a CcFiles object. * * @param CcFiles $v - * @return PodcastContents The current object (for fluent API support) + * @return PodcastEpisodes The current object (for fluent API support) * @throws PropelException */ public function setCcFiles(CcFiles $v = null) @@ -1010,7 +1120,7 @@ abstract class BasePodcastContents 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->addPodcastContents($this); + $v->addPodcastEpisodes($this); } @@ -1035,7 +1145,7 @@ abstract class BasePodcastContents 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->addPodcastContentss($this); + $this->aCcFiles->addPodcastEpisodess($this); */ } @@ -1046,7 +1156,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent * Declares an association between this object and a Podcast object. * * @param Podcast $v - * @return PodcastContents The current object (for fluent API support) + * @return PodcastEpisodes The current object (for fluent API support) * @throws PropelException */ public function setPodcast(Podcast $v = null) @@ -1062,7 +1172,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent // Add binding for other direction of this n:n relationship. // If this object has already been added to the Podcast object, it will not be re-added. if ($v !== null) { - $v->addPodcastContents($this); + $v->addPodcastEpisodes($this); } @@ -1087,7 +1197,7 @@ abstract class BasePodcastContents 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->aPodcast->addPodcastContentss($this); + $this->aPodcast->addPodcastEpisodess($this); */ } @@ -1103,6 +1213,8 @@ abstract class BasePodcastContents extends BaseObject implements Persistent $this->file_id = null; $this->podcast_id = null; $this->publication_date = null; + $this->download_url = null; + $this->episode_guid = null; $this->alreadyInSave = false; $this->alreadyInValidation = false; $this->alreadyInClearAllReferencesDeep = false; @@ -1146,7 +1258,7 @@ abstract class BasePodcastContents extends BaseObject implements Persistent */ public function __toString() { - return (string) $this->exportTo(PodcastContentsPeer::DEFAULT_STRING_FORMAT); + return (string) $this->exportTo(PodcastEpisodesPeer::DEFAULT_STRING_FORMAT); } /** diff --git a/airtime_mvc/application/models/airtime/om/BasePodcastContentsPeer.php b/airtime_mvc/application/models/airtime/om/BasePodcastEpisodesPeer.php similarity index 74% rename from airtime_mvc/application/models/airtime/om/BasePodcastContentsPeer.php rename to airtime_mvc/application/models/airtime/om/BasePodcastEpisodesPeer.php index 5a1a8fbe7..3415c9345 100644 --- a/airtime_mvc/application/models/airtime/om/BasePodcastContentsPeer.php +++ b/airtime_mvc/application/models/airtime/om/BasePodcastEpisodesPeer.php @@ -2,56 +2,62 @@ /** - * Base static class for performing query and update operations on the 'podcast_contents' table. + * Base static class for performing query and update operations on the 'podcast_episodes' table. * * * * @package propel.generator.airtime.om */ -abstract class BasePodcastContentsPeer +abstract class BasePodcastEpisodesPeer { /** the default database name for this class */ const DATABASE_NAME = 'airtime'; /** the table name for this class */ - const TABLE_NAME = 'podcast_contents'; + const TABLE_NAME = 'podcast_episodes'; /** the related Propel class for this table */ - const OM_CLASS = 'PodcastContents'; + const OM_CLASS = 'PodcastEpisodes'; /** the related TableMap class for this table */ - const TM_CLASS = 'PodcastContentsTableMap'; + const TM_CLASS = 'PodcastEpisodesTableMap'; /** The total number of columns. */ - const NUM_COLUMNS = 4; + const NUM_COLUMNS = 6; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ - const NUM_HYDRATE_COLUMNS = 4; + const NUM_HYDRATE_COLUMNS = 6; /** the column name for the id field */ - const ID = 'podcast_contents.id'; + const ID = 'podcast_episodes.id'; /** the column name for the file_id field */ - const FILE_ID = 'podcast_contents.file_id'; + const FILE_ID = 'podcast_episodes.file_id'; /** the column name for the podcast_id field */ - const PODCAST_ID = 'podcast_contents.podcast_id'; + const PODCAST_ID = 'podcast_episodes.podcast_id'; /** the column name for the publication_date field */ - const PUBLICATION_DATE = 'podcast_contents.publication_date'; + const PUBLICATION_DATE = 'podcast_episodes.publication_date'; + + /** the column name for the download_url field */ + const DOWNLOAD_URL = 'podcast_episodes.download_url'; + + /** the column name for the episode_guid field */ + const EPISODE_GUID = 'podcast_episodes.episode_guid'; /** The default string format for model objects of the related table **/ const DEFAULT_STRING_FORMAT = 'YAML'; /** - * An identity map to hold any loaded instances of PodcastContents objects. + * An identity map to hold any loaded instances of PodcastEpisodes objects. * This must be public so that other peer classes can access this when hydrating from JOIN * queries. - * @var array PodcastContents[] + * @var array PodcastEpisodes[] */ public static $instances = array(); @@ -60,30 +66,30 @@ abstract class BasePodcastContentsPeer * holds an array of fieldnames * * first dimension keys are the type constants - * e.g. PodcastContentsPeer::$fieldNames[PodcastContentsPeer::TYPE_PHPNAME][0] = 'Id' + * e.g. PodcastEpisodesPeer::$fieldNames[PodcastEpisodesPeer::TYPE_PHPNAME][0] = 'Id' */ protected static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbPodcastId', 'DbPublicationDate', ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbPodcastId', 'dbPublicationDate', ), - BasePeer::TYPE_COLNAME => array (PodcastContentsPeer::ID, PodcastContentsPeer::FILE_ID, PodcastContentsPeer::PODCAST_ID, PodcastContentsPeer::PUBLICATION_DATE, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'PODCAST_ID', 'PUBLICATION_DATE', ), - BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'podcast_id', 'publication_date', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbPodcastId', 'DbPublicationDate', 'DbDownloadUrl', 'DbEpisodeGuid', ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbPodcastId', 'dbPublicationDate', 'dbDownloadUrl', 'dbEpisodeGuid', ), + BasePeer::TYPE_COLNAME => array (PodcastEpisodesPeer::ID, PodcastEpisodesPeer::FILE_ID, PodcastEpisodesPeer::PODCAST_ID, PodcastEpisodesPeer::PUBLICATION_DATE, PodcastEpisodesPeer::DOWNLOAD_URL, PodcastEpisodesPeer::EPISODE_GUID, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'PODCAST_ID', 'PUBLICATION_DATE', 'DOWNLOAD_URL', 'EPISODE_GUID', ), + BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'podcast_id', 'publication_date', 'download_url', 'episode_guid', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) ); /** * holds an array of keys for quick access to the fieldnames array * * first dimension keys are the type constants - * e.g. PodcastContentsPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + * e.g. PodcastEpisodesPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ protected static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbPodcastId' => 2, 'DbPublicationDate' => 3, ), - BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbPodcastId' => 2, 'dbPublicationDate' => 3, ), - BasePeer::TYPE_COLNAME => array (PodcastContentsPeer::ID => 0, PodcastContentsPeer::FILE_ID => 1, PodcastContentsPeer::PODCAST_ID => 2, PodcastContentsPeer::PUBLICATION_DATE => 3, ), - BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'PODCAST_ID' => 2, 'PUBLICATION_DATE' => 3, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'podcast_id' => 2, 'publication_date' => 3, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) + BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbPodcastId' => 2, 'DbPublicationDate' => 3, 'DbDownloadUrl' => 4, 'DbEpisodeGuid' => 5, ), + BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbPodcastId' => 2, 'dbPublicationDate' => 3, 'dbDownloadUrl' => 4, 'dbEpisodeGuid' => 5, ), + BasePeer::TYPE_COLNAME => array (PodcastEpisodesPeer::ID => 0, PodcastEpisodesPeer::FILE_ID => 1, PodcastEpisodesPeer::PODCAST_ID => 2, PodcastEpisodesPeer::PUBLICATION_DATE => 3, PodcastEpisodesPeer::DOWNLOAD_URL => 4, PodcastEpisodesPeer::EPISODE_GUID => 5, ), + BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'PODCAST_ID' => 2, 'PUBLICATION_DATE' => 3, 'DOWNLOAD_URL' => 4, 'EPISODE_GUID' => 5, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'podcast_id' => 2, 'publication_date' => 3, 'download_url' => 4, 'episode_guid' => 5, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) ); /** @@ -98,10 +104,10 @@ abstract class BasePodcastContentsPeer */ public static function translateFieldName($name, $fromType, $toType) { - $toNames = PodcastContentsPeer::getFieldNames($toType); - $key = isset(PodcastContentsPeer::$fieldKeys[$fromType][$name]) ? PodcastContentsPeer::$fieldKeys[$fromType][$name] : null; + $toNames = PodcastEpisodesPeer::getFieldNames($toType); + $key = isset(PodcastEpisodesPeer::$fieldKeys[$fromType][$name]) ? PodcastEpisodesPeer::$fieldKeys[$fromType][$name] : null; if ($key === null) { - throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(PodcastContentsPeer::$fieldKeys[$fromType], true)); + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(PodcastEpisodesPeer::$fieldKeys[$fromType], true)); } return $toNames[$key]; @@ -118,11 +124,11 @@ abstract class BasePodcastContentsPeer */ public static function getFieldNames($type = BasePeer::TYPE_PHPNAME) { - if (!array_key_exists($type, PodcastContentsPeer::$fieldNames)) { + if (!array_key_exists($type, PodcastEpisodesPeer::$fieldNames)) { throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.'); } - return PodcastContentsPeer::$fieldNames[$type]; + return PodcastEpisodesPeer::$fieldNames[$type]; } /** @@ -134,12 +140,12 @@ abstract class BasePodcastContentsPeer * $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. PodcastContentsPeer::COLUMN_NAME). + * @param string $column The column name for current table. (i.e. PodcastEpisodesPeer::COLUMN_NAME). * @return string */ public static function alias($alias, $column) { - return str_replace(PodcastContentsPeer::TABLE_NAME.'.', $alias.'.', $column); + return str_replace(PodcastEpisodesPeer::TABLE_NAME.'.', $alias.'.', $column); } /** @@ -157,15 +163,19 @@ abstract class BasePodcastContentsPeer public static function addSelectColumns(Criteria $criteria, $alias = null) { if (null === $alias) { - $criteria->addSelectColumn(PodcastContentsPeer::ID); - $criteria->addSelectColumn(PodcastContentsPeer::FILE_ID); - $criteria->addSelectColumn(PodcastContentsPeer::PODCAST_ID); - $criteria->addSelectColumn(PodcastContentsPeer::PUBLICATION_DATE); + $criteria->addSelectColumn(PodcastEpisodesPeer::ID); + $criteria->addSelectColumn(PodcastEpisodesPeer::FILE_ID); + $criteria->addSelectColumn(PodcastEpisodesPeer::PODCAST_ID); + $criteria->addSelectColumn(PodcastEpisodesPeer::PUBLICATION_DATE); + $criteria->addSelectColumn(PodcastEpisodesPeer::DOWNLOAD_URL); + $criteria->addSelectColumn(PodcastEpisodesPeer::EPISODE_GUID); } else { $criteria->addSelectColumn($alias . '.id'); $criteria->addSelectColumn($alias . '.file_id'); $criteria->addSelectColumn($alias . '.podcast_id'); $criteria->addSelectColumn($alias . '.publication_date'); + $criteria->addSelectColumn($alias . '.download_url'); + $criteria->addSelectColumn($alias . '.episode_guid'); } } @@ -185,21 +195,21 @@ abstract class BasePodcastContentsPeer // 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(PodcastContentsPeer::TABLE_NAME); + $criteria->setPrimaryTableName(PodcastEpisodesPeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { - PodcastContentsPeer::addSelectColumns($criteria); + PodcastEpisodesPeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); // Set the correct dbName + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); // Set the correct dbName if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } // BasePeer returns a PDOStatement $stmt = BasePeer::doCount($criteria, $con); @@ -218,7 +228,7 @@ abstract class BasePodcastContentsPeer * * @param Criteria $criteria object used to create the SELECT statement. * @param PropelPDO $con - * @return PodcastContents + * @return PodcastEpisodes * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ @@ -226,7 +236,7 @@ abstract class BasePodcastContentsPeer { $critcopy = clone $criteria; $critcopy->setLimit(1); - $objects = PodcastContentsPeer::doSelect($critcopy, $con); + $objects = PodcastEpisodesPeer::doSelect($critcopy, $con); if ($objects) { return $objects[0]; } @@ -244,7 +254,7 @@ abstract class BasePodcastContentsPeer */ public static function doSelect(Criteria $criteria, PropelPDO $con = null) { - return PodcastContentsPeer::populateObjects(PodcastContentsPeer::doSelectStmt($criteria, $con)); + return PodcastEpisodesPeer::populateObjects(PodcastEpisodesPeer::doSelectStmt($criteria, $con)); } /** * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. @@ -262,16 +272,16 @@ abstract class BasePodcastContentsPeer public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } if (!$criteria->hasSelectClause()) { $criteria = clone $criteria; - PodcastContentsPeer::addSelectColumns($criteria); + PodcastEpisodesPeer::addSelectColumns($criteria); } // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); // BasePeer returns a PDOStatement return BasePeer::doSelect($criteria, $con); @@ -285,7 +295,7 @@ abstract class BasePodcastContentsPeer * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * - * @param PodcastContents $obj A PodcastContents object. + * @param PodcastEpisodes $obj A PodcastEpisodes object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) @@ -294,7 +304,7 @@ abstract class BasePodcastContentsPeer if ($key === null) { $key = (string) $obj->getDbId(); } // if key === null - PodcastContentsPeer::$instances[$key] = $obj; + PodcastEpisodesPeer::$instances[$key] = $obj; } } @@ -306,7 +316,7 @@ abstract class BasePodcastContentsPeer * 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 PodcastContents object or a primary key value. + * @param mixed $value A PodcastEpisodes object or a primary key value. * * @return void * @throws PropelException - if the value is invalid. @@ -314,17 +324,17 @@ abstract class BasePodcastContentsPeer public static function removeInstanceFromPool($value) { if (Propel::isInstancePoolingEnabled() && $value !== null) { - if (is_object($value) && $value instanceof PodcastContents) { + if (is_object($value) && $value instanceof PodcastEpisodes) { $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 PodcastContents 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 PodcastEpisodes object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true))); throw $e; } - unset(PodcastContentsPeer::$instances[$key]); + unset(PodcastEpisodesPeer::$instances[$key]); } } // removeInstanceFromPool() @@ -335,14 +345,14 @@ abstract class BasePodcastContentsPeer * 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 PodcastContents Found object or null if 1) no instance exists for specified key or 2) instance pooling has been disabled. + * @return PodcastEpisodes 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) { if (Propel::isInstancePoolingEnabled()) { - if (isset(PodcastContentsPeer::$instances[$key])) { - return PodcastContentsPeer::$instances[$key]; + if (isset(PodcastEpisodesPeer::$instances[$key])) { + return PodcastEpisodesPeer::$instances[$key]; } } @@ -357,15 +367,15 @@ abstract class BasePodcastContentsPeer public static function clearInstancePool($and_clear_all_references = false) { if ($and_clear_all_references) { - foreach (PodcastContentsPeer::$instances as $instance) { + foreach (PodcastEpisodesPeer::$instances as $instance) { $instance->clearAllReferences(true); } } - PodcastContentsPeer::$instances = array(); + PodcastEpisodesPeer::$instances = array(); } /** - * Method to invalidate the instance pool of all tables related to podcast_contents + * Method to invalidate the instance pool of all tables related to podcast_episodes * by a foreign key with ON DELETE CASCADE */ public static function clearRelatedInstancePool() @@ -419,11 +429,11 @@ abstract class BasePodcastContentsPeer $results = array(); // set the class once to avoid overhead in the loop - $cls = PodcastContentsPeer::getOMClass(); + $cls = PodcastEpisodesPeer::getOMClass(); // populate the object(s) while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key = PodcastContentsPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj = PodcastContentsPeer::getInstanceFromPool($key))) { + $key = PodcastEpisodesPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj = PodcastEpisodesPeer::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 @@ -432,7 +442,7 @@ abstract class BasePodcastContentsPeer $obj = new $cls(); $obj->hydrate($row); $results[] = $obj; - PodcastContentsPeer::addInstanceToPool($obj, $key); + PodcastEpisodesPeer::addInstanceToPool($obj, $key); } // if key exists } $stmt->closeCursor(); @@ -446,21 +456,21 @@ abstract class BasePodcastContentsPeer * @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 (PodcastContents object, last column rank) + * @return array (PodcastEpisodes object, last column rank) */ public static function populateObject($row, $startcol = 0) { - $key = PodcastContentsPeer::getPrimaryKeyHashFromRow($row, $startcol); - if (null !== ($obj = PodcastContentsPeer::getInstanceFromPool($key))) { + $key = PodcastEpisodesPeer::getPrimaryKeyHashFromRow($row, $startcol); + if (null !== ($obj = PodcastEpisodesPeer::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 + PodcastContentsPeer::NUM_HYDRATE_COLUMNS; + $col = $startcol + PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS; } else { - $cls = PodcastContentsPeer::OM_CLASS; + $cls = PodcastEpisodesPeer::OM_CLASS; $obj = new $cls(); $col = $obj->hydrate($row, $startcol); - PodcastContentsPeer::addInstanceToPool($obj, $key); + PodcastEpisodesPeer::addInstanceToPool($obj, $key); } return array($obj, $col); @@ -484,26 +494,26 @@ abstract class BasePodcastContentsPeer // 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(PodcastContentsPeer::TABLE_NAME); + $criteria->setPrimaryTableName(PodcastEpisodesPeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { - PodcastContentsPeer::addSelectColumns($criteria); + PodcastEpisodesPeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(PodcastContentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -535,26 +545,26 @@ abstract class BasePodcastContentsPeer // 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(PodcastContentsPeer::TABLE_NAME); + $criteria->setPrimaryTableName(PodcastEpisodesPeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { - PodcastContentsPeer::addSelectColumns($criteria); + PodcastEpisodesPeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(PodcastContentsPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -570,11 +580,11 @@ abstract class BasePodcastContentsPeer /** - * Selects a collection of PodcastContents objects pre-filled with their CcFiles objects. + * Selects a collection of PodcastEpisodes 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 PodcastContents objects. + * @return array Array of PodcastEpisodes objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ @@ -584,31 +594,31 @@ abstract class BasePodcastContentsPeer // Set the correct dbName if it has not been overridden if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); } - PodcastContentsPeer::addSelectColumns($criteria); - $startcol = PodcastContentsPeer::NUM_HYDRATE_COLUMNS; + PodcastEpisodesPeer::addSelectColumns($criteria); + $startcol = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS; CcFilesPeer::addSelectColumns($criteria); - $criteria->addJoin(PodcastContentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = PodcastContentsPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = PodcastContentsPeer::getInstanceFromPool($key1))) { + $key1 = PodcastEpisodesPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = PodcastEpisodesPeer::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 = PodcastContentsPeer::getOMClass(); + $cls = PodcastEpisodesPeer::getOMClass(); $obj1 = new $cls(); $obj1->hydrate($row); - PodcastContentsPeer::addInstanceToPool($obj1, $key1); + PodcastEpisodesPeer::addInstanceToPool($obj1, $key1); } // if $obj1 already loaded $key2 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol); @@ -623,8 +633,8 @@ abstract class BasePodcastContentsPeer CcFilesPeer::addInstanceToPool($obj2, $key2); } // if obj2 already loaded - // Add the $obj1 (PodcastContents) to $obj2 (CcFiles) - $obj2->addPodcastContents($obj1); + // Add the $obj1 (PodcastEpisodes) to $obj2 (CcFiles) + $obj2->addPodcastEpisodes($obj1); } // if joined row was not null @@ -637,11 +647,11 @@ abstract class BasePodcastContentsPeer /** - * Selects a collection of PodcastContents objects pre-filled with their Podcast objects. + * Selects a collection of PodcastEpisodes objects pre-filled with their Podcast 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 PodcastContents objects. + * @return array Array of PodcastEpisodes objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ @@ -651,31 +661,31 @@ abstract class BasePodcastContentsPeer // Set the correct dbName if it has not been overridden if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); } - PodcastContentsPeer::addSelectColumns($criteria); - $startcol = PodcastContentsPeer::NUM_HYDRATE_COLUMNS; + PodcastEpisodesPeer::addSelectColumns($criteria); + $startcol = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS; PodcastPeer::addSelectColumns($criteria); - $criteria->addJoin(PodcastContentsPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = PodcastContentsPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = PodcastContentsPeer::getInstanceFromPool($key1))) { + $key1 = PodcastEpisodesPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = PodcastEpisodesPeer::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 = PodcastContentsPeer::getOMClass(); + $cls = PodcastEpisodesPeer::getOMClass(); $obj1 = new $cls(); $obj1->hydrate($row); - PodcastContentsPeer::addInstanceToPool($obj1, $key1); + PodcastEpisodesPeer::addInstanceToPool($obj1, $key1); } // if $obj1 already loaded $key2 = PodcastPeer::getPrimaryKeyHashFromRow($row, $startcol); @@ -690,8 +700,8 @@ abstract class BasePodcastContentsPeer PodcastPeer::addInstanceToPool($obj2, $key2); } // if obj2 already loaded - // Add the $obj1 (PodcastContents) to $obj2 (Podcast) - $obj2->addPodcastContents($obj1); + // Add the $obj1 (PodcastEpisodes) to $obj2 (Podcast) + $obj2->addPodcastEpisodes($obj1); } // if joined row was not null @@ -720,28 +730,28 @@ abstract class BasePodcastContentsPeer // 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(PodcastContentsPeer::TABLE_NAME); + $criteria->setPrimaryTableName(PodcastEpisodesPeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { - PodcastContentsPeer::addSelectColumns($criteria); + PodcastEpisodesPeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(PodcastContentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - $criteria->addJoin(PodcastContentsPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -756,12 +766,12 @@ abstract class BasePodcastContentsPeer } /** - * Selects a collection of PodcastContents objects pre-filled with all related objects. + * Selects a collection of PodcastEpisodes 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 PodcastContents objects. + * @return array Array of PodcastEpisodes objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ @@ -771,11 +781,11 @@ abstract class BasePodcastContentsPeer // Set the correct dbName if it has not been overridden if ($criteria->getDbName() == Propel::getDefaultDB()) { - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); } - PodcastContentsPeer::addSelectColumns($criteria); - $startcol2 = PodcastContentsPeer::NUM_HYDRATE_COLUMNS; + PodcastEpisodesPeer::addSelectColumns($criteria); + $startcol2 = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS; CcFilesPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + CcFilesPeer::NUM_HYDRATE_COLUMNS; @@ -783,25 +793,25 @@ abstract class BasePodcastContentsPeer PodcastPeer::addSelectColumns($criteria); $startcol4 = $startcol3 + PodcastPeer::NUM_HYDRATE_COLUMNS; - $criteria->addJoin(PodcastContentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); - $criteria->addJoin(PodcastContentsPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = PodcastContentsPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = PodcastContentsPeer::getInstanceFromPool($key1))) { + $key1 = PodcastEpisodesPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = PodcastEpisodesPeer::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 = PodcastContentsPeer::getOMClass(); + $cls = PodcastEpisodesPeer::getOMClass(); $obj1 = new $cls(); $obj1->hydrate($row); - PodcastContentsPeer::addInstanceToPool($obj1, $key1); + PodcastEpisodesPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined CcFiles rows @@ -818,8 +828,8 @@ abstract class BasePodcastContentsPeer CcFilesPeer::addInstanceToPool($obj2, $key2); } // if obj2 loaded - // Add the $obj1 (PodcastContents) to the collection in $obj2 (CcFiles) - $obj2->addPodcastContents($obj1); + // Add the $obj1 (PodcastEpisodes) to the collection in $obj2 (CcFiles) + $obj2->addPodcastEpisodes($obj1); } // if joined row not null // Add objects for joined Podcast rows @@ -836,8 +846,8 @@ abstract class BasePodcastContentsPeer PodcastPeer::addInstanceToPool($obj3, $key3); } // if obj3 loaded - // Add the $obj1 (PodcastContents) to the collection in $obj3 (Podcast) - $obj3->addPodcastContents($obj1); + // Add the $obj1 (PodcastEpisodes) to the collection in $obj3 (Podcast) + $obj3->addPodcastEpisodes($obj1); } // if joined row not null $results[] = $obj1; @@ -865,26 +875,26 @@ abstract class BasePodcastContentsPeer // 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(PodcastContentsPeer::TABLE_NAME); + $criteria->setPrimaryTableName(PodcastEpisodesPeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { - PodcastContentsPeer::addSelectColumns($criteria); + PodcastEpisodesPeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY should not affect count // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(PodcastContentsPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -916,26 +926,26 @@ abstract class BasePodcastContentsPeer // 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(PodcastContentsPeer::TABLE_NAME); + $criteria->setPrimaryTableName(PodcastEpisodesPeer::TABLE_NAME); if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->setDistinct(); } if (!$criteria->hasSelectClause()) { - PodcastContentsPeer::addSelectColumns($criteria); + PodcastEpisodesPeer::addSelectColumns($criteria); } $criteria->clearOrderByColumns(); // ORDER BY should not affect count // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria->addJoin(PodcastContentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); $stmt = BasePeer::doCount($criteria, $con); @@ -951,12 +961,12 @@ abstract class BasePodcastContentsPeer /** - * Selects a collection of PodcastContents objects pre-filled with all related objects except CcFiles. + * Selects a collection of PodcastEpisodes 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 PodcastContents objects. + * @return array Array of PodcastEpisodes objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ @@ -968,33 +978,33 @@ abstract class BasePodcastContentsPeer // $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(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); } - PodcastContentsPeer::addSelectColumns($criteria); - $startcol2 = PodcastContentsPeer::NUM_HYDRATE_COLUMNS; + PodcastEpisodesPeer::addSelectColumns($criteria); + $startcol2 = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS; PodcastPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + PodcastPeer::NUM_HYDRATE_COLUMNS; - $criteria->addJoin(PodcastContentsPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::PODCAST_ID, PodcastPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = PodcastContentsPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = PodcastContentsPeer::getInstanceFromPool($key1))) { + $key1 = PodcastEpisodesPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = PodcastEpisodesPeer::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 = PodcastContentsPeer::getOMClass(); + $cls = PodcastEpisodesPeer::getOMClass(); $obj1 = new $cls(); $obj1->hydrate($row); - PodcastContentsPeer::addInstanceToPool($obj1, $key1); + PodcastEpisodesPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined Podcast rows @@ -1011,8 +1021,8 @@ abstract class BasePodcastContentsPeer PodcastPeer::addInstanceToPool($obj2, $key2); } // if $obj2 already loaded - // Add the $obj1 (PodcastContents) to the collection in $obj2 (Podcast) - $obj2->addPodcastContents($obj1); + // Add the $obj1 (PodcastEpisodes) to the collection in $obj2 (Podcast) + $obj2->addPodcastEpisodes($obj1); } // if joined row is not null @@ -1025,12 +1035,12 @@ abstract class BasePodcastContentsPeer /** - * Selects a collection of PodcastContents objects pre-filled with all related objects except Podcast. + * Selects a collection of PodcastEpisodes objects pre-filled with all related objects except Podcast. * * @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 PodcastContents objects. + * @return array Array of PodcastEpisodes objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ @@ -1042,33 +1052,33 @@ abstract class BasePodcastContentsPeer // $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(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); } - PodcastContentsPeer::addSelectColumns($criteria); - $startcol2 = PodcastContentsPeer::NUM_HYDRATE_COLUMNS; + PodcastEpisodesPeer::addSelectColumns($criteria); + $startcol2 = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS; CcFilesPeer::addSelectColumns($criteria); $startcol3 = $startcol2 + CcFilesPeer::NUM_HYDRATE_COLUMNS; - $criteria->addJoin(PodcastContentsPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); + $criteria->addJoin(PodcastEpisodesPeer::FILE_ID, CcFilesPeer::ID, $join_behavior); $stmt = BasePeer::doSelect($criteria, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $key1 = PodcastContentsPeer::getPrimaryKeyHashFromRow($row, 0); - if (null !== ($obj1 = PodcastContentsPeer::getInstanceFromPool($key1))) { + $key1 = PodcastEpisodesPeer::getPrimaryKeyHashFromRow($row, 0); + if (null !== ($obj1 = PodcastEpisodesPeer::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 = PodcastContentsPeer::getOMClass(); + $cls = PodcastEpisodesPeer::getOMClass(); $obj1 = new $cls(); $obj1->hydrate($row); - PodcastContentsPeer::addInstanceToPool($obj1, $key1); + PodcastEpisodesPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined CcFiles rows @@ -1085,8 +1095,8 @@ abstract class BasePodcastContentsPeer CcFilesPeer::addInstanceToPool($obj2, $key2); } // if $obj2 already loaded - // Add the $obj1 (PodcastContents) to the collection in $obj2 (CcFiles) - $obj2->addPodcastContents($obj1); + // Add the $obj1 (PodcastEpisodes) to the collection in $obj2 (CcFiles) + $obj2->addPodcastEpisodes($obj1); } // if joined row is not null @@ -1106,7 +1116,7 @@ abstract class BasePodcastContentsPeer */ public static function getTableMap() { - return Propel::getDatabaseMap(PodcastContentsPeer::DATABASE_NAME)->getTable(PodcastContentsPeer::TABLE_NAME); + return Propel::getDatabaseMap(PodcastEpisodesPeer::DATABASE_NAME)->getTable(PodcastEpisodesPeer::TABLE_NAME); } /** @@ -1114,9 +1124,9 @@ abstract class BasePodcastContentsPeer */ public static function buildTableMap() { - $dbMap = Propel::getDatabaseMap(BasePodcastContentsPeer::DATABASE_NAME); - if (!$dbMap->hasTable(BasePodcastContentsPeer::TABLE_NAME)) { - $dbMap->addTableObject(new \PodcastContentsTableMap()); + $dbMap = Propel::getDatabaseMap(BasePodcastEpisodesPeer::DATABASE_NAME); + if (!$dbMap->hasTable(BasePodcastEpisodesPeer::TABLE_NAME)) { + $dbMap->addTableObject(new \PodcastEpisodesTableMap()); } } @@ -1128,13 +1138,13 @@ abstract class BasePodcastContentsPeer */ public static function getOMClass($row = 0, $colnum = 0) { - return PodcastContentsPeer::OM_CLASS; + return PodcastEpisodesPeer::OM_CLASS; } /** - * Performs an INSERT on the database, given a PodcastContents or Criteria object. + * Performs an INSERT on the database, given a PodcastEpisodes or Criteria object. * - * @param mixed $values Criteria or PodcastContents object containing data that is used to create the INSERT statement. + * @param mixed $values Criteria or PodcastEpisodes 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 @@ -1143,22 +1153,22 @@ abstract class BasePodcastContentsPeer public static function doInsert($values, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity } else { - $criteria = $values->buildCriteria(); // build Criteria from PodcastContents object + $criteria = $values->buildCriteria(); // build Criteria from PodcastEpisodes object } - if ($criteria->containsKey(PodcastContentsPeer::ID) && $criteria->keyContainsValue(PodcastContentsPeer::ID) ) { - throw new PropelException('Cannot insert a value for auto-increment primary key ('.PodcastContentsPeer::ID.')'); + if ($criteria->containsKey(PodcastEpisodesPeer::ID) && $criteria->keyContainsValue(PodcastEpisodesPeer::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.PodcastEpisodesPeer::ID.')'); } // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); try { // use transaction because $criteria could contain info @@ -1175,9 +1185,9 @@ abstract class BasePodcastContentsPeer } /** - * Performs an UPDATE on the database, given a PodcastContents or Criteria object. + * Performs an UPDATE on the database, given a PodcastEpisodes or Criteria object. * - * @param mixed $values Criteria or PodcastContents object containing data that is used to create the UPDATE statement. + * @param mixed $values Criteria or PodcastEpisodes 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 @@ -1186,35 +1196,35 @@ abstract class BasePodcastContentsPeer public static function doUpdate($values, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } - $selectCriteria = new Criteria(PodcastContentsPeer::DATABASE_NAME); + $selectCriteria = new Criteria(PodcastEpisodesPeer::DATABASE_NAME); if ($values instanceof Criteria) { $criteria = clone $values; // rename for clarity - $comparison = $criteria->getComparison(PodcastContentsPeer::ID); - $value = $criteria->remove(PodcastContentsPeer::ID); + $comparison = $criteria->getComparison(PodcastEpisodesPeer::ID); + $value = $criteria->remove(PodcastEpisodesPeer::ID); if ($value) { - $selectCriteria->add(PodcastContentsPeer::ID, $value, $comparison); + $selectCriteria->add(PodcastEpisodesPeer::ID, $value, $comparison); } else { - $selectCriteria->setPrimaryTableName(PodcastContentsPeer::TABLE_NAME); + $selectCriteria->setPrimaryTableName(PodcastEpisodesPeer::TABLE_NAME); } - } else { // $values is PodcastContents object + } else { // $values is PodcastEpisodes object $criteria = $values->buildCriteria(); // gets full criteria $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) } // set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); return BasePeer::doUpdate($selectCriteria, $criteria, $con); } /** - * Deletes all rows from the podcast_contents table. + * Deletes all rows from the podcast_episodes table. * * @param PropelPDO $con the connection to use * @return int The number of affected rows (if supported by underlying database driver). @@ -1223,19 +1233,19 @@ abstract class BasePodcastContentsPeer public static function doDeleteAll(PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(PodcastEpisodesPeer::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(PodcastContentsPeer::TABLE_NAME, $con, PodcastContentsPeer::DATABASE_NAME); + $affectedRows += BasePeer::doDeleteAll(PodcastEpisodesPeer::TABLE_NAME, $con, PodcastEpisodesPeer::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). - PodcastContentsPeer::clearInstancePool(); - PodcastContentsPeer::clearRelatedInstancePool(); + PodcastEpisodesPeer::clearInstancePool(); + PodcastEpisodesPeer::clearRelatedInstancePool(); $con->commit(); return $affectedRows; @@ -1246,9 +1256,9 @@ abstract class BasePodcastContentsPeer } /** - * Performs a DELETE on the database, given a PodcastContents or Criteria object OR a primary key value. + * Performs a DELETE on the database, given a PodcastEpisodes or Criteria object OR a primary key value. * - * @param mixed $values Criteria or PodcastContents object or primary key or array of primary keys + * @param mixed $values Criteria or PodcastEpisodes 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 @@ -1259,32 +1269,32 @@ abstract class BasePodcastContentsPeer public static function doDelete($values, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); + $con = Propel::getConnection(PodcastEpisodesPeer::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. - PodcastContentsPeer::clearInstancePool(); + PodcastEpisodesPeer::clearInstancePool(); // rename for clarity $criteria = clone $values; - } elseif ($values instanceof PodcastContents) { // it's a model object + } elseif ($values instanceof PodcastEpisodes) { // it's a model object // invalidate the cache for this single object - PodcastContentsPeer::removeInstanceFromPool($values); + PodcastEpisodesPeer::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(PodcastContentsPeer::DATABASE_NAME); - $criteria->add(PodcastContentsPeer::ID, (array) $values, Criteria::IN); + $criteria = new Criteria(PodcastEpisodesPeer::DATABASE_NAME); + $criteria->add(PodcastEpisodesPeer::ID, (array) $values, Criteria::IN); // invalidate the cache for this object(s) foreach ((array) $values as $singleval) { - PodcastContentsPeer::removeInstanceFromPool($singleval); + PodcastEpisodesPeer::removeInstanceFromPool($singleval); } } // Set the correct dbName - $criteria->setDbName(PodcastContentsPeer::DATABASE_NAME); + $criteria->setDbName(PodcastEpisodesPeer::DATABASE_NAME); $affectedRows = 0; // initialize var to track total num of affected rows @@ -1294,7 +1304,7 @@ abstract class BasePodcastContentsPeer $con->beginTransaction(); $affectedRows += BasePeer::doDelete($criteria, $con); - PodcastContentsPeer::clearRelatedInstancePool(); + PodcastEpisodesPeer::clearRelatedInstancePool(); $con->commit(); return $affectedRows; @@ -1305,13 +1315,13 @@ abstract class BasePodcastContentsPeer } /** - * Validates all modified columns of given PodcastContents object. + * Validates all modified columns of given PodcastEpisodes 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 PodcastContents $obj The object to validate. + * @param PodcastEpisodes $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. @@ -1321,8 +1331,8 @@ abstract class BasePodcastContentsPeer $columns = array(); if ($cols) { - $dbMap = Propel::getDatabaseMap(PodcastContentsPeer::DATABASE_NAME); - $tableMap = $dbMap->getTable(PodcastContentsPeer::TABLE_NAME); + $dbMap = Propel::getDatabaseMap(PodcastEpisodesPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(PodcastEpisodesPeer::TABLE_NAME); if (! is_array($cols)) { $cols = array($cols); @@ -1338,7 +1348,7 @@ abstract class BasePodcastContentsPeer } - return BasePeer::doValidate(PodcastContentsPeer::DATABASE_NAME, PodcastContentsPeer::TABLE_NAME, $columns); + return BasePeer::doValidate(PodcastEpisodesPeer::DATABASE_NAME, PodcastEpisodesPeer::TABLE_NAME, $columns); } /** @@ -1346,23 +1356,23 @@ abstract class BasePodcastContentsPeer * * @param int $pk the primary key. * @param PropelPDO $con the connection to use - * @return PodcastContents + * @return PodcastEpisodes */ public static function retrieveByPK($pk, PropelPDO $con = null) { - if (null !== ($obj = PodcastContentsPeer::getInstanceFromPool((string) $pk))) { + if (null !== ($obj = PodcastEpisodesPeer::getInstanceFromPool((string) $pk))) { return $obj; } if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } - $criteria = new Criteria(PodcastContentsPeer::DATABASE_NAME); - $criteria->add(PodcastContentsPeer::ID, $pk); + $criteria = new Criteria(PodcastEpisodesPeer::DATABASE_NAME); + $criteria->add(PodcastEpisodesPeer::ID, $pk); - $v = PodcastContentsPeer::doSelect($criteria, $con); + $v = PodcastEpisodesPeer::doSelect($criteria, $con); return !empty($v) > 0 ? $v[0] : null; } @@ -1372,31 +1382,31 @@ abstract class BasePodcastContentsPeer * * @param array $pks List of primary keys * @param PropelPDO $con the connection to use - * @return PodcastContents[] + * @return PodcastEpisodes[] * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, PropelPDO $con = null) { if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { - $criteria = new Criteria(PodcastContentsPeer::DATABASE_NAME); - $criteria->add(PodcastContentsPeer::ID, $pks, Criteria::IN); - $objs = PodcastContentsPeer::doSelect($criteria, $con); + $criteria = new Criteria(PodcastEpisodesPeer::DATABASE_NAME); + $criteria->add(PodcastEpisodesPeer::ID, $pks, Criteria::IN); + $objs = PodcastEpisodesPeer::doSelect($criteria, $con); } return $objs; } -} // BasePodcastContentsPeer +} // BasePodcastEpisodesPeer // This is the static code needed to register the TableMap for this table with the main Propel class. // -BasePodcastContentsPeer::buildTableMap(); +BasePodcastEpisodesPeer::buildTableMap(); diff --git a/airtime_mvc/application/models/airtime/om/BasePodcastContentsQuery.php b/airtime_mvc/application/models/airtime/om/BasePodcastEpisodesQuery.php similarity index 68% rename from airtime_mvc/application/models/airtime/om/BasePodcastContentsQuery.php rename to airtime_mvc/application/models/airtime/om/BasePodcastEpisodesQuery.php index 65d9fdf75..640856220 100644 --- a/airtime_mvc/application/models/airtime/om/BasePodcastContentsQuery.php +++ b/airtime_mvc/application/models/airtime/om/BasePodcastEpisodesQuery.php @@ -2,50 +2,58 @@ /** - * Base class that represents a query for the 'podcast_contents' table. + * Base class that represents a query for the 'podcast_episodes' table. * * * - * @method PodcastContentsQuery orderByDbId($order = Criteria::ASC) Order by the id column - * @method PodcastContentsQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column - * @method PodcastContentsQuery orderByDbPodcastId($order = Criteria::ASC) Order by the podcast_id column - * @method PodcastContentsQuery orderByDbPublicationDate($order = Criteria::ASC) Order by the publication_date column + * @method PodcastEpisodesQuery orderByDbId($order = Criteria::ASC) Order by the id column + * @method PodcastEpisodesQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column + * @method PodcastEpisodesQuery orderByDbPodcastId($order = Criteria::ASC) Order by the podcast_id column + * @method PodcastEpisodesQuery orderByDbPublicationDate($order = Criteria::ASC) Order by the publication_date column + * @method PodcastEpisodesQuery orderByDbDownloadUrl($order = Criteria::ASC) Order by the download_url column + * @method PodcastEpisodesQuery orderByDbEpisodeGuid($order = Criteria::ASC) Order by the episode_guid column * - * @method PodcastContentsQuery groupByDbId() Group by the id column - * @method PodcastContentsQuery groupByDbFileId() Group by the file_id column - * @method PodcastContentsQuery groupByDbPodcastId() Group by the podcast_id column - * @method PodcastContentsQuery groupByDbPublicationDate() Group by the publication_date column + * @method PodcastEpisodesQuery groupByDbId() Group by the id column + * @method PodcastEpisodesQuery groupByDbFileId() Group by the file_id column + * @method PodcastEpisodesQuery groupByDbPodcastId() Group by the podcast_id column + * @method PodcastEpisodesQuery groupByDbPublicationDate() Group by the publication_date column + * @method PodcastEpisodesQuery groupByDbDownloadUrl() Group by the download_url column + * @method PodcastEpisodesQuery groupByDbEpisodeGuid() Group by the episode_guid column * - * @method PodcastContentsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query - * @method PodcastContentsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query - * @method PodcastContentsQuery innerJoin($relation) Adds a INNER JOIN clause to the query + * @method PodcastEpisodesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query + * @method PodcastEpisodesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query + * @method PodcastEpisodesQuery innerJoin($relation) Adds a INNER JOIN clause to the query * - * @method PodcastContentsQuery leftJoinCcFiles($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcFiles relation - * @method PodcastContentsQuery rightJoinCcFiles($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcFiles relation - * @method PodcastContentsQuery innerJoinCcFiles($relationAlias = null) Adds a INNER JOIN clause to the query using the CcFiles relation + * @method PodcastEpisodesQuery leftJoinCcFiles($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcFiles relation + * @method PodcastEpisodesQuery rightJoinCcFiles($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcFiles relation + * @method PodcastEpisodesQuery innerJoinCcFiles($relationAlias = null) Adds a INNER JOIN clause to the query using the CcFiles relation * - * @method PodcastContentsQuery leftJoinPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the Podcast relation - * @method PodcastContentsQuery rightJoinPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Podcast relation - * @method PodcastContentsQuery innerJoinPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the Podcast relation + * @method PodcastEpisodesQuery leftJoinPodcast($relationAlias = null) Adds a LEFT JOIN clause to the query using the Podcast relation + * @method PodcastEpisodesQuery rightJoinPodcast($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Podcast relation + * @method PodcastEpisodesQuery innerJoinPodcast($relationAlias = null) Adds a INNER JOIN clause to the query using the Podcast relation * - * @method PodcastContents findOne(PropelPDO $con = null) Return the first PodcastContents matching the query - * @method PodcastContents findOneOrCreate(PropelPDO $con = null) Return the first PodcastContents matching the query, or a new PodcastContents object populated from the query conditions when no match is found + * @method PodcastEpisodes findOne(PropelPDO $con = null) Return the first PodcastEpisodes matching the query + * @method PodcastEpisodes findOneOrCreate(PropelPDO $con = null) Return the first PodcastEpisodes matching the query, or a new PodcastEpisodes object populated from the query conditions when no match is found * - * @method PodcastContents findOneByDbFileId(int $file_id) Return the first PodcastContents filtered by the file_id column - * @method PodcastContents findOneByDbPodcastId(int $podcast_id) Return the first PodcastContents filtered by the podcast_id column - * @method PodcastContents findOneByDbPublicationDate(string $publication_date) Return the first PodcastContents filtered by the publication_date column + * @method PodcastEpisodes findOneByDbFileId(int $file_id) Return the first PodcastEpisodes filtered by the file_id column + * @method PodcastEpisodes findOneByDbPodcastId(int $podcast_id) Return the first PodcastEpisodes filtered by the podcast_id column + * @method PodcastEpisodes findOneByDbPublicationDate(string $publication_date) Return the first PodcastEpisodes filtered by the publication_date column + * @method PodcastEpisodes findOneByDbDownloadUrl(string $download_url) Return the first PodcastEpisodes filtered by the download_url column + * @method PodcastEpisodes findOneByDbEpisodeGuid(string $episode_guid) Return the first PodcastEpisodes filtered by the episode_guid column * - * @method array findByDbId(int $id) Return PodcastContents objects filtered by the id column - * @method array findByDbFileId(int $file_id) Return PodcastContents objects filtered by the file_id column - * @method array findByDbPodcastId(int $podcast_id) Return PodcastContents objects filtered by the podcast_id column - * @method array findByDbPublicationDate(string $publication_date) Return PodcastContents objects filtered by the publication_date column + * @method array findByDbId(int $id) Return PodcastEpisodes objects filtered by the id column + * @method array findByDbFileId(int $file_id) Return PodcastEpisodes objects filtered by the file_id column + * @method array findByDbPodcastId(int $podcast_id) Return PodcastEpisodes objects filtered by the podcast_id column + * @method array findByDbPublicationDate(string $publication_date) Return PodcastEpisodes objects filtered by the publication_date column + * @method array findByDbDownloadUrl(string $download_url) Return PodcastEpisodes objects filtered by the download_url column + * @method array findByDbEpisodeGuid(string $episode_guid) Return PodcastEpisodes objects filtered by the episode_guid column * * @package propel.generator.airtime.om */ -abstract class BasePodcastContentsQuery extends ModelCriteria +abstract class BasePodcastEpisodesQuery extends ModelCriteria { /** - * Initializes internal state of BasePodcastContentsQuery object. + * Initializes internal state of BasePodcastEpisodesQuery object. * * @param string $dbName The dabase name * @param string $modelName The phpName of a model, e.g. 'Book' @@ -57,25 +65,25 @@ abstract class BasePodcastContentsQuery extends ModelCriteria $dbName = 'airtime'; } if (null === $modelName) { - $modelName = 'PodcastContents'; + $modelName = 'PodcastEpisodes'; } parent::__construct($dbName, $modelName, $modelAlias); } /** - * Returns a new PodcastContentsQuery object. + * Returns a new PodcastEpisodesQuery object. * * @param string $modelAlias The alias of a model in the query - * @param PodcastContentsQuery|Criteria $criteria Optional Criteria to build the query from + * @param PodcastEpisodesQuery|Criteria $criteria Optional Criteria to build the query from * - * @return PodcastContentsQuery + * @return PodcastEpisodesQuery */ public static function create($modelAlias = null, $criteria = null) { - if ($criteria instanceof PodcastContentsQuery) { + if ($criteria instanceof PodcastEpisodesQuery) { return $criteria; } - $query = new PodcastContentsQuery(null, null, $modelAlias); + $query = new PodcastEpisodesQuery(null, null, $modelAlias); if ($criteria instanceof Criteria) { $query->mergeWith($criteria); @@ -96,19 +104,19 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param mixed $key Primary key to use for the query * @param PropelPDO $con an optional connection object * - * @return PodcastContents|PodcastContents[]|mixed the result, formatted by the current formatter + * @return PodcastEpisodes|PodcastEpisodes[]|mixed the result, formatted by the current formatter */ public function findPk($key, $con = null) { if ($key === null) { return null; } - if ((null !== ($obj = PodcastContentsPeer::getInstanceFromPool((string) $key))) && !$this->formatter) { + if ((null !== ($obj = PodcastEpisodesPeer::getInstanceFromPool((string) $key))) && !$this->formatter) { // the object is already in the instance pool return $obj; } if ($con === null) { - $con = Propel::getConnection(PodcastContentsPeer::DATABASE_NAME, Propel::CONNECTION_READ); + $con = Propel::getConnection(PodcastEpisodesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $this->basePreSelect($con); if ($this->formatter || $this->modelAlias || $this->with || $this->select @@ -126,7 +134,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param mixed $key Primary key to use for the query * @param PropelPDO $con A connection object * - * @return PodcastContents A model object, or null if the key is not found + * @return PodcastEpisodes A model object, or null if the key is not found * @throws PropelException */ public function findOneByDbId($key, $con = null) @@ -141,12 +149,12 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param mixed $key Primary key to use for the query * @param PropelPDO $con A connection object * - * @return PodcastContents A model object, or null if the key is not found + * @return PodcastEpisodes A model object, or null if the key is not found * @throws PropelException */ protected function findPkSimple($key, $con) { - $sql = 'SELECT "id", "file_id", "podcast_id", "publication_date" FROM "podcast_contents" WHERE "id" = :p0'; + $sql = 'SELECT "id", "file_id", "podcast_id", "publication_date", "download_url", "episode_guid" FROM "podcast_episodes" WHERE "id" = :p0'; try { $stmt = $con->prepare($sql); $stmt->bindValue(':p0', $key, PDO::PARAM_INT); @@ -157,9 +165,9 @@ abstract class BasePodcastContentsQuery extends ModelCriteria } $obj = null; if ($row = $stmt->fetch(PDO::FETCH_NUM)) { - $obj = new PodcastContents(); + $obj = new PodcastEpisodes(); $obj->hydrate($row); - PodcastContentsPeer::addInstanceToPool($obj, (string) $key); + PodcastEpisodesPeer::addInstanceToPool($obj, (string) $key); } $stmt->closeCursor(); @@ -172,7 +180,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param mixed $key Primary key to use for the query * @param PropelPDO $con A connection object * - * @return PodcastContents|PodcastContents[]|mixed the result, formatted by the current formatter + * @return PodcastEpisodes|PodcastEpisodes[]|mixed the result, formatted by the current formatter */ protected function findPkComplex($key, $con) { @@ -193,7 +201,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param array $keys Primary keys to use for the query * @param PropelPDO $con an optional connection object * - * @return PropelObjectCollection|PodcastContents[]|mixed the list of results, formatted by the current formatter + * @return PropelObjectCollection|PodcastEpisodes[]|mixed the list of results, formatted by the current formatter */ public function findPks($keys, $con = null) { @@ -214,12 +222,12 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * * @param mixed $key Primary key to use for the query * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ public function filterByPrimaryKey($key) { - return $this->addUsingAlias(PodcastContentsPeer::ID, $key, Criteria::EQUAL); + return $this->addUsingAlias(PodcastEpisodesPeer::ID, $key, Criteria::EQUAL); } /** @@ -227,12 +235,12 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * * @param array $keys The list of primary key to use for the query * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ public function filterByPrimaryKeys($keys) { - return $this->addUsingAlias(PodcastContentsPeer::ID, $keys, Criteria::IN); + return $this->addUsingAlias(PodcastEpisodesPeer::ID, $keys, Criteria::IN); } /** @@ -252,18 +260,18 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ public function filterByDbId($dbId = null, $comparison = null) { if (is_array($dbId)) { $useMinMax = false; if (isset($dbId['min'])) { - $this->addUsingAlias(PodcastContentsPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($dbId['max'])) { - $this->addUsingAlias(PodcastContentsPeer::ID, $dbId['max'], Criteria::LESS_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::ID, $dbId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { @@ -274,7 +282,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria } } - return $this->addUsingAlias(PodcastContentsPeer::ID, $dbId, $comparison); + return $this->addUsingAlias(PodcastEpisodesPeer::ID, $dbId, $comparison); } /** @@ -296,18 +304,18 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery 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(PodcastContentsPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::FILE_ID, $dbFileId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($dbFileId['max'])) { - $this->addUsingAlias(PodcastContentsPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::FILE_ID, $dbFileId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { @@ -318,7 +326,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria } } - return $this->addUsingAlias(PodcastContentsPeer::FILE_ID, $dbFileId, $comparison); + return $this->addUsingAlias(PodcastEpisodesPeer::FILE_ID, $dbFileId, $comparison); } /** @@ -340,18 +348,18 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ public function filterByDbPodcastId($dbPodcastId = null, $comparison = null) { if (is_array($dbPodcastId)) { $useMinMax = false; if (isset($dbPodcastId['min'])) { - $this->addUsingAlias(PodcastContentsPeer::PODCAST_ID, $dbPodcastId['min'], Criteria::GREATER_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::PODCAST_ID, $dbPodcastId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($dbPodcastId['max'])) { - $this->addUsingAlias(PodcastContentsPeer::PODCAST_ID, $dbPodcastId['max'], Criteria::LESS_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::PODCAST_ID, $dbPodcastId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { @@ -362,7 +370,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria } } - return $this->addUsingAlias(PodcastContentsPeer::PODCAST_ID, $dbPodcastId, $comparison); + return $this->addUsingAlias(PodcastEpisodesPeer::PODCAST_ID, $dbPodcastId, $comparison); } /** @@ -383,18 +391,18 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ public function filterByDbPublicationDate($dbPublicationDate = null, $comparison = null) { if (is_array($dbPublicationDate)) { $useMinMax = false; if (isset($dbPublicationDate['min'])) { - $this->addUsingAlias(PodcastContentsPeer::PUBLICATION_DATE, $dbPublicationDate['min'], Criteria::GREATER_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::PUBLICATION_DATE, $dbPublicationDate['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($dbPublicationDate['max'])) { - $this->addUsingAlias(PodcastContentsPeer::PUBLICATION_DATE, $dbPublicationDate['max'], Criteria::LESS_EQUAL); + $this->addUsingAlias(PodcastEpisodesPeer::PUBLICATION_DATE, $dbPublicationDate['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { @@ -405,7 +413,65 @@ abstract class BasePodcastContentsQuery extends ModelCriteria } } - return $this->addUsingAlias(PodcastContentsPeer::PUBLICATION_DATE, $dbPublicationDate, $comparison); + return $this->addUsingAlias(PodcastEpisodesPeer::PUBLICATION_DATE, $dbPublicationDate, $comparison); + } + + /** + * Filter the query on the download_url column + * + * Example usage: + * + * $query->filterByDbDownloadUrl('fooValue'); // WHERE download_url = 'fooValue' + * $query->filterByDbDownloadUrl('%fooValue%'); // WHERE download_url LIKE '%fooValue%' + * + * + * @param string $dbDownloadUrl 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 PodcastEpisodesQuery The current query, for fluid interface + */ + public function filterByDbDownloadUrl($dbDownloadUrl = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbDownloadUrl)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbDownloadUrl)) { + $dbDownloadUrl = str_replace('*', '%', $dbDownloadUrl); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(PodcastEpisodesPeer::DOWNLOAD_URL, $dbDownloadUrl, $comparison); + } + + /** + * Filter the query on the episode_guid column + * + * Example usage: + * + * $query->filterByDbEpisodeGuid('fooValue'); // WHERE episode_guid = 'fooValue' + * $query->filterByDbEpisodeGuid('%fooValue%'); // WHERE episode_guid LIKE '%fooValue%' + * + * + * @param string $dbEpisodeGuid 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 PodcastEpisodesQuery The current query, for fluid interface + */ + public function filterByDbEpisodeGuid($dbEpisodeGuid = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($dbEpisodeGuid)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $dbEpisodeGuid)) { + $dbEpisodeGuid = str_replace('*', '%', $dbEpisodeGuid); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(PodcastEpisodesPeer::EPISODE_GUID, $dbEpisodeGuid, $comparison); } /** @@ -414,21 +480,21 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param CcFiles|PropelObjectCollection $ccFiles The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByCcFiles($ccFiles, $comparison = null) { if ($ccFiles instanceof CcFiles) { return $this - ->addUsingAlias(PodcastContentsPeer::FILE_ID, $ccFiles->getDbId(), $comparison); + ->addUsingAlias(PodcastEpisodesPeer::FILE_ID, $ccFiles->getDbId(), $comparison); } elseif ($ccFiles instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this - ->addUsingAlias(PodcastContentsPeer::FILE_ID, $ccFiles->toKeyValue('PrimaryKey', 'DbId'), $comparison); + ->addUsingAlias(PodcastEpisodesPeer::FILE_ID, $ccFiles->toKeyValue('PrimaryKey', 'DbId'), $comparison); } else { throw new PropelException('filterByCcFiles() only accepts arguments of type CcFiles or PropelCollection'); } @@ -440,7 +506,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ public function joinCcFiles($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -490,21 +556,21 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param Podcast|PropelObjectCollection $podcast The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByPodcast($podcast, $comparison = null) { if ($podcast instanceof Podcast) { return $this - ->addUsingAlias(PodcastContentsPeer::PODCAST_ID, $podcast->getDbId(), $comparison); + ->addUsingAlias(PodcastEpisodesPeer::PODCAST_ID, $podcast->getDbId(), $comparison); } elseif ($podcast instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this - ->addUsingAlias(PodcastContentsPeer::PODCAST_ID, $podcast->toKeyValue('PrimaryKey', 'DbId'), $comparison); + ->addUsingAlias(PodcastEpisodesPeer::PODCAST_ID, $podcast->toKeyValue('PrimaryKey', 'DbId'), $comparison); } else { throw new PropelException('filterByPodcast() only accepts arguments of type Podcast or PropelCollection'); } @@ -516,7 +582,7 @@ abstract class BasePodcastContentsQuery extends ModelCriteria * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ public function joinPodcast($relationAlias = null, $joinType = Criteria::INNER_JOIN) { @@ -563,14 +629,14 @@ abstract class BasePodcastContentsQuery extends ModelCriteria /** * Exclude object from result * - * @param PodcastContents $podcastContents Object to remove from the list of results + * @param PodcastEpisodes $podcastEpisodes Object to remove from the list of results * - * @return PodcastContentsQuery The current query, for fluid interface + * @return PodcastEpisodesQuery The current query, for fluid interface */ - public function prune($podcastContents = null) + public function prune($podcastEpisodes = null) { - if ($podcastContents) { - $this->addUsingAlias(PodcastContentsPeer::ID, $podcastContents->getDbId(), Criteria::NOT_EQUAL); + if ($podcastEpisodes) { + $this->addUsingAlias(PodcastEpisodesPeer::ID, $podcastEpisodes->getDbId(), Criteria::NOT_EQUAL); } return $this; diff --git a/airtime_mvc/application/models/airtime/om/BasePodcastPeer.php b/airtime_mvc/application/models/airtime/om/BasePodcastPeer.php index 3b37465a6..25c910177 100644 --- a/airtime_mvc/application/models/airtime/om/BasePodcastPeer.php +++ b/airtime_mvc/application/models/airtime/om/BasePodcastPeer.php @@ -390,9 +390,9 @@ abstract class BasePodcastPeer */ public static function clearRelatedInstancePool() { - // Invalidate objects in PodcastContentsPeer instance pool, + // Invalidate objects in PodcastEpisodesPeer instance pool, // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. - PodcastContentsPeer::clearInstancePool(); + PodcastEpisodesPeer::clearInstancePool(); } /** diff --git a/airtime_mvc/application/models/airtime/om/BasePodcastQuery.php b/airtime_mvc/application/models/airtime/om/BasePodcastQuery.php index ce0f41a0f..92453e360 100644 --- a/airtime_mvc/application/models/airtime/om/BasePodcastQuery.php +++ b/airtime_mvc/application/models/airtime/om/BasePodcastQuery.php @@ -32,9 +32,9 @@ * @method PodcastQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation * @method PodcastQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation * - * @method PodcastQuery leftJoinPodcastContents($relationAlias = null) Adds a LEFT JOIN clause to the query using the PodcastContents relation - * @method PodcastQuery rightJoinPodcastContents($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PodcastContents relation - * @method PodcastQuery innerJoinPodcastContents($relationAlias = null) Adds a INNER JOIN clause to the query using the PodcastContents relation + * @method PodcastQuery leftJoinPodcastEpisodes($relationAlias = null) Adds a LEFT JOIN clause to the query using the PodcastEpisodes relation + * @method PodcastQuery rightJoinPodcastEpisodes($relationAlias = null) Adds a RIGHT JOIN clause to the query using the PodcastEpisodes relation + * @method PodcastQuery innerJoinPodcastEpisodes($relationAlias = null) Adds a INNER JOIN clause to the query using the PodcastEpisodes relation * * @method Podcast findOne(PropelPDO $con = null) Return the first Podcast matching the query * @method Podcast findOneOrCreate(PropelPDO $con = null) Return the first Podcast matching the query, or a new Podcast object populated from the query conditions when no match is found @@ -599,41 +599,41 @@ abstract class BasePodcastQuery extends ModelCriteria } /** - * Filter the query by a related PodcastContents object + * Filter the query by a related PodcastEpisodes object * - * @param PodcastContents|PropelObjectCollection $podcastContents the related object to use as filter + * @param PodcastEpisodes|PropelObjectCollection $podcastEpisodes the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return PodcastQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ - public function filterByPodcastContents($podcastContents, $comparison = null) + public function filterByPodcastEpisodes($podcastEpisodes, $comparison = null) { - if ($podcastContents instanceof PodcastContents) { + if ($podcastEpisodes instanceof PodcastEpisodes) { return $this - ->addUsingAlias(PodcastPeer::ID, $podcastContents->getDbPodcastId(), $comparison); - } elseif ($podcastContents instanceof PropelObjectCollection) { + ->addUsingAlias(PodcastPeer::ID, $podcastEpisodes->getDbPodcastId(), $comparison); + } elseif ($podcastEpisodes instanceof PropelObjectCollection) { return $this - ->usePodcastContentsQuery() - ->filterByPrimaryKeys($podcastContents->getPrimaryKeys()) + ->usePodcastEpisodesQuery() + ->filterByPrimaryKeys($podcastEpisodes->getPrimaryKeys()) ->endUse(); } else { - throw new PropelException('filterByPodcastContents() only accepts arguments of type PodcastContents or PropelCollection'); + throw new PropelException('filterByPodcastEpisodes() only accepts arguments of type PodcastEpisodes or PropelCollection'); } } /** - * Adds a JOIN clause to the query using the PodcastContents relation + * Adds a JOIN clause to the query using the PodcastEpisodes relation * * @param string $relationAlias optional alias for the relation * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * * @return PodcastQuery The current query, for fluid interface */ - public function joinPodcastContents($relationAlias = null, $joinType = Criteria::INNER_JOIN) + public function joinPodcastEpisodes($relationAlias = null, $joinType = Criteria::INNER_JOIN) { $tableMap = $this->getTableMap(); - $relationMap = $tableMap->getRelation('PodcastContents'); + $relationMap = $tableMap->getRelation('PodcastEpisodes'); // create a ModelJoin object for this join $join = new ModelJoin(); @@ -648,14 +648,14 @@ abstract class BasePodcastQuery extends ModelCriteria $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { - $this->addJoinObject($join, 'PodcastContents'); + $this->addJoinObject($join, 'PodcastEpisodes'); } return $this; } /** - * Use the PodcastContents relation PodcastContents object + * Use the PodcastEpisodes relation PodcastEpisodes object * * @see useQuery() * @@ -663,13 +663,13 @@ abstract class BasePodcastQuery 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 PodcastContentsQuery A secondary query class using the current class as primary query + * @return PodcastEpisodesQuery A secondary query class using the current class as primary query */ - public function usePodcastContentsQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + public function usePodcastEpisodesQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this - ->joinPodcastContents($relationAlias, $joinType) - ->useQuery($relationAlias ? $relationAlias : 'PodcastContents', 'PodcastContentsQuery'); + ->joinPodcastEpisodes($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'PodcastEpisodes', 'PodcastEpisodesQuery'); } /** diff --git a/airtime_mvc/build/schema.xml b/airtime_mvc/build/schema.xml index 97a23c6ef..ec5346165 100644 --- a/airtime_mvc/build/schema.xml +++ b/airtime_mvc/build/schema.xml @@ -577,15 +577,17 @@ - +
- + + + - +
diff --git a/airtime_mvc/build/sql/schema.sql b/airtime_mvc/build/sql/schema.sql index d0cee6bae..1e729bb70 100644 --- a/airtime_mvc/build/sql/schema.sql +++ b/airtime_mvc/build/sql/schema.sql @@ -727,17 +727,19 @@ CREATE TABLE "podcast" ); ----------------------------------------------------------------------- --- podcast_contents +-- podcast_episodes ----------------------------------------------------------------------- -DROP TABLE IF EXISTS "podcast_contents" CASCADE; +DROP TABLE IF EXISTS "podcast_episodes" CASCADE; -CREATE TABLE "podcast_contents" +CREATE TABLE "podcast_episodes" ( "id" serial NOT NULL, "file_id" INTEGER NOT NULL, "podcast_id" INTEGER NOT NULL, "publication_date" TIMESTAMP NOT NULL, + "download_url" VARCHAR(512) NOT NULL, + "episode_guid" VARCHAR(512) NOT NULL, PRIMARY KEY ("id") ); @@ -918,12 +920,12 @@ ALTER TABLE "podcast" ADD CONSTRAINT "podcast_owner_fkey" REFERENCES "cc_subjs" ("id") ON DELETE CASCADE; -ALTER TABLE "podcast_contents" ADD CONSTRAINT "podcast_contents_cc_files_fkey" +ALTER TABLE "podcast_episodes" ADD CONSTRAINT "podcast_episodes_cc_files_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE; -ALTER TABLE "podcast_contents" ADD CONSTRAINT "podcast_contents_podcast_id_fkey" +ALTER TABLE "podcast_episodes" ADD CONSTRAINT "podcast_episodes_podcast_id_fkey" FOREIGN KEY ("podcast_id") REFERENCES "podcast" ("id") ON DELETE CASCADE;