feat: use custom intro/outro playlists per show (#2941)

### Description

Having a global intro and outro playlist in settings is not very
flexible for special programming. This adds an override intro/outro
playlist per show. If it is not set, the global one is used. also it's
ignored if there's no autloading at all.

**I have updated the documentation to reflect these changes**:

Yes

### Testing Notes

**What I did:**
Schedule 2 shows, one without defining custom lists, one with defining
custom lists. one hour before the show starts it should be populated
correctly. If you define a global list it shojuld be replaced with the
per-show list.

---------

Co-authored-by: Thomas Göttgens <tgoettgens@mail.com>
This commit is contained in:
Thomas Göttgens 2024-10-14 22:07:41 +02:00 committed by GitHub
parent 5b5c68c628
commit 299be3c142
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
47 changed files with 2281 additions and 182 deletions

View File

@ -0,0 +1,33 @@
# pylint: disable=invalid-name
from django.db import migrations
from ._migrations import legacy_migration_factory
UP = """
ALTER TABLE cc_show ADD COLUMN intro_playlist_id integer DEFAULT NULL;
ALTER TABLE cc_show ADD CONSTRAINT cc_playlist_intro_playlist_fkey FOREIGN KEY (intro_playlist_id) REFERENCES cc_playlist (id) ON DELETE SET NULL;
ALTER TABLE cc_show ADD COLUMN outro_playlist_id integer DEFAULT NULL;
ALTER TABLE cc_show ADD CONSTRAINT cc_playlist_outro_playlist_fkey FOREIGN KEY (outro_playlist_id) REFERENCES cc_playlist (id) ON DELETE SET NULL;
"""
DOWN = """
ALTER TABLE cc_show DROP COLUMN IF EXISTS intro_playlist_id;
ALTER TABLE cc_show DROP CONSTRAINT IF EXISTS cc_playlist_intro_playlist_fkey;
ALTER TABLE cc_show DROP COLUMN IF EXISTS outro_playlist_id;
ALTER TABLE cc_show DROP CONSTRAINT IF EXISTS cc_playlist_outro_playlist_fkey;
"""
class Migration(migrations.Migration):
dependencies = [
("legacy", "0045_add_sessions_table"),
]
operations = [
migrations.RunPython(
code=legacy_migration_factory(
target="46",
sql=UP,
)
)
]

View File

@ -1,2 +1,2 @@
# The schema version is defined using the migration file prefix number # The schema version is defined using the migration file prefix number
LEGACY_SCHEMA_VERSION = "45" LEGACY_SCHEMA_VERSION = "46"

View File

@ -126,6 +126,8 @@ CREATE TABLE "cc_show"
"has_autoplaylist" BOOLEAN DEFAULT 'f' NOT NULL, "has_autoplaylist" BOOLEAN DEFAULT 'f' NOT NULL,
"autoplaylist_id" INTEGER, "autoplaylist_id" INTEGER,
"autoplaylist_repeat" BOOLEAN DEFAULT 'f' NOT NULL, "autoplaylist_repeat" BOOLEAN DEFAULT 'f' NOT NULL,
"intro_playlist_id" INTEGER,
"outro_playlist_id" INTEGER,
PRIMARY KEY ("id") PRIMARY KEY ("id")
); );
@ -718,6 +720,16 @@ ALTER TABLE "cc_show" ADD CONSTRAINT "cc_playlist_autoplaylist_fkey"
REFERENCES "cc_playlist" ("id") REFERENCES "cc_playlist" ("id")
ON DELETE SET NULL; ON DELETE SET NULL;
ALTER TABLE "cc_show" ADD CONSTRAINT "cc_playlist_intro_playlist_fkey"
FOREIGN KEY ("intro_playlist_id")
REFERENCES "cc_playlist" ("id")
ON DELETE SET NULL;
ALTER TABLE "cc_show" ADD CONSTRAINT "cc_playlist_outro_playlist_fkey"
FOREIGN KEY ("outro_playlist_id")
REFERENCES "cc_playlist" ("id")
ON DELETE SET NULL;
ALTER TABLE "cc_show_instances" ADD CONSTRAINT "cc_show_fkey" ALTER TABLE "cc_show_instances" ADD CONSTRAINT "cc_show_fkey"
FOREIGN KEY ("show_id") FOREIGN KEY ("show_id")
REFERENCES "cc_show" ("id") REFERENCES "cc_show" ("id")

View File

@ -69,6 +69,24 @@ class Show(models.Model):
auto_playlist_enabled = models.BooleanField(db_column="has_autoplaylist") auto_playlist_enabled = models.BooleanField(db_column="has_autoplaylist")
auto_playlist_repeat = models.BooleanField(db_column="autoplaylist_repeat") auto_playlist_repeat = models.BooleanField(db_column="autoplaylist_repeat")
intro_playlist = models.ForeignKey(
"schedule.Playlist",
on_delete=models.DO_NOTHING,
blank=True,
null=True,
db_column="intro_playlist_id",
related_name="intro_playlist",
)
outro_playlist = models.ForeignKey(
"schedule.Playlist",
on_delete=models.DO_NOTHING,
blank=True,
null=True,
db_column="outro_playlist_id",
related_name="outro_playlist",
)
hosts = models.ManyToManyField( # type: ignore[var-annotated] hosts = models.ManyToManyField( # type: ignore[var-annotated]
"core.User", "core.User",
through="ShowHost", through="ShowHost",

View File

@ -21,6 +21,8 @@ class ShowSerializer(serializers.ModelSerializer):
"auto_playlist", "auto_playlist",
"auto_playlist_enabled", "auto_playlist_enabled",
"auto_playlist_repeat", "auto_playlist_repeat",
"intro_playlist",
"outro_playlist",
] ]

View File

@ -6409,6 +6409,12 @@ components:
type: boolean type: boolean
auto_playlist_repeat: auto_playlist_repeat:
type: boolean type: boolean
intro_playlist:
type: integer
nullable: true
outro_playlist:
type: integer
nullable: true
PatchedShowDays: PatchedShowDays:
type: object type: object
properties: properties:
@ -7241,6 +7247,12 @@ components:
type: boolean type: boolean
auto_playlist_repeat: auto_playlist_repeat:
type: boolean type: boolean
intro_playlist:
type: integer
nullable: true
outro_playlist:
type: integer
nullable: true
required: required:
- auto_playlist_enabled - auto_playlist_enabled
- auto_playlist_repeat - auto_playlist_repeat

View File

@ -79,6 +79,8 @@ indicator.
| Add Autoloading Playlist? | If checked, allows for the following options | | Add Autoloading Playlist? | If checked, allows for the following options |
| Select Playlist | Select the playlist the show will autofill from (shows autofill exactly one hour before air). If you wish to use a smartblock you must add it to a playlist and then select that playlist. This can be used to auto schedule new podcast episodes to air. | | Select Playlist | Select the playlist the show will autofill from (shows autofill exactly one hour before air). If you wish to use a smartblock you must add it to a playlist and then select that playlist. This can be used to auto schedule new podcast episodes to air. |
| Repeat Playlist Until Show Is Full | If checked, the playlist will be added to the show multiple times until the slot is full. Useful for applying a one-hour music playlist made up of smartblocks to a two-hour show. | | Repeat Playlist Until Show Is Full | If checked, the playlist will be added to the show multiple times until the slot is full. Useful for applying a one-hour music playlist made up of smartblocks to a two-hour show. |
| Select Intro Playlist | Select the playlist to replace the global intro playlist from settings. If you wish to use a smartblock you must add it to a playlist and then select that playlist. |
| Select Outro Playlist | Select the playlist to replace the global outro playlist from settings. If you wish to use a smartblock you must add it to a playlist and then select that playlist. |
| _Live Stream Input_ | | | _Live Stream Input_ | |
| Use LibreTime/Custom Authentication | | | Use LibreTime/Custom Authentication | |
| Show Source | | | Show Source | |

View File

@ -33,8 +33,13 @@ class AutoPlaylistManager
// call the addPlaylist to show function and don't check for user permission to avoid call to non-existant user object // call the addPlaylist to show function and don't check for user permission to avoid call to non-existant user object
$sid = $si->getShowId(); $sid = $si->getShowId();
$playlistrepeat = new Application_Model_Show($sid); $playlistrepeat = new Application_Model_Show($sid);
$introplaylistid = Application_Model_Preference::GetIntroPlaylist(); if (!$introplaylistid = $playlistrepeat->getIntroPlaylistId()) {
$outroplaylistid = Application_Model_Preference::GetOutroPlaylist(); $introplaylistid = Application_Model_Preference::GetIntroPlaylist();
}
if (!$outroplaylistid = $playlistrepeat->getOutroPlaylistId()) {
$outroplaylistid = Application_Model_Preference::GetOutroPlaylist();
}
// we want to check and see if we need to repeat this process until the show is 100% scheduled // we want to check and see if we need to repeat this process until the show is 100% scheduled
// so we create a while loop and break it immediately if repeat until full isn't enabled // so we create a while loop and break it immediately if repeat until full isn't enabled

View File

@ -13,6 +13,8 @@ class Application_Form_AddShowAutoPlaylist extends Zend_Form_SubForm
// and store to assoc array // and store to assoc array
$maxLens = Application_Model_Show::getMaxLengths(); $maxLens = Application_Model_Show::getMaxLengths();
$playlistNames = Application_Model_Library::getPlaylistNames(true);
// Add autoplaylist checkbox element // Add autoplaylist checkbox element
$this->addElement('checkbox', 'add_show_has_autoplaylist', [ $this->addElement('checkbox', 'add_show_has_autoplaylist', [
'label' => _('Add Autoloading Playlist ?'), 'label' => _('Add Autoloading Playlist ?'),
@ -23,10 +25,11 @@ class Application_Form_AddShowAutoPlaylist extends Zend_Form_SubForm
$autoPlaylistSelect = new Zend_Form_Element_Select('add_show_autoplaylist_id'); $autoPlaylistSelect = new Zend_Form_Element_Select('add_show_autoplaylist_id');
$autoPlaylistSelect->setLabel(_('Select Playlist')); $autoPlaylistSelect->setLabel(_('Select Playlist'));
$autoPlaylistSelect->setMultiOptions(Application_Model_Library::getPlaylistNames(true)); $autoPlaylistSelect->setMultiOptions($playlistNames);
$autoPlaylistSelect->setValue(null); $autoPlaylistSelect->setValue(null);
$autoPlaylistSelect->setDecorators(['ViewHelper']); $autoPlaylistSelect->setDecorators(['ViewHelper']);
$this->addElement($autoPlaylistSelect); $this->addElement($autoPlaylistSelect);
// Add autoplaylist checkbox element // Add autoplaylist checkbox element
$this->addElement('checkbox', 'add_show_autoplaylist_repeat', [ $this->addElement('checkbox', 'add_show_autoplaylist_repeat', [
'label' => _('Repeat Playlist Until Show is Full ?'), 'label' => _('Repeat Playlist Until Show is Full ?'),
@ -34,6 +37,23 @@ class Application_Form_AddShowAutoPlaylist extends Zend_Form_SubForm
'class' => 'input_text', 'class' => 'input_text',
'decorators' => ['ViewHelper'], 'decorators' => ['ViewHelper'],
]); ]);
// Append 'Default' to 'None' option
$playlistNames[null] = _('None') . '/' . _('Default');
$introPlaylistSelect = new Zend_Form_Element_Select('add_show_intro_playlist_id');
$introPlaylistSelect->setLabel(_('Select Intro Playlist'));
$introPlaylistSelect->setMultiOptions($playlistNames);
$introPlaylistSelect->setValue(null);
$introPlaylistSelect->setDecorators(['ViewHelper']);
$this->addElement($introPlaylistSelect);
$outroPlaylistSelect = new Zend_Form_Element_Select('add_show_outro_playlist_id');
$outroPlaylistSelect->setLabel(_('Select Outro Playlist'));
$outroPlaylistSelect->setMultiOptions($playlistNames);
$outroPlaylistSelect->setValue(null);
$outroPlaylistSelect->setDecorators(['ViewHelper']);
$this->addElement($outroPlaylistSelect);
} }
public function disable() public function disable()

View File

@ -169,6 +169,32 @@ class Application_Model_Show
$show->setDbAutoPlaylistId($playlistid); $show->setDbAutoPlaylistId($playlistid);
} }
public function getIntroPlaylistId()
{
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbIntroPlaylistId();
}
public function setIntroPlaylistId($playlistid)
{
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbIntroPlaylistId($playlistid);
}
public function getOutroPlaylistId()
{
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbOutroPlaylistId();
}
public function setOutroPlaylistId($playlistid)
{
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbOutroPlaylistId($playlistid);
}
public function getHosts() public function getHosts()
{ {
$sql = <<<'SQL' $sql = <<<'SQL'

View File

@ -327,6 +327,8 @@ class CcShow extends BaseCcShow
$info['has_autoplaylist'] = $this->getDbHasAutoPlaylist(); $info['has_autoplaylist'] = $this->getDbHasAutoPlaylist();
$info['autoplaylist_id'] = $this->getDbAutoPlaylistId(); $info['autoplaylist_id'] = $this->getDbAutoPlaylistId();
$info['autoplaylist_repeat'] = $this->getDbAutoPlaylistRepeat(); $info['autoplaylist_repeat'] = $this->getDbAutoPlaylistRepeat();
$info['intro_playlist_id'] = $this->getDbIntroPlaylistId();
$info['outro_playlist_id'] = $this->getDbOutroPlaylistId();
return $info; return $info;
} }

View File

@ -55,7 +55,9 @@ class CcPlaylistTableMap extends TableMap
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null); $this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcShow', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'autoplaylist_id', ), 'SET NULL', null, 'CcShows'); $this->addRelation('CcShowRelatedByDbAutoPlaylistId', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'autoplaylist_id', ), 'SET NULL', null, 'CcShowsRelatedByDbAutoPlaylistId');
$this->addRelation('CcShowRelatedByDbIntroPlaylistId', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'intro_playlist_id', ), 'SET NULL', null, 'CcShowsRelatedByDbIntroPlaylistId');
$this->addRelation('CcShowRelatedByDbOutroPlaylistId', 'CcShow', RelationMap::ONE_TO_MANY, array('id' => 'outro_playlist_id', ), 'SET NULL', null, 'CcShowsRelatedByDbOutroPlaylistId');
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null, 'CcPlaylistcontentss'); $this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null, 'CcPlaylistcontentss');
} // buildRelations() } // buildRelations()

View File

@ -56,6 +56,8 @@ class CcShowTableMap extends TableMap
$this->addColumn('has_autoplaylist', 'DbHasAutoPlaylist', 'BOOLEAN', true, null, false); $this->addColumn('has_autoplaylist', 'DbHasAutoPlaylist', 'BOOLEAN', true, null, false);
$this->addForeignKey('autoplaylist_id', 'DbAutoPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null); $this->addForeignKey('autoplaylist_id', 'DbAutoPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null);
$this->addColumn('autoplaylist_repeat', 'DbAutoPlaylistRepeat', 'BOOLEAN', true, null, false); $this->addColumn('autoplaylist_repeat', 'DbAutoPlaylistRepeat', 'BOOLEAN', true, null, false);
$this->addForeignKey('intro_playlist_id', 'DbIntroPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null);
$this->addForeignKey('outro_playlist_id', 'DbOutroPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null);
// validators // validators
} // initialize() } // initialize()
@ -64,7 +66,9 @@ class CcShowTableMap extends TableMap
*/ */
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('autoplaylist_id' => 'id', ), 'SET NULL', null); $this->addRelation('CcPlaylistRelatedByDbAutoPlaylistId', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('autoplaylist_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcPlaylistRelatedByDbIntroPlaylistId', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('intro_playlist_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcPlaylistRelatedByDbOutroPlaylistId', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('outro_playlist_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowInstancess'); $this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowInstancess');
$this->addRelation('CcShowDays', 'CcShowDays', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowDayss'); $this->addRelation('CcShowDays', 'CcShowDays', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowDayss');
$this->addRelation('CcShowRebroadcast', 'CcShowRebroadcast', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowRebroadcasts'); $this->addRelation('CcShowRebroadcast', 'CcShowRebroadcast', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowRebroadcasts');

View File

@ -81,8 +81,20 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
/** /**
* @var PropelObjectCollection|CcShow[] Collection to store aggregation of CcShow objects. * @var PropelObjectCollection|CcShow[] Collection to store aggregation of CcShow objects.
*/ */
protected $collCcShows; protected $collCcShowsRelatedByDbAutoPlaylistId;
protected $collCcShowsPartial; protected $collCcShowsRelatedByDbAutoPlaylistIdPartial;
/**
* @var PropelObjectCollection|CcShow[] Collection to store aggregation of CcShow objects.
*/
protected $collCcShowsRelatedByDbIntroPlaylistId;
protected $collCcShowsRelatedByDbIntroPlaylistIdPartial;
/**
* @var PropelObjectCollection|CcShow[] Collection to store aggregation of CcShow objects.
*/
protected $collCcShowsRelatedByDbOutroPlaylistId;
protected $collCcShowsRelatedByDbOutroPlaylistIdPartial;
/** /**
* @var PropelObjectCollection|CcPlaylistcontents[] Collection to store aggregation of CcPlaylistcontents objects. * @var PropelObjectCollection|CcPlaylistcontents[] Collection to store aggregation of CcPlaylistcontents objects.
@ -114,7 +126,19 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* An array of objects scheduled for deletion. * An array of objects scheduled for deletion.
* @var PropelObjectCollection * @var PropelObjectCollection
*/ */
protected $ccShowsScheduledForDeletion = null; protected $ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = null;
/**
* An array of objects scheduled for deletion.
* @var PropelObjectCollection
*/
protected $ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = null;
/** /**
* An array of objects scheduled for deletion. * An array of objects scheduled for deletion.
@ -546,7 +570,11 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects? if ($deep) { // also de-associate any related objects?
$this->aCcSubjs = null; $this->aCcSubjs = null;
$this->collCcShows = null; $this->collCcShowsRelatedByDbAutoPlaylistId = null;
$this->collCcShowsRelatedByDbIntroPlaylistId = null;
$this->collCcShowsRelatedByDbOutroPlaylistId = null;
$this->collCcPlaylistcontentss = null; $this->collCcPlaylistcontentss = null;
@ -694,18 +722,54 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->resetModified(); $this->resetModified();
} }
if ($this->ccShowsScheduledForDeletion !== null) { if ($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion !== null) {
if (!$this->ccShowsScheduledForDeletion->isEmpty()) { if (!$this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->isEmpty()) {
foreach ($this->ccShowsScheduledForDeletion as $ccShow) { foreach ($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion as $ccShowRelatedByDbAutoPlaylistId) {
// need to save related object because we set the relation to null // need to save related object because we set the relation to null
$ccShow->save($con); $ccShowRelatedByDbAutoPlaylistId->save($con);
} }
$this->ccShowsScheduledForDeletion = null; $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = null;
} }
} }
if ($this->collCcShows !== null) { if ($this->collCcShowsRelatedByDbAutoPlaylistId !== null) {
foreach ($this->collCcShows as $referrerFK) { foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
if ($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion !== null) {
if (!$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->isEmpty()) {
foreach ($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion as $ccShowRelatedByDbIntroPlaylistId) {
// need to save related object because we set the relation to null
$ccShowRelatedByDbIntroPlaylistId->save($con);
}
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = null;
}
}
if ($this->collCcShowsRelatedByDbIntroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con);
}
}
}
if ($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion !== null) {
if (!$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->isEmpty()) {
foreach ($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion as $ccShowRelatedByDbOutroPlaylistId) {
// need to save related object because we set the relation to null
$ccShowRelatedByDbOutroPlaylistId->save($con);
}
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = null;
}
}
if ($this->collCcShowsRelatedByDbOutroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $referrerFK) {
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
$affectedRows += $referrerFK->save($con); $affectedRows += $referrerFK->save($con);
} }
@ -922,8 +986,24 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
} }
if ($this->collCcShows !== null) { if ($this->collCcShowsRelatedByDbAutoPlaylistId !== null) {
foreach ($this->collCcShows as $referrerFK) { foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
if ($this->collCcShowsRelatedByDbIntroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $referrerFK) {
if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
}
}
}
if ($this->collCcShowsRelatedByDbOutroPlaylistId !== null) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $referrerFK) {
if (!$referrerFK->validate($columns)) { if (!$referrerFK->validate($columns)) {
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures()); $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
} }
@ -1040,8 +1120,14 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if (null !== $this->aCcSubjs) { if (null !== $this->aCcSubjs) {
$result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); $result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
} }
if (null !== $this->collCcShows) { if (null !== $this->collCcShowsRelatedByDbAutoPlaylistId) {
$result['CcShows'] = $this->collCcShows->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); $result['CcShowsRelatedByDbAutoPlaylistId'] = $this->collCcShowsRelatedByDbAutoPlaylistId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collCcShowsRelatedByDbIntroPlaylistId) {
$result['CcShowsRelatedByDbIntroPlaylistId'] = $this->collCcShowsRelatedByDbIntroPlaylistId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
}
if (null !== $this->collCcShowsRelatedByDbOutroPlaylistId) {
$result['CcShowsRelatedByDbOutroPlaylistId'] = $this->collCcShowsRelatedByDbOutroPlaylistId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
} }
if (null !== $this->collCcPlaylistcontentss) { if (null !== $this->collCcPlaylistcontentss) {
$result['CcPlaylistcontentss'] = $this->collCcPlaylistcontentss->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); $result['CcPlaylistcontentss'] = $this->collCcPlaylistcontentss->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
@ -1227,9 +1313,21 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
// store object hash to prevent cycle // store object hash to prevent cycle
$this->startCopy = true; $this->startCopy = true;
foreach ($this->getCcShows() as $relObj) { foreach ($this->getCcShowsRelatedByDbAutoPlaylistId() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcShow($relObj->copy($deepCopy)); $copyObj->addCcShowRelatedByDbAutoPlaylistId($relObj->copy($deepCopy));
}
}
foreach ($this->getCcShowsRelatedByDbIntroPlaylistId() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcShowRelatedByDbIntroPlaylistId($relObj->copy($deepCopy));
}
}
foreach ($this->getCcShowsRelatedByDbOutroPlaylistId() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcShowRelatedByDbOutroPlaylistId($relObj->copy($deepCopy));
} }
} }
@ -1352,8 +1450,14 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/ */
public function initRelation($relationName) public function initRelation($relationName)
{ {
if ('CcShow' == $relationName) { if ('CcShowRelatedByDbAutoPlaylistId' == $relationName) {
$this->initCcShows(); $this->initCcShowsRelatedByDbAutoPlaylistId();
}
if ('CcShowRelatedByDbIntroPlaylistId' == $relationName) {
$this->initCcShowsRelatedByDbIntroPlaylistId();
}
if ('CcShowRelatedByDbOutroPlaylistId' == $relationName) {
$this->initCcShowsRelatedByDbOutroPlaylistId();
} }
if ('CcPlaylistcontents' == $relationName) { if ('CcPlaylistcontents' == $relationName) {
$this->initCcPlaylistcontentss(); $this->initCcPlaylistcontentss();
@ -1361,36 +1465,36 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
} }
/** /**
* Clears out the collCcShows collection * Clears out the collCcShowsRelatedByDbAutoPlaylistId collection
* *
* This does not modify the database; however, it will remove any associated objects, causing * This does not modify the database; however, it will remove any associated objects, causing
* them to be refetched by subsequent calls to accessor method. * them to be refetched by subsequent calls to accessor method.
* *
* @return CcPlaylist The current object (for fluent API support) * @return CcPlaylist The current object (for fluent API support)
* @see addCcShows() * @see addCcShowsRelatedByDbAutoPlaylistId()
*/ */
public function clearCcShows() public function clearCcShowsRelatedByDbAutoPlaylistId()
{ {
$this->collCcShows = null; // important to set this to null since that means it is uninitialized $this->collCcShowsRelatedByDbAutoPlaylistId = null; // important to set this to null since that means it is uninitialized
$this->collCcShowsPartial = null; $this->collCcShowsRelatedByDbAutoPlaylistIdPartial = null;
return $this; return $this;
} }
/** /**
* reset is the collCcShows collection loaded partially * reset is the collCcShowsRelatedByDbAutoPlaylistId collection loaded partially
* *
* @return void * @return void
*/ */
public function resetPartialCcShows($v = true) public function resetPartialCcShowsRelatedByDbAutoPlaylistId($v = true)
{ {
$this->collCcShowsPartial = $v; $this->collCcShowsRelatedByDbAutoPlaylistIdPartial = $v;
} }
/** /**
* Initializes the collCcShows collection. * Initializes the collCcShowsRelatedByDbAutoPlaylistId collection.
* *
* By default this just sets the collCcShows collection to an empty array (like clearcollCcShows()); * By default this just sets the collCcShowsRelatedByDbAutoPlaylistId collection to an empty array (like clearcollCcShowsRelatedByDbAutoPlaylistId());
* however, you may wish to override this method in your stub class to provide setting appropriate * 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. * to your application -- for example, setting the initial array to the values stored in database.
* *
@ -1399,13 +1503,13 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* *
* @return void * @return void
*/ */
public function initCcShows($overrideExisting = true) public function initCcShowsRelatedByDbAutoPlaylistId($overrideExisting = true)
{ {
if (null !== $this->collCcShows && !$overrideExisting) { if (null !== $this->collCcShowsRelatedByDbAutoPlaylistId && !$overrideExisting) {
return; return;
} }
$this->collCcShows = new PropelObjectCollection(); $this->collCcShowsRelatedByDbAutoPlaylistId = new PropelObjectCollection();
$this->collCcShows->setModel('CcShow'); $this->collCcShowsRelatedByDbAutoPlaylistId->setModel('CcShow');
} }
/** /**
@ -1422,79 +1526,79 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* @return PropelObjectCollection|CcShow[] List of CcShow objects * @return PropelObjectCollection|CcShow[] List of CcShow objects
* @throws PropelException * @throws PropelException
*/ */
public function getCcShows($criteria = null, PropelPDO $con = null) public function getCcShowsRelatedByDbAutoPlaylistId($criteria = null, PropelPDO $con = null)
{ {
$partial = $this->collCcShowsPartial && !$this->isNew(); $partial = $this->collCcShowsRelatedByDbAutoPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShows || null !== $criteria || $partial) { if (null === $this->collCcShowsRelatedByDbAutoPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShows) { if ($this->isNew() && null === $this->collCcShowsRelatedByDbAutoPlaylistId) {
// return empty collection // return empty collection
$this->initCcShows(); $this->initCcShowsRelatedByDbAutoPlaylistId();
} else { } else {
$collCcShows = CcShowQuery::create(null, $criteria) $collCcShowsRelatedByDbAutoPlaylistId = CcShowQuery::create(null, $criteria)
->filterByCcPlaylist($this) ->filterByCcPlaylistRelatedByDbAutoPlaylistId($this)
->find($con); ->find($con);
if (null !== $criteria) { if (null !== $criteria) {
if (false !== $this->collCcShowsPartial && count($collCcShows)) { if (false !== $this->collCcShowsRelatedByDbAutoPlaylistIdPartial && count($collCcShowsRelatedByDbAutoPlaylistId)) {
$this->initCcShows(false); $this->initCcShowsRelatedByDbAutoPlaylistId(false);
foreach ($collCcShows as $obj) { foreach ($collCcShowsRelatedByDbAutoPlaylistId as $obj) {
if (false == $this->collCcShows->contains($obj)) { if (false == $this->collCcShowsRelatedByDbAutoPlaylistId->contains($obj)) {
$this->collCcShows->append($obj); $this->collCcShowsRelatedByDbAutoPlaylistId->append($obj);
} }
} }
$this->collCcShowsPartial = true; $this->collCcShowsRelatedByDbAutoPlaylistIdPartial = true;
} }
$collCcShows->getInternalIterator()->rewind(); $collCcShowsRelatedByDbAutoPlaylistId->getInternalIterator()->rewind();
return $collCcShows; return $collCcShowsRelatedByDbAutoPlaylistId;
} }
if ($partial && $this->collCcShows) { if ($partial && $this->collCcShowsRelatedByDbAutoPlaylistId) {
foreach ($this->collCcShows as $obj) { foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $obj) {
if ($obj->isNew()) { if ($obj->isNew()) {
$collCcShows[] = $obj; $collCcShowsRelatedByDbAutoPlaylistId[] = $obj;
} }
} }
} }
$this->collCcShows = $collCcShows; $this->collCcShowsRelatedByDbAutoPlaylistId = $collCcShowsRelatedByDbAutoPlaylistId;
$this->collCcShowsPartial = false; $this->collCcShowsRelatedByDbAutoPlaylistIdPartial = false;
} }
} }
return $this->collCcShows; return $this->collCcShowsRelatedByDbAutoPlaylistId;
} }
/** /**
* Sets a collection of CcShow objects related by a one-to-many relationship * Sets a collection of CcShowRelatedByDbAutoPlaylistId objects related by a one-to-many relationship
* to the current object. * to the current object.
* It will also schedule objects for deletion based on a diff between old objects (aka persisted) * It will also schedule objects for deletion based on a diff between old objects (aka persisted)
* and new objects from the given Propel collection. * and new objects from the given Propel collection.
* *
* @param PropelCollection $ccShows A Propel collection. * @param PropelCollection $ccShowsRelatedByDbAutoPlaylistId A Propel collection.
* @param PropelPDO $con Optional connection object * @param PropelPDO $con Optional connection object
* @return CcPlaylist The current object (for fluent API support) * @return CcPlaylist The current object (for fluent API support)
*/ */
public function setCcShows(PropelCollection $ccShows, PropelPDO $con = null) public function setCcShowsRelatedByDbAutoPlaylistId(PropelCollection $ccShowsRelatedByDbAutoPlaylistId, PropelPDO $con = null)
{ {
$ccShowsToDelete = $this->getCcShows(new Criteria(), $con)->diff($ccShows); $ccShowsRelatedByDbAutoPlaylistIdToDelete = $this->getCcShowsRelatedByDbAutoPlaylistId(new Criteria(), $con)->diff($ccShowsRelatedByDbAutoPlaylistId);
$this->ccShowsScheduledForDeletion = $ccShowsToDelete; $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = $ccShowsRelatedByDbAutoPlaylistIdToDelete;
foreach ($ccShowsToDelete as $ccShowRemoved) { foreach ($ccShowsRelatedByDbAutoPlaylistIdToDelete as $ccShowRelatedByDbAutoPlaylistIdRemoved) {
$ccShowRemoved->setCcPlaylist(null); $ccShowRelatedByDbAutoPlaylistIdRemoved->setCcPlaylistRelatedByDbAutoPlaylistId(null);
} }
$this->collCcShows = null; $this->collCcShowsRelatedByDbAutoPlaylistId = null;
foreach ($ccShows as $ccShow) { foreach ($ccShowsRelatedByDbAutoPlaylistId as $ccShowRelatedByDbAutoPlaylistId) {
$this->addCcShow($ccShow); $this->addCcShowRelatedByDbAutoPlaylistId($ccShowRelatedByDbAutoPlaylistId);
} }
$this->collCcShows = $ccShows; $this->collCcShowsRelatedByDbAutoPlaylistId = $ccShowsRelatedByDbAutoPlaylistId;
$this->collCcShowsPartial = false; $this->collCcShowsRelatedByDbAutoPlaylistIdPartial = false;
return $this; return $this;
} }
@ -1508,16 +1612,16 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* @return int Count of related CcShow objects. * @return int Count of related CcShow objects.
* @throws PropelException * @throws PropelException
*/ */
public function countCcShows(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) public function countCcShowsRelatedByDbAutoPlaylistId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{ {
$partial = $this->collCcShowsPartial && !$this->isNew(); $partial = $this->collCcShowsRelatedByDbAutoPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShows || null !== $criteria || $partial) { if (null === $this->collCcShowsRelatedByDbAutoPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShows) { if ($this->isNew() && null === $this->collCcShowsRelatedByDbAutoPlaylistId) {
return 0; return 0;
} }
if ($partial && !$criteria) { if ($partial && !$criteria) {
return count($this->getCcShows()); return count($this->getCcShowsRelatedByDbAutoPlaylistId());
} }
$query = CcShowQuery::create(null, $criteria); $query = CcShowQuery::create(null, $criteria);
if ($distinct) { if ($distinct) {
@ -1525,11 +1629,11 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
} }
return $query return $query
->filterByCcPlaylist($this) ->filterByCcPlaylistRelatedByDbAutoPlaylistId($this)
->count($con); ->count($con);
} }
return count($this->collCcShows); return count($this->collCcShowsRelatedByDbAutoPlaylistId);
} }
/** /**
@ -1539,18 +1643,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
* @param CcShow $l CcShow * @param CcShow $l CcShow
* @return CcPlaylist The current object (for fluent API support) * @return CcPlaylist The current object (for fluent API support)
*/ */
public function addCcShow(CcShow $l) public function addCcShowRelatedByDbAutoPlaylistId(CcShow $l)
{ {
if ($this->collCcShows === null) { if ($this->collCcShowsRelatedByDbAutoPlaylistId === null) {
$this->initCcShows(); $this->initCcShowsRelatedByDbAutoPlaylistId();
$this->collCcShowsPartial = true; $this->collCcShowsRelatedByDbAutoPlaylistIdPartial = true;
} }
if (!in_array($l, $this->collCcShows->getArrayCopy(), true)) { // only add it if the **same** object is not already associated if (!in_array($l, $this->collCcShowsRelatedByDbAutoPlaylistId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCcShow($l); $this->doAddCcShowRelatedByDbAutoPlaylistId($l);
if ($this->ccShowsScheduledForDeletion and $this->ccShowsScheduledForDeletion->contains($l)) { if ($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion and $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->contains($l)) {
$this->ccShowsScheduledForDeletion->remove($this->ccShowsScheduledForDeletion->search($l)); $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->remove($this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->search($l));
} }
} }
@ -1558,28 +1662,478 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
} }
/** /**
* @param CcShow $ccShow The ccShow object to add. * @param CcShowRelatedByDbAutoPlaylistId $ccShowRelatedByDbAutoPlaylistId The ccShowRelatedByDbAutoPlaylistId object to add.
*/ */
protected function doAddCcShow($ccShow) protected function doAddCcShowRelatedByDbAutoPlaylistId($ccShowRelatedByDbAutoPlaylistId)
{ {
$this->collCcShows[]= $ccShow; $this->collCcShowsRelatedByDbAutoPlaylistId[]= $ccShowRelatedByDbAutoPlaylistId;
$ccShow->setCcPlaylist($this); $ccShowRelatedByDbAutoPlaylistId->setCcPlaylistRelatedByDbAutoPlaylistId($this);
} }
/** /**
* @param CcShow $ccShow The ccShow object to remove. * @param CcShowRelatedByDbAutoPlaylistId $ccShowRelatedByDbAutoPlaylistId The ccShowRelatedByDbAutoPlaylistId object to remove.
* @return CcPlaylist The current object (for fluent API support) * @return CcPlaylist The current object (for fluent API support)
*/ */
public function removeCcShow($ccShow) public function removeCcShowRelatedByDbAutoPlaylistId($ccShowRelatedByDbAutoPlaylistId)
{ {
if ($this->getCcShows()->contains($ccShow)) { if ($this->getCcShowsRelatedByDbAutoPlaylistId()->contains($ccShowRelatedByDbAutoPlaylistId)) {
$this->collCcShows->remove($this->collCcShows->search($ccShow)); $this->collCcShowsRelatedByDbAutoPlaylistId->remove($this->collCcShowsRelatedByDbAutoPlaylistId->search($ccShowRelatedByDbAutoPlaylistId));
if (null === $this->ccShowsScheduledForDeletion) { if (null === $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion) {
$this->ccShowsScheduledForDeletion = clone $this->collCcShows; $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion = clone $this->collCcShowsRelatedByDbAutoPlaylistId;
$this->ccShowsScheduledForDeletion->clear(); $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion->clear();
} }
$this->ccShowsScheduledForDeletion[]= $ccShow; $this->ccShowsRelatedByDbAutoPlaylistIdScheduledForDeletion[]= $ccShowRelatedByDbAutoPlaylistId;
$ccShow->setCcPlaylist(null); $ccShowRelatedByDbAutoPlaylistId->setCcPlaylistRelatedByDbAutoPlaylistId(null);
}
return $this;
}
/**
* Clears out the collCcShowsRelatedByDbIntroPlaylistId 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 CcPlaylist The current object (for fluent API support)
* @see addCcShowsRelatedByDbIntroPlaylistId()
*/
public function clearCcShowsRelatedByDbIntroPlaylistId()
{
$this->collCcShowsRelatedByDbIntroPlaylistId = null; // important to set this to null since that means it is uninitialized
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = null;
return $this;
}
/**
* reset is the collCcShowsRelatedByDbIntroPlaylistId collection loaded partially
*
* @return void
*/
public function resetPartialCcShowsRelatedByDbIntroPlaylistId($v = true)
{
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = $v;
}
/**
* Initializes the collCcShowsRelatedByDbIntroPlaylistId collection.
*
* By default this just sets the collCcShowsRelatedByDbIntroPlaylistId collection to an empty array (like clearcollCcShowsRelatedByDbIntroPlaylistId());
* 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.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initCcShowsRelatedByDbIntroPlaylistId($overrideExisting = true)
{
if (null !== $this->collCcShowsRelatedByDbIntroPlaylistId && !$overrideExisting) {
return;
}
$this->collCcShowsRelatedByDbIntroPlaylistId = new PropelObjectCollection();
$this->collCcShowsRelatedByDbIntroPlaylistId->setModel('CcShow');
}
/**
* Gets an array of CcShow objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this CcPlaylist is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|CcShow[] List of CcShow objects
* @throws PropelException
*/
public function getCcShowsRelatedByDbIntroPlaylistId($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbIntroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbIntroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbIntroPlaylistId) {
// return empty collection
$this->initCcShowsRelatedByDbIntroPlaylistId();
} else {
$collCcShowsRelatedByDbIntroPlaylistId = CcShowQuery::create(null, $criteria)
->filterByCcPlaylistRelatedByDbIntroPlaylistId($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collCcShowsRelatedByDbIntroPlaylistIdPartial && count($collCcShowsRelatedByDbIntroPlaylistId)) {
$this->initCcShowsRelatedByDbIntroPlaylistId(false);
foreach ($collCcShowsRelatedByDbIntroPlaylistId as $obj) {
if (false == $this->collCcShowsRelatedByDbIntroPlaylistId->contains($obj)) {
$this->collCcShowsRelatedByDbIntroPlaylistId->append($obj);
}
}
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = true;
}
$collCcShowsRelatedByDbIntroPlaylistId->getInternalIterator()->rewind();
return $collCcShowsRelatedByDbIntroPlaylistId;
}
if ($partial && $this->collCcShowsRelatedByDbIntroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $obj) {
if ($obj->isNew()) {
$collCcShowsRelatedByDbIntroPlaylistId[] = $obj;
}
}
}
$this->collCcShowsRelatedByDbIntroPlaylistId = $collCcShowsRelatedByDbIntroPlaylistId;
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = false;
}
}
return $this->collCcShowsRelatedByDbIntroPlaylistId;
}
/**
* Sets a collection of CcShowRelatedByDbIntroPlaylistId 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 $ccShowsRelatedByDbIntroPlaylistId A Propel collection.
* @param PropelPDO $con Optional connection object
* @return CcPlaylist The current object (for fluent API support)
*/
public function setCcShowsRelatedByDbIntroPlaylistId(PropelCollection $ccShowsRelatedByDbIntroPlaylistId, PropelPDO $con = null)
{
$ccShowsRelatedByDbIntroPlaylistIdToDelete = $this->getCcShowsRelatedByDbIntroPlaylistId(new Criteria(), $con)->diff($ccShowsRelatedByDbIntroPlaylistId);
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = $ccShowsRelatedByDbIntroPlaylistIdToDelete;
foreach ($ccShowsRelatedByDbIntroPlaylistIdToDelete as $ccShowRelatedByDbIntroPlaylistIdRemoved) {
$ccShowRelatedByDbIntroPlaylistIdRemoved->setCcPlaylistRelatedByDbIntroPlaylistId(null);
}
$this->collCcShowsRelatedByDbIntroPlaylistId = null;
foreach ($ccShowsRelatedByDbIntroPlaylistId as $ccShowRelatedByDbIntroPlaylistId) {
$this->addCcShowRelatedByDbIntroPlaylistId($ccShowRelatedByDbIntroPlaylistId);
}
$this->collCcShowsRelatedByDbIntroPlaylistId = $ccShowsRelatedByDbIntroPlaylistId;
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = false;
return $this;
}
/**
* Returns the number of related CcShow objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related CcShow objects.
* @throws PropelException
*/
public function countCcShowsRelatedByDbIntroPlaylistId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbIntroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbIntroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbIntroPlaylistId) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getCcShowsRelatedByDbIntroPlaylistId());
}
$query = CcShowQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByCcPlaylistRelatedByDbIntroPlaylistId($this)
->count($con);
}
return count($this->collCcShowsRelatedByDbIntroPlaylistId);
}
/**
* Method called to associate a CcShow object to this object
* through the CcShow foreign key attribute.
*
* @param CcShow $l CcShow
* @return CcPlaylist The current object (for fluent API support)
*/
public function addCcShowRelatedByDbIntroPlaylistId(CcShow $l)
{
if ($this->collCcShowsRelatedByDbIntroPlaylistId === null) {
$this->initCcShowsRelatedByDbIntroPlaylistId();
$this->collCcShowsRelatedByDbIntroPlaylistIdPartial = true;
}
if (!in_array($l, $this->collCcShowsRelatedByDbIntroPlaylistId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCcShowRelatedByDbIntroPlaylistId($l);
if ($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion and $this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->contains($l)) {
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->remove($this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param CcShowRelatedByDbIntroPlaylistId $ccShowRelatedByDbIntroPlaylistId The ccShowRelatedByDbIntroPlaylistId object to add.
*/
protected function doAddCcShowRelatedByDbIntroPlaylistId($ccShowRelatedByDbIntroPlaylistId)
{
$this->collCcShowsRelatedByDbIntroPlaylistId[]= $ccShowRelatedByDbIntroPlaylistId;
$ccShowRelatedByDbIntroPlaylistId->setCcPlaylistRelatedByDbIntroPlaylistId($this);
}
/**
* @param CcShowRelatedByDbIntroPlaylistId $ccShowRelatedByDbIntroPlaylistId The ccShowRelatedByDbIntroPlaylistId object to remove.
* @return CcPlaylist The current object (for fluent API support)
*/
public function removeCcShowRelatedByDbIntroPlaylistId($ccShowRelatedByDbIntroPlaylistId)
{
if ($this->getCcShowsRelatedByDbIntroPlaylistId()->contains($ccShowRelatedByDbIntroPlaylistId)) {
$this->collCcShowsRelatedByDbIntroPlaylistId->remove($this->collCcShowsRelatedByDbIntroPlaylistId->search($ccShowRelatedByDbIntroPlaylistId));
if (null === $this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion) {
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion = clone $this->collCcShowsRelatedByDbIntroPlaylistId;
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion->clear();
}
$this->ccShowsRelatedByDbIntroPlaylistIdScheduledForDeletion[]= $ccShowRelatedByDbIntroPlaylistId;
$ccShowRelatedByDbIntroPlaylistId->setCcPlaylistRelatedByDbIntroPlaylistId(null);
}
return $this;
}
/**
* Clears out the collCcShowsRelatedByDbOutroPlaylistId 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 CcPlaylist The current object (for fluent API support)
* @see addCcShowsRelatedByDbOutroPlaylistId()
*/
public function clearCcShowsRelatedByDbOutroPlaylistId()
{
$this->collCcShowsRelatedByDbOutroPlaylistId = null; // important to set this to null since that means it is uninitialized
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = null;
return $this;
}
/**
* reset is the collCcShowsRelatedByDbOutroPlaylistId collection loaded partially
*
* @return void
*/
public function resetPartialCcShowsRelatedByDbOutroPlaylistId($v = true)
{
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = $v;
}
/**
* Initializes the collCcShowsRelatedByDbOutroPlaylistId collection.
*
* By default this just sets the collCcShowsRelatedByDbOutroPlaylistId collection to an empty array (like clearcollCcShowsRelatedByDbOutroPlaylistId());
* 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.
*
* @param boolean $overrideExisting If set to true, the method call initializes
* the collection even if it is not empty
*
* @return void
*/
public function initCcShowsRelatedByDbOutroPlaylistId($overrideExisting = true)
{
if (null !== $this->collCcShowsRelatedByDbOutroPlaylistId && !$overrideExisting) {
return;
}
$this->collCcShowsRelatedByDbOutroPlaylistId = new PropelObjectCollection();
$this->collCcShowsRelatedByDbOutroPlaylistId->setModel('CcShow');
}
/**
* Gets an array of CcShow objects which contain a foreign key that references this object.
*
* If the $criteria is not null, it is used to always fetch the results from the database.
* Otherwise the results are fetched from the database the first time, then cached.
* Next time the same method is called without $criteria, the cached collection is returned.
* If this CcPlaylist is new, it will return
* an empty collection or the current collection; the criteria is ignored on a new object.
*
* @param Criteria $criteria optional Criteria object to narrow the query
* @param PropelPDO $con optional connection object
* @return PropelObjectCollection|CcShow[] List of CcShow objects
* @throws PropelException
*/
public function getCcShowsRelatedByDbOutroPlaylistId($criteria = null, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbOutroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbOutroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbOutroPlaylistId) {
// return empty collection
$this->initCcShowsRelatedByDbOutroPlaylistId();
} else {
$collCcShowsRelatedByDbOutroPlaylistId = CcShowQuery::create(null, $criteria)
->filterByCcPlaylistRelatedByDbOutroPlaylistId($this)
->find($con);
if (null !== $criteria) {
if (false !== $this->collCcShowsRelatedByDbOutroPlaylistIdPartial && count($collCcShowsRelatedByDbOutroPlaylistId)) {
$this->initCcShowsRelatedByDbOutroPlaylistId(false);
foreach ($collCcShowsRelatedByDbOutroPlaylistId as $obj) {
if (false == $this->collCcShowsRelatedByDbOutroPlaylistId->contains($obj)) {
$this->collCcShowsRelatedByDbOutroPlaylistId->append($obj);
}
}
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = true;
}
$collCcShowsRelatedByDbOutroPlaylistId->getInternalIterator()->rewind();
return $collCcShowsRelatedByDbOutroPlaylistId;
}
if ($partial && $this->collCcShowsRelatedByDbOutroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $obj) {
if ($obj->isNew()) {
$collCcShowsRelatedByDbOutroPlaylistId[] = $obj;
}
}
}
$this->collCcShowsRelatedByDbOutroPlaylistId = $collCcShowsRelatedByDbOutroPlaylistId;
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = false;
}
}
return $this->collCcShowsRelatedByDbOutroPlaylistId;
}
/**
* Sets a collection of CcShowRelatedByDbOutroPlaylistId 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 $ccShowsRelatedByDbOutroPlaylistId A Propel collection.
* @param PropelPDO $con Optional connection object
* @return CcPlaylist The current object (for fluent API support)
*/
public function setCcShowsRelatedByDbOutroPlaylistId(PropelCollection $ccShowsRelatedByDbOutroPlaylistId, PropelPDO $con = null)
{
$ccShowsRelatedByDbOutroPlaylistIdToDelete = $this->getCcShowsRelatedByDbOutroPlaylistId(new Criteria(), $con)->diff($ccShowsRelatedByDbOutroPlaylistId);
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = $ccShowsRelatedByDbOutroPlaylistIdToDelete;
foreach ($ccShowsRelatedByDbOutroPlaylistIdToDelete as $ccShowRelatedByDbOutroPlaylistIdRemoved) {
$ccShowRelatedByDbOutroPlaylistIdRemoved->setCcPlaylistRelatedByDbOutroPlaylistId(null);
}
$this->collCcShowsRelatedByDbOutroPlaylistId = null;
foreach ($ccShowsRelatedByDbOutroPlaylistId as $ccShowRelatedByDbOutroPlaylistId) {
$this->addCcShowRelatedByDbOutroPlaylistId($ccShowRelatedByDbOutroPlaylistId);
}
$this->collCcShowsRelatedByDbOutroPlaylistId = $ccShowsRelatedByDbOutroPlaylistId;
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = false;
return $this;
}
/**
* Returns the number of related CcShow objects.
*
* @param Criteria $criteria
* @param boolean $distinct
* @param PropelPDO $con
* @return int Count of related CcShow objects.
* @throws PropelException
*/
public function countCcShowsRelatedByDbOutroPlaylistId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collCcShowsRelatedByDbOutroPlaylistIdPartial && !$this->isNew();
if (null === $this->collCcShowsRelatedByDbOutroPlaylistId || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collCcShowsRelatedByDbOutroPlaylistId) {
return 0;
}
if ($partial && !$criteria) {
return count($this->getCcShowsRelatedByDbOutroPlaylistId());
}
$query = CcShowQuery::create(null, $criteria);
if ($distinct) {
$query->distinct();
}
return $query
->filterByCcPlaylistRelatedByDbOutroPlaylistId($this)
->count($con);
}
return count($this->collCcShowsRelatedByDbOutroPlaylistId);
}
/**
* Method called to associate a CcShow object to this object
* through the CcShow foreign key attribute.
*
* @param CcShow $l CcShow
* @return CcPlaylist The current object (for fluent API support)
*/
public function addCcShowRelatedByDbOutroPlaylistId(CcShow $l)
{
if ($this->collCcShowsRelatedByDbOutroPlaylistId === null) {
$this->initCcShowsRelatedByDbOutroPlaylistId();
$this->collCcShowsRelatedByDbOutroPlaylistIdPartial = true;
}
if (!in_array($l, $this->collCcShowsRelatedByDbOutroPlaylistId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
$this->doAddCcShowRelatedByDbOutroPlaylistId($l);
if ($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion and $this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->contains($l)) {
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->remove($this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->search($l));
}
}
return $this;
}
/**
* @param CcShowRelatedByDbOutroPlaylistId $ccShowRelatedByDbOutroPlaylistId The ccShowRelatedByDbOutroPlaylistId object to add.
*/
protected function doAddCcShowRelatedByDbOutroPlaylistId($ccShowRelatedByDbOutroPlaylistId)
{
$this->collCcShowsRelatedByDbOutroPlaylistId[]= $ccShowRelatedByDbOutroPlaylistId;
$ccShowRelatedByDbOutroPlaylistId->setCcPlaylistRelatedByDbOutroPlaylistId($this);
}
/**
* @param CcShowRelatedByDbOutroPlaylistId $ccShowRelatedByDbOutroPlaylistId The ccShowRelatedByDbOutroPlaylistId object to remove.
* @return CcPlaylist The current object (for fluent API support)
*/
public function removeCcShowRelatedByDbOutroPlaylistId($ccShowRelatedByDbOutroPlaylistId)
{
if ($this->getCcShowsRelatedByDbOutroPlaylistId()->contains($ccShowRelatedByDbOutroPlaylistId)) {
$this->collCcShowsRelatedByDbOutroPlaylistId->remove($this->collCcShowsRelatedByDbOutroPlaylistId->search($ccShowRelatedByDbOutroPlaylistId));
if (null === $this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion) {
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion = clone $this->collCcShowsRelatedByDbOutroPlaylistId;
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion->clear();
}
$this->ccShowsRelatedByDbOutroPlaylistIdScheduledForDeletion[]= $ccShowRelatedByDbOutroPlaylistId;
$ccShowRelatedByDbOutroPlaylistId->setCcPlaylistRelatedByDbOutroPlaylistId(null);
} }
return $this; return $this;
@ -1895,8 +2449,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
{ {
if ($deep && !$this->alreadyInClearAllReferencesDeep) { if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true; $this->alreadyInClearAllReferencesDeep = true;
if ($this->collCcShows) { if ($this->collCcShowsRelatedByDbAutoPlaylistId) {
foreach ($this->collCcShows as $o) { foreach ($this->collCcShowsRelatedByDbAutoPlaylistId as $o) {
$o->clearAllReferences($deep);
}
}
if ($this->collCcShowsRelatedByDbIntroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbIntroPlaylistId as $o) {
$o->clearAllReferences($deep);
}
}
if ($this->collCcShowsRelatedByDbOutroPlaylistId) {
foreach ($this->collCcShowsRelatedByDbOutroPlaylistId as $o) {
$o->clearAllReferences($deep); $o->clearAllReferences($deep);
} }
} }
@ -1912,10 +2476,18 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->alreadyInClearAllReferencesDeep = false; $this->alreadyInClearAllReferencesDeep = false;
} // if ($deep) } // if ($deep)
if ($this->collCcShows instanceof PropelCollection) { if ($this->collCcShowsRelatedByDbAutoPlaylistId instanceof PropelCollection) {
$this->collCcShows->clearIterator(); $this->collCcShowsRelatedByDbAutoPlaylistId->clearIterator();
} }
$this->collCcShows = null; $this->collCcShowsRelatedByDbAutoPlaylistId = null;
if ($this->collCcShowsRelatedByDbIntroPlaylistId instanceof PropelCollection) {
$this->collCcShowsRelatedByDbIntroPlaylistId->clearIterator();
}
$this->collCcShowsRelatedByDbIntroPlaylistId = null;
if ($this->collCcShowsRelatedByDbOutroPlaylistId instanceof PropelCollection) {
$this->collCcShowsRelatedByDbOutroPlaylistId->clearIterator();
}
$this->collCcShowsRelatedByDbOutroPlaylistId = null;
if ($this->collCcPlaylistcontentss instanceof PropelCollection) { if ($this->collCcPlaylistcontentss instanceof PropelCollection) {
$this->collCcPlaylistcontentss->clearIterator(); $this->collCcPlaylistcontentss->clearIterator();
} }

View File

@ -385,6 +385,12 @@ abstract class BaseCcPlaylistPeer
*/ */
public static function clearRelatedInstancePool() public static function clearRelatedInstancePool()
{ {
// Invalidate objects in CcShowPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcShowPeer::clearInstancePool();
// Invalidate objects in CcShowPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcShowPeer::clearInstancePool();
// Invalidate objects in CcShowPeer instance pool, // Invalidate objects in CcShowPeer instance pool,
// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
CcShowPeer::clearInstancePool(); CcShowPeer::clearInstancePool();

View File

@ -30,9 +30,17 @@
* @method CcPlaylistQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation * @method CcPlaylistQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcPlaylistQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation * @method CcPlaylistQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
* *
* @method CcPlaylistQuery leftJoinCcShow($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShow relation * @method CcPlaylistQuery leftJoinCcShowRelatedByDbAutoPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
* @method CcPlaylistQuery rightJoinCcShow($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShow relation * @method CcPlaylistQuery rightJoinCcShowRelatedByDbAutoPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
* @method CcPlaylistQuery innerJoinCcShow($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShow relation * @method CcPlaylistQuery innerJoinCcShowRelatedByDbAutoPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
*
* @method CcPlaylistQuery leftJoinCcShowRelatedByDbIntroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
* @method CcPlaylistQuery rightJoinCcShowRelatedByDbIntroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
* @method CcPlaylistQuery innerJoinCcShowRelatedByDbIntroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
*
* @method CcPlaylistQuery leftJoinCcShowRelatedByDbOutroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
* @method CcPlaylistQuery rightJoinCcShowRelatedByDbOutroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
* @method CcPlaylistQuery innerJoinCcShowRelatedByDbOutroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
* *
* @method CcPlaylistQuery leftJoinCcPlaylistcontents($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistcontents relation * @method CcPlaylistQuery leftJoinCcPlaylistcontents($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistcontents relation
* @method CcPlaylistQuery rightJoinCcPlaylistcontents($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistcontents relation * @method CcPlaylistQuery rightJoinCcPlaylistcontents($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistcontents relation
@ -595,33 +603,33 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
* @return CcPlaylistQuery The current query, for fluid interface * @return CcPlaylistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid. * @throws PropelException - if the provided filter is invalid.
*/ */
public function filterByCcShow($ccShow, $comparison = null) public function filterByCcShowRelatedByDbAutoPlaylistId($ccShow, $comparison = null)
{ {
if ($ccShow instanceof CcShow) { if ($ccShow instanceof CcShow) {
return $this return $this
->addUsingAlias(CcPlaylistPeer::ID, $ccShow->getDbAutoPlaylistId(), $comparison); ->addUsingAlias(CcPlaylistPeer::ID, $ccShow->getDbAutoPlaylistId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) { } elseif ($ccShow instanceof PropelObjectCollection) {
return $this return $this
->useCcShowQuery() ->useCcShowRelatedByDbAutoPlaylistIdQuery()
->filterByPrimaryKeys($ccShow->getPrimaryKeys()) ->filterByPrimaryKeys($ccShow->getPrimaryKeys())
->endUse(); ->endUse();
} else { } else {
throw new PropelException('filterByCcShow() only accepts arguments of type CcShow or PropelCollection'); throw new PropelException('filterByCcShowRelatedByDbAutoPlaylistId() only accepts arguments of type CcShow or PropelCollection');
} }
} }
/** /**
* Adds a JOIN clause to the query using the CcShow relation * Adds a JOIN clause to the query using the CcShowRelatedByDbAutoPlaylistId relation
* *
* @param string $relationAlias optional alias for the relation * @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
* *
* @return CcPlaylistQuery The current query, for fluid interface * @return CcPlaylistQuery The current query, for fluid interface
*/ */
public function joinCcShow($relationAlias = null, $joinType = Criteria::LEFT_JOIN) public function joinCcShowRelatedByDbAutoPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
$tableMap = $this->getTableMap(); $tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShow'); $relationMap = $tableMap->getRelation('CcShowRelatedByDbAutoPlaylistId');
// create a ModelJoin object for this join // create a ModelJoin object for this join
$join = new ModelJoin(); $join = new ModelJoin();
@ -636,14 +644,14 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias); $this->addJoinObject($join, $relationAlias);
} else { } else {
$this->addJoinObject($join, 'CcShow'); $this->addJoinObject($join, 'CcShowRelatedByDbAutoPlaylistId');
} }
return $this; return $this;
} }
/** /**
* Use the CcShow relation CcShow object * Use the CcShowRelatedByDbAutoPlaylistId relation CcShow object
* *
* @see useQuery() * @see useQuery()
* *
@ -653,11 +661,159 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
* *
* @return CcShowQuery A secondary query class using the current class as primary query * @return CcShowQuery A secondary query class using the current class as primary query
*/ */
public function useCcShowQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) public function useCcShowRelatedByDbAutoPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
return $this return $this
->joinCcShow($relationAlias, $joinType) ->joinCcShowRelatedByDbAutoPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery'); ->useQuery($relationAlias ? $relationAlias : 'CcShowRelatedByDbAutoPlaylistId', 'CcShowQuery');
}
/**
* Filter the query by a related CcShow object
*
* @param CcShow|PropelObjectCollection $ccShow the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlaylistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcShowRelatedByDbIntroPlaylistId($ccShow, $comparison = null)
{
if ($ccShow instanceof CcShow) {
return $this
->addUsingAlias(CcPlaylistPeer::ID, $ccShow->getDbIntroPlaylistId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) {
return $this
->useCcShowRelatedByDbIntroPlaylistIdQuery()
->filterByPrimaryKeys($ccShow->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcShowRelatedByDbIntroPlaylistId() only accepts arguments of type CcShow or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcShowRelatedByDbIntroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery The current query, for fluid interface
*/
public function joinCcShowRelatedByDbIntroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShowRelatedByDbIntroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcShowRelatedByDbIntroPlaylistId');
}
return $this;
}
/**
* Use the CcShowRelatedByDbIntroPlaylistId relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowRelatedByDbIntroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcShowRelatedByDbIntroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShowRelatedByDbIntroPlaylistId', 'CcShowQuery');
}
/**
* Filter the query by a related CcShow object
*
* @param CcShow|PropelObjectCollection $ccShow the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlaylistQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcShowRelatedByDbOutroPlaylistId($ccShow, $comparison = null)
{
if ($ccShow instanceof CcShow) {
return $this
->addUsingAlias(CcPlaylistPeer::ID, $ccShow->getDbOutroPlaylistId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) {
return $this
->useCcShowRelatedByDbOutroPlaylistIdQuery()
->filterByPrimaryKeys($ccShow->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcShowRelatedByDbOutroPlaylistId() only accepts arguments of type CcShow or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcShowRelatedByDbOutroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery The current query, for fluid interface
*/
public function joinCcShowRelatedByDbOutroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShowRelatedByDbOutroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcShowRelatedByDbOutroPlaylistId');
}
return $this;
}
/**
* Use the CcShowRelatedByDbOutroPlaylistId relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowRelatedByDbOutroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcShowRelatedByDbOutroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShowRelatedByDbOutroPlaylistId', 'CcShowQuery');
} }
/** /**

View File

@ -141,10 +141,32 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/ */
protected $autoplaylist_repeat; protected $autoplaylist_repeat;
/**
* The value for the intro_playlist_id field.
* @var int
*/
protected $intro_playlist_id;
/**
* The value for the outro_playlist_id field.
* @var int
*/
protected $outro_playlist_id;
/** /**
* @var CcPlaylist * @var CcPlaylist
*/ */
protected $aCcPlaylist; protected $aCcPlaylistRelatedByDbAutoPlaylistId;
/**
* @var CcPlaylist
*/
protected $aCcPlaylistRelatedByDbIntroPlaylistId;
/**
* @var CcPlaylist
*/
protected $aCcPlaylistRelatedByDbOutroPlaylistId;
/** /**
* @var PropelObjectCollection|CcShowInstances[] Collection to store aggregation of CcShowInstances objects. * @var PropelObjectCollection|CcShowInstances[] Collection to store aggregation of CcShowInstances objects.
@ -431,6 +453,28 @@ abstract class BaseCcShow extends BaseObject implements Persistent
return $this->autoplaylist_repeat; return $this->autoplaylist_repeat;
} }
/**
* Get the [intro_playlist_id] column value.
*
* @return int
*/
public function getDbIntroPlaylistId()
{
return $this->intro_playlist_id;
}
/**
* Get the [outro_playlist_id] column value.
*
* @return int
*/
public function getDbOutroPlaylistId()
{
return $this->outro_playlist_id;
}
/** /**
* Set the value of [id] column. * Set the value of [id] column.
* *
@ -803,8 +847,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->modifiedColumns[] = CcShowPeer::AUTOPLAYLIST_ID; $this->modifiedColumns[] = CcShowPeer::AUTOPLAYLIST_ID;
} }
if ($this->aCcPlaylist !== null && $this->aCcPlaylist->getDbId() !== $v) { if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null && $this->aCcPlaylistRelatedByDbAutoPlaylistId->getDbId() !== $v) {
$this->aCcPlaylist = null; $this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
} }
@ -840,6 +884,56 @@ abstract class BaseCcShow extends BaseObject implements Persistent
return $this; return $this;
} // setDbAutoPlaylistRepeat() } // setDbAutoPlaylistRepeat()
/**
* Set the value of [intro_playlist_id] column.
*
* @param int $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbIntroPlaylistId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->intro_playlist_id !== $v) {
$this->intro_playlist_id = $v;
$this->modifiedColumns[] = CcShowPeer::INTRO_PLAYLIST_ID;
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null && $this->aCcPlaylistRelatedByDbIntroPlaylistId->getDbId() !== $v) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
}
return $this;
} // setDbIntroPlaylistId()
/**
* Set the value of [outro_playlist_id] column.
*
* @param int $v new value
* @return CcShow The current object (for fluent API support)
*/
public function setDbOutroPlaylistId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->outro_playlist_id !== $v) {
$this->outro_playlist_id = $v;
$this->modifiedColumns[] = CcShowPeer::OUTRO_PLAYLIST_ID;
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null && $this->aCcPlaylistRelatedByDbOutroPlaylistId->getDbId() !== $v) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
}
return $this;
} // setDbOutroPlaylistId()
/** /**
* Indicates whether the columns in this object are only set to default values. * Indicates whether the columns in this object are only set to default values.
* *
@ -929,6 +1023,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->has_autoplaylist = ($row[$startcol + 14] !== null) ? (boolean) $row[$startcol + 14] : null; $this->has_autoplaylist = ($row[$startcol + 14] !== null) ? (boolean) $row[$startcol + 14] : null;
$this->autoplaylist_id = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null; $this->autoplaylist_id = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
$this->autoplaylist_repeat = ($row[$startcol + 16] !== null) ? (boolean) $row[$startcol + 16] : null; $this->autoplaylist_repeat = ($row[$startcol + 16] !== null) ? (boolean) $row[$startcol + 16] : null;
$this->intro_playlist_id = ($row[$startcol + 17] !== null) ? (int) $row[$startcol + 17] : null;
$this->outro_playlist_id = ($row[$startcol + 18] !== null) ? (int) $row[$startcol + 18] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
@ -938,7 +1034,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
} }
$this->postHydrate($row, $startcol, $rehydrate); $this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 17; // 17 = CcShowPeer::NUM_HYDRATE_COLUMNS. return $startcol + 19; // 19 = CcShowPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating CcShow object", $e); throw new PropelException("Error populating CcShow object", $e);
@ -961,8 +1057,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aCcPlaylist !== null && $this->autoplaylist_id !== $this->aCcPlaylist->getDbId()) { if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null && $this->autoplaylist_id !== $this->aCcPlaylistRelatedByDbAutoPlaylistId->getDbId()) {
$this->aCcPlaylist = null; $this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null && $this->intro_playlist_id !== $this->aCcPlaylistRelatedByDbIntroPlaylistId->getDbId()) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null && $this->outro_playlist_id !== $this->aCcPlaylistRelatedByDbOutroPlaylistId->getDbId()) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
} }
} // ensureConsistency } // ensureConsistency
@ -1003,7 +1105,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects? if ($deep) { // also de-associate any related objects?
$this->aCcPlaylist = null; $this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
$this->collCcShowInstancess = null; $this->collCcShowInstancess = null;
$this->collCcShowDayss = null; $this->collCcShowDayss = null;
@ -1130,11 +1234,25 @@ abstract class BaseCcShow extends BaseObject implements Persistent
// method. This object relates to these object(s) by a // method. This object relates to these object(s) by a
// foreign key reference. // foreign key reference.
if ($this->aCcPlaylist !== null) { if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null) {
if ($this->aCcPlaylist->isModified() || $this->aCcPlaylist->isNew()) { if ($this->aCcPlaylistRelatedByDbAutoPlaylistId->isModified() || $this->aCcPlaylistRelatedByDbAutoPlaylistId->isNew()) {
$affectedRows += $this->aCcPlaylist->save($con); $affectedRows += $this->aCcPlaylistRelatedByDbAutoPlaylistId->save($con);
} }
$this->setCcPlaylist($this->aCcPlaylist); $this->setCcPlaylistRelatedByDbAutoPlaylistId($this->aCcPlaylistRelatedByDbAutoPlaylistId);
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null) {
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId->isModified() || $this->aCcPlaylistRelatedByDbIntroPlaylistId->isNew()) {
$affectedRows += $this->aCcPlaylistRelatedByDbIntroPlaylistId->save($con);
}
$this->setCcPlaylistRelatedByDbIntroPlaylistId($this->aCcPlaylistRelatedByDbIntroPlaylistId);
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null) {
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId->isModified() || $this->aCcPlaylistRelatedByDbOutroPlaylistId->isNew()) {
$affectedRows += $this->aCcPlaylistRelatedByDbOutroPlaylistId->save($con);
}
$this->setCcPlaylistRelatedByDbOutroPlaylistId($this->aCcPlaylistRelatedByDbOutroPlaylistId);
} }
if ($this->isNew() || $this->isModified()) { if ($this->isNew() || $this->isModified()) {
@ -1303,6 +1421,12 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) { if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) {
$modifiedColumns[':p' . $index++] = '"autoplaylist_repeat"'; $modifiedColumns[':p' . $index++] = '"autoplaylist_repeat"';
} }
if ($this->isColumnModified(CcShowPeer::INTRO_PLAYLIST_ID)) {
$modifiedColumns[':p' . $index++] = '"intro_playlist_id"';
}
if ($this->isColumnModified(CcShowPeer::OUTRO_PLAYLIST_ID)) {
$modifiedColumns[':p' . $index++] = '"outro_playlist_id"';
}
$sql = sprintf( $sql = sprintf(
'INSERT INTO "cc_show" (%s) VALUES (%s)', 'INSERT INTO "cc_show" (%s) VALUES (%s)',
@ -1365,6 +1489,12 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case '"autoplaylist_repeat"': case '"autoplaylist_repeat"':
$stmt->bindValue($identifier, $this->autoplaylist_repeat, PDO::PARAM_BOOL); $stmt->bindValue($identifier, $this->autoplaylist_repeat, PDO::PARAM_BOOL);
break; break;
case '"intro_playlist_id"':
$stmt->bindValue($identifier, $this->intro_playlist_id, PDO::PARAM_INT);
break;
case '"outro_playlist_id"':
$stmt->bindValue($identifier, $this->outro_playlist_id, PDO::PARAM_INT);
break;
} }
} }
$stmt->execute(); $stmt->execute();
@ -1457,9 +1587,21 @@ abstract class BaseCcShow extends BaseObject implements Persistent
// method. This object relates to these object(s) by a // method. This object relates to these object(s) by a
// foreign key reference. // foreign key reference.
if ($this->aCcPlaylist !== null) { if ($this->aCcPlaylistRelatedByDbAutoPlaylistId !== null) {
if (!$this->aCcPlaylist->validate($columns)) { if (!$this->aCcPlaylistRelatedByDbAutoPlaylistId->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylist->getValidationFailures()); $failureMap = array_merge($failureMap, $this->aCcPlaylistRelatedByDbAutoPlaylistId->getValidationFailures());
}
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId !== null) {
if (!$this->aCcPlaylistRelatedByDbIntroPlaylistId->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylistRelatedByDbIntroPlaylistId->getValidationFailures());
}
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId !== null) {
if (!$this->aCcPlaylistRelatedByDbOutroPlaylistId->validate($columns)) {
$failureMap = array_merge($failureMap, $this->aCcPlaylistRelatedByDbOutroPlaylistId->getValidationFailures());
} }
} }
@ -1587,6 +1729,12 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case 16: case 16:
return $this->getDbAutoPlaylistRepeat(); return $this->getDbAutoPlaylistRepeat();
break; break;
case 17:
return $this->getDbIntroPlaylistId();
break;
case 18:
return $this->getDbOutroPlaylistId();
break;
default: default:
return null; return null;
break; break;
@ -1633,6 +1781,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$keys[14] => $this->getDbHasAutoPlaylist(), $keys[14] => $this->getDbHasAutoPlaylist(),
$keys[15] => $this->getDbAutoPlaylistId(), $keys[15] => $this->getDbAutoPlaylistId(),
$keys[16] => $this->getDbAutoPlaylistRepeat(), $keys[16] => $this->getDbAutoPlaylistRepeat(),
$keys[17] => $this->getDbIntroPlaylistId(),
$keys[18] => $this->getDbOutroPlaylistId(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) { foreach ($virtualColumns as $key => $virtualColumn) {
@ -1640,8 +1790,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent
} }
if ($includeForeignObjects) { if ($includeForeignObjects) {
if (null !== $this->aCcPlaylist) { if (null !== $this->aCcPlaylistRelatedByDbAutoPlaylistId) {
$result['CcPlaylist'] = $this->aCcPlaylist->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); $result['CcPlaylistRelatedByDbAutoPlaylistId'] = $this->aCcPlaylistRelatedByDbAutoPlaylistId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aCcPlaylistRelatedByDbIntroPlaylistId) {
$result['CcPlaylistRelatedByDbIntroPlaylistId'] = $this->aCcPlaylistRelatedByDbIntroPlaylistId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
}
if (null !== $this->aCcPlaylistRelatedByDbOutroPlaylistId) {
$result['CcPlaylistRelatedByDbOutroPlaylistId'] = $this->aCcPlaylistRelatedByDbOutroPlaylistId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
} }
if (null !== $this->collCcShowInstancess) { if (null !== $this->collCcShowInstancess) {
$result['CcShowInstancess'] = $this->collCcShowInstancess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); $result['CcShowInstancess'] = $this->collCcShowInstancess->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
@ -1740,6 +1896,12 @@ abstract class BaseCcShow extends BaseObject implements Persistent
case 16: case 16:
$this->setDbAutoPlaylistRepeat($value); $this->setDbAutoPlaylistRepeat($value);
break; break;
case 17:
$this->setDbIntroPlaylistId($value);
break;
case 18:
$this->setDbOutroPlaylistId($value);
break;
} // switch() } // switch()
} }
@ -1781,6 +1943,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if (array_key_exists($keys[14], $arr)) $this->setDbHasAutoPlaylist($arr[$keys[14]]); if (array_key_exists($keys[14], $arr)) $this->setDbHasAutoPlaylist($arr[$keys[14]]);
if (array_key_exists($keys[15], $arr)) $this->setDbAutoPlaylistId($arr[$keys[15]]); if (array_key_exists($keys[15], $arr)) $this->setDbAutoPlaylistId($arr[$keys[15]]);
if (array_key_exists($keys[16], $arr)) $this->setDbAutoPlaylistRepeat($arr[$keys[16]]); if (array_key_exists($keys[16], $arr)) $this->setDbAutoPlaylistRepeat($arr[$keys[16]]);
if (array_key_exists($keys[17], $arr)) $this->setDbIntroPlaylistId($arr[$keys[17]]);
if (array_key_exists($keys[18], $arr)) $this->setDbOutroPlaylistId($arr[$keys[18]]);
} }
/** /**
@ -1809,6 +1973,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
if ($this->isColumnModified(CcShowPeer::HAS_AUTOPLAYLIST)) $criteria->add(CcShowPeer::HAS_AUTOPLAYLIST, $this->has_autoplaylist); if ($this->isColumnModified(CcShowPeer::HAS_AUTOPLAYLIST)) $criteria->add(CcShowPeer::HAS_AUTOPLAYLIST, $this->has_autoplaylist);
if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_ID)) $criteria->add(CcShowPeer::AUTOPLAYLIST_ID, $this->autoplaylist_id); if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_ID)) $criteria->add(CcShowPeer::AUTOPLAYLIST_ID, $this->autoplaylist_id);
if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) $criteria->add(CcShowPeer::AUTOPLAYLIST_REPEAT, $this->autoplaylist_repeat); if ($this->isColumnModified(CcShowPeer::AUTOPLAYLIST_REPEAT)) $criteria->add(CcShowPeer::AUTOPLAYLIST_REPEAT, $this->autoplaylist_repeat);
if ($this->isColumnModified(CcShowPeer::INTRO_PLAYLIST_ID)) $criteria->add(CcShowPeer::INTRO_PLAYLIST_ID, $this->intro_playlist_id);
if ($this->isColumnModified(CcShowPeer::OUTRO_PLAYLIST_ID)) $criteria->add(CcShowPeer::OUTRO_PLAYLIST_ID, $this->outro_playlist_id);
return $criteria; return $criteria;
} }
@ -1888,6 +2054,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$copyObj->setDbHasAutoPlaylist($this->getDbHasAutoPlaylist()); $copyObj->setDbHasAutoPlaylist($this->getDbHasAutoPlaylist());
$copyObj->setDbAutoPlaylistId($this->getDbAutoPlaylistId()); $copyObj->setDbAutoPlaylistId($this->getDbAutoPlaylistId());
$copyObj->setDbAutoPlaylistRepeat($this->getDbAutoPlaylistRepeat()); $copyObj->setDbAutoPlaylistRepeat($this->getDbAutoPlaylistRepeat());
$copyObj->setDbIntroPlaylistId($this->getDbIntroPlaylistId());
$copyObj->setDbOutroPlaylistId($this->getDbOutroPlaylistId());
if ($deepCopy && !$this->startCopy) { if ($deepCopy && !$this->startCopy) {
// important: temporarily setNew(false) because this affects the behavior of // important: temporarily setNew(false) because this affects the behavior of
@ -1977,7 +2145,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
* @return CcShow The current object (for fluent API support) * @return CcShow The current object (for fluent API support)
* @throws PropelException * @throws PropelException
*/ */
public function setCcPlaylist(CcPlaylist $v = null) public function setCcPlaylistRelatedByDbAutoPlaylistId(CcPlaylist $v = null)
{ {
if ($v === null) { if ($v === null) {
$this->setDbAutoPlaylistId(NULL); $this->setDbAutoPlaylistId(NULL);
@ -1985,12 +2153,12 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->setDbAutoPlaylistId($v->getDbId()); $this->setDbAutoPlaylistId($v->getDbId());
} }
$this->aCcPlaylist = $v; $this->aCcPlaylistRelatedByDbAutoPlaylistId = $v;
// Add binding for other direction of this n:n relationship. // Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcPlaylist object, it will not be re-added. // If this object has already been added to the CcPlaylist object, it will not be re-added.
if ($v !== null) { if ($v !== null) {
$v->addCcShow($this); $v->addCcShowRelatedByDbAutoPlaylistId($this);
} }
@ -2006,20 +2174,124 @@ abstract class BaseCcShow extends BaseObject implements Persistent
* @return CcPlaylist The associated CcPlaylist object. * @return CcPlaylist The associated CcPlaylist object.
* @throws PropelException * @throws PropelException
*/ */
public function getCcPlaylist(PropelPDO $con = null, $doQuery = true) public function getCcPlaylistRelatedByDbAutoPlaylistId(PropelPDO $con = null, $doQuery = true)
{ {
if ($this->aCcPlaylist === null && ($this->autoplaylist_id !== null) && $doQuery) { if ($this->aCcPlaylistRelatedByDbAutoPlaylistId === null && ($this->autoplaylist_id !== null) && $doQuery) {
$this->aCcPlaylist = CcPlaylistQuery::create()->findPk($this->autoplaylist_id, $con); $this->aCcPlaylistRelatedByDbAutoPlaylistId = CcPlaylistQuery::create()->findPk($this->autoplaylist_id, $con);
/* The following can be used additionally to /* The following can be used additionally to
guarantee the related object contains a reference guarantee the related object contains a reference
to this object. This level of coupling may, however, be to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection undesirable since it could result in an only partially populated collection
in the referenced object. in the referenced object.
$this->aCcPlaylist->addCcShows($this); $this->aCcPlaylistRelatedByDbAutoPlaylistId->addCcShowsRelatedByDbAutoPlaylistId($this);
*/ */
} }
return $this->aCcPlaylist; return $this->aCcPlaylistRelatedByDbAutoPlaylistId;
}
/**
* Declares an association between this object and a CcPlaylist object.
*
* @param CcPlaylist $v
* @return CcShow The current object (for fluent API support)
* @throws PropelException
*/
public function setCcPlaylistRelatedByDbIntroPlaylistId(CcPlaylist $v = null)
{
if ($v === null) {
$this->setDbIntroPlaylistId(NULL);
} else {
$this->setDbIntroPlaylistId($v->getDbId());
}
$this->aCcPlaylistRelatedByDbIntroPlaylistId = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcPlaylist object, it will not be re-added.
if ($v !== null) {
$v->addCcShowRelatedByDbIntroPlaylistId($this);
}
return $this;
}
/**
* Get the associated CcPlaylist object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return CcPlaylist The associated CcPlaylist object.
* @throws PropelException
*/
public function getCcPlaylistRelatedByDbIntroPlaylistId(PropelPDO $con = null, $doQuery = true)
{
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId === null && ($this->intro_playlist_id !== null) && $doQuery) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId = CcPlaylistQuery::create()->findPk($this->intro_playlist_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aCcPlaylistRelatedByDbIntroPlaylistId->addCcShowsRelatedByDbIntroPlaylistId($this);
*/
}
return $this->aCcPlaylistRelatedByDbIntroPlaylistId;
}
/**
* Declares an association between this object and a CcPlaylist object.
*
* @param CcPlaylist $v
* @return CcShow The current object (for fluent API support)
* @throws PropelException
*/
public function setCcPlaylistRelatedByDbOutroPlaylistId(CcPlaylist $v = null)
{
if ($v === null) {
$this->setDbOutroPlaylistId(NULL);
} else {
$this->setDbOutroPlaylistId($v->getDbId());
}
$this->aCcPlaylistRelatedByDbOutroPlaylistId = $v;
// Add binding for other direction of this n:n relationship.
// If this object has already been added to the CcPlaylist object, it will not be re-added.
if ($v !== null) {
$v->addCcShowRelatedByDbOutroPlaylistId($this);
}
return $this;
}
/**
* Get the associated CcPlaylist object
*
* @param PropelPDO $con Optional Connection object.
* @param $doQuery Executes a query to get the object if required
* @return CcPlaylist The associated CcPlaylist object.
* @throws PropelException
*/
public function getCcPlaylistRelatedByDbOutroPlaylistId(PropelPDO $con = null, $doQuery = true)
{
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId === null && ($this->outro_playlist_id !== null) && $doQuery) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId = CcPlaylistQuery::create()->findPk($this->outro_playlist_id, $con);
/* The following can be used additionally to
guarantee the related object contains a reference
to this object. This level of coupling may, however, be
undesirable since it could result in an only partially populated collection
in the referenced object.
$this->aCcPlaylistRelatedByDbOutroPlaylistId->addCcShowsRelatedByDbOutroPlaylistId($this);
*/
}
return $this->aCcPlaylistRelatedByDbOutroPlaylistId;
} }
@ -3044,6 +3316,8 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->has_autoplaylist = null; $this->has_autoplaylist = null;
$this->autoplaylist_id = null; $this->autoplaylist_id = null;
$this->autoplaylist_repeat = null; $this->autoplaylist_repeat = null;
$this->intro_playlist_id = null;
$this->outro_playlist_id = null;
$this->alreadyInSave = false; $this->alreadyInSave = false;
$this->alreadyInValidation = false; $this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false; $this->alreadyInClearAllReferencesDeep = false;
@ -3087,8 +3361,14 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$o->clearAllReferences($deep); $o->clearAllReferences($deep);
} }
} }
if ($this->aCcPlaylist instanceof Persistent) { if ($this->aCcPlaylistRelatedByDbAutoPlaylistId instanceof Persistent) {
$this->aCcPlaylist->clearAllReferences($deep); $this->aCcPlaylistRelatedByDbAutoPlaylistId->clearAllReferences($deep);
}
if ($this->aCcPlaylistRelatedByDbIntroPlaylistId instanceof Persistent) {
$this->aCcPlaylistRelatedByDbIntroPlaylistId->clearAllReferences($deep);
}
if ($this->aCcPlaylistRelatedByDbOutroPlaylistId instanceof Persistent) {
$this->aCcPlaylistRelatedByDbOutroPlaylistId->clearAllReferences($deep);
} }
$this->alreadyInClearAllReferencesDeep = false; $this->alreadyInClearAllReferencesDeep = false;
@ -3110,7 +3390,9 @@ abstract class BaseCcShow extends BaseObject implements Persistent
$this->collCcShowHostss->clearIterator(); $this->collCcShowHostss->clearIterator();
} }
$this->collCcShowHostss = null; $this->collCcShowHostss = null;
$this->aCcPlaylist = null; $this->aCcPlaylistRelatedByDbAutoPlaylistId = null;
$this->aCcPlaylistRelatedByDbIntroPlaylistId = null;
$this->aCcPlaylistRelatedByDbOutroPlaylistId = null;
} }
/** /**

View File

@ -24,13 +24,13 @@ abstract class BaseCcShowPeer
const TM_CLASS = 'CcShowTableMap'; const TM_CLASS = 'CcShowTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 17; const NUM_COLUMNS = 19;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 17; const NUM_HYDRATE_COLUMNS = 19;
/** the column name for the id field */ /** the column name for the id field */
const ID = 'cc_show.id'; const ID = 'cc_show.id';
@ -83,6 +83,12 @@ abstract class BaseCcShowPeer
/** the column name for the autoplaylist_repeat field */ /** the column name for the autoplaylist_repeat field */
const AUTOPLAYLIST_REPEAT = 'cc_show.autoplaylist_repeat'; const AUTOPLAYLIST_REPEAT = 'cc_show.autoplaylist_repeat';
/** the column name for the intro_playlist_id field */
const INTRO_PLAYLIST_ID = 'cc_show.intro_playlist_id';
/** the column name for the outro_playlist_id field */
const OUTRO_PLAYLIST_ID = 'cc_show.outro_playlist_id';
/** The default string format for model objects of the related table **/ /** The default string format for model objects of the related table **/
const DEFAULT_STRING_FORMAT = 'YAML'; const DEFAULT_STRING_FORMAT = 'YAML';
@ -102,12 +108,12 @@ abstract class BaseCcShowPeer
* e.g. CcShowPeer::$fieldNames[CcShowPeer::TYPE_PHPNAME][0] = 'Id' * e.g. CcShowPeer::$fieldNames[CcShowPeer::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', 'DbImagePath', 'DbHasAutoPlaylist', 'DbAutoPlaylistId', 'DbAutoPlaylistRepeat', ), BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbGenre', 'DbDescription', 'DbColor', 'DbBackgroundColor', 'DbLiveStreamUsingAirtimeAuth', 'DbLiveStreamUsingCustomAuth', 'DbLiveStreamUser', 'DbLiveStreamPass', 'DbLinked', 'DbIsLinkable', 'DbImagePath', 'DbHasAutoPlaylist', 'DbAutoPlaylistId', 'DbAutoPlaylistRepeat', 'DbIntroPlaylistId', 'DbOutroPlaylistId', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', 'dbImagePath', 'dbHasAutoPlaylist', 'dbAutoPlaylistId', 'dbAutoPlaylistRepeat', ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbGenre', 'dbDescription', 'dbColor', 'dbBackgroundColor', 'dbLiveStreamUsingAirtimeAuth', 'dbLiveStreamUsingCustomAuth', 'dbLiveStreamUser', 'dbLiveStreamPass', 'dbLinked', 'dbIsLinkable', 'dbImagePath', 'dbHasAutoPlaylist', 'dbAutoPlaylistId', 'dbAutoPlaylistRepeat', 'dbIntroPlaylistId', 'dbOutroPlaylistId', ),
BasePeer::TYPE_COLNAME => array (CcShowPeer::ID, CcShowPeer::NAME, CcShowPeer::URL, CcShowPeer::GENRE, CcShowPeer::DESCRIPTION, CcShowPeer::COLOR, CcShowPeer::BACKGROUND_COLOR, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, CcShowPeer::LIVE_STREAM_USER, CcShowPeer::LIVE_STREAM_PASS, CcShowPeer::LINKED, CcShowPeer::IS_LINKABLE, CcShowPeer::IMAGE_PATH, CcShowPeer::HAS_AUTOPLAYLIST, CcShowPeer::AUTOPLAYLIST_ID, CcShowPeer::AUTOPLAYLIST_REPEAT, ), BasePeer::TYPE_COLNAME => array (CcShowPeer::ID, CcShowPeer::NAME, CcShowPeer::URL, CcShowPeer::GENRE, CcShowPeer::DESCRIPTION, CcShowPeer::COLOR, CcShowPeer::BACKGROUND_COLOR, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH, CcShowPeer::LIVE_STREAM_USER, CcShowPeer::LIVE_STREAM_PASS, CcShowPeer::LINKED, CcShowPeer::IS_LINKABLE, CcShowPeer::IMAGE_PATH, CcShowPeer::HAS_AUTOPLAYLIST, CcShowPeer::AUTOPLAYLIST_ID, CcShowPeer::AUTOPLAYLIST_REPEAT, CcShowPeer::INTRO_PLAYLIST_ID, CcShowPeer::OUTRO_PLAYLIST_ID, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', 'IMAGE_PATH', 'HAS_AUTOPLAYLIST', 'AUTOPLAYLIST_ID', 'AUTOPLAYLIST_REPEAT', ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'GENRE', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', 'LIVE_STREAM_USING_AIRTIME_AUTH', 'LIVE_STREAM_USING_CUSTOM_AUTH', 'LIVE_STREAM_USER', 'LIVE_STREAM_PASS', 'LINKED', 'IS_LINKABLE', 'IMAGE_PATH', 'HAS_AUTOPLAYLIST', 'AUTOPLAYLIST_ID', 'AUTOPLAYLIST_REPEAT', 'INTRO_PLAYLIST_ID', 'OUTRO_PLAYLIST_ID', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', 'image_path', 'has_autoplaylist', 'autoplaylist_id', 'autoplaylist_repeat', ), BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'genre', 'description', 'color', 'background_color', 'live_stream_using_airtime_auth', 'live_stream_using_custom_auth', 'live_stream_user', 'live_stream_pass', 'linked', 'is_linkable', 'image_path', 'has_autoplaylist', 'autoplaylist_id', 'autoplaylist_repeat', 'intro_playlist_id', 'outro_playlist_id', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
); );
/** /**
@ -117,12 +123,12 @@ abstract class BaseCcShowPeer
* e.g. CcShowPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. CcShowPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, 'DbImagePath' => 13, 'DbHasAutoPlaylist' => 14, 'DbAutoPlaylistId' => 15, 'DbAutoPlaylistRepeat' => 16, ), BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbGenre' => 3, 'DbDescription' => 4, 'DbColor' => 5, 'DbBackgroundColor' => 6, 'DbLiveStreamUsingAirtimeAuth' => 7, 'DbLiveStreamUsingCustomAuth' => 8, 'DbLiveStreamUser' => 9, 'DbLiveStreamPass' => 10, 'DbLinked' => 11, 'DbIsLinkable' => 12, 'DbImagePath' => 13, 'DbHasAutoPlaylist' => 14, 'DbAutoPlaylistId' => 15, 'DbAutoPlaylistRepeat' => 16, 'DbIntroPlaylistId' => 17, 'DbOutroPlaylistId' => 18, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, 'dbImagePath' => 13, 'dbHasAutoPlaylist' => 14, 'dbAutoPlaylistId' => 15, 'dbAutoPlaylistRepeat' => 16, ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbGenre' => 3, 'dbDescription' => 4, 'dbColor' => 5, 'dbBackgroundColor' => 6, 'dbLiveStreamUsingAirtimeAuth' => 7, 'dbLiveStreamUsingCustomAuth' => 8, 'dbLiveStreamUser' => 9, 'dbLiveStreamPass' => 10, 'dbLinked' => 11, 'dbIsLinkable' => 12, 'dbImagePath' => 13, 'dbHasAutoPlaylist' => 14, 'dbAutoPlaylistId' => 15, 'dbAutoPlaylistRepeat' => 16, 'dbIntroPlaylistId' => 17, 'dbOutroPlaylistId' => 18, ),
BasePeer::TYPE_COLNAME => array (CcShowPeer::ID => 0, CcShowPeer::NAME => 1, CcShowPeer::URL => 2, CcShowPeer::GENRE => 3, CcShowPeer::DESCRIPTION => 4, CcShowPeer::COLOR => 5, CcShowPeer::BACKGROUND_COLOR => 6, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH => 7, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH => 8, CcShowPeer::LIVE_STREAM_USER => 9, CcShowPeer::LIVE_STREAM_PASS => 10, CcShowPeer::LINKED => 11, CcShowPeer::IS_LINKABLE => 12, CcShowPeer::IMAGE_PATH => 13, CcShowPeer::HAS_AUTOPLAYLIST => 14, CcShowPeer::AUTOPLAYLIST_ID => 15, CcShowPeer::AUTOPLAYLIST_REPEAT => 16, ), BasePeer::TYPE_COLNAME => array (CcShowPeer::ID => 0, CcShowPeer::NAME => 1, CcShowPeer::URL => 2, CcShowPeer::GENRE => 3, CcShowPeer::DESCRIPTION => 4, CcShowPeer::COLOR => 5, CcShowPeer::BACKGROUND_COLOR => 6, CcShowPeer::LIVE_STREAM_USING_AIRTIME_AUTH => 7, CcShowPeer::LIVE_STREAM_USING_CUSTOM_AUTH => 8, CcShowPeer::LIVE_STREAM_USER => 9, CcShowPeer::LIVE_STREAM_PASS => 10, CcShowPeer::LINKED => 11, CcShowPeer::IS_LINKABLE => 12, CcShowPeer::IMAGE_PATH => 13, CcShowPeer::HAS_AUTOPLAYLIST => 14, CcShowPeer::AUTOPLAYLIST_ID => 15, CcShowPeer::AUTOPLAYLIST_REPEAT => 16, CcShowPeer::INTRO_PLAYLIST_ID => 17, CcShowPeer::OUTRO_PLAYLIST_ID => 18, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, 'IMAGE_PATH' => 13, 'HAS_AUTOPLAYLIST' => 14, 'AUTOPLAYLIST_ID' => 15, 'AUTOPLAYLIST_REPEAT' => 16, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'GENRE' => 3, 'DESCRIPTION' => 4, 'COLOR' => 5, 'BACKGROUND_COLOR' => 6, 'LIVE_STREAM_USING_AIRTIME_AUTH' => 7, 'LIVE_STREAM_USING_CUSTOM_AUTH' => 8, 'LIVE_STREAM_USER' => 9, 'LIVE_STREAM_PASS' => 10, 'LINKED' => 11, 'IS_LINKABLE' => 12, 'IMAGE_PATH' => 13, 'HAS_AUTOPLAYLIST' => 14, 'AUTOPLAYLIST_ID' => 15, 'AUTOPLAYLIST_REPEAT' => 16, 'INTRO_PLAYLIST_ID' => 17, 'OUTRO_PLAYLIST_ID' => 18, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, 'image_path' => 13, 'has_autoplaylist' => 14, 'autoplaylist_id' => 15, 'autoplaylist_repeat' => 16, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'genre' => 3, 'description' => 4, 'color' => 5, 'background_color' => 6, 'live_stream_using_airtime_auth' => 7, 'live_stream_using_custom_auth' => 8, 'live_stream_user' => 9, 'live_stream_pass' => 10, 'linked' => 11, 'is_linkable' => 12, 'image_path' => 13, 'has_autoplaylist' => 14, 'autoplaylist_id' => 15, 'autoplaylist_repeat' => 16, 'intro_playlist_id' => 17, 'outro_playlist_id' => 18, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
); );
/** /**
@ -213,6 +219,8 @@ abstract class BaseCcShowPeer
$criteria->addSelectColumn(CcShowPeer::HAS_AUTOPLAYLIST); $criteria->addSelectColumn(CcShowPeer::HAS_AUTOPLAYLIST);
$criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_ID); $criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_ID);
$criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_REPEAT); $criteria->addSelectColumn(CcShowPeer::AUTOPLAYLIST_REPEAT);
$criteria->addSelectColumn(CcShowPeer::INTRO_PLAYLIST_ID);
$criteria->addSelectColumn(CcShowPeer::OUTRO_PLAYLIST_ID);
} else { } else {
$criteria->addSelectColumn($alias . '.id'); $criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.name'); $criteria->addSelectColumn($alias . '.name');
@ -231,6 +239,8 @@ abstract class BaseCcShowPeer
$criteria->addSelectColumn($alias . '.has_autoplaylist'); $criteria->addSelectColumn($alias . '.has_autoplaylist');
$criteria->addSelectColumn($alias . '.autoplaylist_id'); $criteria->addSelectColumn($alias . '.autoplaylist_id');
$criteria->addSelectColumn($alias . '.autoplaylist_repeat'); $criteria->addSelectColumn($alias . '.autoplaylist_repeat');
$criteria->addSelectColumn($alias . '.intro_playlist_id');
$criteria->addSelectColumn($alias . '.outro_playlist_id');
} }
} }
@ -545,7 +555,7 @@ abstract class BaseCcShowPeer
/** /**
* Returns the number of rows matching criteria, joining the related CcPlaylist table * Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbAutoPlaylistId table
* *
* @param Criteria $criteria * @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
@ -553,7 +563,7 @@ abstract class BaseCcShowPeer
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows. * @return int Number of matching rows.
*/ */
public static function doCountJoinCcPlaylist(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN) public static function doCountJoinCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{ {
// we're going to modify criteria, so copy it first // we're going to modify criteria, so copy it first
$criteria = clone $criteria; $criteria = clone $criteria;
@ -595,6 +605,108 @@ abstract class BaseCcShowPeer
} }
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbIntroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbOutroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/** /**
* Selects a collection of CcShow objects pre-filled with their CcPlaylist objects. * Selects a collection of CcShow objects pre-filled with their CcPlaylist objects.
* @param Criteria $criteria * @param Criteria $criteria
@ -604,7 +716,7 @@ abstract class BaseCcShowPeer
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelectJoinCcPlaylist(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN) public static function doSelectJoinCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{ {
$criteria = clone $criteria; $criteria = clone $criteria;
@ -650,7 +762,141 @@ abstract class BaseCcShowPeer
} // if obj2 already loaded } // if obj2 already loaded
// Add the $obj1 (CcShow) to $obj2 (CcPlaylist) // Add the $obj1 (CcShow) to $obj2 (CcPlaylist)
$obj2->addCcShow($obj1); $obj2->addCcShowRelatedByDbAutoPlaylistId($obj1);
} // if joined row was not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with their CcPlaylist objects.
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol = CcShowPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::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 = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
$obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = CcPlaylistPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
CcPlaylistPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
// Add the $obj1 (CcShow) to $obj2 (CcPlaylist)
$obj2->addCcShowRelatedByDbIntroPlaylistId($obj1);
} // if joined row was not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with their CcPlaylist objects.
* @param Criteria $criteria
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return array Array of CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol = CcShowPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::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 = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if $obj1 already loaded
$key2 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol);
if ($key2 !== null) {
$obj2 = CcPlaylistPeer::getInstanceFromPool($key2);
if (!$obj2) {
$cls = CcPlaylistPeer::getOMClass();
$obj2 = new $cls();
$obj2->hydrate($row, $startcol);
CcPlaylistPeer::addInstanceToPool($obj2, $key2);
} // if obj2 already loaded
// Add the $obj1 (CcShow) to $obj2 (CcPlaylist)
$obj2->addCcShowRelatedByDbOutroPlaylistId($obj1);
} // if joined row was not null } // if joined row was not null
@ -700,6 +946,10 @@ abstract class BaseCcShowPeer
$criteria->addJoin(CcShowPeer::AUTOPLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior); $criteria->addJoin(CcShowPeer::AUTOPLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doCount($criteria, $con); $stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) { if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@ -737,8 +987,18 @@ abstract class BaseCcShowPeer
CcPlaylistPeer::addSelectColumns($criteria); CcPlaylistPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + CcPlaylistPeer::NUM_HYDRATE_COLUMNS; $startcol3 = $startcol2 + CcPlaylistPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + CcPlaylistPeer::NUM_HYDRATE_COLUMNS;
CcPlaylistPeer::addSelectColumns($criteria);
$startcol5 = $startcol4 + CcPlaylistPeer::NUM_HYDRATE_COLUMNS;
$criteria->addJoin(CcShowPeer::AUTOPLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior); $criteria->addJoin(CcShowPeer::AUTOPLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::INTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$criteria->addJoin(CcShowPeer::OUTRO_PLAYLIST_ID, CcPlaylistPeer::ID, $join_behavior);
$stmt = BasePeer::doSelect($criteria, $con); $stmt = BasePeer::doSelect($criteria, $con);
$results = array(); $results = array();
@ -771,9 +1031,342 @@ abstract class BaseCcShowPeer
} // if obj2 loaded } // if obj2 loaded
// Add the $obj1 (CcShow) to the collection in $obj2 (CcPlaylist) // Add the $obj1 (CcShow) to the collection in $obj2 (CcPlaylist)
$obj2->addCcShow($obj1); $obj2->addCcShowRelatedByDbAutoPlaylistId($obj1);
} // if joined row not null } // if joined row not null
// Add objects for joined CcPlaylist rows
$key3 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol3);
if ($key3 !== null) {
$obj3 = CcPlaylistPeer::getInstanceFromPool($key3);
if (!$obj3) {
$cls = CcPlaylistPeer::getOMClass();
$obj3 = new $cls();
$obj3->hydrate($row, $startcol3);
CcPlaylistPeer::addInstanceToPool($obj3, $key3);
} // if obj3 loaded
// Add the $obj1 (CcShow) to the collection in $obj3 (CcPlaylist)
$obj3->addCcShowRelatedByDbIntroPlaylistId($obj1);
} // if joined row not null
// Add objects for joined CcPlaylist rows
$key4 = CcPlaylistPeer::getPrimaryKeyHashFromRow($row, $startcol4);
if ($key4 !== null) {
$obj4 = CcPlaylistPeer::getInstanceFromPool($key4);
if (!$obj4) {
$cls = CcPlaylistPeer::getOMClass();
$obj4 = new $cls();
$obj4->hydrate($row, $startcol4);
CcPlaylistPeer::addInstanceToPool($obj4, $key4);
} // if obj4 loaded
// Add the $obj1 (CcShow) to the collection in $obj4 (CcPlaylist)
$obj4->addCcShowRelatedByDbOutroPlaylistId($obj1);
} // if joined row not null
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbAutoPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbIntroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Returns the number of rows matching criteria, joining the related CcPlaylistRelatedByDbOutroPlaylistId table
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
* @param PropelPDO $con
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
* @return int Number of matching rows.
*/
public static function doCountJoinAllExceptCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// We need to set the primary table name, since in the case that there are no WHERE columns
// it will be impossible for the BasePeer::createSelectSql() method to determine which
// tables go into the FROM clause.
$criteria->setPrimaryTableName(CcShowPeer::TABLE_NAME);
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->setDistinct();
}
if (!$criteria->hasSelectClause()) {
CcShowPeer::addSelectColumns($criteria);
}
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
// Set the correct dbName
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
if ($con === null) {
$con = Propel::getConnection(CcShowPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$count = (int) $row[0];
} else {
$count = 0; // no rows returned; we infer that means 0 matches.
}
$stmt->closeCursor();
return $count;
}
/**
* Selects a collection of CcShow objects pre-filled with all related objects except CcPlaylistRelatedByDbAutoPlaylistId.
*
* @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 CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptCcPlaylistRelatedByDbAutoPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol2 = CcShowPeer::NUM_HYDRATE_COLUMNS;
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::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 = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with all related objects except CcPlaylistRelatedByDbIntroPlaylistId.
*
* @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 CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptCcPlaylistRelatedByDbIntroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol2 = CcShowPeer::NUM_HYDRATE_COLUMNS;
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::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 = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
$results[] = $obj1;
}
$stmt->closeCursor();
return $results;
}
/**
* Selects a collection of CcShow objects pre-filled with all related objects except CcPlaylistRelatedByDbOutroPlaylistId.
*
* @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 CcShow objects.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectJoinAllExceptCcPlaylistRelatedByDbOutroPlaylistId(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$criteria = clone $criteria;
// Set the correct dbName if it has not been overridden
// $criteria->getDbName() will return the same object if not set to another value
// so == check is okay and faster
if ($criteria->getDbName() == Propel::getDefaultDB()) {
$criteria->setDbName(CcShowPeer::DATABASE_NAME);
}
CcShowPeer::addSelectColumns($criteria);
$startcol2 = CcShowPeer::NUM_HYDRATE_COLUMNS;
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$key1 = CcShowPeer::getPrimaryKeyHashFromRow($row, 0);
if (null !== ($obj1 = CcShowPeer::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 = CcShowPeer::getOMClass();
$obj1 = new $cls();
$obj1->hydrate($row);
CcShowPeer::addInstanceToPool($obj1, $key1);
} // if obj1 already loaded
$results[] = $obj1; $results[] = $obj1;
} }
$stmt->closeCursor(); $stmt->closeCursor();

View File

@ -23,6 +23,8 @@
* @method CcShowQuery orderByDbHasAutoPlaylist($order = Criteria::ASC) Order by the has_autoplaylist column * @method CcShowQuery orderByDbHasAutoPlaylist($order = Criteria::ASC) Order by the has_autoplaylist column
* @method CcShowQuery orderByDbAutoPlaylistId($order = Criteria::ASC) Order by the autoplaylist_id column * @method CcShowQuery orderByDbAutoPlaylistId($order = Criteria::ASC) Order by the autoplaylist_id column
* @method CcShowQuery orderByDbAutoPlaylistRepeat($order = Criteria::ASC) Order by the autoplaylist_repeat column * @method CcShowQuery orderByDbAutoPlaylistRepeat($order = Criteria::ASC) Order by the autoplaylist_repeat column
* @method CcShowQuery orderByDbIntroPlaylistId($order = Criteria::ASC) Order by the intro_playlist_id column
* @method CcShowQuery orderByDbOutroPlaylistId($order = Criteria::ASC) Order by the outro_playlist_id column
* *
* @method CcShowQuery groupByDbId() Group by the id column * @method CcShowQuery groupByDbId() Group by the id column
* @method CcShowQuery groupByDbName() Group by the name column * @method CcShowQuery groupByDbName() Group by the name column
@ -41,14 +43,24 @@
* @method CcShowQuery groupByDbHasAutoPlaylist() Group by the has_autoplaylist column * @method CcShowQuery groupByDbHasAutoPlaylist() Group by the has_autoplaylist column
* @method CcShowQuery groupByDbAutoPlaylistId() Group by the autoplaylist_id column * @method CcShowQuery groupByDbAutoPlaylistId() Group by the autoplaylist_id column
* @method CcShowQuery groupByDbAutoPlaylistRepeat() Group by the autoplaylist_repeat column * @method CcShowQuery groupByDbAutoPlaylistRepeat() Group by the autoplaylist_repeat column
* @method CcShowQuery groupByDbIntroPlaylistId() Group by the intro_playlist_id column
* @method CcShowQuery groupByDbOutroPlaylistId() Group by the outro_playlist_id column
* *
* @method CcShowQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcShowQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcShowQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method CcShowQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcShowQuery innerJoin($relation) Adds a INNER JOIN clause to the query * @method CcShowQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* *
* @method CcShowQuery leftJoinCcPlaylist($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylist relation * @method CcShowQuery leftJoinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
* @method CcShowQuery rightJoinCcPlaylist($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylist relation * @method CcShowQuery rightJoinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
* @method CcShowQuery innerJoinCcPlaylist($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylist relation * @method CcShowQuery innerJoinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
*
* @method CcShowQuery leftJoinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
* @method CcShowQuery rightJoinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
* @method CcShowQuery innerJoinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
*
* @method CcShowQuery leftJoinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
* @method CcShowQuery rightJoinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
* @method CcShowQuery innerJoinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
* *
* @method CcShowQuery leftJoinCcShowInstances($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowInstances relation * @method CcShowQuery leftJoinCcShowInstances($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShowInstances relation
* @method CcShowQuery rightJoinCcShowInstances($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowInstances relation * @method CcShowQuery rightJoinCcShowInstances($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShowInstances relation
@ -85,6 +97,8 @@
* @method CcShow findOneByDbHasAutoPlaylist(boolean $has_autoplaylist) Return the first CcShow filtered by the has_autoplaylist column * @method CcShow findOneByDbHasAutoPlaylist(boolean $has_autoplaylist) Return the first CcShow filtered by the has_autoplaylist column
* @method CcShow findOneByDbAutoPlaylistId(int $autoplaylist_id) Return the first CcShow filtered by the autoplaylist_id column * @method CcShow findOneByDbAutoPlaylistId(int $autoplaylist_id) Return the first CcShow filtered by the autoplaylist_id column
* @method CcShow findOneByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return the first CcShow filtered by the autoplaylist_repeat column * @method CcShow findOneByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return the first CcShow filtered by the autoplaylist_repeat column
* @method CcShow findOneByDbIntroPlaylistId(int $intro_playlist_id) Return the first CcShow filtered by the intro_playlist_id column
* @method CcShow findOneByDbOutroPlaylistId(int $outro_playlist_id) Return the first CcShow filtered by the outro_playlist_id column
* *
* @method array findByDbId(int $id) Return CcShow objects filtered by the id column * @method array findByDbId(int $id) Return CcShow objects filtered by the id column
* @method array findByDbName(string $name) Return CcShow objects filtered by the name column * @method array findByDbName(string $name) Return CcShow objects filtered by the name column
@ -103,6 +117,8 @@
* @method array findByDbHasAutoPlaylist(boolean $has_autoplaylist) Return CcShow objects filtered by the has_autoplaylist column * @method array findByDbHasAutoPlaylist(boolean $has_autoplaylist) Return CcShow objects filtered by the has_autoplaylist column
* @method array findByDbAutoPlaylistId(int $autoplaylist_id) Return CcShow objects filtered by the autoplaylist_id column * @method array findByDbAutoPlaylistId(int $autoplaylist_id) Return CcShow objects filtered by the autoplaylist_id column
* @method array findByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return CcShow objects filtered by the autoplaylist_repeat column * @method array findByDbAutoPlaylistRepeat(boolean $autoplaylist_repeat) Return CcShow objects filtered by the autoplaylist_repeat column
* @method array findByDbIntroPlaylistId(int $intro_playlist_id) Return CcShow objects filtered by the intro_playlist_id column
* @method array findByDbOutroPlaylistId(int $outro_playlist_id) Return CcShow objects filtered by the outro_playlist_id column
* *
* @package propel.generator.airtime.om * @package propel.generator.airtime.om
*/ */
@ -210,7 +226,7 @@ abstract class BaseCcShowQuery extends ModelCriteria
*/ */
protected function findPkSimple($key, $con) protected function findPkSimple($key, $con)
{ {
$sql = 'SELECT "id", "name", "url", "genre", "description", "color", "background_color", "live_stream_using_airtime_auth", "live_stream_using_custom_auth", "live_stream_user", "live_stream_pass", "linked", "is_linkable", "image_path", "has_autoplaylist", "autoplaylist_id", "autoplaylist_repeat" FROM "cc_show" WHERE "id" = :p0'; $sql = 'SELECT "id", "name", "url", "genre", "description", "color", "background_color", "live_stream_using_airtime_auth", "live_stream_using_custom_auth", "live_stream_user", "live_stream_pass", "linked", "is_linkable", "image_path", "has_autoplaylist", "autoplaylist_id", "autoplaylist_repeat", "intro_playlist_id", "outro_playlist_id" FROM "cc_show" WHERE "id" = :p0';
try { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@ -748,7 +764,7 @@ abstract class BaseCcShowQuery extends ModelCriteria
* $query->filterByDbAutoPlaylistId(array('max' => 12)); // WHERE autoplaylist_id <= 12 * $query->filterByDbAutoPlaylistId(array('max' => 12)); // WHERE autoplaylist_id <= 12
* </code> * </code>
* *
* @see filterByCcPlaylist() * @see filterByCcPlaylistRelatedByDbAutoPlaylistId()
* *
* @param mixed $dbAutoPlaylistId The value to use as filter. * @param mixed $dbAutoPlaylistId The value to use as filter.
* Use scalar values for equality. * Use scalar values for equality.
@ -808,6 +824,94 @@ abstract class BaseCcShowQuery extends ModelCriteria
return $this->addUsingAlias(CcShowPeer::AUTOPLAYLIST_REPEAT, $dbAutoPlaylistRepeat, $comparison); return $this->addUsingAlias(CcShowPeer::AUTOPLAYLIST_REPEAT, $dbAutoPlaylistRepeat, $comparison);
} }
/**
* Filter the query on the intro_playlist_id column
*
* Example usage:
* <code>
* $query->filterByDbIntroPlaylistId(1234); // WHERE intro_playlist_id = 1234
* $query->filterByDbIntroPlaylistId(array(12, 34)); // WHERE intro_playlist_id IN (12, 34)
* $query->filterByDbIntroPlaylistId(array('min' => 12)); // WHERE intro_playlist_id >= 12
* $query->filterByDbIntroPlaylistId(array('max' => 12)); // WHERE intro_playlist_id <= 12
* </code>
*
* @see filterByCcPlaylistRelatedByDbIntroPlaylistId()
*
* @param mixed $dbIntroPlaylistId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbIntroPlaylistId($dbIntroPlaylistId = null, $comparison = null)
{
if (is_array($dbIntroPlaylistId)) {
$useMinMax = false;
if (isset($dbIntroPlaylistId['min'])) {
$this->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $dbIntroPlaylistId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbIntroPlaylistId['max'])) {
$this->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $dbIntroPlaylistId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $dbIntroPlaylistId, $comparison);
}
/**
* Filter the query on the outro_playlist_id column
*
* Example usage:
* <code>
* $query->filterByDbOutroPlaylistId(1234); // WHERE outro_playlist_id = 1234
* $query->filterByDbOutroPlaylistId(array(12, 34)); // WHERE outro_playlist_id IN (12, 34)
* $query->filterByDbOutroPlaylistId(array('min' => 12)); // WHERE outro_playlist_id >= 12
* $query->filterByDbOutroPlaylistId(array('max' => 12)); // WHERE outro_playlist_id <= 12
* </code>
*
* @see filterByCcPlaylistRelatedByDbOutroPlaylistId()
*
* @param mixed $dbOutroPlaylistId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
*/
public function filterByDbOutroPlaylistId($dbOutroPlaylistId = null, $comparison = null)
{
if (is_array($dbOutroPlaylistId)) {
$useMinMax = false;
if (isset($dbOutroPlaylistId['min'])) {
$this->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $dbOutroPlaylistId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbOutroPlaylistId['max'])) {
$this->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $dbOutroPlaylistId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $dbOutroPlaylistId, $comparison);
}
/** /**
* Filter the query by a related CcPlaylist object * Filter the query by a related CcPlaylist object
* *
@ -817,7 +921,7 @@ abstract class BaseCcShowQuery extends ModelCriteria
* @return CcShowQuery The current query, for fluid interface * @return CcShowQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid. * @throws PropelException - if the provided filter is invalid.
*/ */
public function filterByCcPlaylist($ccPlaylist, $comparison = null) public function filterByCcPlaylistRelatedByDbAutoPlaylistId($ccPlaylist, $comparison = null)
{ {
if ($ccPlaylist instanceof CcPlaylist) { if ($ccPlaylist instanceof CcPlaylist) {
return $this return $this
@ -830,22 +934,22 @@ abstract class BaseCcShowQuery extends ModelCriteria
return $this return $this
->addUsingAlias(CcShowPeer::AUTOPLAYLIST_ID, $ccPlaylist->toKeyValue('PrimaryKey', 'DbId'), $comparison); ->addUsingAlias(CcShowPeer::AUTOPLAYLIST_ID, $ccPlaylist->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else { } else {
throw new PropelException('filterByCcPlaylist() only accepts arguments of type CcPlaylist or PropelCollection'); throw new PropelException('filterByCcPlaylistRelatedByDbAutoPlaylistId() only accepts arguments of type CcPlaylist or PropelCollection');
} }
} }
/** /**
* Adds a JOIN clause to the query using the CcPlaylist relation * Adds a JOIN clause to the query using the CcPlaylistRelatedByDbAutoPlaylistId relation
* *
* @param string $relationAlias optional alias for the relation * @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
* *
* @return CcShowQuery The current query, for fluid interface * @return CcShowQuery The current query, for fluid interface
*/ */
public function joinCcPlaylist($relationAlias = null, $joinType = Criteria::LEFT_JOIN) public function joinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
$tableMap = $this->getTableMap(); $tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlaylist'); $relationMap = $tableMap->getRelation('CcPlaylistRelatedByDbAutoPlaylistId');
// create a ModelJoin object for this join // create a ModelJoin object for this join
$join = new ModelJoin(); $join = new ModelJoin();
@ -860,14 +964,14 @@ abstract class BaseCcShowQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias); $this->addJoinObject($join, $relationAlias);
} else { } else {
$this->addJoinObject($join, 'CcPlaylist'); $this->addJoinObject($join, 'CcPlaylistRelatedByDbAutoPlaylistId');
} }
return $this; return $this;
} }
/** /**
* Use the CcPlaylist relation CcPlaylist object * Use the CcPlaylistRelatedByDbAutoPlaylistId relation CcPlaylist object
* *
* @see useQuery() * @see useQuery()
* *
@ -877,11 +981,163 @@ abstract class BaseCcShowQuery extends ModelCriteria
* *
* @return CcPlaylistQuery A secondary query class using the current class as primary query * @return CcPlaylistQuery A secondary query class using the current class as primary query
*/ */
public function useCcPlaylistQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) public function useCcPlaylistRelatedByDbAutoPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{ {
return $this return $this
->joinCcPlaylist($relationAlias, $joinType) ->joinCcPlaylistRelatedByDbAutoPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlaylist', 'CcPlaylistQuery'); ->useQuery($relationAlias ? $relationAlias : 'CcPlaylistRelatedByDbAutoPlaylistId', 'CcPlaylistQuery');
}
/**
* Filter the query by a related CcPlaylist object
*
* @param CcPlaylist|PropelObjectCollection $ccPlaylist The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlaylistRelatedByDbIntroPlaylistId($ccPlaylist, $comparison = null)
{
if ($ccPlaylist instanceof CcPlaylist) {
return $this
->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $ccPlaylist->getDbId(), $comparison);
} elseif ($ccPlaylist instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcShowPeer::INTRO_PLAYLIST_ID, $ccPlaylist->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcPlaylistRelatedByDbIntroPlaylistId() only accepts arguments of type CcPlaylist or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlaylistRelatedByDbIntroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery The current query, for fluid interface
*/
public function joinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlaylistRelatedByDbIntroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcPlaylistRelatedByDbIntroPlaylistId');
}
return $this;
}
/**
* Use the CcPlaylistRelatedByDbIntroPlaylistId relation CcPlaylist object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery A secondary query class using the current class as primary query
*/
public function useCcPlaylistRelatedByDbIntroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcPlaylistRelatedByDbIntroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlaylistRelatedByDbIntroPlaylistId', 'CcPlaylistQuery');
}
/**
* Filter the query by a related CcPlaylist object
*
* @param CcPlaylist|PropelObjectCollection $ccPlaylist The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlaylistRelatedByDbOutroPlaylistId($ccPlaylist, $comparison = null)
{
if ($ccPlaylist instanceof CcPlaylist) {
return $this
->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $ccPlaylist->getDbId(), $comparison);
} elseif ($ccPlaylist instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcShowPeer::OUTRO_PLAYLIST_ID, $ccPlaylist->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcPlaylistRelatedByDbOutroPlaylistId() only accepts arguments of type CcPlaylist or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlaylistRelatedByDbOutroPlaylistId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery The current query, for fluid interface
*/
public function joinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlaylistRelatedByDbOutroPlaylistId');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcPlaylistRelatedByDbOutroPlaylistId');
}
return $this;
}
/**
* Use the CcPlaylistRelatedByDbOutroPlaylistId relation CcPlaylist object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlaylistQuery A secondary query class using the current class as primary query
*/
public function useCcPlaylistRelatedByDbOutroPlaylistIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcPlaylistRelatedByDbOutroPlaylistId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlaylistRelatedByDbOutroPlaylistId', 'CcPlaylistQuery');
} }
/** /**

View File

@ -164,6 +164,8 @@ class Application_Service_ShowFormService
'add_show_has_autoplaylist' => $this->ccShow->getDbHasAutoPlaylist() ? 1 : 0, 'add_show_has_autoplaylist' => $this->ccShow->getDbHasAutoPlaylist() ? 1 : 0,
'add_show_autoplaylist_id' => $this->ccShow->getDbAutoPlaylistId(), 'add_show_autoplaylist_id' => $this->ccShow->getDbAutoPlaylistId(),
'add_show_autoplaylist_repeat' => $this->ccShow->getDbAutoPlaylistRepeat(), 'add_show_autoplaylist_repeat' => $this->ccShow->getDbAutoPlaylistRepeat(),
'add_show_intro_playlist_id' => $this->ccShow->getDbIntroPlaylistId(),
'add_show_outro_playlist_id' => $this->ccShow->getDbOutroPlaylistId(),
] ]
); );
} }

View File

@ -1667,6 +1667,12 @@ SQL;
if ($showData['add_show_autoplaylist_id'] != '') { if ($showData['add_show_autoplaylist_id'] != '') {
$ccShow->setDbAutoPlaylistId($showData['add_show_autoplaylist_id']); $ccShow->setDbAutoPlaylistId($showData['add_show_autoplaylist_id']);
} }
if ($showData['add_show_intro_playlist_id'] != '') {
$ccShow->setDbIntroPlaylistId($showData['add_show_intro_playlist_id']);
}
if ($showData['add_show_outro_playlist_id'] != '') {
$ccShow->setDbOutroPlaylistId($showData['add_show_outro_playlist_id']);
}
// Here a user has edited a show and linked it. // Here a user has edited a show and linked it.
// We need to grab the existing show instances ids and fill their content // We need to grab the existing show instances ids and fill their content

View File

@ -19,6 +19,7 @@
</dt> </dt>
<dd> <dd>
<?php echo $this->element->getElement('add_show_autoplaylist_id') ?> <?php echo $this->element->getElement('add_show_autoplaylist_id') ?>
</dd>
</div> </div>
<div id="add_show_autoplaylist_repeat"> <div id="add_show_autoplaylist_repeat">
<dt id="add_show_autoplaylist_repeat_label"> <dt id="add_show_autoplaylist_repeat_label">
@ -30,7 +31,26 @@
<?php echo $this->element->getElement('add_show_autoplaylist_repeat') ?> <?php echo $this->element->getElement('add_show_autoplaylist_repeat') ?>
</dd> </dd>
</div> </div>
<hr/>
<div id="add_show_override_intro_playlist_dropdown">
<dt id="add_show_intro_playlist_id">
<label for="add_show_intro_playlist_id" class="required">
<?php echo $this->element->getElement('add_show_intro_playlist_id')->getLabel() ?>
</label>
</dt>
<dd>
<?php echo $this->element->getElement('add_show_intro_playlist_id') ?>
</dd>
</div>
<div id="add_show_override_outro_playlist_dropdown">
<dt id="add_show_outro_playlist_id">
<label for="add_show_outro_playlist_id" class="required">
<?php echo $this->element->getElement('add_show_outro_playlist_id')->getLabel() ?>
</label>
</dt>
<dd>
<?php echo $this->element->getElement('add_show_outro_playlist_id') ?>
</dd>
</div>
</dl> </dl>
</fieldset> </fieldset>

View File

@ -122,9 +122,17 @@
<column name="has_autoplaylist" phpName="DbHasAutoPlaylist" type="BOOLEAN" required="true" defaultValue="false" /> <column name="has_autoplaylist" phpName="DbHasAutoPlaylist" type="BOOLEAN" required="true" defaultValue="false" />
<column name="autoplaylist_id" phpName="DbAutoPlaylistId" type="INTEGER" required="false" /> <column name="autoplaylist_id" phpName="DbAutoPlaylistId" type="INTEGER" required="false" />
<column name="autoplaylist_repeat" phpName="DbAutoPlaylistRepeat" type="BOOLEAN" required="true" defaultValue="false" /> <column name="autoplaylist_repeat" phpName="DbAutoPlaylistRepeat" type="BOOLEAN" required="true" defaultValue="false" />
<column name="intro_playlist_id" phpName="DbIntroPlaylistId" type="INTEGER" required="false" />
<column name="outro_playlist_id" phpName="DbOutroPlaylistId" type="INTEGER" required="false" />
<foreign-key foreignTable="cc_playlist" name="cc_playlist_autoplaylist_fkey" onDelete="SETNULL"> <foreign-key foreignTable="cc_playlist" name="cc_playlist_autoplaylist_fkey" onDelete="SETNULL">
<reference local="autoplaylist_id" foreign="id" /> <reference local="autoplaylist_id" foreign="id" />
</foreign-key> </foreign-key>
<foreign-key foreignTable="cc_playlist" name="cc_playlist_intro_playlist_fkey" onDelete="SETNULL">
<reference local="intro_playlist_id" foreign="id" />
</foreign-key>
<foreign-key foreignTable="cc_playlist" name="cc_playlist_outro_playlist_fkey" onDelete="SETNULL">
<reference local="outro_playlist_id" foreign="id" />
</foreign-key>
</table> </table>
<table name="cc_show_instances" phpName="CcShowInstances"> <table name="cc_show_instances" phpName="CcShowInstances">
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true" /> <column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true" />

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2014-01-05" first_show: "2014-01-05"

View File

@ -77,6 +77,8 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase
'add_show_has_autoplaylist' => 0, 'add_show_has_autoplaylist' => 0,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_autoplaylist_repeat' => 0, 'add_show_autoplaylist_repeat' => 0,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
]; ];
$showService->setCcShow($data); $showService->setCcShow($data);

View File

@ -16,3 +16,5 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "2" - id: "2"
first_show: "2044-01-30" first_show: "2044-01-30"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "2" - id: "2"
first_show: "2044-01-30" first_show: "2044-01-30"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "1" - id: "1"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "2" - id: "2"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -16,6 +16,8 @@ cc_show:
has_autoplaylist: false has_autoplaylist: false
autoplaylist_id: null autoplaylist_id: null
autoplaylist_repeat: false autoplaylist_repeat: false
intro_playlist_id: null
outro_playlist_id: null
cc_show_days: cc_show_days:
- id: "2" - id: "2"
first_show: "2044-01-01" first_show: "2044-01-01"

View File

@ -21,6 +21,8 @@ class ShowServiceData
'add_show_has_autoplaylist' => false, 'add_show_has_autoplaylist' => false,
'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_repeat' => false,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
'add_show_repeats' => 0, 'add_show_repeats' => 0,
'add_show_linked' => 0, 'add_show_linked' => 0,
'add_show_repeat_type' => 0, 'add_show_repeat_type' => 0,
@ -99,6 +101,8 @@ class ShowServiceData
'add_show_has_autoplaylist' => false, 'add_show_has_autoplaylist' => false,
'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_repeat' => false,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
'add_show_repeats' => 1, 'add_show_repeats' => 1,
'add_show_linked' => 0, 'add_show_linked' => 0,
'add_show_repeat_type' => 0, 'add_show_repeat_type' => 0,
@ -177,6 +181,8 @@ class ShowServiceData
'add_show_has_autoplaylist' => false, 'add_show_has_autoplaylist' => false,
'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_repeat' => false,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
'add_show_repeats' => 1, 'add_show_repeats' => 1,
'add_show_linked' => 0, 'add_show_linked' => 0,
'add_show_repeat_type' => 0, 'add_show_repeat_type' => 0,
@ -266,6 +272,8 @@ class ShowServiceData
'add_show_has_autoplaylist' => false, 'add_show_has_autoplaylist' => false,
'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_repeat' => false,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
'add_show_repeats' => 0, 'add_show_repeats' => 0,
'add_show_linked' => 0, 'add_show_linked' => 0,
'add_show_no_end' => 0, 'add_show_no_end' => 0,
@ -295,6 +303,8 @@ class ShowServiceData
'add_show_has_autoplaylist' => false, 'add_show_has_autoplaylist' => false,
'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_repeat' => false,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
'add_show_repeats' => 1, 'add_show_repeats' => 1,
'add_show_linked' => 0, 'add_show_linked' => 0,
'add_show_repeat_type' => 0, 'add_show_repeat_type' => 0,
@ -374,6 +384,8 @@ class ShowServiceData
'add_show_has_autoplaylist' => false, 'add_show_has_autoplaylist' => false,
'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_repeat' => false,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
'add_show_repeats' => 0, 'add_show_repeats' => 0,
'add_show_linked' => 0, 'add_show_linked' => 0,
'add_show_repeat_type' => 0, 'add_show_repeat_type' => 0,
@ -452,6 +464,8 @@ class ShowServiceData
'add_show_has_autoplaylist' => false, 'add_show_has_autoplaylist' => false,
'add_show_autoplaylist_repeat' => false, 'add_show_autoplaylist_repeat' => false,
'add_show_autoplaylist_id' => null, 'add_show_autoplaylist_id' => null,
'add_show_intro_playlist_id' => null,
'add_show_outro_playlist_id' => null,
'add_show_repeats' => 1, 'add_show_repeats' => 1,
'add_show_linked' => 0, 'add_show_linked' => 0,
'add_show_repeat_type' => 0, 'add_show_repeat_type' => 0,