diff --git a/airtime_mvc/application/configs/ACL.php b/airtime_mvc/application/configs/ACL.php
index 6b44865ba..b89057194 100644
--- a/airtime_mvc/application/configs/ACL.php
+++ b/airtime_mvc/application/configs/ACL.php
@@ -10,31 +10,33 @@ $ccAcl->addRole(new Zend_Acl_Role('G'))
->addRole(new Zend_Acl_Role('A'), 'P');
$ccAcl->add(new Zend_Acl_Resource('library'))
- ->add(new Zend_Acl_Resource('index'))
- ->add(new Zend_Acl_Resource('user'))
- ->add(new Zend_Acl_Resource('error'))
+ ->add(new Zend_Acl_Resource('index'))
+ ->add(new Zend_Acl_Resource('user'))
+ ->add(new Zend_Acl_Resource('error'))
->add(new Zend_Acl_Resource('login'))
- ->add(new Zend_Acl_Resource('playlist'))
- ->add(new Zend_Acl_Resource('plupload'))
- ->add(new Zend_Acl_Resource('schedule'))
- ->add(new Zend_Acl_Resource('api'))
- ->add(new Zend_Acl_Resource('systemstatus'))
+ ->add(new Zend_Acl_Resource('playlist'))
+ ->add(new Zend_Acl_Resource('plupload'))
+ ->add(new Zend_Acl_Resource('schedule'))
+ ->add(new Zend_Acl_Resource('api'))
+ ->add(new Zend_Acl_Resource('systemstatus'))
->add(new Zend_Acl_Resource('dashboard'))
->add(new Zend_Acl_Resource('preference'))
->add(new Zend_Acl_Resource('showbuilder'))
->add(new Zend_Acl_Resource('playouthistory'))
->add(new Zend_Acl_Resource('usersettings'))
- ->add(new Zend_Acl_Resource('audiopreview'));
+ ->add(new Zend_Acl_Resource('audiopreview'))
+ ->add(new Zend_Acl_Resource('webstream'));
/** Creating permissions */
$ccAcl->allow('G', 'index')
- ->allow('G', 'login')
- ->allow('G', 'error')
- ->allow('G', 'showbuilder')
- ->allow('G', 'api')
+ ->allow('G', 'login')
+ ->allow('G', 'error')
+ ->allow('G', 'showbuilder')
+ ->allow('G', 'api')
->allow('G', 'schedule')
->allow('G', 'dashboard')
->allow('G', 'audiopreview')
+ ->allow('G', 'webstream')
->allow('H', 'preference', 'is-import-in-progress')
->allow('H', 'usersettings')
->allow('H', 'plupload')
diff --git a/airtime_mvc/application/configs/classmap-airtime-conf.php b/airtime_mvc/application/configs/classmap-airtime-conf.php
index d9b576e04..360c6d9f2 100644
--- a/airtime_mvc/application/configs/classmap-airtime-conf.php
+++ b/airtime_mvc/application/configs/classmap-airtime-conf.php
@@ -1,13 +1,6 @@
'airtime/map/CcAccessTableMap.php',
- 'CcAccessPeer' => 'airtime/CcAccessPeer.php',
- 'CcAccess' => 'airtime/CcAccess.php',
- 'CcAccessQuery' => 'airtime/CcAccessQuery.php',
- 'BaseCcAccessPeer' => 'airtime/om/BaseCcAccessPeer.php',
- 'BaseCcAccess' => 'airtime/om/BaseCcAccess.php',
- 'BaseCcAccessQuery' => 'airtime/om/BaseCcAccessQuery.php',
'CcMusicDirsTableMap' => 'airtime/map/CcMusicDirsTableMap.php',
'CcMusicDirsPeer' => 'airtime/CcMusicDirsPeer.php',
'CcMusicDirs' => 'airtime/CcMusicDirs.php',
@@ -176,4 +169,11 @@ return array (
'BaseCcLiveLogPeer' => 'airtime/om/BaseCcLiveLogPeer.php',
'BaseCcLiveLog' => 'airtime/om/BaseCcLiveLog.php',
'BaseCcLiveLogQuery' => 'airtime/om/BaseCcLiveLogQuery.php',
+ 'CcWebstreamTableMap' => 'airtime/map/CcWebstreamTableMap.php',
+ 'CcWebstreamPeer' => 'airtime/CcWebstreamPeer.php',
+ 'CcWebstream' => 'airtime/CcWebstream.php',
+ 'CcWebstreamQuery' => 'airtime/CcWebstreamQuery.php',
+ 'BaseCcWebstreamPeer' => 'airtime/om/BaseCcWebstreamPeer.php',
+ 'BaseCcWebstream' => 'airtime/om/BaseCcWebstream.php',
+ 'BaseCcWebstreamQuery' => 'airtime/om/BaseCcWebstreamQuery.php',
);
\ No newline at end of file
diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php
index 3faa771e9..ef5d143f1 100644
--- a/airtime_mvc/application/controllers/ApiController.php
+++ b/airtime_mvc/application/controllers/ApiController.php
@@ -113,54 +113,51 @@ class ApiController extends Zend_Controller_Action
$this->view->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
- $fileID = $this->_getParam("file");
- $file_id = substr($fileID, 0, strpos($fileID, "."));
+ $fileId = $this->_getParam("file");
- if (ctype_alnum($file_id) && strlen($file_id) == 32) {
- $media = Application_Model_StoredFile::RecallByGunid($file_id);
- if ($media != null) {
+ $media = Application_Model_StoredFile::Recall($fileId);
+ if ($media != null) {
- $filepath = $media->getFilePath();
- if (is_file($filepath)) {
- $full_path = $media->getPropelOrm()->getDbFilepath();
+ $filepath = $media->getFilePath();
+ if (is_file($filepath)) {
+ $full_path = $media->getPropelOrm()->getDbFilepath();
- $file_base_name = strrchr($full_path, '/');
- /* If $full_path does not contain a '/', strrchr will return false,
- * in which case we can use $full_path as the base name.
- */
- if (!$file_base_name) {
- $file_base_name = $full_path;
- } else {
- $file_base_name = substr($file_base_name, 1);
- }
-
- // possibly use fileinfo module here in the future.
- // http://www.php.net/manual/en/book.fileinfo.php
- $ext = pathinfo($fileID, PATHINFO_EXTENSION);
- //Download user left clicks a track and selects Download.
- if ("true" == $this->_getParam('download')) {
- //path_info breaks up a file path into seperate pieces of informaiton.
- //We just want the basename which is the file name with the path
- //information stripped away. We are using Content-Disposition to specify
- //to the browser what name the file should be saved as.
- //
- // By james.moon:
- // I'm removing pathinfo() since it strips away UTF-8 characters.
- // Using manualy parsing
- header('Content-Disposition: attachment; filename="'.$file_base_name.'"');
- } else {
- //user clicks play button for track and downloads it.
- header('Content-Disposition: inline; filename="'.$file_base_name.'"');
- }
- if (strtolower($ext) === 'mp3') {
- $this->smartReadFile($filepath, 'audio/mpeg');
- } else {
- $this->smartReadFile($filepath, 'audio/'.$ext);
- }
- exit;
+ $file_base_name = strrchr($full_path, '/');
+ /* If $full_path does not contain a '/', strrchr will return false,
+ * in which case we can use $full_path as the base name.
+ */
+ if (!$file_base_name) {
+ $file_base_name = $full_path;
} else {
- header ("HTTP/1.1 404 Not Found");
+ $file_base_name = substr($file_base_name, 1);
}
+
+ // possibly use fileinfo module here in the future.
+ // http://www.php.net/manual/en/book.fileinfo.php
+ $ext = pathinfo($file_base_name, PATHINFO_EXTENSION);
+ //Download user left clicks a track and selects Download.
+ if ("true" == $this->_getParam('download')) {
+ //path_info breaks up a file path into seperate pieces of informaiton.
+ //We just want the basename which is the file name with the path
+ //information stripped away. We are using Content-Disposition to specify
+ //to the browser what name the file should be saved as.
+ //
+ // By james.moon:
+ // I'm removing pathinfo() since it strips away UTF-8 characters.
+ // Using manualy parsing
+ header('Content-Disposition: attachment; filename="'.$file_base_name.'"');
+ } else {
+ //user clicks play button for track and downloads it.
+ header('Content-Disposition: inline; filename="'.$file_base_name.'"');
+ }
+ if (strtolower($ext) === 'mp3') {
+ $this->smartReadFile($filepath, 'audio/mpeg');
+ } else {
+ $this->smartReadFile($filepath, 'audio/'.$ext);
+ }
+ exit;
+ } else {
+ header ("HTTP/1.1 404 Not Found");
}
}
diff --git a/airtime_mvc/application/controllers/AudiopreviewController.php b/airtime_mvc/application/controllers/AudiopreviewController.php
index 037eeca30..f904475b9 100644
--- a/airtime_mvc/application/controllers/AudiopreviewController.php
+++ b/airtime_mvc/application/controllers/AudiopreviewController.php
@@ -99,18 +99,18 @@ class AudiopreviewController extends Zend_Controller_Action
$pl = new Application_Model_Playlist($playlistID);
$result = Array();
- foreach ( $pl->getContents(true) as $track ) {
+ foreach ($pl->getContents(true) as $track) {
- $elementMap = array( 'element_title' => isset($track['CcFiles']['track_title'])?$track['CcFiles']['track_title']:"",
- 'element_artist' => isset($track['CcFiles']['artist_name'])?$track['CcFiles']['artist_name']:"",
+ $elementMap = array( 'element_title' => isset($track['track_title'])?$track['track_title']:"",
+ 'element_artist' => isset($track['artist_name'])?$track['artist_name']:"",
'element_id' => isset($track['id'])?$track['id']:"",
'element_position' => isset($track['position'])?$track['position']:"",
);
- $fileExtension = pathinfo($track['CcFiles']['filepath'], PATHINFO_EXTENSION);
+ $fileExtension = pathinfo($track['path'], PATHINFO_EXTENSION);
if (strtolower($fileExtension) === 'mp3') {
- $elementMap['element_mp3'] = $track['CcFiles']['gunid'].'.'.$fileExtension;
- } elseif (strtolower($fileExtension) === 'ogg') {
- $elementMap['element_oga'] = $track['CcFiles']['gunid'].'.'.$fileExtension;
+ $elementMap['element_mp3'] = $track['item_id'];
+ } else if (strtolower($fileExtension) === 'ogg') {
+ $elementMap['element_oga'] = $track['item_id'];
} else {
//the media was neither mp3 or ogg
}
@@ -183,9 +183,9 @@ class AudiopreviewController extends Zend_Controller_Action
$fileExtension = pathinfo($track['filepath'], PATHINFO_EXTENSION);
if (strtolower($fileExtension) === 'mp3') {
- $elementMap['element_mp3'] = $track['gunid'].'.'.$fileExtension;
+ $elementMap['element_mp3'] = $track['item_id'];
} elseif (strtolower($fileExtension) === 'ogg') {
- $elementMap['element_oga'] = $track['gunid'].'.'.$fileExtension;
+ $elementMap['element_oga'] = $track['item_id'];
} else {
//the media was neither mp3 or ogg
}
diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php
index fe783d953..8f5a97a8c 100644
--- a/airtime_mvc/application/controllers/LibraryController.php
+++ b/airtime_mvc/application/controllers/LibraryController.php
@@ -57,7 +57,11 @@ class LibraryController extends Zend_Controller_Action
$obj = new Application_Model_Block($this->obj_sess->id);
}
if ($isAdminOrPM || $obj->getCreatorId() == $user->getId()) {
- $menu["pl_add"] = array("name"=> "Add to ".ucfirst($this->obj_sess->type), "icon" => "add-playlist", "icon" => "copy");
+ if ($this->obj_sess->type === "playlist") {
+ $menu["pl_add"] = array("name"=> "Add to Playlist", "icon" => "add-playlist", "icon" => "copy");
+ } else {
+ $menu["pl_add"] = array("name"=> "Add to Smart Playlist", "icon" => "add-playlist", "icon" => "copy");
+ }
}
}
if ($isAdminOrPM) {
@@ -72,6 +76,13 @@ class LibraryController extends Zend_Controller_Action
$obj = new Application_Model_Playlist($id);
} else {
$obj = new Application_Model_Block($id);
+ if ($isAdminOrPM || $obj->getCreatorId() == $user->getId()) {
+ if ($this->obj_sess->type === "playlist") {
+ $menu["pl_add"] = array("name"=> "Add to Playlist", "icon" => "add-playlist", "icon" => "copy");
+ } else {
+ $menu["pl_add"] = array("name"=> "Add to Smart Playlist", "icon" => "add-playlist", "icon" => "copy");
+ }
+ }
}
if ($this->obj_sess->id !== $id && $screen == "playlist") {
diff --git a/airtime_mvc/application/controllers/PlaylistController.php b/airtime_mvc/application/controllers/PlaylistController.php
index abac5d840..9a334bcfc 100644
--- a/airtime_mvc/application/controllers/PlaylistController.php
+++ b/airtime_mvc/application/controllers/PlaylistController.php
@@ -219,7 +219,7 @@ class PlaylistController extends Zend_Controller_Action
$name = 'Untitled Playlist';
if ($type == 'block') {
- $name = 'Untitled Smart Block';
+ $name = 'Untitled Smart Playlist';
}
$obj = new $objInfo['className']();
@@ -293,7 +293,7 @@ class PlaylistController extends Zend_Controller_Action
public function addItemsAction()
{
- $ids = $this->_getParam('ids', array());
+ $ids = $this->_getParam('aItems', array());
$ids = (!is_array($ids)) ? array($ids) : $ids;
$afterItem = $this->_getParam('afterItem', null);
$addType = $this->_getParam('type', 'after');
@@ -307,17 +307,13 @@ class PlaylistController extends Zend_Controller_Action
} else {
throw new PlaylistDyanmicException;
}
- }
- catch (PlaylistOutDatedException $e) {
- $this->playlistOutdated($e);
- }
- catch (PlaylistNotFoundException $e) {
- $this->playlistNotFound($obj_type);
- }
- catch (PlaylistDyanmicException $e) {
- $this->playlistDynamic($obj);
- }
- catch (Exception $e) {
+ } catch (PlaylistOutDatedException $e) {
+ $this->playlistOutdated($pl, $e);
+ } catch (PlaylistNotFoundException $e) {
+ $this->playlistNotFound();
+ } catch (PlaylistDyanmicException $e) {
+ $this->playlistDynamic($pl);
+ } catch (Exception $e) {
$this->playlistUnknownError($e);
}
}
diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php
index af79d24ce..653fdf1e4 100644
--- a/airtime_mvc/application/controllers/ScheduleController.php
+++ b/airtime_mvc/application/controllers/ScheduleController.php
@@ -117,6 +117,17 @@ class ScheduleController extends Zend_Controller_Action
$events = &Application_Model_Show::getFullCalendarEvents($start, $end, $editable);
$this->view->events = $events;
}
+
+ public function getCurrentShowAction()
+ {
+ $currentShow = Application_Model_Show::GetCurrentShow();
+ if (!empty($currentShow)) {
+ $this->view->si_id = $currentShow[0]["instance_id"];
+ $this->view->current_show = true;
+ } else {
+ $this->view->current_show = false;
+ }
+ }
public function moveShowAction()
{
diff --git a/airtime_mvc/application/controllers/WebstreamController.php b/airtime_mvc/application/controllers/WebstreamController.php
new file mode 100644
index 000000000..63fe2aaa6
--- /dev/null
+++ b/airtime_mvc/application/controllers/WebstreamController.php
@@ -0,0 +1,47 @@
+_helper->getHelper('AjaxContext');
+ $ajaxContext->addActionContext('new', 'json')
+ ->addActionContext('save', 'json')
+ ->initContext();
+ //TODO
+ //$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
+ }
+
+ public function newAction()
+ {
+ $this->view->ws = new Application_Model_Webstream();
+ $this->view->html = $this->view->render('webstream/webstream.phtml');
+ /*
+ $pl_sess = $this->pl_sess;
+ $userInfo = Zend_Auth::getInstance()->getStorage()->read();
+
+ $pl = new Application_Model_Playlist();
+ $pl->setName("Untitled Playlist");
+ $pl->setPLMetaData('dc:creator', $userInfo->id);
+
+ $this->changePlaylist($pl->getId());
+ $this->createFullResponse($pl);
+ */
+ }
+
+ public function saveAction(){
+ $request = $this->getRequest();
+
+ Application_Model_Webstream::save($request);
+
+
+ $this->view->x = "hi";
+
+
+ //http://localhost/Library/contents-feed
+ // 1) Create Propel object and save these parameters
+ // 2) Make these appear in the library
+ // 3) Make Web streams + playlists draggable.
+ // 4)
+ }
+}
diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php
index 8de5ec463..8223f5e2d 100644
--- a/airtime_mvc/application/models/Playlist.php
+++ b/airtime_mvc/application/models/Playlist.php
@@ -157,6 +157,7 @@ class Application_Model_Playlist
Logging::log("Getting contents for playlist {$this->id}");
$files = array();
+ /*
$query = CcPlaylistcontentsQuery::create()
->filterByDbPlaylistId($this->id);
@@ -166,15 +167,46 @@ class Application_Model_Playlist
->endUse();
}
$query->orderByDbPosition()
+ ->filterByDbType(0)
->leftJoinWith('CcFiles');
$rows = $query->find($this->con);
+ */
+ $sql = <<<"EOT"
+((SELECT pc.id as id, pc.type, pc.position, pc.cliplength as length, pc.cuein, pc.cueout, pc.fadein, pc.fadeout,
+ f.id as item_id, f.track_title, f.artist_name as creator, f.file_exists as exists, f.filepath as path FROM cc_playlistcontents AS pc
+ LEFT JOIN cc_files AS f ON pc.file_id=f.id WHERE pc.playlist_id = {$this->id} AND type = 0)
+UNION ALL
+(SELECT pc.id as id, pc.type, pc.position, pc.cliplength as length, pc.cuein, pc.cueout, pc.fadein, pc.fadeout,
+ws.id as item_id, (ws.name || ': ' || ws.url) as title, ws.login as creator, 't'::boolean as exists, ws.url as path FROM cc_playlistcontents AS pc
+LEFT JOIN cc_webstream AS ws on pc.file_id=ws.id WHERE pc.playlist_id = {$this->id} AND type = 1));
+EOT;
+ Logging::debug($sql);
+ $con = Propel::getConnection();
+ $rows = $con->query($sql)->fetchAll();
+ $offset = 0;
+ foreach ($rows as &$row) {
+ Logging::log($row);
+
+ $clipSec = Application_Common_DateHelper::playlistTimeToSeconds($row['length']);
+ $offset += $clipSec;
+ $offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
+
+ //format the length for UI.
+ $formatter = new LengthFormatter($row['length']);
+ $row['length'] = $formatter->format();
+
+ $formatter = new LengthFormatter($offset_cliplength);
+ $row['offset'] = $formatter->format();
+ }
+
+ /*
$i = 0;
$offset = 0;
foreach ($rows as $row) {
+ Logging::log($row);
$files[$i] = $row->toArray(BasePeer::TYPE_FIELDNAME, true, true);
-
$clipSec = Application_Common_DateHelper::playlistTimeToSeconds($files[$i]['cliplength']);
$offset += $clipSec;
$offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
@@ -188,8 +220,9 @@ class Application_Model_Playlist
$i++;
}
+ */
- return $files;
+ return $rows;
}
/**
@@ -199,19 +232,21 @@ class Application_Model_Playlist
**/
public function normalizeFade($fade)
{
- //First get rid of the first six characters 00:00: which will be added back later for db update
- $fade = substr($fade, 6);
+ //First get rid of the first six characters 00:00: which will be added back later for db update
+ $fade = substr($fade, 6);
+
+ //Second add .000000 if the fade does't have milliseconds format already
+ $dbFadeStrPos = strpos( $fade, '.' );
+ if ($dbFadeStrPos === false) {
+ $fade .= '.000000';
+ } else {
+ while (strlen($fade) < 9) {
+ $fade .= '0';
+ }
+ }
- //Second add .000000 if the fade does't have milliseconds format already
- $dbFadeStrPos = strpos( $fade, '.' );
- if ( $dbFadeStrPos === False )
- $fade .= '.000000';
- else
- while( strlen( $fade ) < 9 )
- $fade .= '0';
-
- //done, just need to set back the formated values
- return $fade;
+ //done, just need to set back the formated values
+ return $fade;
}
//aggregate column on playlistcontents cliplength column.
@@ -220,7 +255,7 @@ class Application_Model_Playlist
return $this->pl->getDbLength();
}
- private function insertPlaylistElement($info)
+ private function insertPlaylistElement($info, $type)
{
$row = new CcPlaylistcontents();
$row->setDbPlaylistId($this->id);
@@ -231,6 +266,7 @@ class Application_Model_Playlist
$row->setDbCueout($info["cueout"]);
$row->setDbFadein($info["fadein"]);
$row->setDbFadeout($info["fadeout"]);
+ $row->setDbType($type);
$row->save($this->con);
// above save result update on cc_playlist table on length column.
// but $this->pl doesn't get updated automatically
@@ -259,6 +295,23 @@ class Application_Model_Playlist
}
}
+ private function buildStreamEntry($p_item, $pos)
+ {
+ $stream = CcWebstreamQuery::create()->findPK($p_item, $this->con);
+
+ if (isset($stream)) {
+ $entry = $this->plItem;
+ $entry["id"] = $stream->getDbId();
+ $entry["pos"] = $pos;
+ $entry["cliplength"] = $stream->getDbLength();
+ $entry["cueout"] = $stream->getDbLength();
+
+ return $entry;
+ } else {
+ throw new Exception("trying to add a stream that does not exist.");
+ }
+ }
+
/*
* @param array $p_items
* an array of audioclips to add to the playlist
@@ -267,7 +320,7 @@ class Application_Model_Playlist
* @param string (before|after) $addAfter
* whether to add the clips before or after the selected item.
*/
- public function addAudioClips($p_items, $p_afterItem=NULL, $addType = 'after')
+ public function addAudioClips($p_items, $p_afterItem=null, $addType = 'after')
{
$this->con->beginTransaction();
$contentsToUpdate = array();
@@ -288,8 +341,6 @@ class Application_Model_Playlist
->orderByDbPosition()
->find($this->con);
- Logging::log("Adding to playlist");
- Logging::log("at position {$pos}");
} else {
//add to the end of the playlist
@@ -312,15 +363,27 @@ class Application_Model_Playlist
->orderByDbPosition()
->find($this->con);
- Logging::log("Adding to playlist");
- Logging::log("at position {$pos}");
}
+ Logging::log("Adding to playlist");
+ Logging::log("at position {$pos}");
+
foreach ($p_items as $ac) {
+ list($item, $type) = $ac;
+ if ($type == "audioclip") {
+ $res = $this->insertPlaylistElement($this->buildEntry($item, $pos), 0);
+ $pos = $pos + 1;
+ } else if ($type == "playlist") {
+
+ } else if ($type == "stream") {
+ $res = $this->insertPlaylistElement($this->buildStreamEntry($item, $pos), 1);
+ $pos = $pos + 1;
+ } else {
+ throw new Exception("Unknown file type");
+ }
+
Logging::log("Adding audio file {$ac}");
- $res = $this->insertPlaylistElement($this->buildEntry($ac, $pos));
- $pos = $pos + 1;
}
//reset the positions of the remaining items.
diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php
index 57920904f..9c87526fa 100644
--- a/airtime_mvc/application/models/Schedule.php
+++ b/airtime_mvc/application/models/Schedule.php
@@ -251,7 +251,7 @@ class Application_Model_Schedule
{
global $CC_CONFIG;
$con = Propel::getConnection();
- $sql = "SELECT DISTINCT
+ $templateSql = "SELECT DISTINCT
showt.name AS show_name, showt.color AS show_color,
showt.background_color AS show_background_color, showt.id AS show_id,
@@ -265,12 +265,17 @@ class Application_Model_Schedule
sched.fade_in AS fade_in, sched.fade_out AS fade_out,
sched.playout_status AS playout_status,
- ft.track_title AS file_track_title, ft.artist_name AS file_artist_name,
- ft.album_title AS file_album_title, ft.length AS file_length, ft.file_exists AS file_exists
+ --ft.track_title AS file_track_title, ft.artist_name AS file_artist_name,
+ --ft.album_title AS file_album_title, ft.length AS file_length, ft.file_exists AS file_exists
+ %%columns%%
FROM
- ((cc_schedule AS sched JOIN cc_files AS ft ON (sched.file_id = ft.id)
- RIGHT OUTER JOIN cc_show_instances AS si ON (si.id = sched.instance_id))
+ ((
+ --cc_schedule AS sched JOIN cc_files AS ft ON (sched.file_id = ft.id)
+ %%join%%
+
+ --JOIN cc_webstream AS ws ON (sched.stream_id = ws.id)
+ RIGHT JOIN cc_show_instances AS si ON (si.id = sched.instance_id))
JOIN cc_show AS showt ON (showt.id = si.show_id)
)
@@ -281,15 +286,30 @@ class Application_Model_Schedule
OR (si.starts <= '{$p_start}' AND si.ends >= '{$p_end}'))";
if (count($p_shows) > 0) {
- $sql .= " AND show_id IN (".implode(",", $p_shows).")";
+ $templateSql .= " AND show_id IN (".implode(",", $p_shows).")";
}
- $sql .= " ORDER BY si.starts, sched.starts;";
+ $templateSql .= " ORDER BY si.starts, sched.starts";
- Logging::debug($sql);
+ $filesSql = str_replace("%%columns%%",
+ "ft.track_title AS file_track_title, ft.artist_name AS file_artist_name,
+ ft.album_title AS file_album_title, ft.length AS file_length, ft.file_exists AS file_exists",
+ $templateSql);
+ $filesSql= str_replace("%%join%%",
+ "cc_schedule AS sched JOIN cc_files AS ft ON (sched.file_id = ft.id)",
+ $filesSql);
- $rows = $con->query($sql)->fetchAll();
+ $streamSql = str_replace("%%columns%%",
+ "ws.name AS file_track_title, ws.login AS file_artist_name,
+ ws.description AS file_album_title, ws.length AS file_length, 't'::BOOL AS file_exists",
+ $templateSql);
+ $streamSql = str_replace("%%join%%",
+ "cc_schedule AS sched JOIN cc_webstream AS ws ON (sched.stream_id = ws.id)",
+ $streamSql);
+ $sql = "($filesSql) UNION ($streamSql)";
+
+ $rows = $con->query($sql)->fetchAll(PDO::FETCH_ASSOC);
return $rows;
}
@@ -470,14 +490,20 @@ class Application_Model_Schedule
." st.cue_out AS cue_out,"
." st.fade_in AS fade_in,"
." st.fade_out AS fade_out,"
+ //." st.type AS type,"
." si.starts AS show_start,"
." si.ends AS show_end,"
- ." f.replay_gain AS replay_gain"
+ ." f.id AS file_id,"
+ ." f.replay_gain AS replay_gain,"
+ ." ws.id as stream_id,"
+ ." ws.url as url"
." FROM $CC_CONFIG[scheduleTable] AS st"
." LEFT JOIN $CC_CONFIG[showInstances] AS si"
." ON st.instance_id = si.id"
." LEFT JOIN $CC_CONFIG[filesTable] AS f"
- ." ON st.file_id = f.id";
+ ." ON st.file_id = f.id"
+ ." LEFT JOIN cc_webstream AS ws"
+ ." ON st.stream_id = ws.id";
$predicates = " WHERE st.ends > '$p_startTime'"
." AND st.starts < '$p_endTime'"
@@ -565,13 +591,14 @@ class Application_Model_Schedule
$data["media"][$kick_start]['end'] = $kick_start;
$data["media"][$kick_start]['event_type'] = "kick_out";
$data["media"][$kick_start]['type'] = "event";
+ $data["media"][$kick_start]['independent_event'] = true;
if ($kick_time !== $switch_off_time) {
$switch_start = Application_Model_Schedule::AirtimeTimeToPypoTime($switch_off_time);
$data["media"][$switch_start]['start'] = $switch_start;
$data["media"][$switch_start]['end'] = $switch_start;
$data["media"][$switch_start]['event_type'] = "switch_off";
- $data["media"][$switch_start]['type'] = "event";
+ $data["media"][$switch_start]['independent_event'] = true;
}
}
@@ -599,13 +626,27 @@ class Application_Model_Schedule
$item["end"] = $showEndDateTime->format("Y-m-d H:i:s");
}
- $storedFile = Application_Model_StoredFile::Recall($item["file_id"]);
- $uri = $storedFile->getFilePath();
+ if (!is_null($item['file_id'])) {
+ //row is from "file"
+ $media_id = $item['file_id'];
+ $storedFile = Application_Model_StoredFile::Recall($media_id);
+ $uri = $storedFile->getFilePath();
+ $type = "file";
+ $independent_event = false;
+ } else if (!is_null($item['stream_id'])) {
+ //row is type "webstream"
+ $media_id = $item['stream_id'];
+ $uri = $item['url'];
+ $type = "stream";
+ $independent_event = true;
+ }
$start = Application_Model_Schedule::AirtimeTimeToPypoTime($item["start"]);
+ $end = Application_Model_Schedule::AirtimeTimeToPypoTime($item["end"]);
+
$data["media"][$start] = array(
- 'id' => $storedFile->getGunid(),
- 'type' => "file",
+ 'id' => $media_id,
+ 'type' => $type,
'row_id' => $item["id"],
'uri' => $uri,
'fade_in' => Application_Model_Schedule::WallTimeToMillisecs($item["fade_in"]),
@@ -613,10 +654,27 @@ class Application_Model_Schedule
'cue_in' => Application_Common_DateHelper::CalculateLengthInSeconds($item["cue_in"]),
'cue_out' => Application_Common_DateHelper::CalculateLengthInSeconds($item["cue_out"]),
'start' => $start,
- 'end' => Application_Model_Schedule::AirtimeTimeToPypoTime($item["end"]),
+ 'end' => $end,
'show_name' => $showName,
- 'replay_gain' => is_null($item["replay_gain"]) ? "0": $item["replay_gain"]
+ 'replay_gain' => is_null($item["replay_gain"]) ? "0": $item["replay_gain"],
+ 'independent_event' => $independent_event
);
+
+ if ($type == "stream") {
+ //since a stream never ends we have to insert an additional "kick stream" event. The "start"
+ //time of this event is the "end" time of the stream minus 1 second.
+ $dt = new DateTime($item["end"], new DateTimeZone('UTC'));
+ $dt->sub(new DateInterval("PT1S"));
+ $stream_end = Application_Model_Schedule::AirtimeTimeToPypoTime($dt->format("Y-m-d H:i:s"));
+
+ $data["media"][$stream_end] = array(
+ 'start' => $stream_end,
+ 'end' => $stream_end,
+ 'uri' => $uri,
+ 'type' => 'stream_end',
+ 'independent_event' => true
+ );
+ }
}
return $data;
diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php
index 1ce56be5d..aeef324dd 100644
--- a/airtime_mvc/application/models/Scheduler.php
+++ b/airtime_mvc/application/models/Scheduler.php
@@ -11,6 +11,7 @@ class Application_Model_Scheduler
"fadein" => "00:00:00",
"fadeout" => "00:00:00",
"sched_id" => null,
+ "type" => 0 //default type of '0' to represent files. type '1' represents a webstream
);
private $epochNow;
@@ -145,8 +146,7 @@ class Application_Model_Scheduler
$files[] = $data;
}
- }
- else if ($type === "playlist") {
+ } else if ($type === "playlist") {
// find if the playslit is static or dynamic
$c = new Criteria();
@@ -188,6 +188,28 @@ class Application_Model_Scheduler
$data["cliplength"] = $file->getDbLength();
}
}
+ $files[] = $data;
+ }
+ } else if ($type == "stream") {
+ //need to return
+ $stream = CcWebstreamQuery::create()->findPK($id, $this->con);
+
+ if (is_null($stream) /* || !$file->getDbFileExists() */) {
+ throw new Exception("A selected File does not exist!");
+ } else {
+ $data = $this->fileInfo;
+ $data["id"] = $id;
+ $data["cliplength"] = $stream->getDbLength();
+ $data["cueout"] = $stream->getDbLength();
+ $data["type"] = 1;
+
+ $defaultFade = Application_Model_Preference::GetDefaultFade();
+ if (isset($defaultFade)) {
+ //fade is in format SS.uuuuuu
+ $data["fadein"] = $defaultFade;
+ $data["fadeout"] = $defaultFade;
+ }
+
$files[] = $data;
}
}
@@ -205,7 +227,7 @@ class Application_Model_Scheduler
private function findEndTime($p_startDT, $p_duration)
{
$startEpoch = $p_startDT->format("U.u");
- $durationSeconds = Application_Model_Playlist::playlistTimeToSeconds($p_duration);
+ $durationSeconds = Application_Common_DateHelper::playlistTimeToSeconds($p_duration);
//add two float numbers to 6 subsecond precision
//DateTime::createFromFormat("U.u") will have a problem if there is no decimal in the resulting number.
@@ -356,17 +378,27 @@ class Application_Model_Scheduler
} else {
$sched = new CcSchedule();
}
- Logging::log(print_r($file,true));
+ Logging::log($file);
$sched->setDbStarts($nextStartDT)
->setDbEnds($endTimeDT)
- ->setDbFileId($file['id'])
->setDbCueIn($file['cuein'])
->setDbCueOut($file['cueout'])
->setDbFadeIn($file['fadein'])
->setDbFadeOut($file['fadeout'])
->setDbClipLength($file['cliplength'])
- ->setDbInstanceId($instance->getDbId())
- ->save($this->con);
+ ->setDbInstanceId($instance->getDbId());
+
+ switch ($file["type"]){
+ case 0:
+ $sched->setDbFileId($file['id']);
+ break;
+ case 1:
+ $sched->setDbStreamId($file['id']);
+ break;
+ default: break;
+ }
+
+ $sched->save($this->con);
$nextStartDT = $endTimeDT;
}
@@ -576,7 +608,7 @@ class Application_Model_Scheduler
$length = bcsub($nEpoch , $sEpoch , 6);
$cliplength = Application_Common_DateHelper::secondsToPlaylistTime($length);
- $cueinSec = Application_Model_Playlist::playlistTimeToSeconds($removedItem->getDbCueIn());
+ $cueinSec = Application_Common_DateHelper::playlistTimeToSeconds($removedItem->getDbCueIn());
$cueOutSec = bcadd($cueinSec , $length, 6);
$cueout = Application_Common_DateHelper::secondsToPlaylistTime($cueOutSec);
diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php
index 9d60ac147..f0955313a 100644
--- a/airtime_mvc/application/models/ShowInstance.php
+++ b/airtime_mvc/application/models/ShowInstance.php
@@ -603,7 +603,7 @@ class Application_Model_ShowInstance
{
$time_filled = $this->getTimeScheduled();
- return Application_Model_Playlist::playlistTimeToSeconds($time_filled);
+ return Application_Common_DateHelper::playlistTimeToSeconds($time_filled);
}
public function getDurationSecs()
diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php
index e57647f9c..69e1a864a 100644
--- a/airtime_mvc/application/models/StoredFile.php
+++ b/airtime_mvc/application/models/StoredFile.php
@@ -60,11 +60,6 @@ class Application_Model_StoredFile
return $this->_file->getDbId();
}
- public function getGunId()
- {
- return $this->_file->getDbGunid();
- }
-
public function getFormat()
{
return $this->_file->getDbFtype();
@@ -280,31 +275,6 @@ class Application_Model_StoredFile
return $md;
}
- /**
- * Set state of virtual file
- *
- * @param string $p_state
- * 'empty'|'incomplete'|'ready'|'edited'
- * @param int $p_editedby
- * user id | 'NULL' for clear editedBy field
- * @return TRUE
- */
- public function setState($p_state, $p_editedby=NULL)
- {
- global $CC_CONFIG;
- $con = Propel::getConnection();
- $escapedState = pg_escape_string($p_state);
- $eb = (!is_null($p_editedby) ? ", editedBy=$p_editedby" : '');
- $sql = "UPDATE ".$CC_CONFIG['filesTable']
- ." SET state='$escapedState'$eb, mtime=now()"
- ." WHERE gunid='{$this->gunid}'";
- $res = $con->exec($sql);
- $this->state = $p_state;
- $this->editedby = $p_editedby;
-
- return TRUE;
- }
-
/**
* Returns an array of playlist objects that this file is a part of.
* @return array
@@ -466,9 +436,7 @@ class Application_Model_StoredFile
private function constructGetFileUrl($p_serverName, $p_serverPort)
{
-Logging::log("getting media! - 2");
-
- return "http://$p_serverName:$p_serverPort/api/get-media/file/".$this->getGunId().".".$this->getFileExtension();
+ return "http://$p_serverName:$p_serverPort/api/get-media/file/".$this->getId().".".$this->getFileExtension();
}
/**
@@ -479,13 +447,12 @@ Logging::log("getting media! - 2");
{
Logging::log("getting media!");
- return $baseUrl."/api/get-media/file/".$this->getGunId().".".$this->getFileExtension();
+ return $baseUrl."/api/get-media/file/".$this->getId().".".$this->getFileExtension();
}
public static function Insert($md=null)
{
$file = new CcFiles();
- $file->setDbGunid(md5(uniqid("", true)));
$file->setDbUtime(new DateTime("now", new DateTimeZone("UTC")));
$file->setDbMtime(new DateTime("now", new DateTimeZone("UTC")));
@@ -517,7 +484,7 @@ Logging::log("getting media! - 2");
*
* @param int $p_id
* local id
- * @param string $p_gunid
+ * @param string $p_gunid - TODO: Remove this!
* global unique id of file
* @param string $p_md5sum
* MD5 sum of the file
@@ -530,10 +497,6 @@ Logging::log("getting media! - 2");
{
if (isset($p_id)) {
$file = CcFilesQuery::create()->findPK(intval($p_id));
- } elseif (isset($p_gunid)) {
- $file = CcFilesQuery::create()
- ->filterByDbGunid($p_gunid)
- ->findOne();
} elseif (isset($p_md5sum)) {
if ($exist) {
$file = CcFilesQuery::create()
@@ -578,20 +541,6 @@ Logging::log("getting media! - 2");
return $info['filename'];
}
- /**
- * Create instance of StoreFile object and recall existing file
- * by gunid.
- *
- * @param string $p_gunid
- * global unique id of file
- * @return Application_Model_StoredFile|NULL
- */
- public static function RecallByGunid($p_gunid)
- {
- return Application_Model_StoredFile::Recall(null, $p_gunid);
- }
-
-
/**
* Fetch the Application_Model_StoredFile by looking up the MD5 value.
*
@@ -644,64 +593,75 @@ Logging::log("getting media! - 2");
$displayColumns = array("id", "track_title", "artist_name", "album_title", "genre", "length",
"year", "utime", "mtime", "ftype", "track_number", "mood", "bpm", "composer", "info_url",
"bit_rate", "sample_rate", "isrc_number", "encoded_by", "label", "copyright", "mime",
- "language", "gunid", "filepath"
+ "language", "filepath"
);
$plSelect = array();
$blSelect = array();
$fileSelect = array();
+ $streamSelect = array();
foreach ($displayColumns as $key) {
if ($key === "id") {
$plSelect[] = "PL.id AS ".$key;
$blSelect[] = "BL.id AS ".$key;
$fileSelect[] = $key;
+ $streamSelect[] = $key;
} elseif ($key === "track_title") {
$plSelect[] = "name AS ".$key;
$blSelect[] = "name AS ".$key;
$fileSelect[] = $key;
+ $streamSelect[] = "name AS ".$key;
} elseif ($key === "ftype") {
$plSelect[] = "'playlist'::varchar AS ".$key;
$blSelect[] = "'block'::varchar AS ".$key;
$fileSelect[] = $key;
+ $streamSelect[] = "'stream'::varchar AS ".$key;
} elseif ($key === "artist_name") {
$plSelect[] = "login AS ".$key;
$blSelect[] = "login AS ".$key;
$fileSelect[] = $key;
+ $plSelect[] = "login AS ".$key;
+ $streamSelect[] = "login AS ".$key;
}
//same columns in each table.
else if (in_array($key, array("length", "utime", "mtime"))) {
$plSelect[] = $key;
$blSelect[] = $key;
$fileSelect[] = $key;
+ $streamSelect[] = $key;
} elseif ($key === "year") {
-
$plSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key;
$blSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key;
$fileSelect[] = "year AS ".$key;
+ $streamSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key;
}
//need to cast certain data as ints for the union to search on.
else if (in_array($key, array("track_number", "bit_rate", "sample_rate"))) {
$plSelect[] = "NULL::int AS ".$key;
$blSelect[] = "NULL::int AS ".$key;
$fileSelect[] = $key;
+ $streamSelect[] = "NULL::int AS ".$key;
} else {
$plSelect[] = "NULL::text AS ".$key;
$blSelect[] = "NULL::text AS ".$key;
$fileSelect[] = $key;
+ $streamSelect[] = "NULL::text AS ".$key;
}
}
$plSelect = "SELECT ". join(",", $plSelect);
$blSelect = "SELECT ". join(",", $blSelect);
$fileSelect = "SELECT ". join(",", $fileSelect);
+ $streamSelect = "SELECT ". join(",", $streamSelect);
$type = intval($datatables["type"]);
$plTable = "({$plSelect} FROM cc_playlist AS PL LEFT JOIN cc_subjs AS sub ON (sub.id = PL.creator_id))";
$blTable = "({$blSelect} FROM cc_block AS BL LEFT JOIN cc_subjs AS sub ON (sub.id = BL.creator_id))";
$fileTable = "({$fileSelect} FROM cc_files AS FILES WHERE file_exists = 'TRUE')";
- $unionTable = "({$plTable} UNION {$blTable} UNION {$fileTable} ) AS RESULTS";
+ $streamTable = "({$streamSelect} FROM cc_webstream AS WEBSTREAM)";
+ $unionTable = "({$plTable} UNION {$blTable} UNION {$fileTable} UNION {$streamTable}) AS RESULTS";
//choose which table we need to select data from.
switch ($type) {
@@ -757,8 +717,10 @@ Logging::log("getting media! - 2");
//datatable stuff really needs to be pulled out and generalized within the project
//access to zend view methods to access url helpers is needed.
- if ($type == "au") {//&& isset( $audioResults )) {
- $row['audioFile'] = $row['gunid'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
+ if ($type == "au") {
+ //TODO:
+ Logging::log("row id: ".$row['id']);
+ $row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
$row['image'] = '
';
} else {
$row['image'] = '
';
diff --git a/airtime_mvc/application/models/Webstream.php b/airtime_mvc/application/models/Webstream.php
new file mode 100644
index 000000000..a48e6c200
--- /dev/null
+++ b/airtime_mvc/application/models/Webstream.php
@@ -0,0 +1,55 @@
+getParams());
+ $userInfo = Zend_Auth::getInstance()->getStorage()->read();
+ Logging::log($userInfo);
+
+ $length = trim($request->getParam("length"));
+ preg_match("/^([0-9]{1,2})h ([0-5][0-9])m$/", $length, $matches);
+ $hours = $matches[1];
+ $minutes = $matches[2];
+ $di = new DateInterval("PT{$hours}H{$minutes}M");
+ $dblength = $di->format("%H:%I");
+
+ #TODO: These should be validated by a Zend Form.
+ $webstream = new CcWebstream();
+ $webstream->setDbName($request->getParam("name"));
+ $webstream->setDbDescription($request->getParam("description"));
+ $webstream->setDbUrl($request->getParam("url"));
+
+ $webstream->setDbLength($dblength);
+ $webstream->setDbLogin($userInfo->id);
+ $webstream->setDbUtime(new DateTime($timezone = new DateTimeZone('UTC')));
+ $webstream->setDbMtime(new DateTime($timezone = new DateTimeZone('UTC')));
+ $webstream->save();
+ }
+}
diff --git a/airtime_mvc/application/models/airtime/CcWebstream.php b/airtime_mvc/application/models/airtime/CcWebstream.php
new file mode 100644
index 000000000..1777d12cd
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/CcWebstream.php
@@ -0,0 +1,18 @@
+setPrimaryKeyMethodInfo('cc_files_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
- $this->addColumn('GUNID', 'DbGunid', 'CHAR', true, 32, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('MIME', 'DbMime', 'VARCHAR', true, 255, '');
$this->addColumn('FTYPE', 'DbFtype', 'VARCHAR', true, 128, '');
diff --git a/airtime_mvc/application/models/airtime/map/CcScheduleTableMap.php b/airtime_mvc/application/models/airtime/map/CcScheduleTableMap.php
index 64e9b2609..0e5bbe94f 100644
--- a/airtime_mvc/application/models/airtime/map/CcScheduleTableMap.php
+++ b/airtime_mvc/application/models/airtime/map/CcScheduleTableMap.php
@@ -42,6 +42,7 @@ class CcScheduleTableMap extends TableMap {
$this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null);
$this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null);
$this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null);
+ $this->addForeignKey('STREAM_ID', 'DbStreamId', 'INTEGER', 'cc_webstream', 'ID', false, null, null);
$this->addColumn('CLIP_LENGTH', 'DbClipLength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('FADE_IN', 'DbFadeIn', 'TIME', false, null, '00:00:00');
$this->addColumn('FADE_OUT', 'DbFadeOut', 'TIME', false, null, '00:00:00');
@@ -61,6 +62,7 @@ class CcScheduleTableMap extends TableMap {
{
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
+ $this->addRelation('CcWebstream', 'CcWebstream', RelationMap::MANY_TO_ONE, array('stream_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcScheduleTableMap
diff --git a/airtime_mvc/application/models/airtime/map/CcSubjsTableMap.php b/airtime_mvc/application/models/airtime/map/CcSubjsTableMap.php
index 82c70a590..6b1c9257e 100644
--- a/airtime_mvc/application/models/airtime/map/CcSubjsTableMap.php
+++ b/airtime_mvc/application/models/airtime/map/CcSubjsTableMap.php
@@ -59,7 +59,6 @@ class CcSubjsTableMap extends TableMap {
*/
public function buildRelations()
{
- $this->addRelation('CcAccess', 'CcAccess', RelationMap::ONE_TO_MANY, array('id' => 'owner', ), null, null);
$this->addRelation('CcFiles', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'editedby', ), null, null);
$this->addRelation('CcPerms', 'CcPerms', RelationMap::ONE_TO_MANY, array('id' => 'subj', ), 'CASCADE', null);
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'subjs_id', ), 'CASCADE', null);
diff --git a/airtime_mvc/application/models/airtime/map/CcWebstreamTableMap.php b/airtime_mvc/application/models/airtime/map/CcWebstreamTableMap.php
new file mode 100644
index 000000000..05bd0c3fa
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/map/CcWebstreamTableMap.php
@@ -0,0 +1,60 @@
+setName('cc_webstream');
+ $this->setPhpName('CcWebstream');
+ $this->setClassname('CcWebstream');
+ $this->setPackage('airtime');
+ $this->setUseIdGenerator(true);
+ $this->setPrimaryKeyMethodInfo('cc_webstream_id_seq');
+ // columns
+ $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
+ $this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, null);
+ $this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', true, 255, null);
+ $this->addColumn('URL', 'DbUrl', 'VARCHAR', true, 255, null);
+ $this->addColumn('LENGTH', 'DbLength', 'VARCHAR', true, null, '00:00:00');
+ $this->addColumn('LOGIN', 'DbLogin', 'VARCHAR', true, 255, null);
+ $this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', true, 6, null);
+ $this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', true, 6, null);
+ // validators
+ } // initialize()
+
+ /**
+ * Build the RelationMap objects for this table relationships
+ */
+ public function buildRelations()
+ {
+ $this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'stream_id', ), 'CASCADE', null);
+ } // buildRelations()
+
+} // CcWebstreamTableMap
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
index 807e21696..57228452f 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFiles.php
@@ -30,12 +30,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $id;
- /**
- * The value for the gunid field.
- * @var string
- */
- protected $gunid;
-
/**
* The value for the name field.
* Note: this column has a database default value of: ''
@@ -498,16 +492,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->id;
}
- /**
- * Get the [gunid] column value.
- *
- * @return string
- */
- public function getDbGunid()
- {
- return $this->gunid;
- }
-
/**
* Get the [name] column value.
*
@@ -1240,26 +1224,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbId()
- /**
- * Set the value of [gunid] column.
- *
- * @param string $v new value
- * @return CcFiles The current object (for fluent API support)
- */
- public function setDbGunid($v)
- {
- if ($v !== null) {
- $v = (string) $v;
- }
-
- if ($this->gunid !== $v) {
- $this->gunid = $v;
- $this->modifiedColumns[] = CcFilesPeer::GUNID;
- }
-
- return $this;
- } // setDbGunid()
-
/**
* Set the value of [name] column.
*
@@ -2689,69 +2653,68 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
- $this->gunid = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
- $this->name = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
- $this->mime = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
- $this->ftype = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
- $this->directory = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
- $this->filepath = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
- $this->state = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
- $this->currentlyaccessing = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
- $this->editedby = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
- $this->mtime = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
- $this->utime = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
- $this->lptime = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
- $this->md5 = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
- $this->track_title = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
- $this->artist_name = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null;
- $this->bit_rate = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;
- $this->sample_rate = ($row[$startcol + 17] !== null) ? (int) $row[$startcol + 17] : null;
- $this->format = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
- $this->length = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
- $this->album_title = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null;
- $this->genre = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null;
- $this->comments = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null;
- $this->year = ($row[$startcol + 23] !== null) ? (string) $row[$startcol + 23] : null;
- $this->track_number = ($row[$startcol + 24] !== null) ? (int) $row[$startcol + 24] : null;
- $this->channels = ($row[$startcol + 25] !== null) ? (int) $row[$startcol + 25] : null;
- $this->url = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null;
- $this->bpm = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
- $this->rating = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
- $this->encoded_by = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
- $this->disc_number = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
- $this->mood = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
- $this->label = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
- $this->composer = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null;
- $this->encoder = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null;
- $this->checksum = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
- $this->lyrics = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null;
- $this->orchestra = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null;
- $this->conductor = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null;
- $this->lyricist = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null;
- $this->original_lyricist = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null;
- $this->radio_station_name = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null;
- $this->info_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null;
- $this->artist_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null;
- $this->audio_source_url = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null;
- $this->radio_station_url = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null;
- $this->buy_this_url = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null;
- $this->isrc_number = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null;
- $this->catalog_number = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null;
- $this->original_artist = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null;
- $this->copyright = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null;
- $this->report_datetime = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null;
- $this->report_location = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null;
- $this->report_organization = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null;
- $this->subject = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
- $this->contributor = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
- $this->language = ($row[$startcol + 56] !== null) ? (string) $row[$startcol + 56] : null;
- $this->file_exists = ($row[$startcol + 57] !== null) ? (boolean) $row[$startcol + 57] : null;
- $this->soundcloud_id = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
- $this->soundcloud_error_code = ($row[$startcol + 59] !== null) ? (int) $row[$startcol + 59] : null;
- $this->soundcloud_error_msg = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
- $this->soundcloud_link_to_file = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null;
- $this->soundcloud_upload_time = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null;
- $this->replay_gain = ($row[$startcol + 63] !== null) ? (string) $row[$startcol + 63] : null;
+ $this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
+ $this->mime = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
+ $this->ftype = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
+ $this->directory = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
+ $this->filepath = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
+ $this->state = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
+ $this->currentlyaccessing = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
+ $this->editedby = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
+ $this->mtime = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
+ $this->utime = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
+ $this->lptime = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
+ $this->md5 = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
+ $this->track_title = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
+ $this->artist_name = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
+ $this->bit_rate = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
+ $this->sample_rate = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;
+ $this->format = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
+ $this->length = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
+ $this->album_title = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
+ $this->genre = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null;
+ $this->comments = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null;
+ $this->year = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null;
+ $this->track_number = ($row[$startcol + 23] !== null) ? (int) $row[$startcol + 23] : null;
+ $this->channels = ($row[$startcol + 24] !== null) ? (int) $row[$startcol + 24] : null;
+ $this->url = ($row[$startcol + 25] !== null) ? (string) $row[$startcol + 25] : null;
+ $this->bpm = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null;
+ $this->rating = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
+ $this->encoded_by = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
+ $this->disc_number = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
+ $this->mood = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
+ $this->label = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
+ $this->composer = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
+ $this->encoder = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null;
+ $this->checksum = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null;
+ $this->lyrics = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
+ $this->orchestra = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null;
+ $this->conductor = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null;
+ $this->lyricist = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null;
+ $this->original_lyricist = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null;
+ $this->radio_station_name = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null;
+ $this->info_url = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null;
+ $this->artist_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null;
+ $this->audio_source_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null;
+ $this->radio_station_url = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null;
+ $this->buy_this_url = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null;
+ $this->isrc_number = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null;
+ $this->catalog_number = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null;
+ $this->original_artist = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null;
+ $this->copyright = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null;
+ $this->report_datetime = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null;
+ $this->report_location = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null;
+ $this->report_organization = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null;
+ $this->subject = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null;
+ $this->contributor = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
+ $this->language = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
+ $this->file_exists = ($row[$startcol + 56] !== null) ? (boolean) $row[$startcol + 56] : null;
+ $this->soundcloud_id = ($row[$startcol + 57] !== null) ? (int) $row[$startcol + 57] : null;
+ $this->soundcloud_error_code = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
+ $this->soundcloud_error_msg = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null;
+ $this->soundcloud_link_to_file = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
+ $this->soundcloud_upload_time = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null;
+ $this->replay_gain = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null;
$this->resetModified();
$this->setNew(false);
@@ -2760,7 +2723,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 64; // 64 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 63; // 63 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcFiles object", $e);
@@ -3180,192 +3143,189 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getDbId();
break;
case 1:
- return $this->getDbGunid();
- break;
- case 2:
return $this->getDbName();
break;
- case 3:
+ case 2:
return $this->getDbMime();
break;
- case 4:
+ case 3:
return $this->getDbFtype();
break;
- case 5:
+ case 4:
return $this->getDbDirectory();
break;
- case 6:
+ case 5:
return $this->getDbFilepath();
break;
- case 7:
+ case 6:
return $this->getDbState();
break;
- case 8:
+ case 7:
return $this->getDbCurrentlyaccessing();
break;
- case 9:
+ case 8:
return $this->getDbEditedby();
break;
- case 10:
+ case 9:
return $this->getDbMtime();
break;
- case 11:
+ case 10:
return $this->getDbUtime();
break;
- case 12:
+ case 11:
return $this->getDbLPtime();
break;
- case 13:
+ case 12:
return $this->getDbMd5();
break;
- case 14:
+ case 13:
return $this->getDbTrackTitle();
break;
- case 15:
+ case 14:
return $this->getDbArtistName();
break;
- case 16:
+ case 15:
return $this->getDbBitRate();
break;
- case 17:
+ case 16:
return $this->getDbSampleRate();
break;
- case 18:
+ case 17:
return $this->getDbFormat();
break;
- case 19:
+ case 18:
return $this->getDbLength();
break;
- case 20:
+ case 19:
return $this->getDbAlbumTitle();
break;
- case 21:
+ case 20:
return $this->getDbGenre();
break;
- case 22:
+ case 21:
return $this->getDbComments();
break;
- case 23:
+ case 22:
return $this->getDbYear();
break;
- case 24:
+ case 23:
return $this->getDbTrackNumber();
break;
- case 25:
+ case 24:
return $this->getDbChannels();
break;
- case 26:
+ case 25:
return $this->getDbUrl();
break;
- case 27:
+ case 26:
return $this->getDbBpm();
break;
- case 28:
+ case 27:
return $this->getDbRating();
break;
- case 29:
+ case 28:
return $this->getDbEncodedBy();
break;
- case 30:
+ case 29:
return $this->getDbDiscNumber();
break;
- case 31:
+ case 30:
return $this->getDbMood();
break;
- case 32:
+ case 31:
return $this->getDbLabel();
break;
- case 33:
+ case 32:
return $this->getDbComposer();
break;
- case 34:
+ case 33:
return $this->getDbEncoder();
break;
- case 35:
+ case 34:
return $this->getDbChecksum();
break;
- case 36:
+ case 35:
return $this->getDbLyrics();
break;
- case 37:
+ case 36:
return $this->getDbOrchestra();
break;
- case 38:
+ case 37:
return $this->getDbConductor();
break;
- case 39:
+ case 38:
return $this->getDbLyricist();
break;
- case 40:
+ case 39:
return $this->getDbOriginalLyricist();
break;
- case 41:
+ case 40:
return $this->getDbRadioStationName();
break;
- case 42:
+ case 41:
return $this->getDbInfoUrl();
break;
- case 43:
+ case 42:
return $this->getDbArtistUrl();
break;
- case 44:
+ case 43:
return $this->getDbAudioSourceUrl();
break;
- case 45:
+ case 44:
return $this->getDbRadioStationUrl();
break;
- case 46:
+ case 45:
return $this->getDbBuyThisUrl();
break;
- case 47:
+ case 46:
return $this->getDbIsrcNumber();
break;
- case 48:
+ case 47:
return $this->getDbCatalogNumber();
break;
- case 49:
+ case 48:
return $this->getDbOriginalArtist();
break;
- case 50:
+ case 49:
return $this->getDbCopyright();
break;
- case 51:
+ case 50:
return $this->getDbReportDatetime();
break;
- case 52:
+ case 51:
return $this->getDbReportLocation();
break;
- case 53:
+ case 52:
return $this->getDbReportOrganization();
break;
- case 54:
+ case 53:
return $this->getDbSubject();
break;
- case 55:
+ case 54:
return $this->getDbContributor();
break;
- case 56:
+ case 55:
return $this->getDbLanguage();
break;
- case 57:
+ case 56:
return $this->getDbFileExists();
break;
- case 58:
+ case 57:
return $this->getDbSoundcloudId();
break;
- case 59:
+ case 58:
return $this->getDbSoundcloudErrorCode();
break;
- case 60:
+ case 59:
return $this->getDbSoundcloudErrorMsg();
break;
- case 61:
+ case 60:
return $this->getDbSoundcloudLinkToFile();
break;
- case 62:
+ case 61:
return $this->getDbSoundCloundUploadTime();
break;
- case 63:
+ case 62:
return $this->getDbReplayGain();
break;
default:
@@ -3393,69 +3353,68 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys = CcFilesPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getDbId(),
- $keys[1] => $this->getDbGunid(),
- $keys[2] => $this->getDbName(),
- $keys[3] => $this->getDbMime(),
- $keys[4] => $this->getDbFtype(),
- $keys[5] => $this->getDbDirectory(),
- $keys[6] => $this->getDbFilepath(),
- $keys[7] => $this->getDbState(),
- $keys[8] => $this->getDbCurrentlyaccessing(),
- $keys[9] => $this->getDbEditedby(),
- $keys[10] => $this->getDbMtime(),
- $keys[11] => $this->getDbUtime(),
- $keys[12] => $this->getDbLPtime(),
- $keys[13] => $this->getDbMd5(),
- $keys[14] => $this->getDbTrackTitle(),
- $keys[15] => $this->getDbArtistName(),
- $keys[16] => $this->getDbBitRate(),
- $keys[17] => $this->getDbSampleRate(),
- $keys[18] => $this->getDbFormat(),
- $keys[19] => $this->getDbLength(),
- $keys[20] => $this->getDbAlbumTitle(),
- $keys[21] => $this->getDbGenre(),
- $keys[22] => $this->getDbComments(),
- $keys[23] => $this->getDbYear(),
- $keys[24] => $this->getDbTrackNumber(),
- $keys[25] => $this->getDbChannels(),
- $keys[26] => $this->getDbUrl(),
- $keys[27] => $this->getDbBpm(),
- $keys[28] => $this->getDbRating(),
- $keys[29] => $this->getDbEncodedBy(),
- $keys[30] => $this->getDbDiscNumber(),
- $keys[31] => $this->getDbMood(),
- $keys[32] => $this->getDbLabel(),
- $keys[33] => $this->getDbComposer(),
- $keys[34] => $this->getDbEncoder(),
- $keys[35] => $this->getDbChecksum(),
- $keys[36] => $this->getDbLyrics(),
- $keys[37] => $this->getDbOrchestra(),
- $keys[38] => $this->getDbConductor(),
- $keys[39] => $this->getDbLyricist(),
- $keys[40] => $this->getDbOriginalLyricist(),
- $keys[41] => $this->getDbRadioStationName(),
- $keys[42] => $this->getDbInfoUrl(),
- $keys[43] => $this->getDbArtistUrl(),
- $keys[44] => $this->getDbAudioSourceUrl(),
- $keys[45] => $this->getDbRadioStationUrl(),
- $keys[46] => $this->getDbBuyThisUrl(),
- $keys[47] => $this->getDbIsrcNumber(),
- $keys[48] => $this->getDbCatalogNumber(),
- $keys[49] => $this->getDbOriginalArtist(),
- $keys[50] => $this->getDbCopyright(),
- $keys[51] => $this->getDbReportDatetime(),
- $keys[52] => $this->getDbReportLocation(),
- $keys[53] => $this->getDbReportOrganization(),
- $keys[54] => $this->getDbSubject(),
- $keys[55] => $this->getDbContributor(),
- $keys[56] => $this->getDbLanguage(),
- $keys[57] => $this->getDbFileExists(),
- $keys[58] => $this->getDbSoundcloudId(),
- $keys[59] => $this->getDbSoundcloudErrorCode(),
- $keys[60] => $this->getDbSoundcloudErrorMsg(),
- $keys[61] => $this->getDbSoundcloudLinkToFile(),
- $keys[62] => $this->getDbSoundCloundUploadTime(),
- $keys[63] => $this->getDbReplayGain(),
+ $keys[1] => $this->getDbName(),
+ $keys[2] => $this->getDbMime(),
+ $keys[3] => $this->getDbFtype(),
+ $keys[4] => $this->getDbDirectory(),
+ $keys[5] => $this->getDbFilepath(),
+ $keys[6] => $this->getDbState(),
+ $keys[7] => $this->getDbCurrentlyaccessing(),
+ $keys[8] => $this->getDbEditedby(),
+ $keys[9] => $this->getDbMtime(),
+ $keys[10] => $this->getDbUtime(),
+ $keys[11] => $this->getDbLPtime(),
+ $keys[12] => $this->getDbMd5(),
+ $keys[13] => $this->getDbTrackTitle(),
+ $keys[14] => $this->getDbArtistName(),
+ $keys[15] => $this->getDbBitRate(),
+ $keys[16] => $this->getDbSampleRate(),
+ $keys[17] => $this->getDbFormat(),
+ $keys[18] => $this->getDbLength(),
+ $keys[19] => $this->getDbAlbumTitle(),
+ $keys[20] => $this->getDbGenre(),
+ $keys[21] => $this->getDbComments(),
+ $keys[22] => $this->getDbYear(),
+ $keys[23] => $this->getDbTrackNumber(),
+ $keys[24] => $this->getDbChannels(),
+ $keys[25] => $this->getDbUrl(),
+ $keys[26] => $this->getDbBpm(),
+ $keys[27] => $this->getDbRating(),
+ $keys[28] => $this->getDbEncodedBy(),
+ $keys[29] => $this->getDbDiscNumber(),
+ $keys[30] => $this->getDbMood(),
+ $keys[31] => $this->getDbLabel(),
+ $keys[32] => $this->getDbComposer(),
+ $keys[33] => $this->getDbEncoder(),
+ $keys[34] => $this->getDbChecksum(),
+ $keys[35] => $this->getDbLyrics(),
+ $keys[36] => $this->getDbOrchestra(),
+ $keys[37] => $this->getDbConductor(),
+ $keys[38] => $this->getDbLyricist(),
+ $keys[39] => $this->getDbOriginalLyricist(),
+ $keys[40] => $this->getDbRadioStationName(),
+ $keys[41] => $this->getDbInfoUrl(),
+ $keys[42] => $this->getDbArtistUrl(),
+ $keys[43] => $this->getDbAudioSourceUrl(),
+ $keys[44] => $this->getDbRadioStationUrl(),
+ $keys[45] => $this->getDbBuyThisUrl(),
+ $keys[46] => $this->getDbIsrcNumber(),
+ $keys[47] => $this->getDbCatalogNumber(),
+ $keys[48] => $this->getDbOriginalArtist(),
+ $keys[49] => $this->getDbCopyright(),
+ $keys[50] => $this->getDbReportDatetime(),
+ $keys[51] => $this->getDbReportLocation(),
+ $keys[52] => $this->getDbReportOrganization(),
+ $keys[53] => $this->getDbSubject(),
+ $keys[54] => $this->getDbContributor(),
+ $keys[55] => $this->getDbLanguage(),
+ $keys[56] => $this->getDbFileExists(),
+ $keys[57] => $this->getDbSoundcloudId(),
+ $keys[58] => $this->getDbSoundcloudErrorCode(),
+ $keys[59] => $this->getDbSoundcloudErrorMsg(),
+ $keys[60] => $this->getDbSoundcloudLinkToFile(),
+ $keys[61] => $this->getDbSoundCloundUploadTime(),
+ $keys[62] => $this->getDbReplayGain(),
);
if ($includeForeignObjects) {
if (null !== $this->aCcSubjs) {
@@ -3499,192 +3458,189 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->setDbId($value);
break;
case 1:
- $this->setDbGunid($value);
- break;
- case 2:
$this->setDbName($value);
break;
- case 3:
+ case 2:
$this->setDbMime($value);
break;
- case 4:
+ case 3:
$this->setDbFtype($value);
break;
- case 5:
+ case 4:
$this->setDbDirectory($value);
break;
- case 6:
+ case 5:
$this->setDbFilepath($value);
break;
- case 7:
+ case 6:
$this->setDbState($value);
break;
- case 8:
+ case 7:
$this->setDbCurrentlyaccessing($value);
break;
- case 9:
+ case 8:
$this->setDbEditedby($value);
break;
- case 10:
+ case 9:
$this->setDbMtime($value);
break;
- case 11:
+ case 10:
$this->setDbUtime($value);
break;
- case 12:
+ case 11:
$this->setDbLPtime($value);
break;
- case 13:
+ case 12:
$this->setDbMd5($value);
break;
- case 14:
+ case 13:
$this->setDbTrackTitle($value);
break;
- case 15:
+ case 14:
$this->setDbArtistName($value);
break;
- case 16:
+ case 15:
$this->setDbBitRate($value);
break;
- case 17:
+ case 16:
$this->setDbSampleRate($value);
break;
- case 18:
+ case 17:
$this->setDbFormat($value);
break;
- case 19:
+ case 18:
$this->setDbLength($value);
break;
- case 20:
+ case 19:
$this->setDbAlbumTitle($value);
break;
- case 21:
+ case 20:
$this->setDbGenre($value);
break;
- case 22:
+ case 21:
$this->setDbComments($value);
break;
- case 23:
+ case 22:
$this->setDbYear($value);
break;
- case 24:
+ case 23:
$this->setDbTrackNumber($value);
break;
- case 25:
+ case 24:
$this->setDbChannels($value);
break;
- case 26:
+ case 25:
$this->setDbUrl($value);
break;
- case 27:
+ case 26:
$this->setDbBpm($value);
break;
- case 28:
+ case 27:
$this->setDbRating($value);
break;
- case 29:
+ case 28:
$this->setDbEncodedBy($value);
break;
- case 30:
+ case 29:
$this->setDbDiscNumber($value);
break;
- case 31:
+ case 30:
$this->setDbMood($value);
break;
- case 32:
+ case 31:
$this->setDbLabel($value);
break;
- case 33:
+ case 32:
$this->setDbComposer($value);
break;
- case 34:
+ case 33:
$this->setDbEncoder($value);
break;
- case 35:
+ case 34:
$this->setDbChecksum($value);
break;
- case 36:
+ case 35:
$this->setDbLyrics($value);
break;
- case 37:
+ case 36:
$this->setDbOrchestra($value);
break;
- case 38:
+ case 37:
$this->setDbConductor($value);
break;
- case 39:
+ case 38:
$this->setDbLyricist($value);
break;
- case 40:
+ case 39:
$this->setDbOriginalLyricist($value);
break;
- case 41:
+ case 40:
$this->setDbRadioStationName($value);
break;
- case 42:
+ case 41:
$this->setDbInfoUrl($value);
break;
- case 43:
+ case 42:
$this->setDbArtistUrl($value);
break;
- case 44:
+ case 43:
$this->setDbAudioSourceUrl($value);
break;
- case 45:
+ case 44:
$this->setDbRadioStationUrl($value);
break;
- case 46:
+ case 45:
$this->setDbBuyThisUrl($value);
break;
- case 47:
+ case 46:
$this->setDbIsrcNumber($value);
break;
- case 48:
+ case 47:
$this->setDbCatalogNumber($value);
break;
- case 49:
+ case 48:
$this->setDbOriginalArtist($value);
break;
- case 50:
+ case 49:
$this->setDbCopyright($value);
break;
- case 51:
+ case 50:
$this->setDbReportDatetime($value);
break;
- case 52:
+ case 51:
$this->setDbReportLocation($value);
break;
- case 53:
+ case 52:
$this->setDbReportOrganization($value);
break;
- case 54:
+ case 53:
$this->setDbSubject($value);
break;
- case 55:
+ case 54:
$this->setDbContributor($value);
break;
- case 56:
+ case 55:
$this->setDbLanguage($value);
break;
- case 57:
+ case 56:
$this->setDbFileExists($value);
break;
- case 58:
+ case 57:
$this->setDbSoundcloudId($value);
break;
- case 59:
+ case 58:
$this->setDbSoundcloudErrorCode($value);
break;
- case 60:
+ case 59:
$this->setDbSoundcloudErrorMsg($value);
break;
- case 61:
+ case 60:
$this->setDbSoundcloudLinkToFile($value);
break;
- case 62:
+ case 61:
$this->setDbSoundCloundUploadTime($value);
break;
- case 63:
+ case 62:
$this->setDbReplayGain($value);
break;
} // switch()
@@ -3712,69 +3668,68 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$keys = CcFilesPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
- if (array_key_exists($keys[1], $arr)) $this->setDbGunid($arr[$keys[1]]);
- if (array_key_exists($keys[2], $arr)) $this->setDbName($arr[$keys[2]]);
- if (array_key_exists($keys[3], $arr)) $this->setDbMime($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setDbFtype($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDbDirectory($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setDbFilepath($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setDbState($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[8]]);
- if (array_key_exists($keys[9], $arr)) $this->setDbEditedby($arr[$keys[9]]);
- if (array_key_exists($keys[10], $arr)) $this->setDbMtime($arr[$keys[10]]);
- if (array_key_exists($keys[11], $arr)) $this->setDbUtime($arr[$keys[11]]);
- if (array_key_exists($keys[12], $arr)) $this->setDbLPtime($arr[$keys[12]]);
- if (array_key_exists($keys[13], $arr)) $this->setDbMd5($arr[$keys[13]]);
- if (array_key_exists($keys[14], $arr)) $this->setDbTrackTitle($arr[$keys[14]]);
- if (array_key_exists($keys[15], $arr)) $this->setDbArtistName($arr[$keys[15]]);
- if (array_key_exists($keys[16], $arr)) $this->setDbBitRate($arr[$keys[16]]);
- if (array_key_exists($keys[17], $arr)) $this->setDbSampleRate($arr[$keys[17]]);
- if (array_key_exists($keys[18], $arr)) $this->setDbFormat($arr[$keys[18]]);
- if (array_key_exists($keys[19], $arr)) $this->setDbLength($arr[$keys[19]]);
- if (array_key_exists($keys[20], $arr)) $this->setDbAlbumTitle($arr[$keys[20]]);
- if (array_key_exists($keys[21], $arr)) $this->setDbGenre($arr[$keys[21]]);
- if (array_key_exists($keys[22], $arr)) $this->setDbComments($arr[$keys[22]]);
- if (array_key_exists($keys[23], $arr)) $this->setDbYear($arr[$keys[23]]);
- if (array_key_exists($keys[24], $arr)) $this->setDbTrackNumber($arr[$keys[24]]);
- if (array_key_exists($keys[25], $arr)) $this->setDbChannels($arr[$keys[25]]);
- if (array_key_exists($keys[26], $arr)) $this->setDbUrl($arr[$keys[26]]);
- if (array_key_exists($keys[27], $arr)) $this->setDbBpm($arr[$keys[27]]);
- if (array_key_exists($keys[28], $arr)) $this->setDbRating($arr[$keys[28]]);
- if (array_key_exists($keys[29], $arr)) $this->setDbEncodedBy($arr[$keys[29]]);
- if (array_key_exists($keys[30], $arr)) $this->setDbDiscNumber($arr[$keys[30]]);
- if (array_key_exists($keys[31], $arr)) $this->setDbMood($arr[$keys[31]]);
- if (array_key_exists($keys[32], $arr)) $this->setDbLabel($arr[$keys[32]]);
- if (array_key_exists($keys[33], $arr)) $this->setDbComposer($arr[$keys[33]]);
- if (array_key_exists($keys[34], $arr)) $this->setDbEncoder($arr[$keys[34]]);
- if (array_key_exists($keys[35], $arr)) $this->setDbChecksum($arr[$keys[35]]);
- if (array_key_exists($keys[36], $arr)) $this->setDbLyrics($arr[$keys[36]]);
- if (array_key_exists($keys[37], $arr)) $this->setDbOrchestra($arr[$keys[37]]);
- if (array_key_exists($keys[38], $arr)) $this->setDbConductor($arr[$keys[38]]);
- if (array_key_exists($keys[39], $arr)) $this->setDbLyricist($arr[$keys[39]]);
- if (array_key_exists($keys[40], $arr)) $this->setDbOriginalLyricist($arr[$keys[40]]);
- if (array_key_exists($keys[41], $arr)) $this->setDbRadioStationName($arr[$keys[41]]);
- if (array_key_exists($keys[42], $arr)) $this->setDbInfoUrl($arr[$keys[42]]);
- if (array_key_exists($keys[43], $arr)) $this->setDbArtistUrl($arr[$keys[43]]);
- if (array_key_exists($keys[44], $arr)) $this->setDbAudioSourceUrl($arr[$keys[44]]);
- if (array_key_exists($keys[45], $arr)) $this->setDbRadioStationUrl($arr[$keys[45]]);
- if (array_key_exists($keys[46], $arr)) $this->setDbBuyThisUrl($arr[$keys[46]]);
- if (array_key_exists($keys[47], $arr)) $this->setDbIsrcNumber($arr[$keys[47]]);
- if (array_key_exists($keys[48], $arr)) $this->setDbCatalogNumber($arr[$keys[48]]);
- if (array_key_exists($keys[49], $arr)) $this->setDbOriginalArtist($arr[$keys[49]]);
- if (array_key_exists($keys[50], $arr)) $this->setDbCopyright($arr[$keys[50]]);
- if (array_key_exists($keys[51], $arr)) $this->setDbReportDatetime($arr[$keys[51]]);
- if (array_key_exists($keys[52], $arr)) $this->setDbReportLocation($arr[$keys[52]]);
- if (array_key_exists($keys[53], $arr)) $this->setDbReportOrganization($arr[$keys[53]]);
- if (array_key_exists($keys[54], $arr)) $this->setDbSubject($arr[$keys[54]]);
- if (array_key_exists($keys[55], $arr)) $this->setDbContributor($arr[$keys[55]]);
- if (array_key_exists($keys[56], $arr)) $this->setDbLanguage($arr[$keys[56]]);
- if (array_key_exists($keys[57], $arr)) $this->setDbFileExists($arr[$keys[57]]);
- if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudId($arr[$keys[58]]);
- if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[59]]);
- if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[60]]);
- if (array_key_exists($keys[61], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[61]]);
- if (array_key_exists($keys[62], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[62]]);
- if (array_key_exists($keys[63], $arr)) $this->setDbReplayGain($arr[$keys[63]]);
+ if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
+ if (array_key_exists($keys[2], $arr)) $this->setDbMime($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbFtype($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbDirectory($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbFilepath($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbState($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDbEditedby($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setDbMtime($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setDbUtime($arr[$keys[10]]);
+ if (array_key_exists($keys[11], $arr)) $this->setDbLPtime($arr[$keys[11]]);
+ if (array_key_exists($keys[12], $arr)) $this->setDbMd5($arr[$keys[12]]);
+ if (array_key_exists($keys[13], $arr)) $this->setDbTrackTitle($arr[$keys[13]]);
+ if (array_key_exists($keys[14], $arr)) $this->setDbArtistName($arr[$keys[14]]);
+ if (array_key_exists($keys[15], $arr)) $this->setDbBitRate($arr[$keys[15]]);
+ if (array_key_exists($keys[16], $arr)) $this->setDbSampleRate($arr[$keys[16]]);
+ if (array_key_exists($keys[17], $arr)) $this->setDbFormat($arr[$keys[17]]);
+ if (array_key_exists($keys[18], $arr)) $this->setDbLength($arr[$keys[18]]);
+ if (array_key_exists($keys[19], $arr)) $this->setDbAlbumTitle($arr[$keys[19]]);
+ if (array_key_exists($keys[20], $arr)) $this->setDbGenre($arr[$keys[20]]);
+ if (array_key_exists($keys[21], $arr)) $this->setDbComments($arr[$keys[21]]);
+ if (array_key_exists($keys[22], $arr)) $this->setDbYear($arr[$keys[22]]);
+ if (array_key_exists($keys[23], $arr)) $this->setDbTrackNumber($arr[$keys[23]]);
+ if (array_key_exists($keys[24], $arr)) $this->setDbChannels($arr[$keys[24]]);
+ if (array_key_exists($keys[25], $arr)) $this->setDbUrl($arr[$keys[25]]);
+ if (array_key_exists($keys[26], $arr)) $this->setDbBpm($arr[$keys[26]]);
+ if (array_key_exists($keys[27], $arr)) $this->setDbRating($arr[$keys[27]]);
+ if (array_key_exists($keys[28], $arr)) $this->setDbEncodedBy($arr[$keys[28]]);
+ if (array_key_exists($keys[29], $arr)) $this->setDbDiscNumber($arr[$keys[29]]);
+ if (array_key_exists($keys[30], $arr)) $this->setDbMood($arr[$keys[30]]);
+ if (array_key_exists($keys[31], $arr)) $this->setDbLabel($arr[$keys[31]]);
+ if (array_key_exists($keys[32], $arr)) $this->setDbComposer($arr[$keys[32]]);
+ if (array_key_exists($keys[33], $arr)) $this->setDbEncoder($arr[$keys[33]]);
+ if (array_key_exists($keys[34], $arr)) $this->setDbChecksum($arr[$keys[34]]);
+ if (array_key_exists($keys[35], $arr)) $this->setDbLyrics($arr[$keys[35]]);
+ if (array_key_exists($keys[36], $arr)) $this->setDbOrchestra($arr[$keys[36]]);
+ if (array_key_exists($keys[37], $arr)) $this->setDbConductor($arr[$keys[37]]);
+ if (array_key_exists($keys[38], $arr)) $this->setDbLyricist($arr[$keys[38]]);
+ if (array_key_exists($keys[39], $arr)) $this->setDbOriginalLyricist($arr[$keys[39]]);
+ if (array_key_exists($keys[40], $arr)) $this->setDbRadioStationName($arr[$keys[40]]);
+ if (array_key_exists($keys[41], $arr)) $this->setDbInfoUrl($arr[$keys[41]]);
+ if (array_key_exists($keys[42], $arr)) $this->setDbArtistUrl($arr[$keys[42]]);
+ if (array_key_exists($keys[43], $arr)) $this->setDbAudioSourceUrl($arr[$keys[43]]);
+ if (array_key_exists($keys[44], $arr)) $this->setDbRadioStationUrl($arr[$keys[44]]);
+ if (array_key_exists($keys[45], $arr)) $this->setDbBuyThisUrl($arr[$keys[45]]);
+ if (array_key_exists($keys[46], $arr)) $this->setDbIsrcNumber($arr[$keys[46]]);
+ if (array_key_exists($keys[47], $arr)) $this->setDbCatalogNumber($arr[$keys[47]]);
+ if (array_key_exists($keys[48], $arr)) $this->setDbOriginalArtist($arr[$keys[48]]);
+ if (array_key_exists($keys[49], $arr)) $this->setDbCopyright($arr[$keys[49]]);
+ if (array_key_exists($keys[50], $arr)) $this->setDbReportDatetime($arr[$keys[50]]);
+ if (array_key_exists($keys[51], $arr)) $this->setDbReportLocation($arr[$keys[51]]);
+ if (array_key_exists($keys[52], $arr)) $this->setDbReportOrganization($arr[$keys[52]]);
+ if (array_key_exists($keys[53], $arr)) $this->setDbSubject($arr[$keys[53]]);
+ if (array_key_exists($keys[54], $arr)) $this->setDbContributor($arr[$keys[54]]);
+ if (array_key_exists($keys[55], $arr)) $this->setDbLanguage($arr[$keys[55]]);
+ if (array_key_exists($keys[56], $arr)) $this->setDbFileExists($arr[$keys[56]]);
+ if (array_key_exists($keys[57], $arr)) $this->setDbSoundcloudId($arr[$keys[57]]);
+ if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[58]]);
+ if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[59]]);
+ if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[60]]);
+ if (array_key_exists($keys[61], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[61]]);
+ if (array_key_exists($keys[62], $arr)) $this->setDbReplayGain($arr[$keys[62]]);
}
/**
@@ -3787,7 +3742,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$criteria = new Criteria(CcFilesPeer::DATABASE_NAME);
if ($this->isColumnModified(CcFilesPeer::ID)) $criteria->add(CcFilesPeer::ID, $this->id);
- if ($this->isColumnModified(CcFilesPeer::GUNID)) $criteria->add(CcFilesPeer::GUNID, $this->gunid);
if ($this->isColumnModified(CcFilesPeer::NAME)) $criteria->add(CcFilesPeer::NAME, $this->name);
if ($this->isColumnModified(CcFilesPeer::MIME)) $criteria->add(CcFilesPeer::MIME, $this->mime);
if ($this->isColumnModified(CcFilesPeer::FTYPE)) $criteria->add(CcFilesPeer::FTYPE, $this->ftype);
@@ -3911,7 +3865,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function copyInto($copyObj, $deepCopy = false)
{
- $copyObj->setDbGunid($this->gunid);
$copyObj->setDbName($this->name);
$copyObj->setDbMime($this->mime);
$copyObj->setDbFtype($this->ftype);
@@ -4733,13 +4686,37 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->getCcSchedules($query, $con);
}
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcFiles is new, it will return
+ * an empty collection; or if this CcFiles has previously
+ * been saved, it will retrieve related CcSchedules from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in CcFiles.
+ *
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param PropelPDO $con optional connection object
+ * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
+ */
+ public function getCcSchedulesJoinCcWebstream($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcScheduleQuery::create(null, $criteria);
+ $query->joinWith('CcWebstream', $join_behavior);
+
+ return $this->getCcSchedules($query, $con);
+ }
+
/**
* Clears the current object and sets all attributes to their default values
*/
public function clear()
{
$this->id = null;
- $this->gunid = null;
$this->name = null;
$this->mime = null;
$this->ftype = null;
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php
index eb6d15d2d..cc151400a 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesPeer.php
@@ -26,7 +26,7 @@ abstract class BaseCcFilesPeer {
const TM_CLASS = 'CcFilesTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 64;
+ const NUM_COLUMNS = 63;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -34,9 +34,6 @@ abstract class BaseCcFilesPeer {
/** the column name for the ID field */
const ID = 'cc_files.ID';
- /** the column name for the GUNID field */
- const GUNID = 'cc_files.GUNID';
-
/** the column name for the NAME field */
const NAME = 'cc_files.NAME';
@@ -239,12 +236,12 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbGunid', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbGunid', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::GUNID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'GUNID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'gunid', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, )
);
/**
@@ -254,12 +251,12 @@ abstract class BaseCcFilesPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbGunid' => 1, 'DbName' => 2, 'DbMime' => 3, 'DbFtype' => 4, 'DbDirectory' => 5, 'DbFilepath' => 6, 'DbState' => 7, 'DbCurrentlyaccessing' => 8, 'DbEditedby' => 9, 'DbMtime' => 10, 'DbUtime' => 11, 'DbLPtime' => 12, 'DbMd5' => 13, 'DbTrackTitle' => 14, 'DbArtistName' => 15, 'DbBitRate' => 16, 'DbSampleRate' => 17, 'DbFormat' => 18, 'DbLength' => 19, 'DbAlbumTitle' => 20, 'DbGenre' => 21, 'DbComments' => 22, 'DbYear' => 23, 'DbTrackNumber' => 24, 'DbChannels' => 25, 'DbUrl' => 26, 'DbBpm' => 27, 'DbRating' => 28, 'DbEncodedBy' => 29, 'DbDiscNumber' => 30, 'DbMood' => 31, 'DbLabel' => 32, 'DbComposer' => 33, 'DbEncoder' => 34, 'DbChecksum' => 35, 'DbLyrics' => 36, 'DbOrchestra' => 37, 'DbConductor' => 38, 'DbLyricist' => 39, 'DbOriginalLyricist' => 40, 'DbRadioStationName' => 41, 'DbInfoUrl' => 42, 'DbArtistUrl' => 43, 'DbAudioSourceUrl' => 44, 'DbRadioStationUrl' => 45, 'DbBuyThisUrl' => 46, 'DbIsrcNumber' => 47, 'DbCatalogNumber' => 48, 'DbOriginalArtist' => 49, 'DbCopyright' => 50, 'DbReportDatetime' => 51, 'DbReportLocation' => 52, 'DbReportOrganization' => 53, 'DbSubject' => 54, 'DbContributor' => 55, 'DbLanguage' => 56, 'DbFileExists' => 57, 'DbSoundcloudId' => 58, 'DbSoundcloudErrorCode' => 59, 'DbSoundcloudErrorMsg' => 60, 'DbSoundcloudLinkToFile' => 61, 'DbSoundCloundUploadTime' => 62, 'DbReplayGain' => 63, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbGunid' => 1, 'dbName' => 2, 'dbMime' => 3, 'dbFtype' => 4, 'dbDirectory' => 5, 'dbFilepath' => 6, 'dbState' => 7, 'dbCurrentlyaccessing' => 8, 'dbEditedby' => 9, 'dbMtime' => 10, 'dbUtime' => 11, 'dbLPtime' => 12, 'dbMd5' => 13, 'dbTrackTitle' => 14, 'dbArtistName' => 15, 'dbBitRate' => 16, 'dbSampleRate' => 17, 'dbFormat' => 18, 'dbLength' => 19, 'dbAlbumTitle' => 20, 'dbGenre' => 21, 'dbComments' => 22, 'dbYear' => 23, 'dbTrackNumber' => 24, 'dbChannels' => 25, 'dbUrl' => 26, 'dbBpm' => 27, 'dbRating' => 28, 'dbEncodedBy' => 29, 'dbDiscNumber' => 30, 'dbMood' => 31, 'dbLabel' => 32, 'dbComposer' => 33, 'dbEncoder' => 34, 'dbChecksum' => 35, 'dbLyrics' => 36, 'dbOrchestra' => 37, 'dbConductor' => 38, 'dbLyricist' => 39, 'dbOriginalLyricist' => 40, 'dbRadioStationName' => 41, 'dbInfoUrl' => 42, 'dbArtistUrl' => 43, 'dbAudioSourceUrl' => 44, 'dbRadioStationUrl' => 45, 'dbBuyThisUrl' => 46, 'dbIsrcNumber' => 47, 'dbCatalogNumber' => 48, 'dbOriginalArtist' => 49, 'dbCopyright' => 50, 'dbReportDatetime' => 51, 'dbReportLocation' => 52, 'dbReportOrganization' => 53, 'dbSubject' => 54, 'dbContributor' => 55, 'dbLanguage' => 56, 'dbFileExists' => 57, 'dbSoundcloudId' => 58, 'dbSoundcloudErrorCode' => 59, 'dbSoundcloudErrorMsg' => 60, 'dbSoundcloudLinkToFile' => 61, 'dbSoundCloundUploadTime' => 62, 'dbReplayGain' => 63, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::GUNID => 1, self::NAME => 2, self::MIME => 3, self::FTYPE => 4, self::DIRECTORY => 5, self::FILEPATH => 6, self::STATE => 7, self::CURRENTLYACCESSING => 8, self::EDITEDBY => 9, self::MTIME => 10, self::UTIME => 11, self::LPTIME => 12, self::MD5 => 13, self::TRACK_TITLE => 14, self::ARTIST_NAME => 15, self::BIT_RATE => 16, self::SAMPLE_RATE => 17, self::FORMAT => 18, self::LENGTH => 19, self::ALBUM_TITLE => 20, self::GENRE => 21, self::COMMENTS => 22, self::YEAR => 23, self::TRACK_NUMBER => 24, self::CHANNELS => 25, self::URL => 26, self::BPM => 27, self::RATING => 28, self::ENCODED_BY => 29, self::DISC_NUMBER => 30, self::MOOD => 31, self::LABEL => 32, self::COMPOSER => 33, self::ENCODER => 34, self::CHECKSUM => 35, self::LYRICS => 36, self::ORCHESTRA => 37, self::CONDUCTOR => 38, self::LYRICIST => 39, self::ORIGINAL_LYRICIST => 40, self::RADIO_STATION_NAME => 41, self::INFO_URL => 42, self::ARTIST_URL => 43, self::AUDIO_SOURCE_URL => 44, self::RADIO_STATION_URL => 45, self::BUY_THIS_URL => 46, self::ISRC_NUMBER => 47, self::CATALOG_NUMBER => 48, self::ORIGINAL_ARTIST => 49, self::COPYRIGHT => 50, self::REPORT_DATETIME => 51, self::REPORT_LOCATION => 52, self::REPORT_ORGANIZATION => 53, self::SUBJECT => 54, self::CONTRIBUTOR => 55, self::LANGUAGE => 56, self::FILE_EXISTS => 57, self::SOUNDCLOUD_ID => 58, self::SOUNDCLOUD_ERROR_CODE => 59, self::SOUNDCLOUD_ERROR_MSG => 60, self::SOUNDCLOUD_LINK_TO_FILE => 61, self::SOUNDCLOUD_UPLOAD_TIME => 62, self::REPLAY_GAIN => 63, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'GUNID' => 1, 'NAME' => 2, 'MIME' => 3, 'FTYPE' => 4, 'DIRECTORY' => 5, 'FILEPATH' => 6, 'STATE' => 7, 'CURRENTLYACCESSING' => 8, 'EDITEDBY' => 9, 'MTIME' => 10, 'UTIME' => 11, 'LPTIME' => 12, 'MD5' => 13, 'TRACK_TITLE' => 14, 'ARTIST_NAME' => 15, 'BIT_RATE' => 16, 'SAMPLE_RATE' => 17, 'FORMAT' => 18, 'LENGTH' => 19, 'ALBUM_TITLE' => 20, 'GENRE' => 21, 'COMMENTS' => 22, 'YEAR' => 23, 'TRACK_NUMBER' => 24, 'CHANNELS' => 25, 'URL' => 26, 'BPM' => 27, 'RATING' => 28, 'ENCODED_BY' => 29, 'DISC_NUMBER' => 30, 'MOOD' => 31, 'LABEL' => 32, 'COMPOSER' => 33, 'ENCODER' => 34, 'CHECKSUM' => 35, 'LYRICS' => 36, 'ORCHESTRA' => 37, 'CONDUCTOR' => 38, 'LYRICIST' => 39, 'ORIGINAL_LYRICIST' => 40, 'RADIO_STATION_NAME' => 41, 'INFO_URL' => 42, 'ARTIST_URL' => 43, 'AUDIO_SOURCE_URL' => 44, 'RADIO_STATION_URL' => 45, 'BUY_THIS_URL' => 46, 'ISRC_NUMBER' => 47, 'CATALOG_NUMBER' => 48, 'ORIGINAL_ARTIST' => 49, 'COPYRIGHT' => 50, 'REPORT_DATETIME' => 51, 'REPORT_LOCATION' => 52, 'REPORT_ORGANIZATION' => 53, 'SUBJECT' => 54, 'CONTRIBUTOR' => 55, 'LANGUAGE' => 56, 'FILE_EXISTS' => 57, 'SOUNDCLOUD_ID' => 58, 'SOUNDCLOUD_ERROR_CODE' => 59, 'SOUNDCLOUD_ERROR_MSG' => 60, 'SOUNDCLOUD_LINK_TO_FILE' => 61, 'SOUNDCLOUD_UPLOAD_TIME' => 62, 'REPLAY_GAIN' => 63, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'gunid' => 1, 'name' => 2, 'mime' => 3, 'ftype' => 4, 'directory' => 5, 'filepath' => 6, 'state' => 7, 'currentlyaccessing' => 8, 'editedby' => 9, 'mtime' => 10, 'utime' => 11, 'lptime' => 12, 'md5' => 13, 'track_title' => 14, 'artist_name' => 15, 'bit_rate' => 16, 'sample_rate' => 17, 'format' => 18, 'length' => 19, 'album_title' => 20, 'genre' => 21, 'comments' => 22, 'year' => 23, 'track_number' => 24, 'channels' => 25, 'url' => 26, 'bpm' => 27, 'rating' => 28, 'encoded_by' => 29, 'disc_number' => 30, 'mood' => 31, 'label' => 32, 'composer' => 33, 'encoder' => 34, 'checksum' => 35, 'lyrics' => 36, 'orchestra' => 37, 'conductor' => 38, 'lyricist' => 39, 'original_lyricist' => 40, 'radio_station_name' => 41, 'info_url' => 42, 'artist_url' => 43, 'audio_source_url' => 44, 'radio_station_url' => 45, 'buy_this_url' => 46, 'isrc_number' => 47, 'catalog_number' => 48, 'original_artist' => 49, 'copyright' => 50, 'report_datetime' => 51, 'report_location' => 52, 'report_organization' => 53, 'subject' => 54, 'contributor' => 55, 'language' => 56, 'file_exists' => 57, 'soundcloud_id' => 58, 'soundcloud_error_code' => 59, 'soundcloud_error_msg' => 60, 'soundcloud_link_to_file' => 61, 'soundcloud_upload_time' => 62, 'replay_gain' => 63, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MIME => 2, self::FTYPE => 3, self::DIRECTORY => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::UTIME => 10, self::LPTIME => 11, self::MD5 => 12, self::TRACK_TITLE => 13, self::ARTIST_NAME => 14, self::BIT_RATE => 15, self::SAMPLE_RATE => 16, self::FORMAT => 17, self::LENGTH => 18, self::ALBUM_TITLE => 19, self::GENRE => 20, self::COMMENTS => 21, self::YEAR => 22, self::TRACK_NUMBER => 23, self::CHANNELS => 24, self::URL => 25, self::BPM => 26, self::RATING => 27, self::ENCODED_BY => 28, self::DISC_NUMBER => 29, self::MOOD => 30, self::LABEL => 31, self::COMPOSER => 32, self::ENCODER => 33, self::CHECKSUM => 34, self::LYRICS => 35, self::ORCHESTRA => 36, self::CONDUCTOR => 37, self::LYRICIST => 38, self::ORIGINAL_LYRICIST => 39, self::RADIO_STATION_NAME => 40, self::INFO_URL => 41, self::ARTIST_URL => 42, self::AUDIO_SOURCE_URL => 43, self::RADIO_STATION_URL => 44, self::BUY_THIS_URL => 45, self::ISRC_NUMBER => 46, self::CATALOG_NUMBER => 47, self::ORIGINAL_ARTIST => 48, self::COPYRIGHT => 49, self::REPORT_DATETIME => 50, self::REPORT_LOCATION => 51, self::REPORT_ORGANIZATION => 52, self::SUBJECT => 53, self::CONTRIBUTOR => 54, self::LANGUAGE => 55, self::FILE_EXISTS => 56, self::SOUNDCLOUD_ID => 57, self::SOUNDCLOUD_ERROR_CODE => 58, self::SOUNDCLOUD_ERROR_MSG => 59, self::SOUNDCLOUD_LINK_TO_FILE => 60, self::SOUNDCLOUD_UPLOAD_TIME => 61, self::REPLAY_GAIN => 62, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, )
);
/**
@@ -332,7 +329,6 @@ abstract class BaseCcFilesPeer {
{
if (null === $alias) {
$criteria->addSelectColumn(CcFilesPeer::ID);
- $criteria->addSelectColumn(CcFilesPeer::GUNID);
$criteria->addSelectColumn(CcFilesPeer::NAME);
$criteria->addSelectColumn(CcFilesPeer::MIME);
$criteria->addSelectColumn(CcFilesPeer::FTYPE);
@@ -397,7 +393,6 @@ abstract class BaseCcFilesPeer {
$criteria->addSelectColumn(CcFilesPeer::REPLAY_GAIN);
} else {
$criteria->addSelectColumn($alias . '.ID');
- $criteria->addSelectColumn($alias . '.GUNID');
$criteria->addSelectColumn($alias . '.NAME');
$criteria->addSelectColumn($alias . '.MIME');
$criteria->addSelectColumn($alias . '.FTYPE');
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
index c08ba557f..42d2f42f2 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcFilesQuery.php
@@ -7,7 +7,6 @@
*
*
* @method CcFilesQuery orderByDbId($order = Criteria::ASC) Order by the id column
- * @method CcFilesQuery orderByDbGunid($order = Criteria::ASC) Order by the gunid column
* @method CcFilesQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcFilesQuery orderByDbMime($order = Criteria::ASC) Order by the mime column
* @method CcFilesQuery orderByDbFtype($order = Criteria::ASC) Order by the ftype column
@@ -72,7 +71,6 @@
* @method CcFilesQuery orderByDbReplayGain($order = Criteria::ASC) Order by the replay_gain column
*
* @method CcFilesQuery groupByDbId() Group by the id column
- * @method CcFilesQuery groupByDbGunid() Group by the gunid column
* @method CcFilesQuery groupByDbName() Group by the name column
* @method CcFilesQuery groupByDbMime() Group by the mime column
* @method CcFilesQuery groupByDbFtype() Group by the ftype column
@@ -168,7 +166,6 @@
* @method CcFiles findOneOrCreate(PropelPDO $con = null) Return the first CcFiles matching the query, or a new CcFiles object populated from the query conditions when no match is found
*
* @method CcFiles findOneByDbId(int $id) Return the first CcFiles filtered by the id column
- * @method CcFiles findOneByDbGunid(string $gunid) Return the first CcFiles filtered by the gunid column
* @method CcFiles findOneByDbName(string $name) Return the first CcFiles filtered by the name column
* @method CcFiles findOneByDbMime(string $mime) Return the first CcFiles filtered by the mime column
* @method CcFiles findOneByDbFtype(string $ftype) Return the first CcFiles filtered by the ftype column
@@ -233,7 +230,6 @@
* @method CcFiles findOneByDbReplayGain(string $replay_gain) Return the first CcFiles filtered by the replay_gain column
*
* @method array findByDbId(int $id) Return CcFiles objects filtered by the id column
- * @method array findByDbGunid(string $gunid) Return CcFiles objects filtered by the gunid column
* @method array findByDbName(string $name) Return CcFiles objects filtered by the name column
* @method array findByDbMime(string $mime) Return CcFiles objects filtered by the mime column
* @method array findByDbFtype(string $ftype) Return CcFiles objects filtered by the ftype column
@@ -422,28 +418,6 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::ID, $dbId, $comparison);
}
- /**
- * Filter the query on the gunid column
- *
- * @param string $dbGunid The value to use as filter.
- * Accepts wildcards (* and % trigger a LIKE)
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
- *
- * @return CcFilesQuery The current query, for fluid interface
- */
- public function filterByDbGunid($dbGunid = null, $comparison = null)
- {
- if (null === $comparison) {
- if (is_array($dbGunid)) {
- $comparison = Criteria::IN;
- } elseif (preg_match('/[\%\*]/', $dbGunid)) {
- $dbGunid = str_replace('*', '%', $dbGunid);
- $comparison = Criteria::LIKE;
- }
- }
- return $this->addUsingAlias(CcFilesPeer::GUNID, $dbGunid, $comparison);
- }
-
/**
* Filter the query on the name column
*
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php b/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php
index 9556499bb..ba5f6bb38 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSchedule.php
@@ -48,6 +48,12 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
protected $file_id;
+ /**
+ * The value for the stream_id field.
+ * @var int
+ */
+ protected $stream_id;
+
/**
* The value for the clip_length field.
* Note: this column has a database default value of: '00:00:00'
@@ -120,6 +126,11 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
protected $aCcFiles;
+ /**
+ * @var CcWebstream
+ */
+ protected $aCcWebstream;
+
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -248,6 +259,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this->file_id;
}
+ /**
+ * Get the [stream_id] column value.
+ *
+ * @return int
+ */
+ public function getDbStreamId()
+ {
+ return $this->stream_id;
+ }
+
/**
* Get the [clip_length] column value.
*
@@ -526,6 +547,30 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this;
} // setDbFileId()
+ /**
+ * Set the value of [stream_id] column.
+ *
+ * @param int $v new value
+ * @return CcSchedule The current object (for fluent API support)
+ */
+ public function setDbStreamId($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->stream_id !== $v) {
+ $this->stream_id = $v;
+ $this->modifiedColumns[] = CcSchedulePeer::STREAM_ID;
+ }
+
+ if ($this->aCcWebstream !== null && $this->aCcWebstream->getDbId() !== $v) {
+ $this->aCcWebstream = null;
+ }
+
+ return $this;
+ } // setDbStreamId()
+
/**
* Set the value of [clip_length] column.
*
@@ -838,15 +883,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->starts = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->ends = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->file_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
- $this->clip_length = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
- $this->fade_in = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
- $this->fade_out = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
- $this->cue_in = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
- $this->cue_out = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
- $this->media_item_played = ($row[$startcol + 9] !== null) ? (boolean) $row[$startcol + 9] : null;
- $this->instance_id = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
- $this->playout_status = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
- $this->broadcasted = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
+ $this->stream_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
+ $this->clip_length = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
+ $this->fade_in = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
+ $this->fade_out = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $this->cue_in = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
+ $this->cue_out = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
+ $this->media_item_played = ($row[$startcol + 10] !== null) ? (boolean) $row[$startcol + 10] : null;
+ $this->instance_id = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null;
+ $this->playout_status = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
+ $this->broadcasted = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null;
$this->resetModified();
$this->setNew(false);
@@ -855,7 +901,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->ensureConsistency();
}
- return $startcol + 13; // 13 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 14; // 14 = CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CcSchedule object", $e);
@@ -881,6 +927,9 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if ($this->aCcFiles !== null && $this->file_id !== $this->aCcFiles->getDbId()) {
$this->aCcFiles = null;
}
+ if ($this->aCcWebstream !== null && $this->stream_id !== $this->aCcWebstream->getDbId()) {
+ $this->aCcWebstream = null;
+ }
if ($this->aCcShowInstances !== null && $this->instance_id !== $this->aCcShowInstances->getDbId()) {
$this->aCcShowInstances = null;
}
@@ -925,6 +974,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->aCcShowInstances = null;
$this->aCcFiles = null;
+ $this->aCcWebstream = null;
} // if (deep)
}
@@ -1054,6 +1104,13 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->setCcFiles($this->aCcFiles);
}
+ if ($this->aCcWebstream !== null) {
+ if ($this->aCcWebstream->isModified() || $this->aCcWebstream->isNew()) {
+ $affectedRows += $this->aCcWebstream->save($con);
+ }
+ $this->setCcWebstream($this->aCcWebstream);
+ }
+
if ($this->isNew() ) {
$this->modifiedColumns[] = CcSchedulePeer::ID;
}
@@ -1160,6 +1217,12 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
}
}
+ if ($this->aCcWebstream !== null) {
+ if (!$this->aCcWebstream->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aCcWebstream->getValidationFailures());
+ }
+ }
+
if (($retval = CcSchedulePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
@@ -1212,30 +1275,33 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this->getDbFileId();
break;
case 4:
- return $this->getDbClipLength();
+ return $this->getDbStreamId();
break;
case 5:
- return $this->getDbFadeIn();
+ return $this->getDbClipLength();
break;
case 6:
- return $this->getDbFadeOut();
+ return $this->getDbFadeIn();
break;
case 7:
- return $this->getDbCueIn();
+ return $this->getDbFadeOut();
break;
case 8:
- return $this->getDbCueOut();
+ return $this->getDbCueIn();
break;
case 9:
- return $this->getDbMediaItemPlayed();
+ return $this->getDbCueOut();
break;
case 10:
- return $this->getDbInstanceId();
+ return $this->getDbMediaItemPlayed();
break;
case 11:
- return $this->getDbPlayoutStatus();
+ return $this->getDbInstanceId();
break;
case 12:
+ return $this->getDbPlayoutStatus();
+ break;
+ case 13:
return $this->getDbBroadcasted();
break;
default:
@@ -1266,15 +1332,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$keys[1] => $this->getDbStarts(),
$keys[2] => $this->getDbEnds(),
$keys[3] => $this->getDbFileId(),
- $keys[4] => $this->getDbClipLength(),
- $keys[5] => $this->getDbFadeIn(),
- $keys[6] => $this->getDbFadeOut(),
- $keys[7] => $this->getDbCueIn(),
- $keys[8] => $this->getDbCueOut(),
- $keys[9] => $this->getDbMediaItemPlayed(),
- $keys[10] => $this->getDbInstanceId(),
- $keys[11] => $this->getDbPlayoutStatus(),
- $keys[12] => $this->getDbBroadcasted(),
+ $keys[4] => $this->getDbStreamId(),
+ $keys[5] => $this->getDbClipLength(),
+ $keys[6] => $this->getDbFadeIn(),
+ $keys[7] => $this->getDbFadeOut(),
+ $keys[8] => $this->getDbCueIn(),
+ $keys[9] => $this->getDbCueOut(),
+ $keys[10] => $this->getDbMediaItemPlayed(),
+ $keys[11] => $this->getDbInstanceId(),
+ $keys[12] => $this->getDbPlayoutStatus(),
+ $keys[13] => $this->getDbBroadcasted(),
);
if ($includeForeignObjects) {
if (null !== $this->aCcShowInstances) {
@@ -1283,6 +1350,9 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if (null !== $this->aCcFiles) {
$result['CcFiles'] = $this->aCcFiles->toArray($keyType, $includeLazyLoadColumns, true);
}
+ if (null !== $this->aCcWebstream) {
+ $result['CcWebstream'] = $this->aCcWebstream->toArray($keyType, $includeLazyLoadColumns, true);
+ }
}
return $result;
}
@@ -1327,30 +1397,33 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->setDbFileId($value);
break;
case 4:
- $this->setDbClipLength($value);
+ $this->setDbStreamId($value);
break;
case 5:
- $this->setDbFadeIn($value);
+ $this->setDbClipLength($value);
break;
case 6:
- $this->setDbFadeOut($value);
+ $this->setDbFadeIn($value);
break;
case 7:
- $this->setDbCueIn($value);
+ $this->setDbFadeOut($value);
break;
case 8:
- $this->setDbCueOut($value);
+ $this->setDbCueIn($value);
break;
case 9:
- $this->setDbMediaItemPlayed($value);
+ $this->setDbCueOut($value);
break;
case 10:
- $this->setDbInstanceId($value);
+ $this->setDbMediaItemPlayed($value);
break;
case 11:
- $this->setDbPlayoutStatus($value);
+ $this->setDbInstanceId($value);
break;
case 12:
+ $this->setDbPlayoutStatus($value);
+ break;
+ case 13:
$this->setDbBroadcasted($value);
break;
} // switch()
@@ -1381,15 +1454,16 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if (array_key_exists($keys[1], $arr)) $this->setDbStarts($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setDbEnds($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setDbFileId($arr[$keys[3]]);
- if (array_key_exists($keys[4], $arr)) $this->setDbClipLength($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setDbFadeIn($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setDbFadeOut($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setDbCueIn($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setDbCueOut($arr[$keys[8]]);
- if (array_key_exists($keys[9], $arr)) $this->setDbMediaItemPlayed($arr[$keys[9]]);
- if (array_key_exists($keys[10], $arr)) $this->setDbInstanceId($arr[$keys[10]]);
- if (array_key_exists($keys[11], $arr)) $this->setDbPlayoutStatus($arr[$keys[11]]);
- if (array_key_exists($keys[12], $arr)) $this->setDbBroadcasted($arr[$keys[12]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbStreamId($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbClipLength($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbFadeIn($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbFadeOut($arr[$keys[7]]);
+ if (array_key_exists($keys[8], $arr)) $this->setDbCueIn($arr[$keys[8]]);
+ if (array_key_exists($keys[9], $arr)) $this->setDbCueOut($arr[$keys[9]]);
+ if (array_key_exists($keys[10], $arr)) $this->setDbMediaItemPlayed($arr[$keys[10]]);
+ if (array_key_exists($keys[11], $arr)) $this->setDbInstanceId($arr[$keys[11]]);
+ if (array_key_exists($keys[12], $arr)) $this->setDbPlayoutStatus($arr[$keys[12]]);
+ if (array_key_exists($keys[13], $arr)) $this->setDbBroadcasted($arr[$keys[13]]);
}
/**
@@ -1405,6 +1479,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
if ($this->isColumnModified(CcSchedulePeer::STARTS)) $criteria->add(CcSchedulePeer::STARTS, $this->starts);
if ($this->isColumnModified(CcSchedulePeer::ENDS)) $criteria->add(CcSchedulePeer::ENDS, $this->ends);
if ($this->isColumnModified(CcSchedulePeer::FILE_ID)) $criteria->add(CcSchedulePeer::FILE_ID, $this->file_id);
+ if ($this->isColumnModified(CcSchedulePeer::STREAM_ID)) $criteria->add(CcSchedulePeer::STREAM_ID, $this->stream_id);
if ($this->isColumnModified(CcSchedulePeer::CLIP_LENGTH)) $criteria->add(CcSchedulePeer::CLIP_LENGTH, $this->clip_length);
if ($this->isColumnModified(CcSchedulePeer::FADE_IN)) $criteria->add(CcSchedulePeer::FADE_IN, $this->fade_in);
if ($this->isColumnModified(CcSchedulePeer::FADE_OUT)) $criteria->add(CcSchedulePeer::FADE_OUT, $this->fade_out);
@@ -1478,6 +1553,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$copyObj->setDbStarts($this->starts);
$copyObj->setDbEnds($this->ends);
$copyObj->setDbFileId($this->file_id);
+ $copyObj->setDbStreamId($this->stream_id);
$copyObj->setDbClipLength($this->clip_length);
$copyObj->setDbFadeIn($this->fade_in);
$copyObj->setDbFadeOut($this->fade_out);
@@ -1628,6 +1704,55 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
return $this->aCcFiles;
}
+ /**
+ * Declares an association between this object and a CcWebstream object.
+ *
+ * @param CcWebstream $v
+ * @return CcSchedule The current object (for fluent API support)
+ * @throws PropelException
+ */
+ public function setCcWebstream(CcWebstream $v = null)
+ {
+ if ($v === null) {
+ $this->setDbStreamId(NULL);
+ } else {
+ $this->setDbStreamId($v->getDbId());
+ }
+
+ $this->aCcWebstream = $v;
+
+ // Add binding for other direction of this n:n relationship.
+ // If this object has already been added to the CcWebstream object, it will not be re-added.
+ if ($v !== null) {
+ $v->addCcSchedule($this);
+ }
+
+ return $this;
+ }
+
+
+ /**
+ * Get the associated CcWebstream object
+ *
+ * @param PropelPDO Optional Connection object.
+ * @return CcWebstream The associated CcWebstream object.
+ * @throws PropelException
+ */
+ public function getCcWebstream(PropelPDO $con = null)
+ {
+ if ($this->aCcWebstream === null && ($this->stream_id !== null)) {
+ $this->aCcWebstream = CcWebstreamQuery::create()->findPk($this->stream_id, $con);
+ /* The following can be used additionally to
+ guarantee the related object contains a reference
+ to this object. This level of coupling may, however, be
+ undesirable since it could result in an only partially populated collection
+ in the referenced object.
+ $this->aCcWebstream->addCcSchedules($this);
+ */
+ }
+ return $this->aCcWebstream;
+ }
+
/**
* Clears the current object and sets all attributes to their default values
*/
@@ -1637,6 +1762,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->starts = null;
$this->ends = null;
$this->file_id = null;
+ $this->stream_id = null;
$this->clip_length = null;
$this->fade_in = null;
$this->fade_out = null;
@@ -1671,6 +1797,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
$this->aCcShowInstances = null;
$this->aCcFiles = null;
+ $this->aCcWebstream = null;
}
/**
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php b/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php
index c73ee915d..37cafa90f 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSchedulePeer.php
@@ -26,7 +26,7 @@ abstract class BaseCcSchedulePeer {
const TM_CLASS = 'CcScheduleTableMap';
/** The total number of columns. */
- const NUM_COLUMNS = 13;
+ const NUM_COLUMNS = 14;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -43,6 +43,9 @@ abstract class BaseCcSchedulePeer {
/** the column name for the FILE_ID field */
const FILE_ID = 'cc_schedule.FILE_ID';
+ /** the column name for the STREAM_ID field */
+ const STREAM_ID = 'cc_schedule.STREAM_ID';
+
/** the column name for the CLIP_LENGTH field */
const CLIP_LENGTH = 'cc_schedule.CLIP_LENGTH';
@@ -86,12 +89,12 @@ abstract class BaseCcSchedulePeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('DbId', 'DbStarts', 'DbEnds', 'DbFileId', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', 'DbMediaItemPlayed', 'DbInstanceId', 'DbPlayoutStatus', 'DbBroadcasted', ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbStarts', 'dbEnds', 'dbFileId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', 'dbMediaItemPlayed', 'dbInstanceId', 'dbPlayoutStatus', 'dbBroadcasted', ),
- BasePeer::TYPE_COLNAME => array (self::ID, self::STARTS, self::ENDS, self::FILE_ID, self::CLIP_LENGTH, self::FADE_IN, self::FADE_OUT, self::CUE_IN, self::CUE_OUT, self::MEDIA_ITEM_PLAYED, self::INSTANCE_ID, self::PLAYOUT_STATUS, self::BROADCASTED, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID', 'STARTS', 'ENDS', 'FILE_ID', 'CLIP_LENGTH', 'FADE_IN', 'FADE_OUT', 'CUE_IN', 'CUE_OUT', 'MEDIA_ITEM_PLAYED', 'INSTANCE_ID', 'PLAYOUT_STATUS', 'BROADCASTED', ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'starts', 'ends', 'file_id', 'clip_length', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'media_item_played', 'instance_id', 'playout_status', 'broadcasted', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ BasePeer::TYPE_PHPNAME => array ('DbId', 'DbStarts', 'DbEnds', 'DbFileId', 'DbStreamId', 'DbClipLength', 'DbFadeIn', 'DbFadeOut', 'DbCueIn', 'DbCueOut', 'DbMediaItemPlayed', 'DbInstanceId', 'DbPlayoutStatus', 'DbBroadcasted', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbStarts', 'dbEnds', 'dbFileId', 'dbStreamId', 'dbClipLength', 'dbFadeIn', 'dbFadeOut', 'dbCueIn', 'dbCueOut', 'dbMediaItemPlayed', 'dbInstanceId', 'dbPlayoutStatus', 'dbBroadcasted', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::STARTS, self::ENDS, self::FILE_ID, self::STREAM_ID, self::CLIP_LENGTH, self::FADE_IN, self::FADE_OUT, self::CUE_IN, self::CUE_OUT, self::MEDIA_ITEM_PLAYED, self::INSTANCE_ID, self::PLAYOUT_STATUS, self::BROADCASTED, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'STARTS', 'ENDS', 'FILE_ID', 'STREAM_ID', 'CLIP_LENGTH', 'FADE_IN', 'FADE_OUT', 'CUE_IN', 'CUE_OUT', 'MEDIA_ITEM_PLAYED', 'INSTANCE_ID', 'PLAYOUT_STATUS', 'BROADCASTED', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'starts', 'ends', 'file_id', 'stream_id', 'clip_length', 'fade_in', 'fade_out', 'cue_in', 'cue_out', 'media_item_played', 'instance_id', 'playout_status', 'broadcasted', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
@@ -101,12 +104,12 @@ abstract class BaseCcSchedulePeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbStarts' => 1, 'DbEnds' => 2, 'DbFileId' => 3, 'DbClipLength' => 4, 'DbFadeIn' => 5, 'DbFadeOut' => 6, 'DbCueIn' => 7, 'DbCueOut' => 8, 'DbMediaItemPlayed' => 9, 'DbInstanceId' => 10, 'DbPlayoutStatus' => 11, 'DbBroadcasted' => 12, ),
- BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbStarts' => 1, 'dbEnds' => 2, 'dbFileId' => 3, 'dbClipLength' => 4, 'dbFadeIn' => 5, 'dbFadeOut' => 6, 'dbCueIn' => 7, 'dbCueOut' => 8, 'dbMediaItemPlayed' => 9, 'dbInstanceId' => 10, 'dbPlayoutStatus' => 11, 'dbBroadcasted' => 12, ),
- BasePeer::TYPE_COLNAME => array (self::ID => 0, self::STARTS => 1, self::ENDS => 2, self::FILE_ID => 3, self::CLIP_LENGTH => 4, self::FADE_IN => 5, self::FADE_OUT => 6, self::CUE_IN => 7, self::CUE_OUT => 8, self::MEDIA_ITEM_PLAYED => 9, self::INSTANCE_ID => 10, self::PLAYOUT_STATUS => 11, self::BROADCASTED => 12, ),
- BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'STARTS' => 1, 'ENDS' => 2, 'FILE_ID' => 3, 'CLIP_LENGTH' => 4, 'FADE_IN' => 5, 'FADE_OUT' => 6, 'CUE_IN' => 7, 'CUE_OUT' => 8, 'MEDIA_ITEM_PLAYED' => 9, 'INSTANCE_ID' => 10, 'PLAYOUT_STATUS' => 11, 'BROADCASTED' => 12, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'starts' => 1, 'ends' => 2, 'file_id' => 3, 'clip_length' => 4, 'fade_in' => 5, 'fade_out' => 6, 'cue_in' => 7, 'cue_out' => 8, 'media_item_played' => 9, 'instance_id' => 10, 'playout_status' => 11, 'broadcasted' => 12, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbStarts' => 1, 'DbEnds' => 2, 'DbFileId' => 3, 'DbStreamId' => 4, 'DbClipLength' => 5, 'DbFadeIn' => 6, 'DbFadeOut' => 7, 'DbCueIn' => 8, 'DbCueOut' => 9, 'DbMediaItemPlayed' => 10, 'DbInstanceId' => 11, 'DbPlayoutStatus' => 12, 'DbBroadcasted' => 13, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbStarts' => 1, 'dbEnds' => 2, 'dbFileId' => 3, 'dbStreamId' => 4, 'dbClipLength' => 5, 'dbFadeIn' => 6, 'dbFadeOut' => 7, 'dbCueIn' => 8, 'dbCueOut' => 9, 'dbMediaItemPlayed' => 10, 'dbInstanceId' => 11, 'dbPlayoutStatus' => 12, 'dbBroadcasted' => 13, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::STARTS => 1, self::ENDS => 2, self::FILE_ID => 3, self::STREAM_ID => 4, self::CLIP_LENGTH => 5, self::FADE_IN => 6, self::FADE_OUT => 7, self::CUE_IN => 8, self::CUE_OUT => 9, self::MEDIA_ITEM_PLAYED => 10, self::INSTANCE_ID => 11, self::PLAYOUT_STATUS => 12, self::BROADCASTED => 13, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'STARTS' => 1, 'ENDS' => 2, 'FILE_ID' => 3, 'STREAM_ID' => 4, 'CLIP_LENGTH' => 5, 'FADE_IN' => 6, 'FADE_OUT' => 7, 'CUE_IN' => 8, 'CUE_OUT' => 9, 'MEDIA_ITEM_PLAYED' => 10, 'INSTANCE_ID' => 11, 'PLAYOUT_STATUS' => 12, 'BROADCASTED' => 13, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'starts' => 1, 'ends' => 2, 'file_id' => 3, 'stream_id' => 4, 'clip_length' => 5, 'fade_in' => 6, 'fade_out' => 7, 'cue_in' => 8, 'cue_out' => 9, 'media_item_played' => 10, 'instance_id' => 11, 'playout_status' => 12, 'broadcasted' => 13, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
@@ -182,6 +185,7 @@ abstract class BaseCcSchedulePeer {
$criteria->addSelectColumn(CcSchedulePeer::STARTS);
$criteria->addSelectColumn(CcSchedulePeer::ENDS);
$criteria->addSelectColumn(CcSchedulePeer::FILE_ID);
+ $criteria->addSelectColumn(CcSchedulePeer::STREAM_ID);
$criteria->addSelectColumn(CcSchedulePeer::CLIP_LENGTH);
$criteria->addSelectColumn(CcSchedulePeer::FADE_IN);
$criteria->addSelectColumn(CcSchedulePeer::FADE_OUT);
@@ -196,6 +200,7 @@ abstract class BaseCcSchedulePeer {
$criteria->addSelectColumn($alias . '.STARTS');
$criteria->addSelectColumn($alias . '.ENDS');
$criteria->addSelectColumn($alias . '.FILE_ID');
+ $criteria->addSelectColumn($alias . '.STREAM_ID');
$criteria->addSelectColumn($alias . '.CLIP_LENGTH');
$criteria->addSelectColumn($alias . '.FADE_IN');
$criteria->addSelectColumn($alias . '.FADE_OUT');
@@ -590,6 +595,56 @@ abstract class BaseCcSchedulePeer {
}
+ /**
+ * Returns the number of rows matching criteria, joining the related CcWebstream table
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return int Number of matching rows.
+ */
+ public static function doCountJoinCcWebstream(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ // we're going to modify criteria, so copy it first
+ $criteria = clone $criteria;
+
+ // We need to set the primary table name, since in the case that there are no WHERE columns
+ // it will be impossible for the BasePeer::createSelectSql() method to determine which
+ // tables go into the FROM clause.
+ $criteria->setPrimaryTableName(CcSchedulePeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcSchedulePeer::addSelectColumns($criteria);
+ }
+
+ $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doCount($criteria, $con);
+
+ if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $count = (int) $row[0];
+ } else {
+ $count = 0; // no rows returned; we infer that means 0 matches.
+ }
+ $stmt->closeCursor();
+ return $count;
+ }
+
+
/**
* Selects a collection of CcSchedule objects pre-filled with their CcShowInstances objects.
* @param Criteria $criteria
@@ -722,6 +777,72 @@ abstract class BaseCcSchedulePeer {
}
+ /**
+ * Selects a collection of CcSchedule objects pre-filled with their CcWebstream objects.
+ * @param Criteria $criteria
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return array Array of CcSchedule objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinCcWebstream(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $criteria = clone $criteria;
+
+ // Set the correct dbName if it has not been overridden
+ if ($criteria->getDbName() == Propel::getDefaultDB()) {
+ $criteria->setDbName(self::DATABASE_NAME);
+ }
+
+ CcSchedulePeer::addSelectColumns($criteria);
+ $startcol = (CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcSchedulePeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcSchedulePeer::getInstanceFromPool($key1))) {
+ // We no longer rehydrate the object, since this can cause data loss.
+ // See http://www.propelorm.org/ticket/509
+ // $obj1->hydrate($row, 0, true); // rehydrate
+ } else {
+
+ $cls = CcSchedulePeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcSchedulePeer::addInstanceToPool($obj1, $key1);
+ } // if $obj1 already loaded
+
+ $key2 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if ($key2 !== null) {
+ $obj2 = CcWebstreamPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol);
+ CcWebstreamPeer::addInstanceToPool($obj2, $key2);
+ } // if obj2 already loaded
+
+ // Add the $obj1 (CcSchedule) to $obj2 (CcWebstream)
+ $obj2->addCcSchedule($obj1);
+
+ } // if joined row was not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
/**
* Returns the number of rows matching criteria, joining all related tables
*
@@ -762,6 +883,8 @@ abstract class BaseCcSchedulePeer {
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -801,10 +924,15 @@ abstract class BaseCcSchedulePeer {
CcFilesPeer::addSelectColumns($criteria);
$startcol4 = $startcol3 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+ $startcol5 = $startcol4 + (CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -858,6 +986,24 @@ abstract class BaseCcSchedulePeer {
$obj3->addCcSchedule($obj1);
} // if joined row not null
+ // Add objects for joined CcWebstream rows
+
+ $key4 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol4);
+ if ($key4 !== null) {
+ $obj4 = CcWebstreamPeer::getInstanceFromPool($key4);
+ if (!$obj4) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj4 = new $cls();
+ $obj4->hydrate($row, $startcol4);
+ CcWebstreamPeer::addInstanceToPool($obj4, $key4);
+ } // if obj4 loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj4 (CcWebstream)
+ $obj4->addCcSchedule($obj1);
+ } // if joined row not null
+
$results[] = $obj1;
}
$stmt->closeCursor();
@@ -903,6 +1049,8 @@ abstract class BaseCcSchedulePeer {
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -953,6 +1101,60 @@ abstract class BaseCcSchedulePeer {
$criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
+ $stmt = BasePeer::doCount($criteria, $con);
+
+ if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $count = (int) $row[0];
+ } else {
+ $count = 0; // no rows returned; we infer that means 0 matches.
+ }
+ $stmt->closeCursor();
+ return $count;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related CcWebstream table
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return int Number of matching rows.
+ */
+ public static function doCountJoinAllExceptCcWebstream(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ // we're going to modify criteria, so copy it first
+ $criteria = clone $criteria;
+
+ // We need to set the primary table name, since in the case that there are no WHERE columns
+ // it will be impossible for the BasePeer::createSelectSql() method to determine which
+ // tables go into the FROM clause.
+ $criteria->setPrimaryTableName(CcSchedulePeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcSchedulePeer::addSelectColumns($criteria);
+ }
+
+ $criteria->clearOrderByColumns(); // ORDER BY should not affect count
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+
+ $criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+
$stmt = BasePeer::doCount($criteria, $con);
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
@@ -992,8 +1194,13 @@ abstract class BaseCcSchedulePeer {
CcFilesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -1029,6 +1236,25 @@ abstract class BaseCcSchedulePeer {
// Add the $obj1 (CcSchedule) to the collection in $obj2 (CcFiles)
$obj2->addCcSchedule($obj1);
+ } // if joined row is not null
+
+ // Add objects for joined CcWebstream rows
+
+ $key3 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcWebstreamPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcWebstreamPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj3 (CcWebstream)
+ $obj3->addCcSchedule($obj1);
+
} // if joined row is not null
$results[] = $obj1;
@@ -1065,8 +1291,13 @@ abstract class BaseCcSchedulePeer {
CcShowInstancesPeer::addSelectColumns($criteria);
$startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
+ CcWebstreamPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS);
+
$criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+ $criteria->addJoin(CcSchedulePeer::STREAM_ID, CcWebstreamPeer::ID, $join_behavior);
+
$stmt = BasePeer::doSelect($criteria, $con);
$results = array();
@@ -1102,6 +1333,122 @@ abstract class BaseCcSchedulePeer {
// Add the $obj1 (CcSchedule) to the collection in $obj2 (CcShowInstances)
$obj2->addCcSchedule($obj1);
+ } // if joined row is not null
+
+ // Add objects for joined CcWebstream rows
+
+ $key3 = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcWebstreamPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcWebstreamPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcWebstreamPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj3 (CcWebstream)
+ $obj3->addCcSchedule($obj1);
+
+ } // if joined row is not null
+
+ $results[] = $obj1;
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of CcSchedule objects pre-filled with all related objects except CcWebstream.
+ *
+ * @param Criteria $criteria
+ * @param PropelPDO $con
+ * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
+ * @return array Array of CcSchedule objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptCcWebstream(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $criteria = clone $criteria;
+
+ // Set the correct dbName if it has not been overridden
+ // $criteria->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($criteria->getDbName() == Propel::getDefaultDB()) {
+ $criteria->setDbName(self::DATABASE_NAME);
+ }
+
+ CcSchedulePeer::addSelectColumns($criteria);
+ $startcol2 = (CcSchedulePeer::NUM_COLUMNS - CcSchedulePeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcShowInstancesPeer::addSelectColumns($criteria);
+ $startcol3 = $startcol2 + (CcShowInstancesPeer::NUM_COLUMNS - CcShowInstancesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ CcFilesPeer::addSelectColumns($criteria);
+ $startcol4 = $startcol3 + (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
+
+ $criteria->addJoin(CcSchedulePeer::INSTANCE_ID, CcShowInstancesPeer::ID, $join_behavior);
+
+ $criteria->addJoin(CcSchedulePeer::FILE_ID, CcFilesPeer::ID, $join_behavior);
+
+
+ $stmt = BasePeer::doSelect($criteria, $con);
+ $results = array();
+
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key1 = CcSchedulePeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj1 = CcSchedulePeer::getInstanceFromPool($key1))) {
+ // We no longer rehydrate the object, since this can cause data loss.
+ // See http://www.propelorm.org/ticket/509
+ // $obj1->hydrate($row, 0, true); // rehydrate
+ } else {
+ $cls = CcSchedulePeer::getOMClass(false);
+
+ $obj1 = new $cls();
+ $obj1->hydrate($row);
+ CcSchedulePeer::addInstanceToPool($obj1, $key1);
+ } // if obj1 already loaded
+
+ // Add objects for joined CcShowInstances rows
+
+ $key2 = CcShowInstancesPeer::getPrimaryKeyHashFromRow($row, $startcol2);
+ if ($key2 !== null) {
+ $obj2 = CcShowInstancesPeer::getInstanceFromPool($key2);
+ if (!$obj2) {
+
+ $cls = CcShowInstancesPeer::getOMClass(false);
+
+ $obj2 = new $cls();
+ $obj2->hydrate($row, $startcol2);
+ CcShowInstancesPeer::addInstanceToPool($obj2, $key2);
+ } // if $obj2 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj2 (CcShowInstances)
+ $obj2->addCcSchedule($obj1);
+
+ } // if joined row is not null
+
+ // Add objects for joined CcFiles rows
+
+ $key3 = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol3);
+ if ($key3 !== null) {
+ $obj3 = CcFilesPeer::getInstanceFromPool($key3);
+ if (!$obj3) {
+
+ $cls = CcFilesPeer::getOMClass(false);
+
+ $obj3 = new $cls();
+ $obj3->hydrate($row, $startcol3);
+ CcFilesPeer::addInstanceToPool($obj3, $key3);
+ } // if $obj3 already loaded
+
+ // Add the $obj1 (CcSchedule) to the collection in $obj3 (CcFiles)
+ $obj3->addCcSchedule($obj1);
+
} // if joined row is not null
$results[] = $obj1;
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php
index 236e3cb26..6661f4005 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcScheduleQuery.php
@@ -10,6 +10,7 @@
* @method CcScheduleQuery orderByDbStarts($order = Criteria::ASC) Order by the starts column
* @method CcScheduleQuery orderByDbEnds($order = Criteria::ASC) Order by the ends column
* @method CcScheduleQuery orderByDbFileId($order = Criteria::ASC) Order by the file_id column
+ * @method CcScheduleQuery orderByDbStreamId($order = Criteria::ASC) Order by the stream_id column
* @method CcScheduleQuery orderByDbClipLength($order = Criteria::ASC) Order by the clip_length column
* @method CcScheduleQuery orderByDbFadeIn($order = Criteria::ASC) Order by the fade_in column
* @method CcScheduleQuery orderByDbFadeOut($order = Criteria::ASC) Order by the fade_out column
@@ -24,6 +25,7 @@
* @method CcScheduleQuery groupByDbStarts() Group by the starts column
* @method CcScheduleQuery groupByDbEnds() Group by the ends column
* @method CcScheduleQuery groupByDbFileId() Group by the file_id column
+ * @method CcScheduleQuery groupByDbStreamId() Group by the stream_id column
* @method CcScheduleQuery groupByDbClipLength() Group by the clip_length column
* @method CcScheduleQuery groupByDbFadeIn() Group by the fade_in column
* @method CcScheduleQuery groupByDbFadeOut() Group by the fade_out column
@@ -46,6 +48,10 @@
* @method CcScheduleQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
* @method CcScheduleQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
*
+ * @method CcScheduleQuery leftJoinCcWebstream($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcWebstream relation
+ * @method CcScheduleQuery rightJoinCcWebstream($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcWebstream relation
+ * @method CcScheduleQuery innerJoinCcWebstream($relationAlias = '') Adds a INNER JOIN clause to the query using the CcWebstream relation
+ *
* @method CcSchedule findOne(PropelPDO $con = null) Return the first CcSchedule matching the query
* @method CcSchedule findOneOrCreate(PropelPDO $con = null) Return the first CcSchedule matching the query, or a new CcSchedule object populated from the query conditions when no match is found
*
@@ -53,6 +59,7 @@
* @method CcSchedule findOneByDbStarts(string $starts) Return the first CcSchedule filtered by the starts column
* @method CcSchedule findOneByDbEnds(string $ends) Return the first CcSchedule filtered by the ends column
* @method CcSchedule findOneByDbFileId(int $file_id) Return the first CcSchedule filtered by the file_id column
+ * @method CcSchedule findOneByDbStreamId(int $stream_id) Return the first CcSchedule filtered by the stream_id column
* @method CcSchedule findOneByDbClipLength(string $clip_length) Return the first CcSchedule filtered by the clip_length column
* @method CcSchedule findOneByDbFadeIn(string $fade_in) Return the first CcSchedule filtered by the fade_in column
* @method CcSchedule findOneByDbFadeOut(string $fade_out) Return the first CcSchedule filtered by the fade_out column
@@ -67,6 +74,7 @@
* @method array findByDbStarts(string $starts) Return CcSchedule objects filtered by the starts column
* @method array findByDbEnds(string $ends) Return CcSchedule objects filtered by the ends column
* @method array findByDbFileId(int $file_id) Return CcSchedule objects filtered by the file_id column
+ * @method array findByDbStreamId(int $stream_id) Return CcSchedule objects filtered by the stream_id column
* @method array findByDbClipLength(string $clip_length) Return CcSchedule objects filtered by the clip_length column
* @method array findByDbFadeIn(string $fade_in) Return CcSchedule objects filtered by the fade_in column
* @method array findByDbFadeOut(string $fade_out) Return CcSchedule objects filtered by the fade_out column
@@ -295,6 +303,37 @@ abstract class BaseCcScheduleQuery extends ModelCriteria
return $this->addUsingAlias(CcSchedulePeer::FILE_ID, $dbFileId, $comparison);
}
+ /**
+ * Filter the query on the stream_id column
+ *
+ * @param int|array $dbStreamId The value to use as filter.
+ * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcScheduleQuery The current query, for fluid interface
+ */
+ public function filterByDbStreamId($dbStreamId = null, $comparison = null)
+ {
+ if (is_array($dbStreamId)) {
+ $useMinMax = false;
+ if (isset($dbStreamId['min'])) {
+ $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbStreamId['max'])) {
+ $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcSchedulePeer::STREAM_ID, $dbStreamId, $comparison);
+ }
+
/**
* Filter the query on the clip_length column
*
@@ -661,6 +700,70 @@ abstract class BaseCcScheduleQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
}
+ /**
+ * Filter the query by a related CcWebstream object
+ *
+ * @param CcWebstream $ccWebstream the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcScheduleQuery The current query, for fluid interface
+ */
+ public function filterByCcWebstream($ccWebstream, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcSchedulePeer::STREAM_ID, $ccWebstream->getDbId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcWebstream relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcScheduleQuery The current query, for fluid interface
+ */
+ public function joinCcWebstream($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcWebstream');
+
+ // create a ModelJoin object for this join
+ $join = new ModelJoin();
+ $join->setJoinType($joinType);
+ $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
+ if ($previousJoin = $this->getPreviousJoin()) {
+ $join->setPreviousJoin($previousJoin);
+ }
+
+ // add the ModelJoin to the current object
+ if($relationAlias) {
+ $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
+ $this->addJoinObject($join, $relationAlias);
+ } else {
+ $this->addJoinObject($join, 'CcWebstream');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcWebstream relation CcWebstream object
+ *
+ * @see useQuery()
+ *
+ * @param string $relationAlias optional alias for the relation,
+ * to be used as main alias in the secondary query
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcWebstreamQuery A secondary query class using the current class as primary query
+ */
+ public function useCcWebstreamQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcWebstream($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcWebstream', 'CcWebstreamQuery');
+ }
+
/**
* Exclude object from result
*
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php
index 7bea16463..1caf7df62 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcShowInstances.php
@@ -1992,6 +1992,31 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
return $this->getCcSchedules($query, $con);
}
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcShowInstances is new, it will return
+ * an empty collection; or if this CcShowInstances has previously
+ * been saved, it will retrieve related CcSchedules from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in CcShowInstances.
+ *
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param PropelPDO $con optional connection object
+ * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
+ */
+ public function getCcSchedulesJoinCcWebstream($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcScheduleQuery::create(null, $criteria);
+ $query->joinWith('CcWebstream', $join_behavior);
+
+ return $this->getCcSchedules($query, $con);
+ }
+
/**
* Clears the current object and sets all attributes to their default values
*/
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php b/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php
index fa8359d84..3b25ce02f 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSubjs.php
@@ -108,11 +108,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
protected $login_attempts;
- /**
- * @var array CcAccess[] Collection to store aggregation of CcAccess objects.
- */
- protected $collCcAccesss;
-
/**
* @var array CcFiles[] Collection to store aggregation of CcFiles objects.
*/
@@ -826,8 +821,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
if ($deep) { // also de-associate any related objects?
- $this->collCcAccesss = null;
-
$this->collCcFiless = null;
$this->collCcPermss = null;
@@ -977,14 +970,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
- if ($this->collCcAccesss !== null) {
- foreach ($this->collCcAccesss as $referrerFK) {
- if (!$referrerFK->isDeleted()) {
- $affectedRows += $referrerFK->save($con);
- }
- }
- }
-
if ($this->collCcFiless !== null) {
foreach ($this->collCcFiless as $referrerFK) {
if (!$referrerFK->isDeleted()) {
@@ -1120,14 +1105,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
- if ($this->collCcAccesss !== null) {
- foreach ($this->collCcAccesss as $referrerFK) {
- if (!$referrerFK->validate($columns)) {
- $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
- }
- }
- }
-
if ($this->collCcFiless !== null) {
foreach ($this->collCcFiless as $referrerFK) {
if (!$referrerFK->validate($columns)) {
@@ -1510,12 +1487,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
// the getter/setter methods for fkey referrer objects.
$copyObj->setNew(false);
- foreach ($this->getCcAccesss() as $relObj) {
- if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
- $copyObj->addCcAccess($relObj->copy($deepCopy));
- }
- }
-
foreach ($this->getCcFiless() as $relObj) {
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
$copyObj->addCcFiles($relObj->copy($deepCopy));
@@ -1609,115 +1580,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
return self::$peer;
}
- /**
- * Clears out the collCcAccesss collection
- *
- * This does not modify the database; however, it will remove any associated objects, causing
- * them to be refetched by subsequent calls to accessor method.
- *
- * @return void
- * @see addCcAccesss()
- */
- public function clearCcAccesss()
- {
- $this->collCcAccesss = null; // important to set this to NULL since that means it is uninitialized
- }
-
- /**
- * Initializes the collCcAccesss collection.
- *
- * By default this just sets the collCcAccesss collection to an empty array (like clearcollCcAccesss());
- * however, you may wish to override this method in your stub class to provide setting appropriate
- * to your application -- for example, setting the initial array to the values stored in database.
- *
- * @return void
- */
- public function initCcAccesss()
- {
- $this->collCcAccesss = new PropelObjectCollection();
- $this->collCcAccesss->setModel('CcAccess');
- }
-
- /**
- * Gets an array of CcAccess objects which contain a foreign key that references this object.
- *
- * If the $criteria is not null, it is used to always fetch the results from the database.
- * Otherwise the results are fetched from the database the first time, then cached.
- * Next time the same method is called without $criteria, the cached collection is returned.
- * If this CcSubjs is new, it will return
- * an empty collection or the current collection; the criteria is ignored on a new object.
- *
- * @param Criteria $criteria optional Criteria object to narrow the query
- * @param PropelPDO $con optional connection object
- * @return PropelCollection|array CcAccess[] List of CcAccess objects
- * @throws PropelException
- */
- public function getCcAccesss($criteria = null, PropelPDO $con = null)
- {
- if(null === $this->collCcAccesss || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcAccesss) {
- // return empty collection
- $this->initCcAccesss();
- } else {
- $collCcAccesss = CcAccessQuery::create(null, $criteria)
- ->filterByCcSubjs($this)
- ->find($con);
- if (null !== $criteria) {
- return $collCcAccesss;
- }
- $this->collCcAccesss = $collCcAccesss;
- }
- }
- return $this->collCcAccesss;
- }
-
- /**
- * Returns the number of related CcAccess objects.
- *
- * @param Criteria $criteria
- * @param boolean $distinct
- * @param PropelPDO $con
- * @return int Count of related CcAccess objects.
- * @throws PropelException
- */
- public function countCcAccesss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
- {
- if(null === $this->collCcAccesss || null !== $criteria) {
- if ($this->isNew() && null === $this->collCcAccesss) {
- return 0;
- } else {
- $query = CcAccessQuery::create(null, $criteria);
- if($distinct) {
- $query->distinct();
- }
- return $query
- ->filterByCcSubjs($this)
- ->count($con);
- }
- } else {
- return count($this->collCcAccesss);
- }
- }
-
- /**
- * Method called to associate a CcAccess object to this object
- * through the CcAccess foreign key attribute.
- *
- * @param CcAccess $l CcAccess
- * @return void
- * @throws PropelException
- */
- public function addCcAccess(CcAccess $l)
- {
- if ($this->collCcAccesss === null) {
- $this->initCcAccesss();
- }
- if (!$this->collCcAccesss->contains($l)) { // only add it if the **same** object is not already associated
- $this->collCcAccesss[]= $l;
- $l->setCcSubjs($this);
- }
- }
-
/**
* Clears out the collCcFiless collection
*
@@ -2679,11 +2541,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
public function clearAllReferences($deep = false)
{
if ($deep) {
- if ($this->collCcAccesss) {
- foreach ((array) $this->collCcAccesss as $o) {
- $o->clearAllReferences($deep);
- }
- }
if ($this->collCcFiless) {
foreach ((array) $this->collCcFiless as $o) {
$o->clearAllReferences($deep);
@@ -2726,7 +2583,6 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
}
} // if ($deep)
- $this->collCcAccesss = null;
$this->collCcFiless = null;
$this->collCcPermss = null;
$this->collCcShowHostss = null;
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php
index d5af8835f..1bd561510 100644
--- a/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php
+++ b/airtime_mvc/application/models/airtime/om/BaseCcSubjsQuery.php
@@ -38,10 +38,6 @@
* @method CcSubjsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSubjsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
- * @method CcSubjsQuery leftJoinCcAccess($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcAccess relation
- * @method CcSubjsQuery rightJoinCcAccess($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcAccess relation
- * @method CcSubjsQuery innerJoinCcAccess($relationAlias = '') Adds a INNER JOIN clause to the query using the CcAccess relation
- *
* @method CcSubjsQuery leftJoinCcFiles($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFiles relation
* @method CcSubjsQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
* @method CcSubjsQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
@@ -521,70 +517,6 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
return $this->addUsingAlias(CcSubjsPeer::LOGIN_ATTEMPTS, $dbLoginAttempts, $comparison);
}
- /**
- * Filter the query by a related CcAccess object
- *
- * @param CcAccess $ccAccess the related object to use as filter
- * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
- *
- * @return CcSubjsQuery The current query, for fluid interface
- */
- public function filterByCcAccess($ccAccess, $comparison = null)
- {
- return $this
- ->addUsingAlias(CcSubjsPeer::ID, $ccAccess->getOwner(), $comparison);
- }
-
- /**
- * Adds a JOIN clause to the query using the CcAccess relation
- *
- * @param string $relationAlias optional alias for the relation
- * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
- *
- * @return CcSubjsQuery The current query, for fluid interface
- */
- public function joinCcAccess($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
- {
- $tableMap = $this->getTableMap();
- $relationMap = $tableMap->getRelation('CcAccess');
-
- // 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, 'CcAccess');
- }
-
- return $this;
- }
-
- /**
- * Use the CcAccess relation CcAccess 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 CcAccessQuery A secondary query class using the current class as primary query
- */
- public function useCcAccessQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
- {
- return $this
- ->joinCcAccess($relationAlias, $joinType)
- ->useQuery($relationAlias ? $relationAlias : 'CcAccess', 'CcAccessQuery');
- }
-
/**
* Filter the query by a related CcFiles object
*
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcWebstream.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstream.php
new file mode 100644
index 000000000..e61d5c24c
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstream.php
@@ -0,0 +1,1337 @@
+length = '00:00:00';
+ }
+
+ /**
+ * Initializes internal state of BaseCcWebstream object.
+ * @see applyDefaults()
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->applyDefaultValues();
+ }
+
+ /**
+ * Get the [id] column value.
+ *
+ * @return int
+ */
+ public function getDbId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * Get the [name] column value.
+ *
+ * @return string
+ */
+ public function getDbName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Get the [description] column value.
+ *
+ * @return string
+ */
+ public function getDbDescription()
+ {
+ return $this->description;
+ }
+
+ /**
+ * Get the [url] column value.
+ *
+ * @return string
+ */
+ public function getDbUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * Get the [length] column value.
+ *
+ * @return string
+ */
+ public function getDbLength()
+ {
+ return $this->length;
+ }
+
+ /**
+ * Get the [login] column value.
+ *
+ * @return string
+ */
+ public function getDbLogin()
+ {
+ return $this->login;
+ }
+
+ /**
+ * Get the [optionally formatted] temporal [mtime] column value.
+ *
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
+ * @throws PropelException - if unable to parse/validate the date/time value.
+ */
+ public function getDbMtime($format = 'Y-m-d H:i:s')
+ {
+ if ($this->mtime === null) {
+ return null;
+ }
+
+
+
+ try {
+ $dt = new DateTime($this->mtime);
+ } catch (Exception $x) {
+ throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->mtime, true), $x);
+ }
+
+ if ($format === null) {
+ // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
+ return $dt;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $dt->format('U'));
+ } else {
+ return $dt->format($format);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] temporal [utime] column value.
+ *
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the raw DateTime object will be returned.
+ * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
+ * @throws PropelException - if unable to parse/validate the date/time value.
+ */
+ public function getDbUtime($format = 'Y-m-d H:i:s')
+ {
+ if ($this->utime === null) {
+ return null;
+ }
+
+
+
+ try {
+ $dt = new DateTime($this->utime);
+ } catch (Exception $x) {
+ throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->utime, true), $x);
+ }
+
+ if ($format === null) {
+ // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
+ return $dt;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $dt->format('U'));
+ } else {
+ return $dt->format($format);
+ }
+ }
+
+ /**
+ * Set the value of [id] column.
+ *
+ * @param int $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbId($v)
+ {
+ if ($v !== null) {
+ $v = (int) $v;
+ }
+
+ if ($this->id !== $v) {
+ $this->id = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::ID;
+ }
+
+ return $this;
+ } // setDbId()
+
+ /**
+ * Set the value of [name] column.
+ *
+ * @param string $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbName($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->name !== $v) {
+ $this->name = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::NAME;
+ }
+
+ return $this;
+ } // setDbName()
+
+ /**
+ * Set the value of [description] column.
+ *
+ * @param string $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbDescription($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->description !== $v) {
+ $this->description = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::DESCRIPTION;
+ }
+
+ return $this;
+ } // setDbDescription()
+
+ /**
+ * Set the value of [url] column.
+ *
+ * @param string $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbUrl($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->url !== $v) {
+ $this->url = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::URL;
+ }
+
+ return $this;
+ } // setDbUrl()
+
+ /**
+ * Set the value of [length] column.
+ *
+ * @param string $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbLength($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->length !== $v || $this->isNew()) {
+ $this->length = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::LENGTH;
+ }
+
+ return $this;
+ } // setDbLength()
+
+ /**
+ * Set the value of [login] column.
+ *
+ * @param string $v new value
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbLogin($v)
+ {
+ if ($v !== null) {
+ $v = (string) $v;
+ }
+
+ if ($this->login !== $v) {
+ $this->login = $v;
+ $this->modifiedColumns[] = CcWebstreamPeer::LOGIN;
+ }
+
+ return $this;
+ } // setDbLogin()
+
+ /**
+ * Sets the value of [mtime] column to a normalized version of the date/time value specified.
+ *
+ * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
+ * be treated as NULL for temporal objects.
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbMtime($v)
+ {
+ // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
+ // -- which is unexpected, to say the least.
+ if ($v === null || $v === '') {
+ $dt = null;
+ } elseif ($v instanceof DateTime) {
+ $dt = $v;
+ } else {
+ // some string/numeric value passed; we normalize that so that we can
+ // validate it.
+ try {
+ if (is_numeric($v)) { // if it's a unix timestamp
+ $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
+ // We have to explicitly specify and then change the time zone because of a
+ // DateTime bug: http://bugs.php.net/bug.php?id=43003
+ $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
+ } else {
+ $dt = new DateTime($v);
+ }
+ } catch (Exception $x) {
+ throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
+ }
+ }
+
+ if ( $this->mtime !== null || $dt !== null ) {
+ // (nested ifs are a little easier to read in this case)
+
+ $currNorm = ($this->mtime !== null && $tmpDt = new DateTime($this->mtime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
+ $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
+
+ if ( ($currNorm !== $newNorm) // normalized values don't match
+ )
+ {
+ $this->mtime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
+ $this->modifiedColumns[] = CcWebstreamPeer::MTIME;
+ }
+ } // if either are not null
+
+ return $this;
+ } // setDbMtime()
+
+ /**
+ * Sets the value of [utime] column to a normalized version of the date/time value specified.
+ *
+ * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
+ * be treated as NULL for temporal objects.
+ * @return CcWebstream The current object (for fluent API support)
+ */
+ public function setDbUtime($v)
+ {
+ // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
+ // -- which is unexpected, to say the least.
+ if ($v === null || $v === '') {
+ $dt = null;
+ } elseif ($v instanceof DateTime) {
+ $dt = $v;
+ } else {
+ // some string/numeric value passed; we normalize that so that we can
+ // validate it.
+ try {
+ if (is_numeric($v)) { // if it's a unix timestamp
+ $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
+ // We have to explicitly specify and then change the time zone because of a
+ // DateTime bug: http://bugs.php.net/bug.php?id=43003
+ $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
+ } else {
+ $dt = new DateTime($v);
+ }
+ } catch (Exception $x) {
+ throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
+ }
+ }
+
+ if ( $this->utime !== null || $dt !== null ) {
+ // (nested ifs are a little easier to read in this case)
+
+ $currNorm = ($this->utime !== null && $tmpDt = new DateTime($this->utime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
+ $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
+
+ if ( ($currNorm !== $newNorm) // normalized values don't match
+ )
+ {
+ $this->utime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
+ $this->modifiedColumns[] = CcWebstreamPeer::UTIME;
+ }
+ } // if either are not null
+
+ return $this;
+ } // setDbUtime()
+
+ /**
+ * Indicates whether the columns in this object are only set to default values.
+ *
+ * This method can be used in conjunction with isModified() to indicate whether an object is both
+ * modified _and_ has some values set which are non-default.
+ *
+ * @return boolean Whether the columns in this object are only been set with default values.
+ */
+ public function hasOnlyDefaultValues()
+ {
+ if ($this->length !== '00:00:00') {
+ return false;
+ }
+
+ // otherwise, everything was equal, so return TRUE
+ return true;
+ } // hasOnlyDefaultValues()
+
+ /**
+ * Hydrates (populates) the object variables with values from the database resultset.
+ *
+ * An offset (0-based "start column") is specified so that objects can be hydrated
+ * with a subset of the columns in the resultset rows. This is needed, for example,
+ * for results of JOIN queries where the resultset row includes columns from two or
+ * more tables.
+ *
+ * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
+ * @param int $startcol 0-based offset column which indicates which restultset column to start with.
+ * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
+ * @return int next starting column
+ * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ */
+ public function hydrate($row, $startcol = 0, $rehydrate = false)
+ {
+ try {
+
+ $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
+ $this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
+ $this->description = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
+ $this->url = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
+ $this->length = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
+ $this->login = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
+ $this->mtime = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
+ $this->utime = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ if ($rehydrate) {
+ $this->ensureConsistency();
+ }
+
+ return $startcol + 8; // 8 = CcWebstreamPeer::NUM_COLUMNS - CcWebstreamPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating CcWebstream object", $e);
+ }
+ }
+
+ /**
+ * Checks and repairs the internal consistency of the object.
+ *
+ * This method is executed after an already-instantiated object is re-hydrated
+ * from the database. It exists to check any foreign keys to make sure that
+ * the objects related to the current object are correct based on foreign key.
+ *
+ * You can override this method in the stub class, but you should always invoke
+ * the base method from the overridden method (i.e. parent::ensureConsistency()),
+ * in case your model changes.
+ *
+ * @throws PropelException
+ */
+ public function ensureConsistency()
+ {
+
+ } // ensureConsistency
+
+ /**
+ * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
+ *
+ * This will only work if the object has been saved and has a valid primary key set.
+ *
+ * @param boolean $deep (optional) Whether to also de-associated any related objects.
+ * @param PropelPDO $con (optional) The PropelPDO connection to use.
+ * @return void
+ * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ */
+ public function reload($deep = false, PropelPDO $con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("Cannot reload a deleted object.");
+ }
+
+ if ($this->isNew()) {
+ throw new PropelException("Cannot reload an unsaved object.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ // We don't need to alter the object instance pool; we're just modifying this instance
+ // already in the pool.
+
+ $stmt = CcWebstreamPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
+ $row = $stmt->fetch(PDO::FETCH_NUM);
+ $stmt->closeCursor();
+ if (!$row) {
+ throw new PropelException('Cannot find matching row in the database to reload object values.');
+ }
+ $this->hydrate($row, 0, true); // rehydrate
+
+ if ($deep) { // also de-associate any related objects?
+
+ $this->collCcSchedules = null;
+
+ } // if (deep)
+ }
+
+ /**
+ * Removes this object from datastore and sets delete attribute.
+ *
+ * @param PropelPDO $con
+ * @return void
+ * @throws PropelException
+ * @see BaseObject::setDeleted()
+ * @see BaseObject::isDeleted()
+ */
+ public function delete(PropelPDO $con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("This object has already been deleted.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+
+ $con->beginTransaction();
+ try {
+ $ret = $this->preDelete($con);
+ if ($ret) {
+ CcWebstreamQuery::create()
+ ->filterByPrimaryKey($this->getPrimaryKey())
+ ->delete($con);
+ $this->postDelete($con);
+ $con->commit();
+ $this->setDeleted(true);
+ } else {
+ $con->commit();
+ }
+ } catch (PropelException $e) {
+ $con->rollBack();
+ throw $e;
+ }
+ }
+
+ /**
+ * Persists this object to the database.
+ *
+ * If the object is new, it inserts it; otherwise an update is performed.
+ * All modified related objects will also be persisted in the doSave()
+ * method. This method wraps all precipitate database operations in a
+ * single transaction.
+ *
+ * @param PropelPDO $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws PropelException
+ * @see doSave()
+ */
+ public function save(PropelPDO $con = null)
+ {
+ if ($this->isDeleted()) {
+ throw new PropelException("You cannot save an object that has been deleted.");
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+
+ $con->beginTransaction();
+ $isInsert = $this->isNew();
+ try {
+ $ret = $this->preSave($con);
+ if ($isInsert) {
+ $ret = $ret && $this->preInsert($con);
+ } else {
+ $ret = $ret && $this->preUpdate($con);
+ }
+ if ($ret) {
+ $affectedRows = $this->doSave($con);
+ if ($isInsert) {
+ $this->postInsert($con);
+ } else {
+ $this->postUpdate($con);
+ }
+ $this->postSave($con);
+ CcWebstreamPeer::addInstanceToPool($this);
+ } else {
+ $affectedRows = 0;
+ }
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollBack();
+ throw $e;
+ }
+ }
+
+ /**
+ * Performs the work of inserting or updating the row in the database.
+ *
+ * If the object is new, it inserts it; otherwise an update is performed.
+ * All related objects are also updated in this method.
+ *
+ * @param PropelPDO $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws PropelException
+ * @see save()
+ */
+ protected function doSave(PropelPDO $con)
+ {
+ $affectedRows = 0; // initialize var to track total num of affected rows
+ if (!$this->alreadyInSave) {
+ $this->alreadyInSave = true;
+
+ if ($this->isNew() ) {
+ $this->modifiedColumns[] = CcWebstreamPeer::ID;
+ }
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $criteria = $this->buildCriteria();
+ if ($criteria->keyContainsValue(CcWebstreamPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcWebstreamPeer::ID.')');
+ }
+
+ $pk = BasePeer::doInsert($criteria, $con);
+ $affectedRows = 1;
+ $this->setDbId($pk); //[IMV] update autoincrement primary key
+ $this->setNew(false);
+ } else {
+ $affectedRows = CcWebstreamPeer::doUpdate($this, $con);
+ }
+
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ if ($this->collCcSchedules !== null) {
+ foreach ($this->collCcSchedules as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ $this->alreadyInSave = false;
+
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass; array of ValidationFailed objets otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = CcWebstreamPeer::doValidate($this, $columns)) !== true) {
+ $failureMap = array_merge($failureMap, $retval);
+ }
+
+
+ if ($this->collCcSchedules !== null) {
+ foreach ($this->collCcSchedules as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+
+ $this->alreadyInValidation = false;
+ }
+
+ return (!empty($failureMap) ? $failureMap : true);
+ }
+
+ /**
+ * Retrieves a field from the object by name passed in as a string.
+ *
+ * @param string $name name
+ * @param string $type The type of fieldname the $name is of:
+ * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
+ * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
+ * @return mixed Value of field.
+ */
+ public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
+ {
+ $pos = CcWebstreamPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $field = $this->getByPosition($pos);
+ return $field;
+ }
+
+ /**
+ * Retrieves a field from the object by Position as specified in the xml schema.
+ * Zero-based.
+ *
+ * @param int $pos position in xml schema
+ * @return mixed Value of field at $pos
+ */
+ public function getByPosition($pos)
+ {
+ switch($pos) {
+ case 0:
+ return $this->getDbId();
+ break;
+ case 1:
+ return $this->getDbName();
+ break;
+ case 2:
+ return $this->getDbDescription();
+ break;
+ case 3:
+ return $this->getDbUrl();
+ break;
+ case 4:
+ return $this->getDbLength();
+ break;
+ case 5:
+ return $this->getDbLogin();
+ break;
+ case 6:
+ return $this->getDbMtime();
+ break;
+ case 7:
+ return $this->getDbUtime();
+ break;
+ default:
+ return null;
+ break;
+ } // switch()
+ }
+
+ /**
+ * Exports the object as an array.
+ *
+ * You can specify the key type of the array by passing one of the class
+ * type constants.
+ *
+ * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
+ * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
+ * Defaults to BasePeer::TYPE_PHPNAME.
+ * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
+ *
+ * @return array an associative array containing the field names (as keys) and field values
+ */
+ public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)
+ {
+ $keys = CcWebstreamPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getDbId(),
+ $keys[1] => $this->getDbName(),
+ $keys[2] => $this->getDbDescription(),
+ $keys[3] => $this->getDbUrl(),
+ $keys[4] => $this->getDbLength(),
+ $keys[5] => $this->getDbLogin(),
+ $keys[6] => $this->getDbMtime(),
+ $keys[7] => $this->getDbUtime(),
+ );
+ return $result;
+ }
+
+ /**
+ * Sets a field from the object by name passed in as a string.
+ *
+ * @param string $name peer name
+ * @param mixed $value field value
+ * @param string $type The type of fieldname the $name is of:
+ * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
+ * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
+ * @return void
+ */
+ public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
+ {
+ $pos = CcWebstreamPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ return $this->setByPosition($pos, $value);
+ }
+
+ /**
+ * Sets a field from the object by Position as specified in the xml schema.
+ * Zero-based.
+ *
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return void
+ */
+ public function setByPosition($pos, $value)
+ {
+ switch($pos) {
+ case 0:
+ $this->setDbId($value);
+ break;
+ case 1:
+ $this->setDbName($value);
+ break;
+ case 2:
+ $this->setDbDescription($value);
+ break;
+ case 3:
+ $this->setDbUrl($value);
+ break;
+ case 4:
+ $this->setDbLength($value);
+ break;
+ case 5:
+ $this->setDbLogin($value);
+ break;
+ case 6:
+ $this->setDbMtime($value);
+ break;
+ case 7:
+ $this->setDbUtime($value);
+ break;
+ } // switch()
+ }
+
+ /**
+ * Populates the object using an array.
+ *
+ * This is particularly useful when populating an object from one of the
+ * request arrays (e.g. $_POST). This method goes through the column
+ * names, checking to see whether a matching key exists in populated
+ * array. If so the setByName() method is called for that column.
+ *
+ * You can specify the key type of the array by additionally passing one
+ * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
+ * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
+ * The default key type is the column's phpname (e.g. 'AuthorId')
+ *
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return void
+ */
+ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
+ {
+ $keys = CcWebstreamPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
+ if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
+ if (array_key_exists($keys[2], $arr)) $this->setDbDescription($arr[$keys[2]]);
+ if (array_key_exists($keys[3], $arr)) $this->setDbUrl($arr[$keys[3]]);
+ if (array_key_exists($keys[4], $arr)) $this->setDbLength($arr[$keys[4]]);
+ if (array_key_exists($keys[5], $arr)) $this->setDbLogin($arr[$keys[5]]);
+ if (array_key_exists($keys[6], $arr)) $this->setDbMtime($arr[$keys[6]]);
+ if (array_key_exists($keys[7], $arr)) $this->setDbUtime($arr[$keys[7]]);
+ }
+
+ /**
+ * Build a Criteria object containing the values of all modified columns in this object.
+ *
+ * @return Criteria The Criteria object containing all modified values.
+ */
+ public function buildCriteria()
+ {
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(CcWebstreamPeer::ID)) $criteria->add(CcWebstreamPeer::ID, $this->id);
+ if ($this->isColumnModified(CcWebstreamPeer::NAME)) $criteria->add(CcWebstreamPeer::NAME, $this->name);
+ if ($this->isColumnModified(CcWebstreamPeer::DESCRIPTION)) $criteria->add(CcWebstreamPeer::DESCRIPTION, $this->description);
+ if ($this->isColumnModified(CcWebstreamPeer::URL)) $criteria->add(CcWebstreamPeer::URL, $this->url);
+ if ($this->isColumnModified(CcWebstreamPeer::LENGTH)) $criteria->add(CcWebstreamPeer::LENGTH, $this->length);
+ if ($this->isColumnModified(CcWebstreamPeer::LOGIN)) $criteria->add(CcWebstreamPeer::LOGIN, $this->login);
+ if ($this->isColumnModified(CcWebstreamPeer::MTIME)) $criteria->add(CcWebstreamPeer::MTIME, $this->mtime);
+ if ($this->isColumnModified(CcWebstreamPeer::UTIME)) $criteria->add(CcWebstreamPeer::UTIME, $this->utime);
+
+ return $criteria;
+ }
+
+ /**
+ * Builds a Criteria object containing the primary key for this object.
+ *
+ * Unlike buildCriteria() this method includes the primary key values regardless
+ * of whether or not they have been modified.
+ *
+ * @return Criteria The Criteria object containing value(s) for primary key(s).
+ */
+ public function buildPkeyCriteria()
+ {
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamPeer::ID, $this->id);
+
+ return $criteria;
+ }
+
+ /**
+ * Returns the primary key for this object (row).
+ * @return int
+ */
+ public function getPrimaryKey()
+ {
+ return $this->getDbId();
+ }
+
+ /**
+ * Generic method to set the primary key (id column).
+ *
+ * @param int $key Primary key.
+ * @return void
+ */
+ public function setPrimaryKey($key)
+ {
+ $this->setDbId($key);
+ }
+
+ /**
+ * Returns true if the primary key for this object is null.
+ * @return boolean
+ */
+ public function isPrimaryKeyNull()
+ {
+ return null === $this->getDbId();
+ }
+
+ /**
+ * Sets contents of passed object to values from current object.
+ *
+ * If desired, this method can also make copies of all associated (fkey referrers)
+ * objects.
+ *
+ * @param object $copyObj An object of CcWebstream (or compatible) type.
+ * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @throws PropelException
+ */
+ public function copyInto($copyObj, $deepCopy = false)
+ {
+ $copyObj->setDbName($this->name);
+ $copyObj->setDbDescription($this->description);
+ $copyObj->setDbUrl($this->url);
+ $copyObj->setDbLength($this->length);
+ $copyObj->setDbLogin($this->login);
+ $copyObj->setDbMtime($this->mtime);
+ $copyObj->setDbUtime($this->utime);
+
+ if ($deepCopy) {
+ // important: temporarily setNew(false) because this affects the behavior of
+ // the getter/setter methods for fkey referrer objects.
+ $copyObj->setNew(false);
+
+ foreach ($this->getCcSchedules() as $relObj) {
+ if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
+ $copyObj->addCcSchedule($relObj->copy($deepCopy));
+ }
+ }
+
+ } // if ($deepCopy)
+
+
+ $copyObj->setNew(true);
+ $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
+ }
+
+ /**
+ * Makes a copy of this object that will be inserted as a new row in table when saved.
+ * It creates a new object filling in the simple attributes, but skipping any primary
+ * keys that are defined for the table.
+ *
+ * If desired, this method can also make copies of all associated (fkey referrers)
+ * objects.
+ *
+ * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @return CcWebstream Clone of current object.
+ * @throws PropelException
+ */
+ public function copy($deepCopy = false)
+ {
+ // we use get_class(), because this might be a subclass
+ $clazz = get_class($this);
+ $copyObj = new $clazz();
+ $this->copyInto($copyObj, $deepCopy);
+ return $copyObj;
+ }
+
+ /**
+ * Returns a peer instance associated with this om.
+ *
+ * Since Peer classes are not to have any instance attributes, this method returns the
+ * same instance for all member of this class. The method could therefore
+ * be static, but this would prevent one from overriding the behavior.
+ *
+ * @return CcWebstreamPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new CcWebstreamPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Clears out the collCcSchedules collection
+ *
+ * This does not modify the database; however, it will remove any associated objects, causing
+ * them to be refetched by subsequent calls to accessor method.
+ *
+ * @return void
+ * @see addCcSchedules()
+ */
+ public function clearCcSchedules()
+ {
+ $this->collCcSchedules = null; // important to set this to NULL since that means it is uninitialized
+ }
+
+ /**
+ * Initializes the collCcSchedules collection.
+ *
+ * By default this just sets the collCcSchedules collection to an empty array (like clearcollCcSchedules());
+ * however, you may wish to override this method in your stub class to provide setting appropriate
+ * to your application -- for example, setting the initial array to the values stored in database.
+ *
+ * @return void
+ */
+ public function initCcSchedules()
+ {
+ $this->collCcSchedules = new PropelObjectCollection();
+ $this->collCcSchedules->setModel('CcSchedule');
+ }
+
+ /**
+ * Gets an array of CcSchedule objects which contain a foreign key that references this object.
+ *
+ * If the $criteria is not null, it is used to always fetch the results from the database.
+ * Otherwise the results are fetched from the database the first time, then cached.
+ * Next time the same method is called without $criteria, the cached collection is returned.
+ * If this CcWebstream is new, it will return
+ * an empty collection or the current collection; the criteria is ignored on a new object.
+ *
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param PropelPDO $con optional connection object
+ * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
+ * @throws PropelException
+ */
+ public function getCcSchedules($criteria = null, PropelPDO $con = null)
+ {
+ if(null === $this->collCcSchedules || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcSchedules) {
+ // return empty collection
+ $this->initCcSchedules();
+ } else {
+ $collCcSchedules = CcScheduleQuery::create(null, $criteria)
+ ->filterByCcWebstream($this)
+ ->find($con);
+ if (null !== $criteria) {
+ return $collCcSchedules;
+ }
+ $this->collCcSchedules = $collCcSchedules;
+ }
+ }
+ return $this->collCcSchedules;
+ }
+
+ /**
+ * Returns the number of related CcSchedule objects.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param PropelPDO $con
+ * @return int Count of related CcSchedule objects.
+ * @throws PropelException
+ */
+ public function countCcSchedules(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
+ {
+ if(null === $this->collCcSchedules || null !== $criteria) {
+ if ($this->isNew() && null === $this->collCcSchedules) {
+ return 0;
+ } else {
+ $query = CcScheduleQuery::create(null, $criteria);
+ if($distinct) {
+ $query->distinct();
+ }
+ return $query
+ ->filterByCcWebstream($this)
+ ->count($con);
+ }
+ } else {
+ return count($this->collCcSchedules);
+ }
+ }
+
+ /**
+ * Method called to associate a CcSchedule object to this object
+ * through the CcSchedule foreign key attribute.
+ *
+ * @param CcSchedule $l CcSchedule
+ * @return void
+ * @throws PropelException
+ */
+ public function addCcSchedule(CcSchedule $l)
+ {
+ if ($this->collCcSchedules === null) {
+ $this->initCcSchedules();
+ }
+ if (!$this->collCcSchedules->contains($l)) { // only add it if the **same** object is not already associated
+ $this->collCcSchedules[]= $l;
+ $l->setCcWebstream($this);
+ }
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcWebstream is new, it will return
+ * an empty collection; or if this CcWebstream has previously
+ * been saved, it will retrieve related CcSchedules from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in CcWebstream.
+ *
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param PropelPDO $con optional connection object
+ * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
+ */
+ public function getCcSchedulesJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcScheduleQuery::create(null, $criteria);
+ $query->joinWith('CcShowInstances', $join_behavior);
+
+ return $this->getCcSchedules($query, $con);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this CcWebstream is new, it will return
+ * an empty collection; or if this CcWebstream has previously
+ * been saved, it will retrieve related CcSchedules from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in CcWebstream.
+ *
+ * @param Criteria $criteria optional Criteria object to narrow the query
+ * @param PropelPDO $con optional connection object
+ * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
+ * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
+ */
+ public function getCcSchedulesJoinCcFiles($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
+ {
+ $query = CcScheduleQuery::create(null, $criteria);
+ $query->joinWith('CcFiles', $join_behavior);
+
+ return $this->getCcSchedules($query, $con);
+ }
+
+ /**
+ * Clears the current object and sets all attributes to their default values
+ */
+ public function clear()
+ {
+ $this->id = null;
+ $this->name = null;
+ $this->description = null;
+ $this->url = null;
+ $this->length = null;
+ $this->login = null;
+ $this->mtime = null;
+ $this->utime = null;
+ $this->alreadyInSave = false;
+ $this->alreadyInValidation = false;
+ $this->clearAllReferences();
+ $this->applyDefaultValues();
+ $this->resetModified();
+ $this->setNew(true);
+ $this->setDeleted(false);
+ }
+
+ /**
+ * Resets all collections of referencing foreign keys.
+ *
+ * This method is a user-space workaround for PHP's inability to garbage collect objects
+ * with circular references. This is currently necessary when using Propel in certain
+ * daemon or large-volumne/high-memory operations.
+ *
+ * @param boolean $deep Whether to also clear the references on all associated objects.
+ */
+ public function clearAllReferences($deep = false)
+ {
+ if ($deep) {
+ if ($this->collCcSchedules) {
+ foreach ((array) $this->collCcSchedules as $o) {
+ $o->clearAllReferences($deep);
+ }
+ }
+ } // if ($deep)
+
+ $this->collCcSchedules = null;
+ }
+
+ /**
+ * Catches calls to virtual methods
+ */
+ public function __call($name, $params)
+ {
+ if (preg_match('/get(\w+)/', $name, $matches)) {
+ $virtualColumn = $matches[1];
+ if ($this->hasVirtualColumn($virtualColumn)) {
+ return $this->getVirtualColumn($virtualColumn);
+ }
+ // no lcfirst in php<5.3...
+ $virtualColumn[0] = strtolower($virtualColumn[0]);
+ if ($this->hasVirtualColumn($virtualColumn)) {
+ return $this->getVirtualColumn($virtualColumn);
+ }
+ }
+ throw new PropelException('Call to undefined method: ' . $name);
+ }
+
+} // BaseCcWebstream
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcWebstreamPeer.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamPeer.php
new file mode 100644
index 000000000..feba2bc19
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamPeer.php
@@ -0,0 +1,772 @@
+ array ('DbId', 'DbName', 'DbDescription', 'DbUrl', 'DbLength', 'DbLogin', 'DbMtime', 'DbUtime', ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbDescription', 'dbUrl', 'dbLength', 'dbLogin', 'dbMtime', 'dbUtime', ),
+ BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::DESCRIPTION, self::URL, self::LENGTH, self::LOGIN, self::MTIME, self::UTIME, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'DESCRIPTION', 'URL', 'LENGTH', 'LOGIN', 'MTIME', 'UTIME', ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'description', 'url', 'length', 'login', 'mtime', 'utime', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ );
+
+ /**
+ * holds an array of keys for quick access to the fieldnames array
+ *
+ * first dimension keys are the type constants
+ * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
+ */
+ private static $fieldKeys = array (
+ BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbDescription' => 2, 'DbUrl' => 3, 'DbLength' => 4, 'DbLogin' => 5, 'DbMtime' => 6, 'DbUtime' => 7, ),
+ BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbDescription' => 2, 'dbUrl' => 3, 'dbLength' => 4, 'dbLogin' => 5, 'dbMtime' => 6, 'dbUtime' => 7, ),
+ BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::DESCRIPTION => 2, self::URL => 3, self::LENGTH => 4, self::LOGIN => 5, self::MTIME => 6, self::UTIME => 7, ),
+ BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'DESCRIPTION' => 2, 'URL' => 3, 'LENGTH' => 4, 'LOGIN' => 5, 'MTIME' => 6, 'UTIME' => 7, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'description' => 2, 'url' => 3, 'length' => 4, 'login' => 5, 'mtime' => 6, 'utime' => 7, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ );
+
+ /**
+ * Translates a fieldname to another type
+ *
+ * @param string $name field name
+ * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
+ * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
+ * @param string $toType One of the class type constants
+ * @return string translated name of the field.
+ * @throws PropelException - if the specified name could not be found in the fieldname mappings.
+ */
+ static public function translateFieldName($name, $fromType, $toType)
+ {
+ $toNames = self::getFieldNames($toType);
+ $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
+ if ($key === null) {
+ throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
+ }
+ return $toNames[$key];
+ }
+
+ /**
+ * Returns an array of field names.
+ *
+ * @param string $type The type of fieldnames to return:
+ * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
+ * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
+ * @return array A list of field names
+ */
+
+ static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
+ {
+ if (!array_key_exists($type, self::$fieldNames)) {
+ throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.');
+ }
+ return self::$fieldNames[$type];
+ }
+
+ /**
+ * Convenience method which changes table.column to alias.column.
+ *
+ * Using this method you can maintain SQL abstraction while using column aliases.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. CcWebstreamPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(CcWebstreamPeer::TABLE_NAME.'.', $alias.'.', $column);
+ }
+
+ /**
+ * Add all the columns needed to create a new object.
+ *
+ * Note: any columns that were marked with lazyLoad="true" in the
+ * XML schema will not be added to the select list and only loaded
+ * on demand.
+ *
+ * @param Criteria $criteria object containing the columns to add.
+ * @param string $alias optional table alias
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function addSelectColumns(Criteria $criteria, $alias = null)
+ {
+ if (null === $alias) {
+ $criteria->addSelectColumn(CcWebstreamPeer::ID);
+ $criteria->addSelectColumn(CcWebstreamPeer::NAME);
+ $criteria->addSelectColumn(CcWebstreamPeer::DESCRIPTION);
+ $criteria->addSelectColumn(CcWebstreamPeer::URL);
+ $criteria->addSelectColumn(CcWebstreamPeer::LENGTH);
+ $criteria->addSelectColumn(CcWebstreamPeer::LOGIN);
+ $criteria->addSelectColumn(CcWebstreamPeer::MTIME);
+ $criteria->addSelectColumn(CcWebstreamPeer::UTIME);
+ } else {
+ $criteria->addSelectColumn($alias . '.ID');
+ $criteria->addSelectColumn($alias . '.NAME');
+ $criteria->addSelectColumn($alias . '.DESCRIPTION');
+ $criteria->addSelectColumn($alias . '.URL');
+ $criteria->addSelectColumn($alias . '.LENGTH');
+ $criteria->addSelectColumn($alias . '.LOGIN');
+ $criteria->addSelectColumn($alias . '.MTIME');
+ $criteria->addSelectColumn($alias . '.UTIME');
+ }
+ }
+
+ /**
+ * Returns the number of rows matching criteria.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
+ * @param PropelPDO $con
+ * @return int Number of matching rows.
+ */
+ public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
+ {
+ // we may 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(CcWebstreamPeer::TABLE_NAME);
+
+ if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+ $criteria->setDistinct();
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ CcWebstreamPeer::addSelectColumns($criteria);
+ }
+
+ $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
+ $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+ // BasePeer returns a PDOStatement
+ $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;
+ }
+ /**
+ * Method to select one object from the DB.
+ *
+ * @param Criteria $criteria object used to create the SELECT statement.
+ * @param PropelPDO $con
+ * @return CcWebstream
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
+ {
+ $critcopy = clone $criteria;
+ $critcopy->setLimit(1);
+ $objects = CcWebstreamPeer::doSelect($critcopy, $con);
+ if ($objects) {
+ return $objects[0];
+ }
+ return null;
+ }
+ /**
+ * Method to do selects.
+ *
+ * @param Criteria $criteria The Criteria object used to build the SELECT statement.
+ * @param PropelPDO $con
+ * @return array Array of selected Objects
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelect(Criteria $criteria, PropelPDO $con = null)
+ {
+ return CcWebstreamPeer::populateObjects(CcWebstreamPeer::doSelectStmt($criteria, $con));
+ }
+ /**
+ * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
+ *
+ * Use this method directly if you want to work with an executed statement durirectly (for example
+ * to perform your own object hydration).
+ *
+ * @param Criteria $criteria The Criteria object used to build the SELECT statement.
+ * @param PropelPDO $con The connection to use
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ * @return PDOStatement The executed PDOStatement object.
+ * @see BasePeer::doSelect()
+ */
+ public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ if (!$criteria->hasSelectClause()) {
+ $criteria = clone $criteria;
+ CcWebstreamPeer::addSelectColumns($criteria);
+ }
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ // BasePeer returns a PDOStatement
+ return BasePeer::doSelect($criteria, $con);
+ }
+ /**
+ * Adds an object to the instance pool.
+ *
+ * Propel keeps cached copies of objects in an instance pool when they are retrieved
+ * from the database. In some cases -- especially when you override doSelect*()
+ * methods in your stub classes -- you may need to explicitly add objects
+ * to the cache in order to ensure that the same objects are always returned by doSelect*()
+ * and retrieveByPK*() calls.
+ *
+ * @param CcWebstream $value A CcWebstream object.
+ * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
+ */
+ public static function addInstanceToPool(CcWebstream $obj, $key = null)
+ {
+ if (Propel::isInstancePoolingEnabled()) {
+ if ($key === null) {
+ $key = (string) $obj->getDbId();
+ } // if key === null
+ self::$instances[$key] = $obj;
+ }
+ }
+
+ /**
+ * Removes an object from the instance pool.
+ *
+ * Propel keeps cached copies of objects in an instance pool when they are retrieved
+ * from the database. In some cases -- especially when you override doDelete
+ * methods in your stub classes -- you may need to explicitly remove objects
+ * from the cache in order to prevent returning objects that no longer exist.
+ *
+ * @param mixed $value A CcWebstream object or a primary key value.
+ */
+ public static function removeInstanceFromPool($value)
+ {
+ if (Propel::isInstancePoolingEnabled() && $value !== null) {
+ if (is_object($value) && $value instanceof CcWebstream) {
+ $key = (string) $value->getDbId();
+ } elseif (is_scalar($value)) {
+ // assume we've been passed a primary key
+ $key = (string) $value;
+ } else {
+ $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcWebstream object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
+ throw $e;
+ }
+
+ unset(self::$instances[$key]);
+ }
+ } // removeInstanceFromPool()
+
+ /**
+ * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
+ *
+ * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
+ * a multi-column primary key, a serialize()d version of the primary key will be returned.
+ *
+ * @param string $key The key (@see getPrimaryKeyHash()) for this instance.
+ * @return CcWebstream Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
+ * @see getPrimaryKeyHash()
+ */
+ public static function getInstanceFromPool($key)
+ {
+ if (Propel::isInstancePoolingEnabled()) {
+ if (isset(self::$instances[$key])) {
+ return self::$instances[$key];
+ }
+ }
+ return null; // just to be explicit
+ }
+
+ /**
+ * Clear the instance pool.
+ *
+ * @return void
+ */
+ public static function clearInstancePool()
+ {
+ self::$instances = array();
+ }
+
+ /**
+ * Method to invalidate the instance pool of all tables related to cc_webstream
+ * by a foreign key with ON DELETE CASCADE
+ */
+ public static function clearRelatedInstancePool()
+ {
+ // Invalidate objects in CcSchedulePeer instance pool,
+ // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
+ CcSchedulePeer::clearInstancePool();
+ }
+
+ /**
+ * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
+ *
+ * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
+ * a multi-column primary key, a serialize()d version of the primary key will be returned.
+ *
+ * @param array $row PropelPDO resultset row.
+ * @param int $startcol The 0-based offset for reading from the resultset row.
+ * @return string A string version of PK or NULL if the components of primary key in result array are all null.
+ */
+ public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
+ {
+ // If the PK cannot be derived from the row, return NULL.
+ if ($row[$startcol] === null) {
+ return null;
+ }
+ return (string) $row[$startcol];
+ }
+
+ /**
+ * Retrieves the primary key from the DB resultset row
+ * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
+ * a multi-column primary key, an array of the primary key columns will be returned.
+ *
+ * @param array $row PropelPDO resultset row.
+ * @param int $startcol The 0-based offset for reading from the resultset row.
+ * @return mixed The primary key of the row
+ */
+ public static function getPrimaryKeyFromRow($row, $startcol = 0)
+ {
+ return (int) $row[$startcol];
+ }
+
+ /**
+ * The returned array will contain objects of the default type or
+ * objects that inherit from the default.
+ *
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function populateObjects(PDOStatement $stmt)
+ {
+ $results = array();
+
+ // set the class once to avoid overhead in the loop
+ $cls = CcWebstreamPeer::getOMClass(false);
+ // populate the object(s)
+ while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
+ $key = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, 0);
+ if (null !== ($obj = CcWebstreamPeer::getInstanceFromPool($key))) {
+ // We no longer rehydrate the object, since this can cause data loss.
+ // See http://www.propelorm.org/ticket/509
+ // $obj->hydrate($row, 0, true); // rehydrate
+ $results[] = $obj;
+ } else {
+ $obj = new $cls();
+ $obj->hydrate($row);
+ $results[] = $obj;
+ CcWebstreamPeer::addInstanceToPool($obj, $key);
+ } // if key exists
+ }
+ $stmt->closeCursor();
+ return $results;
+ }
+ /**
+ * Populates an object of the default type or an object that inherit from the default.
+ *
+ * @param array $row PropelPDO resultset row.
+ * @param int $startcol The 0-based offset for reading from the resultset row.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ * @return array (CcWebstream object, last column rank)
+ */
+ public static function populateObject($row, $startcol = 0)
+ {
+ $key = CcWebstreamPeer::getPrimaryKeyHashFromRow($row, $startcol);
+ if (null !== ($obj = CcWebstreamPeer::getInstanceFromPool($key))) {
+ // We no longer rehydrate the object, since this can cause data loss.
+ // See http://www.propelorm.org/ticket/509
+ // $obj->hydrate($row, $startcol, true); // rehydrate
+ $col = $startcol + CcWebstreamPeer::NUM_COLUMNS;
+ } else {
+ $cls = CcWebstreamPeer::OM_CLASS;
+ $obj = new $cls();
+ $col = $obj->hydrate($row, $startcol);
+ CcWebstreamPeer::addInstanceToPool($obj, $key);
+ }
+ return array($obj, $col);
+ }
+ /**
+ * Returns the TableMap related to this peer.
+ * This method is not needed for general use but a specific application could have a need.
+ * @return TableMap
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function getTableMap()
+ {
+ return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
+ }
+
+ /**
+ * Add a TableMap instance to the database for this peer class.
+ */
+ public static function buildTableMap()
+ {
+ $dbMap = Propel::getDatabaseMap(BaseCcWebstreamPeer::DATABASE_NAME);
+ if (!$dbMap->hasTable(BaseCcWebstreamPeer::TABLE_NAME))
+ {
+ $dbMap->addTableObject(new CcWebstreamTableMap());
+ }
+ }
+
+ /**
+ * The class that the Peer will make instances of.
+ *
+ * If $withPrefix is true, the returned path
+ * uses a dot-path notation which is tranalted into a path
+ * relative to a location on the PHP include_path.
+ * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
+ *
+ * @param boolean $withPrefix Whether or not to return the path with the class name
+ * @return string path.to.ClassName
+ */
+ public static function getOMClass($withPrefix = true)
+ {
+ return $withPrefix ? CcWebstreamPeer::CLASS_DEFAULT : CcWebstreamPeer::OM_CLASS;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a CcWebstream or Criteria object.
+ *
+ * @param mixed $values Criteria or CcWebstream object containing data that is used to create the INSERT statement.
+ * @param PropelPDO $con the PropelPDO connection to use
+ * @return mixed The new primary key.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doInsert($values, PropelPDO $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } else {
+ $criteria = $values->buildCriteria(); // build Criteria from CcWebstream object
+ }
+
+ if ($criteria->containsKey(CcWebstreamPeer::ID) && $criteria->keyContainsValue(CcWebstreamPeer::ID) ) {
+ throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcWebstreamPeer::ID.')');
+ }
+
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ try {
+ // use transaction because $criteria could contain info
+ // for more than one table (I guess, conceivably)
+ $con->beginTransaction();
+ $pk = BasePeer::doInsert($criteria, $con);
+ $con->commit();
+ } catch(PropelException $e) {
+ $con->rollBack();
+ throw $e;
+ }
+
+ return $pk;
+ }
+
+ /**
+ * Method perform an UPDATE on the database, given a CcWebstream or Criteria object.
+ *
+ * @param mixed $values Criteria or CcWebstream object containing data that is used to create the UPDATE statement.
+ * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
+ * @return int The number of affected rows (if supported by underlying database driver).
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doUpdate($values, PropelPDO $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+
+ $selectCriteria = new Criteria(self::DATABASE_NAME);
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+
+ $comparison = $criteria->getComparison(CcWebstreamPeer::ID);
+ $value = $criteria->remove(CcWebstreamPeer::ID);
+ if ($value) {
+ $selectCriteria->add(CcWebstreamPeer::ID, $value, $comparison);
+ } else {
+ $selectCriteria->setPrimaryTableName(CcWebstreamPeer::TABLE_NAME);
+ }
+
+ } else { // $values is CcWebstream object
+ $criteria = $values->buildCriteria(); // gets full criteria
+ $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
+ }
+
+ // set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ return BasePeer::doUpdate($selectCriteria, $criteria, $con);
+ }
+
+ /**
+ * Method to DELETE all rows from the cc_webstream table.
+ *
+ * @return int The number of affected rows (if supported by underlying database driver).
+ */
+ public static function doDeleteAll($con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+ $affectedRows = 0; // initialize var to track total num of affected rows
+ try {
+ // use transaction because $criteria could contain info
+ // for more than one table or we could emulating ON DELETE CASCADE, etc.
+ $con->beginTransaction();
+ $affectedRows += BasePeer::doDeleteAll(CcWebstreamPeer::TABLE_NAME, $con, CcWebstreamPeer::DATABASE_NAME);
+ // Because this db requires some delete cascade/set null emulation, we have to
+ // clear the cached instance *after* the emulation has happened (since
+ // instances get re-added by the select statement contained therein).
+ CcWebstreamPeer::clearInstancePool();
+ CcWebstreamPeer::clearRelatedInstancePool();
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollBack();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a CcWebstream or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or CcWebstream object or primary key or array of primary keys
+ * which is used to create the DELETE statement
+ * @param PropelPDO $con the connection to use
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * if supported by native driver or if emulated using Propel.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doDelete($values, PropelPDO $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
+ }
+
+ if ($values instanceof Criteria) {
+ // invalidate the cache for all objects of this type, since we have no
+ // way of knowing (without running a query) what objects should be invalidated
+ // from the cache based on this Criteria.
+ CcWebstreamPeer::clearInstancePool();
+ // rename for clarity
+ $criteria = clone $values;
+ } elseif ($values instanceof CcWebstream) { // it's a model object
+ // invalidate the cache for this single object
+ CcWebstreamPeer::removeInstanceFromPool($values);
+ // create criteria based on pk values
+ $criteria = $values->buildPkeyCriteria();
+ } else { // it's a primary key, or an array of pks
+ $criteria = new Criteria(self::DATABASE_NAME);
+ $criteria->add(CcWebstreamPeer::ID, (array) $values, Criteria::IN);
+ // invalidate the cache for this object(s)
+ foreach ((array) $values as $singleval) {
+ CcWebstreamPeer::removeInstanceFromPool($singleval);
+ }
+ }
+
+ // Set the correct dbName
+ $criteria->setDbName(self::DATABASE_NAME);
+
+ $affectedRows = 0; // initialize var to track total num of affected rows
+
+ try {
+ // use transaction because $criteria could contain info
+ // for more than one table or we could emulating ON DELETE CASCADE, etc.
+ $con->beginTransaction();
+
+ $affectedRows += BasePeer::doDelete($criteria, $con);
+ CcWebstreamPeer::clearRelatedInstancePool();
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollBack();
+ throw $e;
+ }
+ }
+
+ /**
+ * Validates all modified columns of given CcWebstream object.
+ * If parameter $columns is either a single column name or an array of column names
+ * than only those columns are validated.
+ *
+ * NOTICE: This does not apply to primary or foreign keys for now.
+ *
+ * @param CcWebstream $obj The object to validate.
+ * @param mixed $cols Column name or array of column names.
+ *
+ * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
+ */
+ public static function doValidate(CcWebstream $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(CcWebstreamPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(CcWebstreamPeer::TABLE_NAME);
+
+ if (! is_array($cols)) {
+ $cols = array($cols);
+ }
+
+ foreach ($cols as $colName) {
+ if ($tableMap->containsColumn($colName)) {
+ $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
+ $columns[$colName] = $obj->$get();
+ }
+ }
+ } else {
+
+ }
+
+ return BasePeer::doValidate(CcWebstreamPeer::DATABASE_NAME, CcWebstreamPeer::TABLE_NAME, $columns);
+ }
+
+ /**
+ * Retrieve a single object by pkey.
+ *
+ * @param int $pk the primary key.
+ * @param PropelPDO $con the connection to use
+ * @return CcWebstream
+ */
+ public static function retrieveByPK($pk, PropelPDO $con = null)
+ {
+
+ if (null !== ($obj = CcWebstreamPeer::getInstanceFromPool((string) $pk))) {
+ return $obj;
+ }
+
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamPeer::ID, $pk);
+
+ $v = CcWebstreamPeer::doSelect($criteria, $con);
+
+ return !empty($v) > 0 ? $v[0] : null;
+ }
+
+ /**
+ * Retrieve multiple objects by pkey.
+ *
+ * @param array $pks List of primary keys
+ * @param PropelPDO $con the connection to use
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function retrieveByPKs($pks, PropelPDO $con = null)
+ {
+ if ($con === null) {
+ $con = Propel::getConnection(CcWebstreamPeer::DATABASE_NAME, Propel::CONNECTION_READ);
+ }
+
+ $objs = null;
+ if (empty($pks)) {
+ $objs = array();
+ } else {
+ $criteria = new Criteria(CcWebstreamPeer::DATABASE_NAME);
+ $criteria->add(CcWebstreamPeer::ID, $pks, Criteria::IN);
+ $objs = CcWebstreamPeer::doSelect($criteria, $con);
+ }
+ return $objs;
+ }
+
+} // BaseCcWebstreamPeer
+
+// This is the static code needed to register the TableMap for this table with the main Propel class.
+//
+BaseCcWebstreamPeer::buildTableMap();
+
diff --git a/airtime_mvc/application/models/airtime/om/BaseCcWebstreamQuery.php b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamQuery.php
new file mode 100644
index 000000000..3fcec705c
--- /dev/null
+++ b/airtime_mvc/application/models/airtime/om/BaseCcWebstreamQuery.php
@@ -0,0 +1,433 @@
+setModelAlias($modelAlias);
+ }
+ if ($criteria instanceof Criteria) {
+ $query->mergeWith($criteria);
+ }
+ return $query;
+ }
+
+ /**
+ * Find object by primary key
+ * Use instance pooling to avoid a database query if the object exists
+ *
+ * $obj = $c->findPk(12, $con);
+ *
+ * @param mixed $key Primary key to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return CcWebstream|array|mixed the result, formatted by the current formatter
+ */
+ public function findPk($key, $con = null)
+ {
+ if ((null !== ($obj = CcWebstreamPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
+ // the object is alredy in the instance pool
+ return $obj;
+ } else {
+ // the object has not been requested yet, or the formatter is not an object formatter
+ $criteria = $this->isKeepQuery() ? clone $this : $this;
+ $stmt = $criteria
+ ->filterByPrimaryKey($key)
+ ->getSelectStatement($con);
+ return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
+ }
+ }
+
+ /**
+ * Find objects by primary key
+ *
+ * $objs = $c->findPks(array(12, 56, 832), $con);
+ *
+ * @param array $keys Primary keys to use for the query
+ * @param PropelPDO $con an optional connection object
+ *
+ * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
+ */
+ public function findPks($keys, $con = null)
+ {
+ $criteria = $this->isKeepQuery() ? clone $this : $this;
+ return $this
+ ->filterByPrimaryKeys($keys)
+ ->find($con);
+ }
+
+ /**
+ * Filter the query by primary key
+ *
+ * @param mixed $key Primary key to use for the query
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKey($key)
+ {
+ return $this->addUsingAlias(CcWebstreamPeer::ID, $key, Criteria::EQUAL);
+ }
+
+ /**
+ * Filter the query by a list of primary keys
+ *
+ * @param array $keys The list of primary key to use for the query
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByPrimaryKeys($keys)
+ {
+ return $this->addUsingAlias(CcWebstreamPeer::ID, $keys, Criteria::IN);
+ }
+
+ /**
+ * Filter the query on the id column
+ *
+ * @param int|array $dbId The value to use as filter.
+ * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbId($dbId = null, $comparison = null)
+ {
+ if (is_array($dbId) && null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::ID, $dbId, $comparison);
+ }
+
+ /**
+ * Filter the query on the name column
+ *
+ * @param string $dbName The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbName($dbName = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbName)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbName)) {
+ $dbName = str_replace('*', '%', $dbName);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::NAME, $dbName, $comparison);
+ }
+
+ /**
+ * Filter the query on the description column
+ *
+ * @param string $dbDescription The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbDescription($dbDescription = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbDescription)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbDescription)) {
+ $dbDescription = str_replace('*', '%', $dbDescription);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::DESCRIPTION, $dbDescription, $comparison);
+ }
+
+ /**
+ * Filter the query on the url column
+ *
+ * @param string $dbUrl The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbUrl($dbUrl = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbUrl)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbUrl)) {
+ $dbUrl = str_replace('*', '%', $dbUrl);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::URL, $dbUrl, $comparison);
+ }
+
+ /**
+ * Filter the query on the length column
+ *
+ * @param string $dbLength The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbLength($dbLength = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbLength)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbLength)) {
+ $dbLength = str_replace('*', '%', $dbLength);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::LENGTH, $dbLength, $comparison);
+ }
+
+ /**
+ * Filter the query on the login column
+ *
+ * @param string $dbLogin The value to use as filter.
+ * Accepts wildcards (* and % trigger a LIKE)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbLogin($dbLogin = null, $comparison = null)
+ {
+ if (null === $comparison) {
+ if (is_array($dbLogin)) {
+ $comparison = Criteria::IN;
+ } elseif (preg_match('/[\%\*]/', $dbLogin)) {
+ $dbLogin = str_replace('*', '%', $dbLogin);
+ $comparison = Criteria::LIKE;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::LOGIN, $dbLogin, $comparison);
+ }
+
+ /**
+ * Filter the query on the mtime column
+ *
+ * @param string|array $dbMtime The value to use as filter.
+ * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbMtime($dbMtime = null, $comparison = null)
+ {
+ if (is_array($dbMtime)) {
+ $useMinMax = false;
+ if (isset($dbMtime['min'])) {
+ $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbMtime['max'])) {
+ $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::MTIME, $dbMtime, $comparison);
+ }
+
+ /**
+ * Filter the query on the utime column
+ *
+ * @param string|array $dbUtime The value to use as filter.
+ * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByDbUtime($dbUtime = null, $comparison = null)
+ {
+ if (is_array($dbUtime)) {
+ $useMinMax = false;
+ if (isset($dbUtime['min'])) {
+ $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime['min'], Criteria::GREATER_EQUAL);
+ $useMinMax = true;
+ }
+ if (isset($dbUtime['max'])) {
+ $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime['max'], Criteria::LESS_EQUAL);
+ $useMinMax = true;
+ }
+ if ($useMinMax) {
+ return $this;
+ }
+ if (null === $comparison) {
+ $comparison = Criteria::IN;
+ }
+ }
+ return $this->addUsingAlias(CcWebstreamPeer::UTIME, $dbUtime, $comparison);
+ }
+
+ /**
+ * Filter the query by a related CcSchedule object
+ *
+ * @param CcSchedule $ccSchedule the related object to use as filter
+ * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function filterByCcSchedule($ccSchedule, $comparison = null)
+ {
+ return $this
+ ->addUsingAlias(CcWebstreamPeer::ID, $ccSchedule->getDbStreamId(), $comparison);
+ }
+
+ /**
+ * Adds a JOIN clause to the query using the CcSchedule relation
+ *
+ * @param string $relationAlias optional alias for the relation
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function joinCcSchedule($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ $tableMap = $this->getTableMap();
+ $relationMap = $tableMap->getRelation('CcSchedule');
+
+ // create a ModelJoin object for this join
+ $join = new ModelJoin();
+ $join->setJoinType($joinType);
+ $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
+ if ($previousJoin = $this->getPreviousJoin()) {
+ $join->setPreviousJoin($previousJoin);
+ }
+
+ // add the ModelJoin to the current object
+ if($relationAlias) {
+ $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
+ $this->addJoinObject($join, $relationAlias);
+ } else {
+ $this->addJoinObject($join, 'CcSchedule');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use the CcSchedule relation CcSchedule object
+ *
+ * @see useQuery()
+ *
+ * @param string $relationAlias optional alias for the relation,
+ * to be used as main alias in the secondary query
+ * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
+ *
+ * @return CcScheduleQuery A secondary query class using the current class as primary query
+ */
+ public function useCcScheduleQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
+ {
+ return $this
+ ->joinCcSchedule($relationAlias, $joinType)
+ ->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery');
+ }
+
+ /**
+ * Exclude object from result
+ *
+ * @param CcWebstream $ccWebstream Object to remove from the list of results
+ *
+ * @return CcWebstreamQuery The current query, for fluid interface
+ */
+ public function prune($ccWebstream = null)
+ {
+ if ($ccWebstream) {
+ $this->addUsingAlias(CcWebstreamPeer::ID, $ccWebstream->getDbId(), Criteria::NOT_EQUAL);
+ }
+
+ return $this;
+ }
+
+} // BaseCcWebstreamQuery
diff --git a/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml b/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml
index 45bf68c0c..87cefbb55 100644
--- a/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml
+++ b/airtime_mvc/application/views/scripts/library/get-file-meta-data.ajax.phtml
@@ -29,10 +29,10 @@