modified schema definition to include episode title

This commit is contained in:
Robbt 2019-01-12 23:48:19 -05:00
parent e773887736
commit 0a2de69fbb
10 changed files with 225 additions and 26 deletions

View file

@ -46,7 +46,7 @@ class CcBlockTableMap extends TableMap
$this->addForeignKey('creator_id', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'id', false, null, null); $this->addForeignKey('creator_id', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null); $this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('length', 'DbLength', 'VARCHAR', false, null, '00:00:00'); $this->addColumn('length', 'DbLength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('type', 'DbType', 'VARCHAR', false, 7, 'static'); $this->addColumn('type', 'DbType', 'VARCHAR', false, 7, 'dynamic');
// validators // validators
} // initialize() } // initialize()

View file

@ -45,6 +45,8 @@ class PodcastEpisodesTableMap extends TableMap
$this->addColumn('publication_date', 'DbPublicationDate', 'TIMESTAMP', true, null, null); $this->addColumn('publication_date', 'DbPublicationDate', 'TIMESTAMP', true, null, null);
$this->addColumn('download_url', 'DbDownloadUrl', 'VARCHAR', true, 4096, null); $this->addColumn('download_url', 'DbDownloadUrl', 'VARCHAR', true, 4096, null);
$this->addColumn('episode_guid', 'DbEpisodeGuid', 'VARCHAR', true, 4096, null); $this->addColumn('episode_guid', 'DbEpisodeGuid', 'VARCHAR', true, 4096, null);
$this->addColumn('episode_title', 'DbEpisodeTitle', 'VARCHAR', true, 4096, null);
$this->addColumn('episode_description', 'DbEpisodeDescription', 'VARCHAR', true, 4096, null);
// validators // validators
} // initialize() } // initialize()

View file

@ -55,7 +55,7 @@ abstract class BaseCcBlockcontents extends BaseObject implements Persistent
/** /**
* The value for the trackoffset field. * The value for the trackoffset field.
* Note: this column has a database default value of: 0 * Note: this column has a database default value of: 0.0
* @var double * @var double
*/ */
protected $trackoffset; protected $trackoffset;
@ -136,7 +136,7 @@ abstract class BaseCcBlockcontents extends BaseObject implements Persistent
*/ */
public function applyDefaultValues() public function applyDefaultValues()
{ {
$this->trackoffset = 0; $this->trackoffset = 0.0;
$this->cliplength = '00:00:00'; $this->cliplength = '00:00:00';
$this->cuein = '00:00:00'; $this->cuein = '00:00:00';
$this->cueout = '00:00:00'; $this->cueout = '00:00:00';
@ -548,7 +548,7 @@ abstract class BaseCcBlockcontents extends BaseObject implements Persistent
*/ */
public function hasOnlyDefaultValues() public function hasOnlyDefaultValues()
{ {
if ($this->trackoffset !== 0) { if ($this->trackoffset !== 0.0) {
return false; return false;
} }

View file

@ -74,7 +74,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
/** /**
* The value for the trackoffset field. * The value for the trackoffset field.
* Note: this column has a database default value of: 0 * Note: this column has a database default value of: 0.0
* @var double * @var double
*/ */
protected $trackoffset; protected $trackoffset;
@ -161,7 +161,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
public function applyDefaultValues() public function applyDefaultValues()
{ {
$this->type = 0; $this->type = 0;
$this->trackoffset = 0; $this->trackoffset = 0.0;
$this->cliplength = '00:00:00'; $this->cliplength = '00:00:00';
$this->cuein = '00:00:00'; $this->cuein = '00:00:00';
$this->cueout = '00:00:00'; $this->cueout = '00:00:00';
@ -677,7 +677,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
return false; return false;
} }
if ($this->trackoffset !== 0) { if ($this->trackoffset !== 0.0) {
return false; return false;
} }

View file

@ -65,6 +65,18 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
*/ */
protected $episode_guid; protected $episode_guid;
/**
* The value for the episode_title field.
* @var string
*/
protected $episode_title;
/**
* The value for the episode_description field.
* @var string
*/
protected $episode_description;
/** /**
* @var CcFiles * @var CcFiles
*/ */
@ -185,6 +197,28 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
return $this->episode_guid; return $this->episode_guid;
} }
/**
* Get the [episode_title] column value.
*
* @return string
*/
public function getDbEpisodeTitle()
{
return $this->episode_title;
}
/**
* Get the [episode_description] column value.
*
* @return string
*/
public function getDbEpisodeDescription()
{
return $this->episode_description;
}
/** /**
* Set the value of [id] column. * Set the value of [id] column.
* *
@ -321,6 +355,48 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
return $this; return $this;
} // setDbEpisodeGuid() } // setDbEpisodeGuid()
/**
* Set the value of [episode_title] column.
*
* @param string $v new value
* @return PodcastEpisodes The current object (for fluent API support)
*/
public function setDbEpisodeTitle($v)
{
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
if ($this->episode_title !== $v) {
$this->episode_title = $v;
$this->modifiedColumns[] = PodcastEpisodesPeer::EPISODE_TITLE;
}
return $this;
} // setDbEpisodeTitle()
/**
* Set the value of [episode_description] column.
*
* @param string $v new value
* @return PodcastEpisodes The current object (for fluent API support)
*/
public function setDbEpisodeDescription($v)
{
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
if ($this->episode_description !== $v) {
$this->episode_description = $v;
$this->modifiedColumns[] = PodcastEpisodesPeer::EPISODE_DESCRIPTION;
}
return $this;
} // setDbEpisodeDescription()
/** /**
* 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.
* *
@ -359,6 +435,8 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
$this->publication_date = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; $this->publication_date = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
$this->download_url = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null; $this->download_url = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
$this->episode_guid = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null; $this->episode_guid = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
$this->episode_title = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
$this->episode_description = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
@ -368,7 +446,7 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
} }
$this->postHydrate($row, $startcol, $rehydrate); $this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 6; // 6 = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS. return $startcol + 8; // 8 = PodcastEpisodesPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating PodcastEpisodes object", $e); throw new PropelException("Error populating PodcastEpisodes object", $e);
@ -635,6 +713,12 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_GUID)) { if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_GUID)) {
$modifiedColumns[':p' . $index++] = '"episode_guid"'; $modifiedColumns[':p' . $index++] = '"episode_guid"';
} }
if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_TITLE)) {
$modifiedColumns[':p' . $index++] = '"episode_title"';
}
if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_DESCRIPTION)) {
$modifiedColumns[':p' . $index++] = '"episode_description"';
}
$sql = sprintf( $sql = sprintf(
'INSERT INTO "podcast_episodes" (%s) VALUES (%s)', 'INSERT INTO "podcast_episodes" (%s) VALUES (%s)',
@ -664,6 +748,12 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
case '"episode_guid"': case '"episode_guid"':
$stmt->bindValue($identifier, $this->episode_guid, PDO::PARAM_STR); $stmt->bindValue($identifier, $this->episode_guid, PDO::PARAM_STR);
break; break;
case '"episode_title"':
$stmt->bindValue($identifier, $this->episode_title, PDO::PARAM_STR);
break;
case '"episode_description"':
$stmt->bindValue($identifier, $this->episode_description, PDO::PARAM_STR);
break;
} }
} }
$stmt->execute(); $stmt->execute();
@ -827,6 +917,12 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
case 5: case 5:
return $this->getDbEpisodeGuid(); return $this->getDbEpisodeGuid();
break; break;
case 6:
return $this->getDbEpisodeTitle();
break;
case 7:
return $this->getDbEpisodeDescription();
break;
default: default:
return null; return null;
break; break;
@ -862,6 +958,8 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
$keys[3] => $this->getDbPublicationDate(), $keys[3] => $this->getDbPublicationDate(),
$keys[4] => $this->getDbDownloadUrl(), $keys[4] => $this->getDbDownloadUrl(),
$keys[5] => $this->getDbEpisodeGuid(), $keys[5] => $this->getDbEpisodeGuid(),
$keys[6] => $this->getDbEpisodeTitle(),
$keys[7] => $this->getDbEpisodeDescription(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) { foreach ($virtualColumns as $key => $virtualColumn) {
@ -927,6 +1025,12 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
case 5: case 5:
$this->setDbEpisodeGuid($value); $this->setDbEpisodeGuid($value);
break; break;
case 6:
$this->setDbEpisodeTitle($value);
break;
case 7:
$this->setDbEpisodeDescription($value);
break;
} // switch() } // switch()
} }
@ -957,6 +1061,8 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
if (array_key_exists($keys[3], $arr)) $this->setDbPublicationDate($arr[$keys[3]]); if (array_key_exists($keys[3], $arr)) $this->setDbPublicationDate($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setDbDownloadUrl($arr[$keys[4]]); if (array_key_exists($keys[4], $arr)) $this->setDbDownloadUrl($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setDbEpisodeGuid($arr[$keys[5]]); if (array_key_exists($keys[5], $arr)) $this->setDbEpisodeGuid($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setDbEpisodeTitle($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setDbEpisodeDescription($arr[$keys[7]]);
} }
/** /**
@ -974,6 +1080,8 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
if ($this->isColumnModified(PodcastEpisodesPeer::PUBLICATION_DATE)) $criteria->add(PodcastEpisodesPeer::PUBLICATION_DATE, $this->publication_date); if ($this->isColumnModified(PodcastEpisodesPeer::PUBLICATION_DATE)) $criteria->add(PodcastEpisodesPeer::PUBLICATION_DATE, $this->publication_date);
if ($this->isColumnModified(PodcastEpisodesPeer::DOWNLOAD_URL)) $criteria->add(PodcastEpisodesPeer::DOWNLOAD_URL, $this->download_url); if ($this->isColumnModified(PodcastEpisodesPeer::DOWNLOAD_URL)) $criteria->add(PodcastEpisodesPeer::DOWNLOAD_URL, $this->download_url);
if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_GUID)) $criteria->add(PodcastEpisodesPeer::EPISODE_GUID, $this->episode_guid); if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_GUID)) $criteria->add(PodcastEpisodesPeer::EPISODE_GUID, $this->episode_guid);
if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_TITLE)) $criteria->add(PodcastEpisodesPeer::EPISODE_TITLE, $this->episode_title);
if ($this->isColumnModified(PodcastEpisodesPeer::EPISODE_DESCRIPTION)) $criteria->add(PodcastEpisodesPeer::EPISODE_DESCRIPTION, $this->episode_description);
return $criteria; return $criteria;
} }
@ -1042,6 +1150,8 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
$copyObj->setDbPublicationDate($this->getDbPublicationDate()); $copyObj->setDbPublicationDate($this->getDbPublicationDate());
$copyObj->setDbDownloadUrl($this->getDbDownloadUrl()); $copyObj->setDbDownloadUrl($this->getDbDownloadUrl());
$copyObj->setDbEpisodeGuid($this->getDbEpisodeGuid()); $copyObj->setDbEpisodeGuid($this->getDbEpisodeGuid());
$copyObj->setDbEpisodeTitle($this->getDbEpisodeTitle());
$copyObj->setDbEpisodeDescription($this->getDbEpisodeDescription());
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
@ -1215,6 +1325,8 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
$this->publication_date = null; $this->publication_date = null;
$this->download_url = null; $this->download_url = null;
$this->episode_guid = null; $this->episode_guid = null;
$this->episode_title = null;
$this->episode_description = null;
$this->alreadyInSave = false; $this->alreadyInSave = false;
$this->alreadyInValidation = false; $this->alreadyInValidation = false;
$this->alreadyInClearAllReferencesDeep = false; $this->alreadyInClearAllReferencesDeep = false;

View file

@ -24,13 +24,13 @@ abstract class BasePodcastEpisodesPeer
const TM_CLASS = 'PodcastEpisodesTableMap'; const TM_CLASS = 'PodcastEpisodesTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 6; const NUM_COLUMNS = 8;
/** 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 = 6; const NUM_HYDRATE_COLUMNS = 8;
/** the column name for the id field */ /** the column name for the id field */
const ID = 'podcast_episodes.id'; const ID = 'podcast_episodes.id';
@ -50,6 +50,12 @@ abstract class BasePodcastEpisodesPeer
/** the column name for the episode_guid field */ /** the column name for the episode_guid field */
const EPISODE_GUID = 'podcast_episodes.episode_guid'; const EPISODE_GUID = 'podcast_episodes.episode_guid';
/** the column name for the episode_title field */
const EPISODE_TITLE = 'podcast_episodes.episode_title';
/** the column name for the episode_description field */
const EPISODE_DESCRIPTION = 'podcast_episodes.episode_description';
/** 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';
@ -69,12 +75,12 @@ abstract class BasePodcastEpisodesPeer
* e.g. PodcastEpisodesPeer::$fieldNames[PodcastEpisodesPeer::TYPE_PHPNAME][0] = 'Id' * e.g. PodcastEpisodesPeer::$fieldNames[PodcastEpisodesPeer::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbPodcastId', 'DbPublicationDate', 'DbDownloadUrl', 'DbEpisodeGuid', ), BasePeer::TYPE_PHPNAME => array ('DbId', 'DbFileId', 'DbPodcastId', 'DbPublicationDate', 'DbDownloadUrl', 'DbEpisodeGuid', 'DbEpisodeTitle', 'DbEpisodeDescription', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbPodcastId', 'dbPublicationDate', 'dbDownloadUrl', 'dbEpisodeGuid', ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbFileId', 'dbPodcastId', 'dbPublicationDate', 'dbDownloadUrl', 'dbEpisodeGuid', 'dbEpisodeTitle', 'dbEpisodeDescription', ),
BasePeer::TYPE_COLNAME => array (PodcastEpisodesPeer::ID, PodcastEpisodesPeer::FILE_ID, PodcastEpisodesPeer::PODCAST_ID, PodcastEpisodesPeer::PUBLICATION_DATE, PodcastEpisodesPeer::DOWNLOAD_URL, PodcastEpisodesPeer::EPISODE_GUID, ), BasePeer::TYPE_COLNAME => array (PodcastEpisodesPeer::ID, PodcastEpisodesPeer::FILE_ID, PodcastEpisodesPeer::PODCAST_ID, PodcastEpisodesPeer::PUBLICATION_DATE, PodcastEpisodesPeer::DOWNLOAD_URL, PodcastEpisodesPeer::EPISODE_GUID, PodcastEpisodesPeer::EPISODE_TITLE, PodcastEpisodesPeer::EPISODE_DESCRIPTION, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'PODCAST_ID', 'PUBLICATION_DATE', 'DOWNLOAD_URL', 'EPISODE_GUID', ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'FILE_ID', 'PODCAST_ID', 'PUBLICATION_DATE', 'DOWNLOAD_URL', 'EPISODE_GUID', 'EPISODE_TITLE', 'EPISODE_DESCRIPTION', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'podcast_id', 'publication_date', 'download_url', 'episode_guid', ), BasePeer::TYPE_FIELDNAME => array ('id', 'file_id', 'podcast_id', 'publication_date', 'download_url', 'episode_guid', 'episode_title', 'episode_description', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
); );
/** /**
@ -84,12 +90,12 @@ abstract class BasePodcastEpisodesPeer
* e.g. PodcastEpisodesPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. PodcastEpisodesPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbPodcastId' => 2, 'DbPublicationDate' => 3, 'DbDownloadUrl' => 4, 'DbEpisodeGuid' => 5, ), BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbFileId' => 1, 'DbPodcastId' => 2, 'DbPublicationDate' => 3, 'DbDownloadUrl' => 4, 'DbEpisodeGuid' => 5, 'DbEpisodeTitle' => 6, 'DbEpisodeDescription' => 7, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbPodcastId' => 2, 'dbPublicationDate' => 3, 'dbDownloadUrl' => 4, 'dbEpisodeGuid' => 5, ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbFileId' => 1, 'dbPodcastId' => 2, 'dbPublicationDate' => 3, 'dbDownloadUrl' => 4, 'dbEpisodeGuid' => 5, 'dbEpisodeTitle' => 6, 'dbEpisodeDescription' => 7, ),
BasePeer::TYPE_COLNAME => array (PodcastEpisodesPeer::ID => 0, PodcastEpisodesPeer::FILE_ID => 1, PodcastEpisodesPeer::PODCAST_ID => 2, PodcastEpisodesPeer::PUBLICATION_DATE => 3, PodcastEpisodesPeer::DOWNLOAD_URL => 4, PodcastEpisodesPeer::EPISODE_GUID => 5, ), BasePeer::TYPE_COLNAME => array (PodcastEpisodesPeer::ID => 0, PodcastEpisodesPeer::FILE_ID => 1, PodcastEpisodesPeer::PODCAST_ID => 2, PodcastEpisodesPeer::PUBLICATION_DATE => 3, PodcastEpisodesPeer::DOWNLOAD_URL => 4, PodcastEpisodesPeer::EPISODE_GUID => 5, PodcastEpisodesPeer::EPISODE_TITLE => 6, PodcastEpisodesPeer::EPISODE_DESCRIPTION => 7, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'PODCAST_ID' => 2, 'PUBLICATION_DATE' => 3, 'DOWNLOAD_URL' => 4, 'EPISODE_GUID' => 5, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'FILE_ID' => 1, 'PODCAST_ID' => 2, 'PUBLICATION_DATE' => 3, 'DOWNLOAD_URL' => 4, 'EPISODE_GUID' => 5, 'EPISODE_TITLE' => 6, 'EPISODE_DESCRIPTION' => 7, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'podcast_id' => 2, 'publication_date' => 3, 'download_url' => 4, 'episode_guid' => 5, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'file_id' => 1, 'podcast_id' => 2, 'publication_date' => 3, 'download_url' => 4, 'episode_guid' => 5, 'episode_title' => 6, 'episode_description' => 7, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
); );
/** /**
@ -169,6 +175,8 @@ abstract class BasePodcastEpisodesPeer
$criteria->addSelectColumn(PodcastEpisodesPeer::PUBLICATION_DATE); $criteria->addSelectColumn(PodcastEpisodesPeer::PUBLICATION_DATE);
$criteria->addSelectColumn(PodcastEpisodesPeer::DOWNLOAD_URL); $criteria->addSelectColumn(PodcastEpisodesPeer::DOWNLOAD_URL);
$criteria->addSelectColumn(PodcastEpisodesPeer::EPISODE_GUID); $criteria->addSelectColumn(PodcastEpisodesPeer::EPISODE_GUID);
$criteria->addSelectColumn(PodcastEpisodesPeer::EPISODE_TITLE);
$criteria->addSelectColumn(PodcastEpisodesPeer::EPISODE_DESCRIPTION);
} else { } else {
$criteria->addSelectColumn($alias . '.id'); $criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.file_id'); $criteria->addSelectColumn($alias . '.file_id');
@ -176,6 +184,8 @@ abstract class BasePodcastEpisodesPeer
$criteria->addSelectColumn($alias . '.publication_date'); $criteria->addSelectColumn($alias . '.publication_date');
$criteria->addSelectColumn($alias . '.download_url'); $criteria->addSelectColumn($alias . '.download_url');
$criteria->addSelectColumn($alias . '.episode_guid'); $criteria->addSelectColumn($alias . '.episode_guid');
$criteria->addSelectColumn($alias . '.episode_title');
$criteria->addSelectColumn($alias . '.episode_description');
} }
} }

View file

@ -12,6 +12,8 @@
* @method PodcastEpisodesQuery orderByDbPublicationDate($order = Criteria::ASC) Order by the publication_date column * @method PodcastEpisodesQuery orderByDbPublicationDate($order = Criteria::ASC) Order by the publication_date column
* @method PodcastEpisodesQuery orderByDbDownloadUrl($order = Criteria::ASC) Order by the download_url column * @method PodcastEpisodesQuery orderByDbDownloadUrl($order = Criteria::ASC) Order by the download_url column
* @method PodcastEpisodesQuery orderByDbEpisodeGuid($order = Criteria::ASC) Order by the episode_guid column * @method PodcastEpisodesQuery orderByDbEpisodeGuid($order = Criteria::ASC) Order by the episode_guid column
* @method PodcastEpisodesQuery orderByDbEpisodeTitle($order = Criteria::ASC) Order by the episode_title column
* @method PodcastEpisodesQuery orderByDbEpisodeDescription($order = Criteria::ASC) Order by the episode_description column
* *
* @method PodcastEpisodesQuery groupByDbId() Group by the id column * @method PodcastEpisodesQuery groupByDbId() Group by the id column
* @method PodcastEpisodesQuery groupByDbFileId() Group by the file_id column * @method PodcastEpisodesQuery groupByDbFileId() Group by the file_id column
@ -19,6 +21,8 @@
* @method PodcastEpisodesQuery groupByDbPublicationDate() Group by the publication_date column * @method PodcastEpisodesQuery groupByDbPublicationDate() Group by the publication_date column
* @method PodcastEpisodesQuery groupByDbDownloadUrl() Group by the download_url column * @method PodcastEpisodesQuery groupByDbDownloadUrl() Group by the download_url column
* @method PodcastEpisodesQuery groupByDbEpisodeGuid() Group by the episode_guid column * @method PodcastEpisodesQuery groupByDbEpisodeGuid() Group by the episode_guid column
* @method PodcastEpisodesQuery groupByDbEpisodeTitle() Group by the episode_title column
* @method PodcastEpisodesQuery groupByDbEpisodeDescription() Group by the episode_description column
* *
* @method PodcastEpisodesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method PodcastEpisodesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method PodcastEpisodesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method PodcastEpisodesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
@ -40,6 +44,8 @@
* @method PodcastEpisodes findOneByDbPublicationDate(string $publication_date) Return the first PodcastEpisodes filtered by the publication_date column * @method PodcastEpisodes findOneByDbPublicationDate(string $publication_date) Return the first PodcastEpisodes filtered by the publication_date column
* @method PodcastEpisodes findOneByDbDownloadUrl(string $download_url) Return the first PodcastEpisodes filtered by the download_url column * @method PodcastEpisodes findOneByDbDownloadUrl(string $download_url) Return the first PodcastEpisodes filtered by the download_url column
* @method PodcastEpisodes findOneByDbEpisodeGuid(string $episode_guid) Return the first PodcastEpisodes filtered by the episode_guid column * @method PodcastEpisodes findOneByDbEpisodeGuid(string $episode_guid) Return the first PodcastEpisodes filtered by the episode_guid column
* @method PodcastEpisodes findOneByDbEpisodeTitle(string $episode_title) Return the first PodcastEpisodes filtered by the episode_title column
* @method PodcastEpisodes findOneByDbEpisodeDescription(string $episode_description) Return the first PodcastEpisodes filtered by the episode_description column
* *
* @method array findByDbId(int $id) Return PodcastEpisodes objects filtered by the id column * @method array findByDbId(int $id) Return PodcastEpisodes objects filtered by the id column
* @method array findByDbFileId(int $file_id) Return PodcastEpisodes objects filtered by the file_id column * @method array findByDbFileId(int $file_id) Return PodcastEpisodes objects filtered by the file_id column
@ -47,6 +53,8 @@
* @method array findByDbPublicationDate(string $publication_date) Return PodcastEpisodes objects filtered by the publication_date column * @method array findByDbPublicationDate(string $publication_date) Return PodcastEpisodes objects filtered by the publication_date column
* @method array findByDbDownloadUrl(string $download_url) Return PodcastEpisodes objects filtered by the download_url column * @method array findByDbDownloadUrl(string $download_url) Return PodcastEpisodes objects filtered by the download_url column
* @method array findByDbEpisodeGuid(string $episode_guid) Return PodcastEpisodes objects filtered by the episode_guid column * @method array findByDbEpisodeGuid(string $episode_guid) Return PodcastEpisodes objects filtered by the episode_guid column
* @method array findByDbEpisodeTitle(string $episode_title) Return PodcastEpisodes objects filtered by the episode_title column
* @method array findByDbEpisodeDescription(string $episode_description) Return PodcastEpisodes objects filtered by the episode_description column
* *
* @package propel.generator.airtime.om * @package propel.generator.airtime.om
*/ */
@ -154,7 +162,7 @@ abstract class BasePodcastEpisodesQuery extends ModelCriteria
*/ */
protected function findPkSimple($key, $con) protected function findPkSimple($key, $con)
{ {
$sql = 'SELECT "id", "file_id", "podcast_id", "publication_date", "download_url", "episode_guid" FROM "podcast_episodes" WHERE "id" = :p0'; $sql = 'SELECT "id", "file_id", "podcast_id", "publication_date", "download_url", "episode_guid", "episode_title", "episode_description" FROM "podcast_episodes" 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);
@ -474,6 +482,64 @@ abstract class BasePodcastEpisodesQuery extends ModelCriteria
return $this->addUsingAlias(PodcastEpisodesPeer::EPISODE_GUID, $dbEpisodeGuid, $comparison); return $this->addUsingAlias(PodcastEpisodesPeer::EPISODE_GUID, $dbEpisodeGuid, $comparison);
} }
/**
* Filter the query on the episode_title column
*
* Example usage:
* <code>
* $query->filterByDbEpisodeTitle('fooValue'); // WHERE episode_title = 'fooValue'
* $query->filterByDbEpisodeTitle('%fooValue%'); // WHERE episode_title LIKE '%fooValue%'
* </code>
*
* @param string $dbEpisodeTitle The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return PodcastEpisodesQuery The current query, for fluid interface
*/
public function filterByDbEpisodeTitle($dbEpisodeTitle = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbEpisodeTitle)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbEpisodeTitle)) {
$dbEpisodeTitle = str_replace('*', '%', $dbEpisodeTitle);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(PodcastEpisodesPeer::EPISODE_TITLE, $dbEpisodeTitle, $comparison);
}
/**
* Filter the query on the episode_description column
*
* Example usage:
* <code>
* $query->filterByDbEpisodeDescription('fooValue'); // WHERE episode_description = 'fooValue'
* $query->filterByDbEpisodeDescription('%fooValue%'); // WHERE episode_description LIKE '%fooValue%'
* </code>
*
* @param string $dbEpisodeDescription The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return PodcastEpisodesQuery The current query, for fluid interface
*/
public function filterByDbEpisodeDescription($dbEpisodeDescription = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbEpisodeDescription)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbEpisodeDescription)) {
$dbEpisodeDescription = str_replace('*', '%', $dbEpisodeDescription);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(PodcastEpisodesPeer::EPISODE_DESCRIPTION, $dbEpisodeDescription, $comparison);
}
/** /**
* Filter the query by a related CcFiles object * Filter the query by a related CcFiles object
* *

View file

@ -93,7 +93,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
// feed object, or whether it's passed in as json // feed object, or whether it's passed in as json
$enclosure = $episode["enclosure"]; $enclosure = $episode["enclosure"];
$url = $enclosure instanceof SimplePie_Enclosure ? $enclosure->get_link() : $enclosure["link"]; $url = $enclosure instanceof SimplePie_Enclosure ? $enclosure->get_link() : $enclosure["link"];
return $this->_buildEpisode($podcastId, $url, $episode["guid"], $episode["pub_date"]); return $this->_buildEpisode($podcastId, $url, $episode["guid"], $episode["pub_date"], $episode["title"], $episode["description"]);
} }
/** /**
@ -103,18 +103,22 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
* @param string $url the download URL for the episode * @param string $url the download URL for the episode
* @param string $guid the unique id for the episode. Often the same as the download URL * @param string $guid the unique id for the episode. Often the same as the download URL
* @param string $publicationDate the publication date of the episode * @param string $publicationDate the publication date of the episode
* @param string $title the title of the episode
* @param string $description the description of the epsiode
* *
* @return PodcastEpisodes the newly created PodcastEpisodes object * @return PodcastEpisodes the newly created PodcastEpisodes object
* *
* @throws Exception * @throws Exception
* @throws PropelException * @throws PropelException
*/ */
private function _buildEpisode($podcastId, $url, $guid, $publicationDate) { private function _buildEpisode($podcastId, $url, $guid, $publicationDate, $title, $description) {
$e = new PodcastEpisodes(); $e = new PodcastEpisodes();
$e->setDbPodcastId($podcastId); $e->setDbPodcastId($podcastId);
$e->setDbDownloadUrl($url); $e->setDbDownloadUrl($url);
$e->setDbEpisodeGuid($guid); $e->setDbEpisodeGuid($guid);
$e->setDbPublicationDate($publicationDate); $e->setDbPublicationDate($publicationDate);
$e->setDbEpisodeTitle($title);
$e->setDbEpisodeDescription($description);
$e->save(); $e->save();
return $e; return $e;
} }

View file

@ -281,7 +281,7 @@
<column name="creator_id" phpName="DbCreatorId" type="INTEGER" required="false"/> <column name="creator_id" phpName="DbCreatorId" type="INTEGER" required="false"/>
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" required="false"/> <column name="description" phpName="DbDescription" type="VARCHAR" size="512" required="false"/>
<column name="length" phpName="DbLength" type="VARCHAR" sqlType="interval" defaultValue="00:00:00"/> <column name="length" phpName="DbLength" type="VARCHAR" sqlType="interval" defaultValue="00:00:00"/>
<column name="type" phpName="DbType" type="VARCHAR" size="7" defaultValue="static"/> <column name="type" phpName="DbType" type="VARCHAR" size="7" defaultValue="dynamic"/>
<behavior name="aggregate_column"> <behavior name="aggregate_column">
<parameter name="name" value="length" /> <parameter name="name" value="length" />
<parameter name="foreign_table" value="cc_blockcontents" /> <parameter name="foreign_table" value="cc_blockcontents" />
@ -623,6 +623,9 @@
<column name="publication_date" phpName="DbPublicationDate" type="TIMESTAMP" required="true" /> <column name="publication_date" phpName="DbPublicationDate" type="TIMESTAMP" required="true" />
<column name="download_url" phpName="DbDownloadUrl" type="varchar" size="4096" required="true" /> <column name="download_url" phpName="DbDownloadUrl" type="varchar" size="4096" required="true" />
<column name="episode_guid" phpName="DbEpisodeGuid" type="varchar" size="4096" required="true" /> <column name="episode_guid" phpName="DbEpisodeGuid" type="varchar" size="4096" required="true" />
<column name="episode_title" phpName="DbEpisodeTitle" type="varchar" size="4096" required="true" />
<column name="episode_description" phpName="DbEpisodeDescription" type="varchar" size="4096" required="true" />
<foreign-key foreignTable="cc_files" name="podcast_episodes_cc_files_fkey" onDelete="CASCADE"> <foreign-key foreignTable="cc_files" name="podcast_episodes_cc_files_fkey" onDelete="CASCADE">
<reference local="file_id" foreign="id" /> <reference local="file_id" foreign="id" />
</foreign-key> </foreign-key>

View file

@ -780,6 +780,8 @@ CREATE TABLE "podcast_episodes"
"publication_date" TIMESTAMP NOT NULL, "publication_date" TIMESTAMP NOT NULL,
"download_url" VARCHAR(4096) NOT NULL, "download_url" VARCHAR(4096) NOT NULL,
"episode_guid" VARCHAR(4096) NOT NULL, "episode_guid" VARCHAR(4096) NOT NULL,
"episode_title" VARCHAR(4096) NOT NULL,
"episode_description" VARCHAR(4096) NOT NULL,
PRIMARY KEY ("id") PRIMARY KEY ("id")
); );