Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer

Conflicts:
	airtime_mvc/application/models/airtime/CcFiles.php
	airtime_mvc/application/modules/rest/controllers/MediaController.php
This commit is contained in:
Albert Santoni 2015-02-20 11:14:11 -05:00
commit 6d00da89db
601 changed files with 118801 additions and 207033 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
.*
*.pyc
vendor/*
composer.phar

View File

@ -3,10 +3,16 @@ require_once __DIR__."/configs/conf.php";
$CC_CONFIG = Config::getConfig();
require_once __DIR__."/configs/ACL.php";
require_once 'propel/runtime/lib/Propel.php';
if (!@include_once('propel/propel1/runtime/lib/Propel.php'))
{
die('Error: Propel not found. Did you install Airtime\'s third-party dependencies with composer? (Check the README.)');
}
Propel::init(__DIR__."/configs/airtime-conf-production.php");
//Composer's autoloader
require_once 'autoload.php';
require_once __DIR__."/configs/constants.php";
require_once 'Preference.php';
require_once 'Locale.php';

View File

@ -0,0 +1,62 @@
<?php
require_once 'StorageBackend.php';
use Aws\S3\S3Client;
class Amazon_S3 extends StorageBackend
{
private $s3Client;
public function Amazon_S3($securityCredentials)
{
$this->setBucket($securityCredentials['bucket']);
$this->setAccessKey($securityCredentials['api_key']);
$this->setSecretKey($securityCredentials['api_key_secret']);
$this->s3Client = S3Client::factory(array(
'key' => $securityCredentials['api_key'],
'secret' => $securityCredentials['api_key_secret'],
'region' => $securityCredentials['region']
));
}
public function getAbsoluteFilePath($resourceId)
{
return $this->s3Client->getObjectUrl($this->getBucket(), $resourceId);
}
public function getSignedURL($resourceId)
{
return $this->s3Client->getObjectUrl($this->getBucket(), $resourceId, '+60 minutes');
}
public function getFileSize($resourceId)
{
$obj = $this->s3Client->getObject(array(
'Bucket' => $this->getBucket(),
'Key' => $resourceId,
));
if (isset($obj["ContentLength"])) {
return (int)$obj["ContentLength"];
} else {
return 0;
}
}
public function deletePhysicalFile($resourceId)
{
$bucket = $this->getBucket();
if ($this->s3Client->doesObjectExist($bucket, $resourceId)) {
$result = $this->s3Client->deleteObject(array(
'Bucket' => $bucket,
'Key' => $resourceId,
));
} else {
throw new Exception("ERROR: Could not locate file to delete.");
}
}
}

View File

@ -0,0 +1,49 @@
<?php
require_once 'StorageBackend.php';
require_once 'Amazon_S3.php';
/**
*
* Controls access to the storage backend class where a file is stored.
*
*/
class ProxyStorageBackend extends StorageBackend
{
private $storageBackend;
/**
* Receives the file's storage backend and instantiates the approriate
* object.
*/
public function ProxyStorageBackend($storageBackend)
{
$CC_CONFIG = Config::getConfig();
//The storage backend in the airtime.conf directly corresponds to
//the name of the class that implements it (eg. Amazon_S3), so we
//can easily create the right backend object dynamically:
$this->storageBackend = new $storageBackend($CC_CONFIG[$storageBackend]);
}
public function getAbsoluteFilePath($resourceId)
{
return $this->storageBackend->getAbsoluteFilePath($resourceId);
}
public function getSignedURL($resourceId)
{
return $this->storageBackend->getSignedURL($resourceId);
}
public function getFileSize($resourceId)
{
return $this->storageBackend->getFileSize($resourceId);
}
public function deletePhysicalFile($resourceId)
{
$this->storageBackend->deletePhysicalFile($resourceId);
}
}

View File

@ -0,0 +1,55 @@
<?php
/**
*
* Provides access to file objects stored on a specific storage backend.
*/
abstract class StorageBackend
{
private $bucket;
private $accessKey;
private $secretKey;
/** Returns the file object's URL to the storage backend it is located on. */
abstract public function getAbsoluteFilePath($resourceId);
/** Returns the file object's signed URL. The URL must be signed since they
* privately stored on the storage backend. */
abstract public function getSignedURL($resourceId);
/** Returns the file's size in bytes. */
abstract public function getFileSize($resourceId);
/** Deletes the file from the storage backend. */
abstract public function deletePhysicalFile($resourceId);
protected function getBucket()
{
return $this->bucket;
}
protected function setBucket($bucket)
{
$this->bucket = $bucket;
}
protected function getAccessKey()
{
return $this->accessKey;
}
protected function setAccessKey($accessKey)
{
$this->accessKey = $accessKey;
}
protected function getSecretKey()
{
return $this->secretKey;
}
protected function setSecretKey($secretKey)
{
$this->secretKey = $secretKey;
}
}

View File

@ -28,7 +28,7 @@ $conf = array (
),
'default' => 'airtime',
),
'generator_version' => '1.5.2',
'generator_version' => '1.7.0',
);
$conf['classmap'] = include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-airtime-conf.php');
return $conf;

View File

@ -1,5 +1,5 @@
<?php
// This file generated by Propel 1.5.2 convert-conf target
// This file generated by Propel 1.7.0 convert-conf target
// from XML runtime conf file /home/ubuntu/airtime/airtime_mvc/build/runtime-conf.xml
$conf = array (
'datasources' =>
@ -22,7 +22,7 @@ $conf = array (
),
'default' => 'airtime',
),
'generator_version' => '1.5.2',
'generator_version' => '1.7.0',
);
$conf['classmap'] = include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-airtime-conf.php');
return $conf;

View File

@ -1,242 +1,242 @@
<?php
// This file generated by Propel 1.5.2 convert-conf target
// This file generated by Propel 1.7.0 convert-conf target
return array (
'CcMusicDirsTableMap' => 'airtime/map/CcMusicDirsTableMap.php',
'CcMusicDirsPeer' => 'airtime/CcMusicDirsPeer.php',
'CcMusicDirs' => 'airtime/CcMusicDirs.php',
'CcMusicDirsQuery' => 'airtime/CcMusicDirsQuery.php',
'BaseCcMusicDirsPeer' => 'airtime/om/BaseCcMusicDirsPeer.php',
'BaseCcMusicDirs' => 'airtime/om/BaseCcMusicDirs.php',
'BaseCcMusicDirsQuery' => 'airtime/om/BaseCcMusicDirsQuery.php',
'CcFilesTableMap' => 'airtime/map/CcFilesTableMap.php',
'CcFilesPeer' => 'airtime/CcFilesPeer.php',
'CcFiles' => 'airtime/CcFiles.php',
'CcFilesQuery' => 'airtime/CcFilesQuery.php',
'BaseCcFilesPeer' => 'airtime/om/BaseCcFilesPeer.php',
'BaseCcFiles' => 'airtime/om/BaseCcFiles.php',
'BaseCcFilesQuery' => 'airtime/om/BaseCcFilesQuery.php',
'CcPermsTableMap' => 'airtime/map/CcPermsTableMap.php',
'CcPermsPeer' => 'airtime/CcPermsPeer.php',
'CcPerms' => 'airtime/CcPerms.php',
'CcPermsQuery' => 'airtime/CcPermsQuery.php',
'BaseCcPermsPeer' => 'airtime/om/BaseCcPermsPeer.php',
'BaseCcPerms' => 'airtime/om/BaseCcPerms.php',
'BaseCcPermsQuery' => 'airtime/om/BaseCcPermsQuery.php',
'CcShowTableMap' => 'airtime/map/CcShowTableMap.php',
'CcShowPeer' => 'airtime/CcShowPeer.php',
'CcShow' => 'airtime/CcShow.php',
'CcShowQuery' => 'airtime/CcShowQuery.php',
'BaseCcShowPeer' => 'airtime/om/BaseCcShowPeer.php',
'BaseCcShow' => 'airtime/om/BaseCcShow.php',
'BaseCcShowQuery' => 'airtime/om/BaseCcShowQuery.php',
'CcShowInstancesTableMap' => 'airtime/map/CcShowInstancesTableMap.php',
'CcShowInstancesPeer' => 'airtime/CcShowInstancesPeer.php',
'CcShowInstances' => 'airtime/CcShowInstances.php',
'CcShowInstancesQuery' => 'airtime/CcShowInstancesQuery.php',
'BaseCcShowInstancesPeer' => 'airtime/om/BaseCcShowInstancesPeer.php',
'BaseCcShowInstances' => 'airtime/om/BaseCcShowInstances.php',
'BaseCcShowInstancesQuery' => 'airtime/om/BaseCcShowInstancesQuery.php',
'CcShowDaysTableMap' => 'airtime/map/CcShowDaysTableMap.php',
'CcShowDaysPeer' => 'airtime/CcShowDaysPeer.php',
'CcShowDays' => 'airtime/CcShowDays.php',
'CcShowDaysQuery' => 'airtime/CcShowDaysQuery.php',
'BaseCcShowDaysPeer' => 'airtime/om/BaseCcShowDaysPeer.php',
'BaseCcShowDays' => 'airtime/om/BaseCcShowDays.php',
'BaseCcShowDaysQuery' => 'airtime/om/BaseCcShowDaysQuery.php',
'CcShowRebroadcastTableMap' => 'airtime/map/CcShowRebroadcastTableMap.php',
'CcShowRebroadcastPeer' => 'airtime/CcShowRebroadcastPeer.php',
'CcShowRebroadcast' => 'airtime/CcShowRebroadcast.php',
'CcShowRebroadcastQuery' => 'airtime/CcShowRebroadcastQuery.php',
'BaseCcShowRebroadcastPeer' => 'airtime/om/BaseCcShowRebroadcastPeer.php',
'BaseCcShowRebroadcast' => 'airtime/om/BaseCcShowRebroadcast.php',
'BaseCcShowRebroadcastQuery' => 'airtime/om/BaseCcShowRebroadcastQuery.php',
'CcShowHostsTableMap' => 'airtime/map/CcShowHostsTableMap.php',
'CcShowHostsPeer' => 'airtime/CcShowHostsPeer.php',
'CcShowHosts' => 'airtime/CcShowHosts.php',
'CcShowHostsQuery' => 'airtime/CcShowHostsQuery.php',
'BaseCcShowHostsPeer' => 'airtime/om/BaseCcShowHostsPeer.php',
'BaseCcShowHosts' => 'airtime/om/BaseCcShowHosts.php',
'BaseCcShowHostsQuery' => 'airtime/om/BaseCcShowHostsQuery.php',
'CcPlaylistTableMap' => 'airtime/map/CcPlaylistTableMap.php',
'CcPlaylistPeer' => 'airtime/CcPlaylistPeer.php',
'CcPlaylist' => 'airtime/CcPlaylist.php',
'CcPlaylistQuery' => 'airtime/CcPlaylistQuery.php',
'BaseCcPlaylistPeer' => 'airtime/om/BaseCcPlaylistPeer.php',
'BaseCcPlaylist' => 'airtime/om/BaseCcPlaylist.php',
'BaseCcPlaylistQuery' => 'airtime/om/BaseCcPlaylistQuery.php',
'CcPlaylistcontentsTableMap' => 'airtime/map/CcPlaylistcontentsTableMap.php',
'CcPlaylistcontentsPeer' => 'airtime/CcPlaylistcontentsPeer.php',
'CcPlaylistcontents' => 'airtime/CcPlaylistcontents.php',
'CcPlaylistcontentsQuery' => 'airtime/CcPlaylistcontentsQuery.php',
'BaseCcPlaylistcontentsPeer' => 'airtime/om/BaseCcPlaylistcontentsPeer.php',
'BaseCcPlaylistcontents' => 'airtime/om/BaseCcPlaylistcontents.php',
'BaseCcPlaylistcontentsQuery' => 'airtime/om/BaseCcPlaylistcontentsQuery.php',
'CcBlockTableMap' => 'airtime/map/CcBlockTableMap.php',
'CcBlockPeer' => 'airtime/CcBlockPeer.php',
'CcBlock' => 'airtime/CcBlock.php',
'CcBlockQuery' => 'airtime/CcBlockQuery.php',
'BaseCcBlockPeer' => 'airtime/om/BaseCcBlockPeer.php',
'BaseCcBlock' => 'airtime/om/BaseCcBlock.php',
'BaseCcBlockPeer' => 'airtime/om/BaseCcBlockPeer.php',
'BaseCcBlockQuery' => 'airtime/om/BaseCcBlockQuery.php',
'CcBlockcontentsTableMap' => 'airtime/map/CcBlockcontentsTableMap.php',
'CcBlockcontentsPeer' => 'airtime/CcBlockcontentsPeer.php',
'CcBlockcontents' => 'airtime/CcBlockcontents.php',
'CcBlockcontentsQuery' => 'airtime/CcBlockcontentsQuery.php',
'BaseCcBlockcontentsPeer' => 'airtime/om/BaseCcBlockcontentsPeer.php',
'BaseCcBlockcontents' => 'airtime/om/BaseCcBlockcontents.php',
'BaseCcBlockcontentsPeer' => 'airtime/om/BaseCcBlockcontentsPeer.php',
'BaseCcBlockcontentsQuery' => 'airtime/om/BaseCcBlockcontentsQuery.php',
'CcBlockcriteriaTableMap' => 'airtime/map/CcBlockcriteriaTableMap.php',
'CcBlockcriteriaPeer' => 'airtime/CcBlockcriteriaPeer.php',
'CcBlockcriteria' => 'airtime/CcBlockcriteria.php',
'CcBlockcriteriaQuery' => 'airtime/CcBlockcriteriaQuery.php',
'BaseCcBlockcriteriaPeer' => 'airtime/om/BaseCcBlockcriteriaPeer.php',
'BaseCcBlockcriteria' => 'airtime/om/BaseCcBlockcriteria.php',
'BaseCcBlockcriteriaPeer' => 'airtime/om/BaseCcBlockcriteriaPeer.php',
'BaseCcBlockcriteriaQuery' => 'airtime/om/BaseCcBlockcriteriaQuery.php',
'CcPrefTableMap' => 'airtime/map/CcPrefTableMap.php',
'CcPrefPeer' => 'airtime/CcPrefPeer.php',
'CcPref' => 'airtime/CcPref.php',
'CcPrefQuery' => 'airtime/CcPrefQuery.php',
'BaseCcPrefPeer' => 'airtime/om/BaseCcPrefPeer.php',
'BaseCcPref' => 'airtime/om/BaseCcPref.php',
'BaseCcPrefQuery' => 'airtime/om/BaseCcPrefQuery.php',
'CcScheduleTableMap' => 'airtime/map/CcScheduleTableMap.php',
'CcSchedulePeer' => 'airtime/CcSchedulePeer.php',
'CcSchedule' => 'airtime/CcSchedule.php',
'CcScheduleQuery' => 'airtime/CcScheduleQuery.php',
'BaseCcSchedulePeer' => 'airtime/om/BaseCcSchedulePeer.php',
'BaseCcSchedule' => 'airtime/om/BaseCcSchedule.php',
'BaseCcScheduleQuery' => 'airtime/om/BaseCcScheduleQuery.php',
'CcSessTableMap' => 'airtime/map/CcSessTableMap.php',
'CcSessPeer' => 'airtime/CcSessPeer.php',
'CcSess' => 'airtime/CcSess.php',
'CcSessQuery' => 'airtime/CcSessQuery.php',
'BaseCcSessPeer' => 'airtime/om/BaseCcSessPeer.php',
'BaseCcSess' => 'airtime/om/BaseCcSess.php',
'BaseCcSessQuery' => 'airtime/om/BaseCcSessQuery.php',
'CcSmembTableMap' => 'airtime/map/CcSmembTableMap.php',
'CcSmembPeer' => 'airtime/CcSmembPeer.php',
'CcSmemb' => 'airtime/CcSmemb.php',
'CcSmembQuery' => 'airtime/CcSmembQuery.php',
'BaseCcSmembPeer' => 'airtime/om/BaseCcSmembPeer.php',
'BaseCcSmemb' => 'airtime/om/BaseCcSmemb.php',
'BaseCcSmembQuery' => 'airtime/om/BaseCcSmembQuery.php',
'CcSubjsTableMap' => 'airtime/map/CcSubjsTableMap.php',
'CcSubjsPeer' => 'airtime/CcSubjsPeer.php',
'CcSubjs' => 'airtime/CcSubjs.php',
'CcSubjsQuery' => 'airtime/CcSubjsQuery.php',
'BaseCcSubjsPeer' => 'airtime/om/BaseCcSubjsPeer.php',
'BaseCcSubjs' => 'airtime/om/BaseCcSubjs.php',
'BaseCcSubjsQuery' => 'airtime/om/BaseCcSubjsQuery.php',
'CcSubjsTokenTableMap' => 'airtime/map/CcSubjsTokenTableMap.php',
'CcSubjsTokenPeer' => 'airtime/CcSubjsTokenPeer.php',
'CcSubjsToken' => 'airtime/CcSubjsToken.php',
'CcSubjsTokenQuery' => 'airtime/CcSubjsTokenQuery.php',
'BaseCcSubjsTokenPeer' => 'airtime/om/BaseCcSubjsTokenPeer.php',
'BaseCcSubjsToken' => 'airtime/om/BaseCcSubjsToken.php',
'BaseCcSubjsTokenQuery' => 'airtime/om/BaseCcSubjsTokenQuery.php',
'CcCountryTableMap' => 'airtime/map/CcCountryTableMap.php',
'CcCountryPeer' => 'airtime/CcCountryPeer.php',
'CcCountry' => 'airtime/CcCountry.php',
'CcCountryQuery' => 'airtime/CcCountryQuery.php',
'BaseCcCountryPeer' => 'airtime/om/BaseCcCountryPeer.php',
'BaseCcCountry' => 'airtime/om/BaseCcCountry.php',
'BaseCcCountryPeer' => 'airtime/om/BaseCcCountryPeer.php',
'BaseCcCountryQuery' => 'airtime/om/BaseCcCountryQuery.php',
'CcStreamSettingTableMap' => 'airtime/map/CcStreamSettingTableMap.php',
'CcStreamSettingPeer' => 'airtime/CcStreamSettingPeer.php',
'CcStreamSetting' => 'airtime/CcStreamSetting.php',
'CcStreamSettingQuery' => 'airtime/CcStreamSettingQuery.php',
'BaseCcStreamSettingPeer' => 'airtime/om/BaseCcStreamSettingPeer.php',
'BaseCcStreamSetting' => 'airtime/om/BaseCcStreamSetting.php',
'BaseCcStreamSettingQuery' => 'airtime/om/BaseCcStreamSettingQuery.php',
'CcLoginAttemptsTableMap' => 'airtime/map/CcLoginAttemptsTableMap.php',
'CcLoginAttemptsPeer' => 'airtime/CcLoginAttemptsPeer.php',
'CcLoginAttempts' => 'airtime/CcLoginAttempts.php',
'CcLoginAttemptsQuery' => 'airtime/CcLoginAttemptsQuery.php',
'BaseCcLoginAttemptsPeer' => 'airtime/om/BaseCcLoginAttemptsPeer.php',
'BaseCcLoginAttempts' => 'airtime/om/BaseCcLoginAttempts.php',
'BaseCcLoginAttemptsQuery' => 'airtime/om/BaseCcLoginAttemptsQuery.php',
'CcServiceRegisterTableMap' => 'airtime/map/CcServiceRegisterTableMap.php',
'CcServiceRegisterPeer' => 'airtime/CcServiceRegisterPeer.php',
'CcServiceRegister' => 'airtime/CcServiceRegister.php',
'CcServiceRegisterQuery' => 'airtime/CcServiceRegisterQuery.php',
'BaseCcServiceRegisterPeer' => 'airtime/om/BaseCcServiceRegisterPeer.php',
'BaseCcServiceRegister' => 'airtime/om/BaseCcServiceRegister.php',
'BaseCcServiceRegisterQuery' => 'airtime/om/BaseCcServiceRegisterQuery.php',
'CcLiveLogTableMap' => 'airtime/map/CcLiveLogTableMap.php',
'CcLiveLogPeer' => 'airtime/CcLiveLogPeer.php',
'CcLiveLog' => 'airtime/CcLiveLog.php',
'CcLiveLogQuery' => 'airtime/CcLiveLogQuery.php',
'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',
'CcWebstreamMetadataTableMap' => 'airtime/map/CcWebstreamMetadataTableMap.php',
'CcWebstreamMetadataPeer' => 'airtime/CcWebstreamMetadataPeer.php',
'CcWebstreamMetadata' => 'airtime/CcWebstreamMetadata.php',
'CcWebstreamMetadataQuery' => 'airtime/CcWebstreamMetadataQuery.php',
'BaseCcWebstreamMetadataPeer' => 'airtime/om/BaseCcWebstreamMetadataPeer.php',
'BaseCcWebstreamMetadata' => 'airtime/om/BaseCcWebstreamMetadata.php',
'BaseCcWebstreamMetadataQuery' => 'airtime/om/BaseCcWebstreamMetadataQuery.php',
'CcMountNameTableMap' => 'airtime/map/CcMountNameTableMap.php',
'CcMountNamePeer' => 'airtime/CcMountNamePeer.php',
'CcMountName' => 'airtime/CcMountName.php',
'CcMountNameQuery' => 'airtime/CcMountNameQuery.php',
'BaseCcMountNamePeer' => 'airtime/om/BaseCcMountNamePeer.php',
'BaseCcMountName' => 'airtime/om/BaseCcMountName.php',
'BaseCcMountNameQuery' => 'airtime/om/BaseCcMountNameQuery.php',
'CcTimestampTableMap' => 'airtime/map/CcTimestampTableMap.php',
'CcTimestampPeer' => 'airtime/CcTimestampPeer.php',
'CcTimestamp' => 'airtime/CcTimestamp.php',
'CcTimestampQuery' => 'airtime/CcTimestampQuery.php',
'BaseCcTimestampPeer' => 'airtime/om/BaseCcTimestampPeer.php',
'BaseCcTimestamp' => 'airtime/om/BaseCcTimestamp.php',
'BaseCcTimestampQuery' => 'airtime/om/BaseCcTimestampQuery.php',
'CcListenerCountTableMap' => 'airtime/map/CcListenerCountTableMap.php',
'CcListenerCountPeer' => 'airtime/CcListenerCountPeer.php',
'CcListenerCount' => 'airtime/CcListenerCount.php',
'CcListenerCountQuery' => 'airtime/CcListenerCountQuery.php',
'BaseCcListenerCountPeer' => 'airtime/om/BaseCcListenerCountPeer.php',
'BaseCcFiles' => 'airtime/om/BaseCcFiles.php',
'BaseCcFilesPeer' => 'airtime/om/BaseCcFilesPeer.php',
'BaseCcFilesQuery' => 'airtime/om/BaseCcFilesQuery.php',
'BaseCcListenerCount' => 'airtime/om/BaseCcListenerCount.php',
'BaseCcListenerCountPeer' => 'airtime/om/BaseCcListenerCountPeer.php',
'BaseCcListenerCountQuery' => 'airtime/om/BaseCcListenerCountQuery.php',
'CcLocaleTableMap' => 'airtime/map/CcLocaleTableMap.php',
'CcLocalePeer' => 'airtime/CcLocalePeer.php',
'CcLocale' => 'airtime/CcLocale.php',
'CcLocaleQuery' => 'airtime/CcLocaleQuery.php',
'BaseCcLocalePeer' => 'airtime/om/BaseCcLocalePeer.php',
'BaseCcLocale' => 'airtime/om/BaseCcLocale.php',
'BaseCcLocaleQuery' => 'airtime/om/BaseCcLocaleQuery.php',
'CcPlayoutHistoryTableMap' => 'airtime/map/CcPlayoutHistoryTableMap.php',
'CcPlayoutHistoryPeer' => 'airtime/CcPlayoutHistoryPeer.php',
'CcPlayoutHistory' => 'airtime/CcPlayoutHistory.php',
'CcPlayoutHistoryQuery' => 'airtime/CcPlayoutHistoryQuery.php',
'BaseCcPlayoutHistoryPeer' => 'airtime/om/BaseCcPlayoutHistoryPeer.php',
'BaseCcLiveLog' => 'airtime/om/BaseCcLiveLog.php',
'BaseCcLiveLogPeer' => 'airtime/om/BaseCcLiveLogPeer.php',
'BaseCcLiveLogQuery' => 'airtime/om/BaseCcLiveLogQuery.php',
'BaseCcLoginAttempts' => 'airtime/om/BaseCcLoginAttempts.php',
'BaseCcLoginAttemptsPeer' => 'airtime/om/BaseCcLoginAttemptsPeer.php',
'BaseCcLoginAttemptsQuery' => 'airtime/om/BaseCcLoginAttemptsQuery.php',
'BaseCcMountName' => 'airtime/om/BaseCcMountName.php',
'BaseCcMountNamePeer' => 'airtime/om/BaseCcMountNamePeer.php',
'BaseCcMountNameQuery' => 'airtime/om/BaseCcMountNameQuery.php',
'BaseCcMusicDirs' => 'airtime/om/BaseCcMusicDirs.php',
'BaseCcMusicDirsPeer' => 'airtime/om/BaseCcMusicDirsPeer.php',
'BaseCcMusicDirsQuery' => 'airtime/om/BaseCcMusicDirsQuery.php',
'BaseCcPerms' => 'airtime/om/BaseCcPerms.php',
'BaseCcPermsPeer' => 'airtime/om/BaseCcPermsPeer.php',
'BaseCcPermsQuery' => 'airtime/om/BaseCcPermsQuery.php',
'BaseCcPlaylist' => 'airtime/om/BaseCcPlaylist.php',
'BaseCcPlaylistPeer' => 'airtime/om/BaseCcPlaylistPeer.php',
'BaseCcPlaylistQuery' => 'airtime/om/BaseCcPlaylistQuery.php',
'BaseCcPlaylistcontents' => 'airtime/om/BaseCcPlaylistcontents.php',
'BaseCcPlaylistcontentsPeer' => 'airtime/om/BaseCcPlaylistcontentsPeer.php',
'BaseCcPlaylistcontentsQuery' => 'airtime/om/BaseCcPlaylistcontentsQuery.php',
'BaseCcPlayoutHistory' => 'airtime/om/BaseCcPlayoutHistory.php',
'BaseCcPlayoutHistoryQuery' => 'airtime/om/BaseCcPlayoutHistoryQuery.php',
'CcPlayoutHistoryMetaDataTableMap' => 'airtime/map/CcPlayoutHistoryMetaDataTableMap.php',
'CcPlayoutHistoryMetaDataPeer' => 'airtime/CcPlayoutHistoryMetaDataPeer.php',
'CcPlayoutHistoryMetaData' => 'airtime/CcPlayoutHistoryMetaData.php',
'CcPlayoutHistoryMetaDataQuery' => 'airtime/CcPlayoutHistoryMetaDataQuery.php',
'BaseCcPlayoutHistoryMetaDataPeer' => 'airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php',
'BaseCcPlayoutHistoryMetaData' => 'airtime/om/BaseCcPlayoutHistoryMetaData.php',
'BaseCcPlayoutHistoryMetaDataPeer' => 'airtime/om/BaseCcPlayoutHistoryMetaDataPeer.php',
'BaseCcPlayoutHistoryMetaDataQuery' => 'airtime/om/BaseCcPlayoutHistoryMetaDataQuery.php',
'CcPlayoutHistoryTemplateTableMap' => 'airtime/map/CcPlayoutHistoryTemplateTableMap.php',
'CcPlayoutHistoryTemplatePeer' => 'airtime/CcPlayoutHistoryTemplatePeer.php',
'CcPlayoutHistoryTemplate' => 'airtime/CcPlayoutHistoryTemplate.php',
'CcPlayoutHistoryTemplateQuery' => 'airtime/CcPlayoutHistoryTemplateQuery.php',
'BaseCcPlayoutHistoryTemplatePeer' => 'airtime/om/BaseCcPlayoutHistoryTemplatePeer.php',
'BaseCcPlayoutHistoryPeer' => 'airtime/om/BaseCcPlayoutHistoryPeer.php',
'BaseCcPlayoutHistoryQuery' => 'airtime/om/BaseCcPlayoutHistoryQuery.php',
'BaseCcPlayoutHistoryTemplate' => 'airtime/om/BaseCcPlayoutHistoryTemplate.php',
'BaseCcPlayoutHistoryTemplateQuery' => 'airtime/om/BaseCcPlayoutHistoryTemplateQuery.php',
'CcPlayoutHistoryTemplateFieldTableMap' => 'airtime/map/CcPlayoutHistoryTemplateFieldTableMap.php',
'CcPlayoutHistoryTemplateFieldPeer' => 'airtime/CcPlayoutHistoryTemplateFieldPeer.php',
'CcPlayoutHistoryTemplateField' => 'airtime/CcPlayoutHistoryTemplateField.php',
'CcPlayoutHistoryTemplateFieldQuery' => 'airtime/CcPlayoutHistoryTemplateFieldQuery.php',
'BaseCcPlayoutHistoryTemplateFieldPeer' => 'airtime/om/BaseCcPlayoutHistoryTemplateFieldPeer.php',
'BaseCcPlayoutHistoryTemplateField' => 'airtime/om/BaseCcPlayoutHistoryTemplateField.php',
'BaseCcPlayoutHistoryTemplateFieldPeer' => 'airtime/om/BaseCcPlayoutHistoryTemplateFieldPeer.php',
'BaseCcPlayoutHistoryTemplateFieldQuery' => 'airtime/om/BaseCcPlayoutHistoryTemplateFieldQuery.php',
'BaseCcPlayoutHistoryTemplatePeer' => 'airtime/om/BaseCcPlayoutHistoryTemplatePeer.php',
'BaseCcPlayoutHistoryTemplateQuery' => 'airtime/om/BaseCcPlayoutHistoryTemplateQuery.php',
'BaseCcPref' => 'airtime/om/BaseCcPref.php',
'BaseCcPrefPeer' => 'airtime/om/BaseCcPrefPeer.php',
'BaseCcPrefQuery' => 'airtime/om/BaseCcPrefQuery.php',
'BaseCcSchedule' => 'airtime/om/BaseCcSchedule.php',
'BaseCcSchedulePeer' => 'airtime/om/BaseCcSchedulePeer.php',
'BaseCcScheduleQuery' => 'airtime/om/BaseCcScheduleQuery.php',
'BaseCcServiceRegister' => 'airtime/om/BaseCcServiceRegister.php',
'BaseCcServiceRegisterPeer' => 'airtime/om/BaseCcServiceRegisterPeer.php',
'BaseCcServiceRegisterQuery' => 'airtime/om/BaseCcServiceRegisterQuery.php',
'BaseCcSess' => 'airtime/om/BaseCcSess.php',
'BaseCcSessPeer' => 'airtime/om/BaseCcSessPeer.php',
'BaseCcSessQuery' => 'airtime/om/BaseCcSessQuery.php',
'BaseCcShow' => 'airtime/om/BaseCcShow.php',
'BaseCcShowDays' => 'airtime/om/BaseCcShowDays.php',
'BaseCcShowDaysPeer' => 'airtime/om/BaseCcShowDaysPeer.php',
'BaseCcShowDaysQuery' => 'airtime/om/BaseCcShowDaysQuery.php',
'BaseCcShowHosts' => 'airtime/om/BaseCcShowHosts.php',
'BaseCcShowHostsPeer' => 'airtime/om/BaseCcShowHostsPeer.php',
'BaseCcShowHostsQuery' => 'airtime/om/BaseCcShowHostsQuery.php',
'BaseCcShowInstances' => 'airtime/om/BaseCcShowInstances.php',
'BaseCcShowInstancesPeer' => 'airtime/om/BaseCcShowInstancesPeer.php',
'BaseCcShowInstancesQuery' => 'airtime/om/BaseCcShowInstancesQuery.php',
'BaseCcShowPeer' => 'airtime/om/BaseCcShowPeer.php',
'BaseCcShowQuery' => 'airtime/om/BaseCcShowQuery.php',
'BaseCcShowRebroadcast' => 'airtime/om/BaseCcShowRebroadcast.php',
'BaseCcShowRebroadcastPeer' => 'airtime/om/BaseCcShowRebroadcastPeer.php',
'BaseCcShowRebroadcastQuery' => 'airtime/om/BaseCcShowRebroadcastQuery.php',
'BaseCcSmemb' => 'airtime/om/BaseCcSmemb.php',
'BaseCcSmembPeer' => 'airtime/om/BaseCcSmembPeer.php',
'BaseCcSmembQuery' => 'airtime/om/BaseCcSmembQuery.php',
'BaseCcStreamSetting' => 'airtime/om/BaseCcStreamSetting.php',
'BaseCcStreamSettingPeer' => 'airtime/om/BaseCcStreamSettingPeer.php',
'BaseCcStreamSettingQuery' => 'airtime/om/BaseCcStreamSettingQuery.php',
'BaseCcSubjs' => 'airtime/om/BaseCcSubjs.php',
'BaseCcSubjsPeer' => 'airtime/om/BaseCcSubjsPeer.php',
'BaseCcSubjsQuery' => 'airtime/om/BaseCcSubjsQuery.php',
'BaseCcSubjsToken' => 'airtime/om/BaseCcSubjsToken.php',
'BaseCcSubjsTokenPeer' => 'airtime/om/BaseCcSubjsTokenPeer.php',
'BaseCcSubjsTokenQuery' => 'airtime/om/BaseCcSubjsTokenQuery.php',
'BaseCcTimestamp' => 'airtime/om/BaseCcTimestamp.php',
'BaseCcTimestampPeer' => 'airtime/om/BaseCcTimestampPeer.php',
'BaseCcTimestampQuery' => 'airtime/om/BaseCcTimestampQuery.php',
'BaseCcWebstream' => 'airtime/om/BaseCcWebstream.php',
'BaseCcWebstreamMetadata' => 'airtime/om/BaseCcWebstreamMetadata.php',
'BaseCcWebstreamMetadataPeer' => 'airtime/om/BaseCcWebstreamMetadataPeer.php',
'BaseCcWebstreamMetadataQuery' => 'airtime/om/BaseCcWebstreamMetadataQuery.php',
'BaseCcWebstreamPeer' => 'airtime/om/BaseCcWebstreamPeer.php',
'BaseCcWebstreamQuery' => 'airtime/om/BaseCcWebstreamQuery.php',
'BaseCloudFile' => 'airtime/om/BaseCloudFile.php',
'BaseCloudFilePeer' => 'airtime/om/BaseCloudFilePeer.php',
'BaseCloudFileQuery' => 'airtime/om/BaseCloudFileQuery.php',
'CcBlock' => 'airtime/CcBlock.php',
'CcBlockPeer' => 'airtime/CcBlockPeer.php',
'CcBlockQuery' => 'airtime/CcBlockQuery.php',
'CcBlockTableMap' => 'airtime/map/CcBlockTableMap.php',
'CcBlockcontents' => 'airtime/CcBlockcontents.php',
'CcBlockcontentsPeer' => 'airtime/CcBlockcontentsPeer.php',
'CcBlockcontentsQuery' => 'airtime/CcBlockcontentsQuery.php',
'CcBlockcontentsTableMap' => 'airtime/map/CcBlockcontentsTableMap.php',
'CcBlockcriteria' => 'airtime/CcBlockcriteria.php',
'CcBlockcriteriaPeer' => 'airtime/CcBlockcriteriaPeer.php',
'CcBlockcriteriaQuery' => 'airtime/CcBlockcriteriaQuery.php',
'CcBlockcriteriaTableMap' => 'airtime/map/CcBlockcriteriaTableMap.php',
'CcCountry' => 'airtime/CcCountry.php',
'CcCountryPeer' => 'airtime/CcCountryPeer.php',
'CcCountryQuery' => 'airtime/CcCountryQuery.php',
'CcCountryTableMap' => 'airtime/map/CcCountryTableMap.php',
'CcFiles' => 'airtime/CcFiles.php',
'CcFilesPeer' => 'airtime/CcFilesPeer.php',
'CcFilesQuery' => 'airtime/CcFilesQuery.php',
'CcFilesTableMap' => 'airtime/map/CcFilesTableMap.php',
'CcListenerCount' => 'airtime/CcListenerCount.php',
'CcListenerCountPeer' => 'airtime/CcListenerCountPeer.php',
'CcListenerCountQuery' => 'airtime/CcListenerCountQuery.php',
'CcListenerCountTableMap' => 'airtime/map/CcListenerCountTableMap.php',
'CcLiveLog' => 'airtime/CcLiveLog.php',
'CcLiveLogPeer' => 'airtime/CcLiveLogPeer.php',
'CcLiveLogQuery' => 'airtime/CcLiveLogQuery.php',
'CcLiveLogTableMap' => 'airtime/map/CcLiveLogTableMap.php',
'CcLoginAttempts' => 'airtime/CcLoginAttempts.php',
'CcLoginAttemptsPeer' => 'airtime/CcLoginAttemptsPeer.php',
'CcLoginAttemptsQuery' => 'airtime/CcLoginAttemptsQuery.php',
'CcLoginAttemptsTableMap' => 'airtime/map/CcLoginAttemptsTableMap.php',
'CcMountName' => 'airtime/CcMountName.php',
'CcMountNamePeer' => 'airtime/CcMountNamePeer.php',
'CcMountNameQuery' => 'airtime/CcMountNameQuery.php',
'CcMountNameTableMap' => 'airtime/map/CcMountNameTableMap.php',
'CcMusicDirs' => 'airtime/CcMusicDirs.php',
'CcMusicDirsPeer' => 'airtime/CcMusicDirsPeer.php',
'CcMusicDirsQuery' => 'airtime/CcMusicDirsQuery.php',
'CcMusicDirsTableMap' => 'airtime/map/CcMusicDirsTableMap.php',
'CcPerms' => 'airtime/CcPerms.php',
'CcPermsPeer' => 'airtime/CcPermsPeer.php',
'CcPermsQuery' => 'airtime/CcPermsQuery.php',
'CcPermsTableMap' => 'airtime/map/CcPermsTableMap.php',
'CcPlaylist' => 'airtime/CcPlaylist.php',
'CcPlaylistPeer' => 'airtime/CcPlaylistPeer.php',
'CcPlaylistQuery' => 'airtime/CcPlaylistQuery.php',
'CcPlaylistTableMap' => 'airtime/map/CcPlaylistTableMap.php',
'CcPlaylistcontents' => 'airtime/CcPlaylistcontents.php',
'CcPlaylistcontentsPeer' => 'airtime/CcPlaylistcontentsPeer.php',
'CcPlaylistcontentsQuery' => 'airtime/CcPlaylistcontentsQuery.php',
'CcPlaylistcontentsTableMap' => 'airtime/map/CcPlaylistcontentsTableMap.php',
'CcPlayoutHistory' => 'airtime/CcPlayoutHistory.php',
'CcPlayoutHistoryMetaData' => 'airtime/CcPlayoutHistoryMetaData.php',
'CcPlayoutHistoryMetaDataPeer' => 'airtime/CcPlayoutHistoryMetaDataPeer.php',
'CcPlayoutHistoryMetaDataQuery' => 'airtime/CcPlayoutHistoryMetaDataQuery.php',
'CcPlayoutHistoryMetaDataTableMap' => 'airtime/map/CcPlayoutHistoryMetaDataTableMap.php',
'CcPlayoutHistoryPeer' => 'airtime/CcPlayoutHistoryPeer.php',
'CcPlayoutHistoryQuery' => 'airtime/CcPlayoutHistoryQuery.php',
'CcPlayoutHistoryTableMap' => 'airtime/map/CcPlayoutHistoryTableMap.php',
'CcPlayoutHistoryTemplate' => 'airtime/CcPlayoutHistoryTemplate.php',
'CcPlayoutHistoryTemplateField' => 'airtime/CcPlayoutHistoryTemplateField.php',
'CcPlayoutHistoryTemplateFieldPeer' => 'airtime/CcPlayoutHistoryTemplateFieldPeer.php',
'CcPlayoutHistoryTemplateFieldQuery' => 'airtime/CcPlayoutHistoryTemplateFieldQuery.php',
'CcPlayoutHistoryTemplateFieldTableMap' => 'airtime/map/CcPlayoutHistoryTemplateFieldTableMap.php',
'CcPlayoutHistoryTemplatePeer' => 'airtime/CcPlayoutHistoryTemplatePeer.php',
'CcPlayoutHistoryTemplateQuery' => 'airtime/CcPlayoutHistoryTemplateQuery.php',
'CcPlayoutHistoryTemplateTableMap' => 'airtime/map/CcPlayoutHistoryTemplateTableMap.php',
'CcPref' => 'airtime/CcPref.php',
'CcPrefPeer' => 'airtime/CcPrefPeer.php',
'CcPrefQuery' => 'airtime/CcPrefQuery.php',
'CcPrefTableMap' => 'airtime/map/CcPrefTableMap.php',
'CcSchedule' => 'airtime/CcSchedule.php',
'CcSchedulePeer' => 'airtime/CcSchedulePeer.php',
'CcScheduleQuery' => 'airtime/CcScheduleQuery.php',
'CcScheduleTableMap' => 'airtime/map/CcScheduleTableMap.php',
'CcServiceRegister' => 'airtime/CcServiceRegister.php',
'CcServiceRegisterPeer' => 'airtime/CcServiceRegisterPeer.php',
'CcServiceRegisterQuery' => 'airtime/CcServiceRegisterQuery.php',
'CcServiceRegisterTableMap' => 'airtime/map/CcServiceRegisterTableMap.php',
'CcSess' => 'airtime/CcSess.php',
'CcSessPeer' => 'airtime/CcSessPeer.php',
'CcSessQuery' => 'airtime/CcSessQuery.php',
'CcSessTableMap' => 'airtime/map/CcSessTableMap.php',
'CcShow' => 'airtime/CcShow.php',
'CcShowDays' => 'airtime/CcShowDays.php',
'CcShowDaysPeer' => 'airtime/CcShowDaysPeer.php',
'CcShowDaysQuery' => 'airtime/CcShowDaysQuery.php',
'CcShowDaysTableMap' => 'airtime/map/CcShowDaysTableMap.php',
'CcShowHosts' => 'airtime/CcShowHosts.php',
'CcShowHostsPeer' => 'airtime/CcShowHostsPeer.php',
'CcShowHostsQuery' => 'airtime/CcShowHostsQuery.php',
'CcShowHostsTableMap' => 'airtime/map/CcShowHostsTableMap.php',
'CcShowInstances' => 'airtime/CcShowInstances.php',
'CcShowInstancesPeer' => 'airtime/CcShowInstancesPeer.php',
'CcShowInstancesQuery' => 'airtime/CcShowInstancesQuery.php',
'CcShowInstancesTableMap' => 'airtime/map/CcShowInstancesTableMap.php',
'CcShowPeer' => 'airtime/CcShowPeer.php',
'CcShowQuery' => 'airtime/CcShowQuery.php',
'CcShowRebroadcast' => 'airtime/CcShowRebroadcast.php',
'CcShowRebroadcastPeer' => 'airtime/CcShowRebroadcastPeer.php',
'CcShowRebroadcastQuery' => 'airtime/CcShowRebroadcastQuery.php',
'CcShowRebroadcastTableMap' => 'airtime/map/CcShowRebroadcastTableMap.php',
'CcShowTableMap' => 'airtime/map/CcShowTableMap.php',
'CcSmemb' => 'airtime/CcSmemb.php',
'CcSmembPeer' => 'airtime/CcSmembPeer.php',
'CcSmembQuery' => 'airtime/CcSmembQuery.php',
'CcSmembTableMap' => 'airtime/map/CcSmembTableMap.php',
'CcStreamSetting' => 'airtime/CcStreamSetting.php',
'CcStreamSettingPeer' => 'airtime/CcStreamSettingPeer.php',
'CcStreamSettingQuery' => 'airtime/CcStreamSettingQuery.php',
'CcStreamSettingTableMap' => 'airtime/map/CcStreamSettingTableMap.php',
'CcSubjs' => 'airtime/CcSubjs.php',
'CcSubjsPeer' => 'airtime/CcSubjsPeer.php',
'CcSubjsQuery' => 'airtime/CcSubjsQuery.php',
'CcSubjsTableMap' => 'airtime/map/CcSubjsTableMap.php',
'CcSubjsToken' => 'airtime/CcSubjsToken.php',
'CcSubjsTokenPeer' => 'airtime/CcSubjsTokenPeer.php',
'CcSubjsTokenQuery' => 'airtime/CcSubjsTokenQuery.php',
'CcSubjsTokenTableMap' => 'airtime/map/CcSubjsTokenTableMap.php',
'CcTimestamp' => 'airtime/CcTimestamp.php',
'CcTimestampPeer' => 'airtime/CcTimestampPeer.php',
'CcTimestampQuery' => 'airtime/CcTimestampQuery.php',
'CcTimestampTableMap' => 'airtime/map/CcTimestampTableMap.php',
'CcWebstream' => 'airtime/CcWebstream.php',
'CcWebstreamMetadata' => 'airtime/CcWebstreamMetadata.php',
'CcWebstreamMetadataPeer' => 'airtime/CcWebstreamMetadataPeer.php',
'CcWebstreamMetadataQuery' => 'airtime/CcWebstreamMetadataQuery.php',
'CcWebstreamMetadataTableMap' => 'airtime/map/CcWebstreamMetadataTableMap.php',
'CcWebstreamPeer' => 'airtime/CcWebstreamPeer.php',
'CcWebstreamQuery' => 'airtime/CcWebstreamQuery.php',
'CcWebstreamTableMap' => 'airtime/map/CcWebstreamTableMap.php',
'CloudFile' => 'airtime/CloudFile.php',
'CloudFilePeer' => 'airtime/CloudFilePeer.php',
'CloudFileQuery' => 'airtime/CloudFileQuery.php',
'CloudFileTableMap' => 'airtime/map/CloudFileTableMap.php',
);

View File

@ -25,6 +25,19 @@ class Config {
$filename = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : "/etc/airtime/airtime.conf";
}
// Parse separate conf file for cloud storage values
$cloudStorageConfig = isset($_SERVER['CLOUD_STORAGE_CONF']) ? $_SERVER['CLOUD_STORAGE_CONF'] : "/etc/airtime-saas/cloud_storage.conf";
$cloudStorageValues = parse_ini_file($cloudStorageConfig, true);
$supportedStorageBackends = array('amazon_S3');
foreach ($supportedStorageBackends as $backend) {
$CC_CONFIG[$backend] = $cloudStorageValues[$backend];
}
// Tells us where file uploads will be uploaded to.
// It will either be set to a cloud storage backend or local file storage.
$CC_CONFIG["current_backend"] = $cloudStorageValues["current_backend"]["storage_backend"];
$values = parse_ini_file($filename, true);
// Name of the web server user

View File

@ -87,26 +87,19 @@ class ApiController extends Zend_Controller_Action
*/
public function getMediaAction()
{
// Close the session so other HTTP requests can be completed while
// tracks are read for previewing or downloading.
session_write_close();
$fileId = $this->_getParam("file");
$media = Application_Model_StoredFile::RecallById($fileId);
if ($media != null) {
$filepath = $media->getFilePath();
// Make sure we don't have some wrong result beecause of caching
clearstatcache();
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);
}
if ($media->getPropelOrm()->isValidPhysicalFile()) {
$filename = $media->getPropelOrm()->getFilename();
//Download user left clicks a track and selects Download.
if ("true" == $this->_getParam('download')) {
@ -114,13 +107,13 @@ class ApiController extends Zend_Controller_Action
//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.
header('Content-Disposition: attachment; filename="'.$file_base_name.'"');
header('Content-Disposition: attachment; filename="'.$filename.'"');
} else {
//user clicks play button for track and downloads it.
header('Content-Disposition: inline; filename="'.$file_base_name.'"');
//user clicks play button for track preview
header('Content-Disposition: inline; filename="'.$filename.'"');
}
$this->smartReadFile($filepath, $media->getPropelOrm()->getDbMime());
$this->smartReadFile($media);
exit;
} else {
header ("HTTP/1.1 404 Not Found");
@ -142,12 +135,13 @@ class ApiController extends Zend_Controller_Action
* @link https://groups.google.com/d/msg/jplayer/nSM2UmnSKKA/Hu76jDZS4xcJ
* @link http://php.net/manual/en/function.readfile.php#86244
*/
public function smartReadFile($location, $mimeType = 'audio/mp3')
public function smartReadFile($media)
{
$size= filesize($location);
$time= date('r', filemtime($location));
$filepath = $media->getFilePath();
$size= $media->getFileSize();
$mimeType = $media->getPropelOrm()->getDbMime();
$fm = @fopen($location, 'rb');
$fm = @fopen($filepath, 'rb');
if (!$fm) {
header ("HTTP/1.1 505 Internal server error");
@ -180,20 +174,18 @@ class ApiController extends Zend_Controller_Action
header("Content-Range: bytes $begin-$end/$size");
}
header("Content-Transfer-Encoding: binary");
header("Last-Modified: $time");
//We can have multiple levels of output buffering. Need to
//keep looping until all have been disabled!!!
//http://www.php.net/manual/en/function.ob-end-flush.php
while (@ob_end_flush());
$cur = $begin;
fseek($fm, $begin, 0);
while (!feof($fm) && $cur <= $end && (connection_status() == 0)) {
echo fread($fm, min(1024 * 16, ($end - $cur) + 1));
$cur += 1024 * 16;
// NOTE: We can't use fseek here because it does not work with streams
// (a.k.a. Files stored in the cloud)
while(!feof($fm) && (connection_status() == 0)) {
echo fread($fm, 1024 * 8);
}
fclose($fm);
}
//Used by the SaaS monitoring

View File

@ -46,8 +46,8 @@ class AudiopreviewController extends Zend_Controller_Action
}
if ($type == "audioclip") {
$uri = $baseUrl."api/get-media/file/".$audioFileID;
$media = Application_Model_StoredFile::RecallById($audioFileID);
$uri = $baseUrl."api/get-media/file/".$audioFileID;
$mime = $media->getPropelOrm()->getDbMime();
} elseif ($type == "stream") {
$webstream = CcWebstreamQuery::create()->findPk($audioFileID);

View File

@ -189,7 +189,6 @@ class LibraryController extends Zend_Controller_Action
$obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME);
if ($type === "audioclip") {
$file = Application_Model_StoredFile::RecallById($id);
$menu["play"]["mime"] = $file->getPropelOrm()->getDbMime();
@ -214,7 +213,11 @@ class LibraryController extends Zend_Controller_Action
$menu["edit"] = array("name"=> _("Edit Metadata"), "icon" => "edit", "url" => $baseUrl."library/edit-file-md/id/{$id}");
}
$url = $file->getRelativeFileUrl($baseUrl).'/download/true';
// It's important that we always return the parent id (cc_files id)
// and not the cloud_file id (if applicable) for track download.
// Our application logic (StoredFile.php) will determine if the track
// is a cloud_file and handle it appropriately.
$url = $baseUrl."api/get-media/file/".$id.".".$file->getFileExtension().'/download/true';
$menu["download"] = array("name" => _("Download"), "icon" => "download", "url" => $url);
} elseif ($type === "playlist" || $type === "block") {
if ($type === 'playlist') {
@ -349,7 +352,6 @@ class LibraryController extends Zend_Controller_Action
foreach ($files as $id) {
$file = Application_Model_StoredFile::RecallById($id);
if (isset($file)) {
try {
$res = $file->delete();
@ -357,8 +359,8 @@ class LibraryController extends Zend_Controller_Action
$message = $noPermissionMsg;
} catch (Exception $e) {
//could throw a scheduled in future exception.
$message = _("Could not delete some scheduled files.");
Logging::debug($e->getMessage());
$message = _("Could not delete file(s).");
Logging::info($message.": ".$e->getMessage());
}
}
}
@ -468,7 +470,7 @@ class LibraryController extends Zend_Controller_Action
$md = $file->getMetadata();
foreach ($md as $key => $value) {
if ($key == 'MDATA_KEY_DIRECTORY') {
if ($key == 'MDATA_KEY_DIRECTORY' && !is_null($value)) {
$musicDir = Application_Model_MusicDir::getDirByPK($value);
$md['MDATA_KEY_FILEPATH'] = Application_Common_OsPath::join($musicDir->getDirectory(), $md['MDATA_KEY_FILEPATH']);
}

View File

@ -88,7 +88,7 @@ class WebstreamController extends Zend_Controller_Action
public function isAuthorized($webstream_id)
{
$user = Application_Model_User::getCurrentUser();
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
if ($user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) {
return true;
}

View File

@ -80,14 +80,21 @@ class Application_Model_RabbitMq
}
public static function SendMessageToAnalyzer($tmpFilePath, $importedStorageDirectory, $originalFilename,
$callbackUrl, $apiKey)
$callbackUrl, $apiKey, $currentStorageBackend)
{
$exchange = 'airtime-uploads';
$data['tmp_file_path'] = $tmpFilePath;
$data['current_storage_backend'] = $currentStorageBackend;
$data['import_directory'] = $importedStorageDirectory;
$data['original_filename'] = $originalFilename;
$data['callback_url'] = $callbackUrl;
$data['api_key'] = $apiKey;
// Pass station name to the analyzer so we can set it with the file's metadata
// and prefix the object name with it before uploading it to the cloud. This
// isn't a requirement for cloud storage, but put there as a safeguard, since
// all Airtime Pro stations will share the same bucket.
$data['station_domain'] = $stationDomain = Application_Model_Preference::GetStationName();
$jsonData = json_encode($data);
self::sendMessage($exchange, 'topic', false, $jsonData, 'airtime-uploads');

View File

@ -761,7 +761,20 @@ SQL;
}
}
private static function createFileScheduleEvent(&$data, $item, $media_id, $uri)
/**
*
* Appends schedule "events" to an array of schedule events that gets
* sent to PYPO. Each schedule event contains information PYPO and
* Liquidsoap need for playout.
*
* @param Array $data array to be filled with schedule info - $item(s)
* @param Array $item schedule info about one track
* @param Integer $media_id scheduled item's cc_files id
* @param String $uri path to the scheduled item's physical location
* @param Integer $filsize The file's file size in bytes
*
*/
private static function createFileScheduleEvent(&$data, $item, $media_id, $uri, $filesize)
{
$start = self::AirtimeTimeToPypoTime($item["start"]);
$end = self::AirtimeTimeToPypoTime($item["end"]);
@ -796,6 +809,7 @@ SQL;
'show_name' => $item["show_name"],
'replay_gain' => $replay_gain,
'independent_event' => $independent_event,
'filesize' => $filesize,
);
if ($schedule_item['cue_in'] > $schedule_item['cue_out']) {
@ -928,8 +942,13 @@ SQL;
//row is from "file"
$media_id = $item['file_id'];
$storedFile = Application_Model_StoredFile::RecallById($media_id);
$uri = $storedFile->getFilePath();
self::createFileScheduleEvent($data, $item, $media_id, $uri);
$file = $storedFile->getPropelOrm();
$uri = $file->getAbsoluteFilePath();
$baseUrl = Application_Common_OsPath::getBaseDir();
$filesize = $file->getFileSize();
self::createFileScheduleEvent($data, $item, $media_id, $uri, $filesize);
}
elseif (!is_null($item['stream_id'])) {
//row is type "webstream"

View File

@ -97,7 +97,7 @@ class Application_Model_StoredFile
}
public static function createWithFile($f, $con) {
$storedFile = new Application_Model_StoredFile($f, $con);
$storedFile = new Application_Model_StoredFile($f, $con);
return $storedFile;
}
@ -210,6 +210,13 @@ class Application_Model_StoredFile
if ($dbColumn == "track_title" && (is_null($mdValue) || $mdValue == "")) {
continue;
}
// Bpm gets POSTed as a string type. With Propel 1.6 this value
// was casted to an integer type before saving it to the db. But
// Propel 1.7 does not do this
if ($dbColumn == "bpm") {
$mdValue = (int) $mdValue;
}
# TODO : refactor string evals
if (isset($this->_dbMD[$dbColumn])) {
$propelColumn = $this->_dbMD[$dbColumn];
@ -364,15 +371,13 @@ SQL;
}
/**
* Delete stored virtual file
*
* @param boolean $p_deleteFile
* Deletes the physical file from the local file system or from the cloud
*
*/
public function delete()
{
// Check if the file is scheduled to be played in the future
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->_file->getCcFileId())) {
throw new DeleteScheduledFileException();
}
@ -382,30 +387,37 @@ SQL;
if (!$isAdminOrPM && $this->getFileOwnerId() != $user->getId()) {
throw new FileNoPermissionException();
}
$file_id = $this->_file->getDbId();
Logging::info("User ".$user->getLogin()." is deleting file: ".$this->_file->getDbTrackTitle()." - file id: ".$file_id);
$music_dir = Application_Model_MusicDir::getDirByPK($this->_file->getDbDirectory());
assert($music_dir);
$type = $music_dir->getType();
Logging::info($_SERVER["HTTP_HOST"].": User ".$user->getLogin()." is deleting file: ".$this->_file->getDbTrackTitle()." - file id: ".$this->_file->getDbId());
try {
if ($this->existsOnDisk() && $type == "stor") {
$filepath = $this->getFilePath();
//Update the user's disk usage
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($filepath)));
unlink($filepath);
}
} catch (Exception $e) {
Logging::warning($e->getMessage());
//If the file didn't exist on disk, that's fine, we still want to
//remove it from the database, so we continue here.
$filesize = $this->_file->getFileSize();
if ($filesize <= 0) {
throw new Exception("Cannot delete file with filesize ".$filesize);
}
// need to explicitly update any playlist's and block's length
// that contains the file getting deleted
$fileId = $this->_file->getDbId();
$plRows = CcPlaylistcontentsQuery::create()->filterByDbFileId()->find();
//Delete the physical file from either the local stor directory
//or from the cloud
$this->_file->deletePhysicalFile();
//Update the user's disk usage
Application_Model_Preference::updateDiskUsage(-1 * $filesize);
//Explicitly update any playlist's and block's length that contain
//the file getting deleted
self::updateBlockAndPlaylistLength($this->_file->getDbId());
//delete the file record from cc_files (and cloud_file, if applicable)
$this->_file->delete();
}
/*
* This function is meant to be called when a file is getting
* deleted from the library. It re-calculates the length of
* all blocks and playlists that contained the deleted file.
*/
private static function updateBlockAndPlaylistLength($fileId)
{
$plRows = CcPlaylistcontentsQuery::create()->filterByDbFileId($fileId)->find();
foreach ($plRows as $row) {
$pl = CcPlaylistQuery::create()->filterByDbId($row->getDbPlaylistId($fileId))->findOne();
$pl->setDbLength($pl->computeDbLength(Propel::getConnection(CcPlaylistPeer::DATABASE_NAME)));
@ -418,9 +430,6 @@ SQL;
$bl->setDbLength($bl->computeDbLength(Propel::getConnection(CcBlockPeer::DATABASE_NAME)));
$bl->save();
}
//We actually do want to delete the file from the database here
$this->_file->delete();
}
/**
@ -471,7 +480,7 @@ SQL;
$mime = $this->_file->getDbMime();
if ($mime == "audio/ogg" || $mime == "application/ogg") {
if ($mime == "audio/ogg" || $mime == "application/ogg" || $mime == "audio/vorbis") {
return "ogg";
} elseif ($mime == "audio/mp3" || $mime == "audio/mpeg") {
return "mp3";
@ -485,7 +494,7 @@ SQL;
}
/**
* Get real filename of raw media data
* Get the absolute filepath
*
* @return string
*/
@ -493,19 +502,7 @@ SQL;
{
assert($this->_file);
$music_dir = Application_Model_MusicDir::getDirByPK($this->
_file->getDbDirectory());
if (!$music_dir) {
throw new Exception(_("Invalid music_dir for file in database."));
}
$directory = $music_dir->getDirectory();
$filepath = $this->_file->getDbFilepath();
if (!$filepath) {
throw new Exception(sprintf(_("Blank file path for file %s (id: %s) in database."), $this->_file->getDbTrackTitle(), $this->getId()));
}
return Application_Common_OsPath::join($directory, $filepath);
return $this->_file->getURLForTrackPreviewOrDownload();
}
/**
@ -558,6 +555,20 @@ SQL;
return $baseUrl."api/get-media/file/".$this->getId().".".$this->getFileExtension();
}
public function getResourceId()
{
return $this->_file->getResourceId();
}
public function getFileSize()
{
$filesize = $this->_file->getFileSize();
if ($filesize <= 0) {
throw new Exception ("Could not determine filesize for file id: ".$this->_file->getDbId().". Filesize: ".$filesize);
}
return $filesize;
}
public static function Insert($md, $con)
{
// save some work by checking if filepath is given right away
@ -596,8 +607,23 @@ SQL;
}
if (isset($p_id)) {
$f = CcFilesQuery::create()->findPK(intval($p_id), $con);
return is_null($f) ? null : self::createWithFile($f, $con);
$p_id = intval($p_id);
$storedFile = CcFilesQuery::create()->findPK($p_id, $con);
if (is_null($storedFile)) {
throw new Exception("Could not recall file with id: ".$p_id);
}
//Attempt to get the cloud file object and return it. If no cloud
//file object is found then we are dealing with a regular stored
//object so return that
$cloudFile = CloudFileQuery::create()->findOneByCcFileId($p_id);
if (is_null($cloudFile)) {
return self::createWithFile($storedFile, $con);
} else {
return self::createWithFile($cloudFile, $con);
}
} else {
throw new Exception("No arguments passed to RecallById");
}
@ -605,8 +631,7 @@ SQL;
public function getName()
{
$info = pathinfo($this->getFilePath());
return $info['filename'];
return $this->_file->getFilename();
}
/**

View File

@ -420,4 +420,79 @@ class CcFiles extends BaseCcFiles {
{
exec("find $path -empty -type d -delete");
}
}
/**
* Returns the file size in bytes.
*/
public function getFileSize()
{
return filesize($this->getAbsoluteFilePath());
}
public function getFilename()
{
$info = pathinfo($this->getAbsoluteFilePath());
return $info['filename'];
}
/**
* Returns the file's absolute file path stored on disk.
*/
public function getURLForTrackPreviewOrDownload()
{
return $this->getAbsoluteFilePath();
}
/**
* Returns the file's absolute file path stored on disk.
*/
public function getAbsoluteFilePath()
{
$music_dir = Application_Model_MusicDir::getDirByPK($this->getDbDirectory());
if (!$music_dir) {
throw new Exception("Invalid music_dir for file in database.");
}
$directory = $music_dir->getDirectory();
$filepath = $this->getDbFilepath();
return Application_Common_OsPath::join($directory, $filepath);
}
/**
* Checks if the file is a regular file that can be previewed and downloaded.
*/
public function isValidPhysicalFile()
{
return is_file($this->getAbsoluteFilePath());
}
/**
*
* Deletes the file from the stor directory on disk.
*/
public function deletePhysicalFile()
{
$filepath = $this->getAbsoluteFilePath();
if (file_exists($filepath)) {
unlink($filepath);
} else {
throw new Exception("Could not locate file ".$filepath);
}
}
/**
*
* This function refers to the file's Amazon S3 resource id.
* Returns null because cc_files are stored on local disk.
*/
public function getResourceId()
{
return null;
}
public function getCcFileId()
{
return $this->id;
}
} // CcFiles

View File

@ -0,0 +1,96 @@
<?php
require_once 'ProxyStorageBackend.php';
/**
* Skeleton subclass for representing a row from the 'cloud_file' table.
*
* Each cloud_file has a corresponding cc_file referenced as a foreign key.
* The file's metadata is stored in the cc_file table. This, cloud_file,
* table represents files that are stored in the cloud.
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package propel.generator.airtime
*/
class CloudFile extends BaseCloudFile
{
private $proxyStorageBackend;
/**
* Returns a signed URL to the file's object on Amazon S3. Since we are
* requesting the file's object via this URL, it needs to be signed because
* all objects stored on Amazon S3 are private.
*/
public function getURLForTrackPreviewOrDownload()
{
if ($this->proxyStorageBackend == null) {
$this->proxyStorageBackend = new ProxyStorageBackend($this->getStorageBackend());
}
return $this->proxyStorageBackend->getSignedURL($this->getResourceId());
}
/**
*
* Returns a url to the file's object on Amazon S3.
*/
public function getAbsoluteFilePath()
{
if ($this->proxyStorageBackend == null) {
$this->proxyStorageBackend = new ProxyStorageBackend($this->getStorageBackend());
}
return $this->proxyStorageBackend->getAbsoluteFilePath($this->getResourceId());
}
/**
* Returns the file size in bytes.
*/
public function getFileSize()
{
if ($this->proxyStorageBackend == null) {
$this->proxyStorageBackend = new ProxyStorageBackend($this->getStorageBackend());
}
return $this->proxyStorageBackend->getFileSize($this->getResourceId());
}
public function getFilename()
{
return $this->getDbFilepath();
}
/**
* Checks if the file is a regular file that can be previewed and downloaded.
*/
public function isValidPhysicalFile()
{
// We don't need to check if the cloud file is a valid file because
// before it is imported the Analyzer runs it through Liquidsoap
// to check its playability. If Liquidsoap can't play the file it
// does not get imported into the Airtime library.
return true;
}
/**
*
* Deletes the file from cloud storage
*/
public function deletePhysicalFile()
{
if ($this->proxyStorageBackend == null) {
$this->proxyStorageBackend = new ProxyStorageBackend($this->getStorageBackend());
}
$this->proxyStorageBackend->deletePhysicalFile($this->getResourceId());
}
/**
*
* Deletes the cc_file and cloud_file entries from the database.
*/
public function delete(PropelPDO $con = NULL)
{
CcFilesQuery::create()->findPk($this->getCcFileId())->delete();
parent::delete();
}
}

View File

@ -0,0 +1,18 @@
<?php
/**
* Skeleton subclass for performing query and update operations on the 'cloud_file' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package propel.generator.airtime
*/
class CloudFilePeer extends BaseCloudFilePeer
{
}

View File

@ -0,0 +1,18 @@
<?php
/**
* Skeleton subclass for performing query and update operations on the 'cloud_file' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package propel.generator.airtime
*/
class CloudFileQuery extends BaseCloudFileQuery
{
}

View File

@ -14,63 +14,70 @@
*
* @package propel.generator.airtime.map
*/
class CcBlockTableMap extends TableMap {
class CcBlockTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcBlockTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcBlockTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_block');
$this->setPhpName('CcBlock');
$this->setClassname('CcBlock');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_block_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', false, 6, null);
$this->addForeignKey('CREATOR_ID', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('LENGTH', 'DbLength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('TYPE', 'DbType', 'VARCHAR', false, 7, 'static');
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_block');
$this->setPhpName('CcBlock');
$this->setClassname('CcBlock');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_block_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('name', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('mtime', 'DbMtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('utime', 'DbUtime', 'TIMESTAMP', false, 6, null);
$this->addForeignKey('creator_id', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('length', 'DbLength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('type', 'DbType', 'VARCHAR', false, 7, 'static');
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'block_id', ), 'CASCADE', null);
$this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'block_id', ), 'CASCADE', null);
$this->addRelation('CcBlockcriteria', 'CcBlockcriteria', RelationMap::ONE_TO_MANY, array('id' => 'block_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'block_id', ), 'CASCADE', null, 'CcPlaylistcontentss');
$this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'block_id', ), 'CASCADE', null, 'CcBlockcontentss');
$this->addRelation('CcBlockcriteria', 'CcBlockcriteria', RelationMap::ONE_TO_MANY, array('id' => 'block_id', ), 'CASCADE', null, 'CcBlockcriterias');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column' => array('name' => 'length', 'expression' => 'SUM(cliplength)', 'foreign_table' => 'cc_blockcontents', ),
);
} // getBehaviors()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column' => array (
'name' => 'length',
'expression' => 'SUM(cliplength)',
'condition' => NULL,
'foreign_table' => 'cc_blockcontents',
'foreign_schema' => NULL,
),
);
} // getBehaviors()
} // CcBlockTableMap

View File

@ -14,63 +14,67 @@
*
* @package propel.generator.airtime.map
*/
class CcBlockcontentsTableMap extends TableMap {
class CcBlockcontentsTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcBlockcontentsTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcBlockcontentsTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_blockcontents');
$this->setPhpName('CcBlockcontents');
$this->setClassname('CcBlockcontents');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_blockcontents_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('BLOCK_ID', 'DbBlockId', 'INTEGER', 'cc_block', 'ID', false, null, null);
$this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null);
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
$this->addColumn('TRACKOFFSET', 'DbTrackOffset', 'REAL', true, null, 0);
$this->addColumn('CLIPLENGTH', 'DbCliplength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('CUEIN', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('FADEIN', 'DbFadein', 'TIME', false, null, '00:00:00');
$this->addColumn('FADEOUT', 'DbFadeout', 'TIME', false, null, '00:00:00');
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_blockcontents');
$this->setPhpName('CcBlockcontents');
$this->setClassname('CcBlockcontents');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_blockcontents_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('block_id', 'DbBlockId', 'INTEGER', 'cc_block', 'id', false, null, null);
$this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_files', 'id', false, null, null);
$this->addColumn('position', 'DbPosition', 'INTEGER', false, null, null);
$this->addColumn('trackoffset', 'DbTrackOffset', 'REAL', true, null, 0);
$this->addColumn('cliplength', 'DbCliplength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('cuein', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('cueout', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('fadein', 'DbFadein', 'TIME', false, null, '00:00:00');
$this->addColumn('fadeout', 'DbFadeout', 'TIME', false, null, '00:00:00');
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcBlock', 'CcBlock', RelationMap::MANY_TO_ONE, array('block_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcBlock', 'CcBlock', RelationMap::MANY_TO_ONE, array('block_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column_relation' => array('foreign_table' => 'cc_block', 'update_method' => 'updateDbLength', ),
);
} // getBehaviors()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column_relation' => array (
'foreign_table' => 'cc_block',
'update_method' => 'updateDbLength',
),
);
} // getBehaviors()
} // CcBlockcontentsTableMap

View File

@ -14,45 +14,46 @@
*
* @package propel.generator.airtime.map
*/
class CcBlockcriteriaTableMap extends TableMap {
class CcBlockcriteriaTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcBlockcriteriaTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcBlockcriteriaTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_blockcriteria');
$this->setPhpName('CcBlockcriteria');
$this->setClassname('CcBlockcriteria');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_blockcriteria_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('CRITERIA', 'DbCriteria', 'VARCHAR', true, 32, null);
$this->addColumn('MODIFIER', 'DbModifier', 'VARCHAR', true, 16, null);
$this->addColumn('VALUE', 'DbValue', 'VARCHAR', true, 512, null);
$this->addColumn('EXTRA', 'DbExtra', 'VARCHAR', false, 512, null);
$this->addForeignKey('BLOCK_ID', 'DbBlockId', 'INTEGER', 'cc_block', 'ID', true, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_blockcriteria');
$this->setPhpName('CcBlockcriteria');
$this->setClassname('CcBlockcriteria');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_blockcriteria_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('criteria', 'DbCriteria', 'VARCHAR', true, 32, null);
$this->addColumn('modifier', 'DbModifier', 'VARCHAR', true, 16, null);
$this->addColumn('value', 'DbValue', 'VARCHAR', true, 512, null);
$this->addColumn('extra', 'DbExtra', 'VARCHAR', false, 512, null);
$this->addForeignKey('block_id', 'DbBlockId', 'INTEGER', 'cc_block', 'id', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcBlock', 'CcBlock', RelationMap::MANY_TO_ONE, array('block_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcBlock', 'CcBlock', RelationMap::MANY_TO_ONE, array('block_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcBlockcriteriaTableMap

View File

@ -14,39 +14,40 @@
*
* @package propel.generator.airtime.map
*/
class CcCountryTableMap extends TableMap {
class CcCountryTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcCountryTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcCountryTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_country');
$this->setPhpName('CcCountry');
$this->setClassname('CcCountry');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ISOCODE', 'DbIsoCode', 'CHAR', true, 3, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_country');
$this->setPhpName('CcCountry');
$this->setClassname('CcCountry');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('isocode', 'DbIsoCode', 'CHAR', true, 3, null);
$this->addColumn('name', 'DbName', 'VARCHAR', true, 255, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // CcCountryTableMap

View File

@ -14,116 +14,118 @@
*
* @package propel.generator.airtime.map
*/
class CcFilesTableMap extends TableMap {
class CcFilesTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcFilesTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcFilesTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_files');
$this->setPhpName('CcFiles');
$this->setClassname('CcFiles');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_files_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('MIME', 'DbMime', 'VARCHAR', true, 255, '');
$this->addColumn('FTYPE', 'DbFtype', 'VARCHAR', true, 128, '');
$this->addForeignKey('DIRECTORY', 'DbDirectory', 'INTEGER', 'cc_music_dirs', 'ID', false, null, null);
$this->addColumn('FILEPATH', 'DbFilepath', 'LONGVARCHAR', false, null, '');
$this->addColumn('IMPORT_STATUS', 'DbImportStatus', 'INTEGER', true, null, 1);
$this->addColumn('CURRENTLYACCESSING', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0);
$this->addForeignKey('EDITEDBY', 'DbEditedby', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
$this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('LPTIME', 'DbLPtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('MD5', 'DbMd5', 'CHAR', false, 32, null);
$this->addColumn('TRACK_TITLE', 'DbTrackTitle', 'VARCHAR', false, 512, null);
$this->addColumn('ARTIST_NAME', 'DbArtistName', 'VARCHAR', false, 512, null);
$this->addColumn('BIT_RATE', 'DbBitRate', 'INTEGER', false, null, null);
$this->addColumn('SAMPLE_RATE', 'DbSampleRate', 'INTEGER', false, null, null);
$this->addColumn('FORMAT', 'DbFormat', 'VARCHAR', false, 128, null);
$this->addColumn('LENGTH', 'DbLength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('ALBUM_TITLE', 'DbAlbumTitle', 'VARCHAR', false, 512, null);
$this->addColumn('GENRE', 'DbGenre', 'VARCHAR', false, 64, null);
$this->addColumn('COMMENTS', 'DbComments', 'LONGVARCHAR', false, null, null);
$this->addColumn('YEAR', 'DbYear', 'VARCHAR', false, 16, null);
$this->addColumn('TRACK_NUMBER', 'DbTrackNumber', 'INTEGER', false, null, null);
$this->addColumn('CHANNELS', 'DbChannels', 'INTEGER', false, null, null);
$this->addColumn('URL', 'DbUrl', 'VARCHAR', false, 1024, null);
$this->addColumn('BPM', 'DbBpm', 'INTEGER', false, null, null);
$this->addColumn('RATING', 'DbRating', 'VARCHAR', false, 8, null);
$this->addColumn('ENCODED_BY', 'DbEncodedBy', 'VARCHAR', false, 255, null);
$this->addColumn('DISC_NUMBER', 'DbDiscNumber', 'VARCHAR', false, 8, null);
$this->addColumn('MOOD', 'DbMood', 'VARCHAR', false, 64, null);
$this->addColumn('LABEL', 'DbLabel', 'VARCHAR', false, 512, null);
$this->addColumn('COMPOSER', 'DbComposer', 'VARCHAR', false, 512, null);
$this->addColumn('ENCODER', 'DbEncoder', 'VARCHAR', false, 64, null);
$this->addColumn('CHECKSUM', 'DbChecksum', 'VARCHAR', false, 256, null);
$this->addColumn('LYRICS', 'DbLyrics', 'LONGVARCHAR', false, null, null);
$this->addColumn('ORCHESTRA', 'DbOrchestra', 'VARCHAR', false, 512, null);
$this->addColumn('CONDUCTOR', 'DbConductor', 'VARCHAR', false, 512, null);
$this->addColumn('LYRICIST', 'DbLyricist', 'VARCHAR', false, 512, null);
$this->addColumn('ORIGINAL_LYRICIST', 'DbOriginalLyricist', 'VARCHAR', false, 512, null);
$this->addColumn('RADIO_STATION_NAME', 'DbRadioStationName', 'VARCHAR', false, 512, null);
$this->addColumn('INFO_URL', 'DbInfoUrl', 'VARCHAR', false, 512, null);
$this->addColumn('ARTIST_URL', 'DbArtistUrl', 'VARCHAR', false, 512, null);
$this->addColumn('AUDIO_SOURCE_URL', 'DbAudioSourceUrl', 'VARCHAR', false, 512, null);
$this->addColumn('RADIO_STATION_URL', 'DbRadioStationUrl', 'VARCHAR', false, 512, null);
$this->addColumn('BUY_THIS_URL', 'DbBuyThisUrl', 'VARCHAR', false, 512, null);
$this->addColumn('ISRC_NUMBER', 'DbIsrcNumber', 'VARCHAR', false, 512, null);
$this->addColumn('CATALOG_NUMBER', 'DbCatalogNumber', 'VARCHAR', false, 512, null);
$this->addColumn('ORIGINAL_ARTIST', 'DbOriginalArtist', 'VARCHAR', false, 512, null);
$this->addColumn('COPYRIGHT', 'DbCopyright', 'VARCHAR', false, 512, null);
$this->addColumn('REPORT_DATETIME', 'DbReportDatetime', 'VARCHAR', false, 32, null);
$this->addColumn('REPORT_LOCATION', 'DbReportLocation', 'VARCHAR', false, 512, null);
$this->addColumn('REPORT_ORGANIZATION', 'DbReportOrganization', 'VARCHAR', false, 512, null);
$this->addColumn('SUBJECT', 'DbSubject', 'VARCHAR', false, 512, null);
$this->addColumn('CONTRIBUTOR', 'DbContributor', 'VARCHAR', false, 512, null);
$this->addColumn('LANGUAGE', 'DbLanguage', 'VARCHAR', false, 512, null);
$this->addColumn('FILE_EXISTS', 'DbFileExists', 'BOOLEAN', false, null, true);
$this->addColumn('SOUNDCLOUD_ID', 'DbSoundcloudId', 'INTEGER', false, null, null);
$this->addColumn('SOUNDCLOUD_ERROR_CODE', 'DbSoundcloudErrorCode', 'INTEGER', false, null, null);
$this->addColumn('SOUNDCLOUD_ERROR_MSG', 'DbSoundcloudErrorMsg', 'VARCHAR', false, 512, null);
$this->addColumn('SOUNDCLOUD_LINK_TO_FILE', 'DbSoundcloudLinkToFile', 'VARCHAR', false, 4096, null);
$this->addColumn('SOUNDCLOUD_UPLOAD_TIME', 'DbSoundCloundUploadTime', 'TIMESTAMP', false, 6, null);
$this->addColumn('REPLAY_GAIN', 'DbReplayGain', 'NUMERIC', false, null, null);
$this->addForeignKey('OWNER_ID', 'DbOwnerId', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
$this->addColumn('CUEIN', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('SILAN_CHECK', 'DbSilanCheck', 'BOOLEAN', false, null, false);
$this->addColumn('HIDDEN', 'DbHidden', 'BOOLEAN', false, null, false);
$this->addColumn('IS_SCHEDULED', 'DbIsScheduled', 'BOOLEAN', false, null, false);
$this->addColumn('IS_PLAYLIST', 'DbIsPlaylist', 'BOOLEAN', false, null, false);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_files');
$this->setPhpName('CcFiles');
$this->setClassname('CcFiles');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_files_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('name', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('mime', 'DbMime', 'VARCHAR', true, 255, '');
$this->addColumn('ftype', 'DbFtype', 'VARCHAR', true, 128, '');
$this->addForeignKey('directory', 'DbDirectory', 'INTEGER', 'cc_music_dirs', 'id', false, null, null);
$this->addColumn('filepath', 'DbFilepath', 'LONGVARCHAR', false, null, '');
$this->addColumn('import_status', 'DbImportStatus', 'INTEGER', true, null, 1);
$this->addColumn('currentlyaccessing', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0);
$this->addForeignKey('editedby', 'DbEditedby', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('mtime', 'DbMtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('utime', 'DbUtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('lptime', 'DbLPtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('md5', 'DbMd5', 'CHAR', false, 32, null);
$this->addColumn('track_title', 'DbTrackTitle', 'VARCHAR', false, 512, null);
$this->addColumn('artist_name', 'DbArtistName', 'VARCHAR', false, 512, null);
$this->addColumn('bit_rate', 'DbBitRate', 'INTEGER', false, null, null);
$this->addColumn('sample_rate', 'DbSampleRate', 'INTEGER', false, null, null);
$this->addColumn('format', 'DbFormat', 'VARCHAR', false, 128, null);
$this->addColumn('length', 'DbLength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('album_title', 'DbAlbumTitle', 'VARCHAR', false, 512, null);
$this->addColumn('genre', 'DbGenre', 'VARCHAR', false, 64, null);
$this->addColumn('comments', 'DbComments', 'LONGVARCHAR', false, null, null);
$this->addColumn('year', 'DbYear', 'VARCHAR', false, 16, null);
$this->addColumn('track_number', 'DbTrackNumber', 'INTEGER', false, null, null);
$this->addColumn('channels', 'DbChannels', 'INTEGER', false, null, null);
$this->addColumn('url', 'DbUrl', 'VARCHAR', false, 1024, null);
$this->addColumn('bpm', 'DbBpm', 'INTEGER', false, null, null);
$this->addColumn('rating', 'DbRating', 'VARCHAR', false, 8, null);
$this->addColumn('encoded_by', 'DbEncodedBy', 'VARCHAR', false, 255, null);
$this->addColumn('disc_number', 'DbDiscNumber', 'VARCHAR', false, 8, null);
$this->addColumn('mood', 'DbMood', 'VARCHAR', false, 64, null);
$this->addColumn('label', 'DbLabel', 'VARCHAR', false, 512, null);
$this->addColumn('composer', 'DbComposer', 'VARCHAR', false, 512, null);
$this->addColumn('encoder', 'DbEncoder', 'VARCHAR', false, 64, null);
$this->addColumn('checksum', 'DbChecksum', 'VARCHAR', false, 256, null);
$this->addColumn('lyrics', 'DbLyrics', 'LONGVARCHAR', false, null, null);
$this->addColumn('orchestra', 'DbOrchestra', 'VARCHAR', false, 512, null);
$this->addColumn('conductor', 'DbConductor', 'VARCHAR', false, 512, null);
$this->addColumn('lyricist', 'DbLyricist', 'VARCHAR', false, 512, null);
$this->addColumn('original_lyricist', 'DbOriginalLyricist', 'VARCHAR', false, 512, null);
$this->addColumn('radio_station_name', 'DbRadioStationName', 'VARCHAR', false, 512, null);
$this->addColumn('info_url', 'DbInfoUrl', 'VARCHAR', false, 512, null);
$this->addColumn('artist_url', 'DbArtistUrl', 'VARCHAR', false, 512, null);
$this->addColumn('audio_source_url', 'DbAudioSourceUrl', 'VARCHAR', false, 512, null);
$this->addColumn('radio_station_url', 'DbRadioStationUrl', 'VARCHAR', false, 512, null);
$this->addColumn('buy_this_url', 'DbBuyThisUrl', 'VARCHAR', false, 512, null);
$this->addColumn('isrc_number', 'DbIsrcNumber', 'VARCHAR', false, 512, null);
$this->addColumn('catalog_number', 'DbCatalogNumber', 'VARCHAR', false, 512, null);
$this->addColumn('original_artist', 'DbOriginalArtist', 'VARCHAR', false, 512, null);
$this->addColumn('copyright', 'DbCopyright', 'VARCHAR', false, 512, null);
$this->addColumn('report_datetime', 'DbReportDatetime', 'VARCHAR', false, 32, null);
$this->addColumn('report_location', 'DbReportLocation', 'VARCHAR', false, 512, null);
$this->addColumn('report_organization', 'DbReportOrganization', 'VARCHAR', false, 512, null);
$this->addColumn('subject', 'DbSubject', 'VARCHAR', false, 512, null);
$this->addColumn('contributor', 'DbContributor', 'VARCHAR', false, 512, null);
$this->addColumn('language', 'DbLanguage', 'VARCHAR', false, 512, null);
$this->addColumn('file_exists', 'DbFileExists', 'BOOLEAN', false, null, true);
$this->addColumn('soundcloud_id', 'DbSoundcloudId', 'INTEGER', false, null, null);
$this->addColumn('soundcloud_error_code', 'DbSoundcloudErrorCode', 'INTEGER', false, null, null);
$this->addColumn('soundcloud_error_msg', 'DbSoundcloudErrorMsg', 'VARCHAR', false, 512, null);
$this->addColumn('soundcloud_link_to_file', 'DbSoundcloudLinkToFile', 'VARCHAR', false, 4096, null);
$this->addColumn('soundcloud_upload_time', 'DbSoundCloundUploadTime', 'TIMESTAMP', false, 6, null);
$this->addColumn('replay_gain', 'DbReplayGain', 'NUMERIC', false, null, null);
$this->addForeignKey('owner_id', 'DbOwnerId', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('cuein', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('cueout', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('silan_check', 'DbSilanCheck', 'BOOLEAN', false, null, false);
$this->addColumn('hidden', 'DbHidden', 'BOOLEAN', false, null, false);
$this->addColumn('is_scheduled', 'DbIsScheduled', 'BOOLEAN', false, null, false);
$this->addColumn('is_playlist', 'DbIsPlaylist', 'BOOLEAN', false, null, false);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('FkOwner', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner_id' => 'id', ), null, null);
$this->addRelation('CcSubjsRelatedByDbEditedby', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
$this->addRelation('CcMusicDirs', 'CcMusicDirs', RelationMap::MANY_TO_ONE, array('directory' => 'id', ), null, null);
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
$this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('FkOwner', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner_id' => 'id', ), null, null);
$this->addRelation('CcSubjsRelatedByDbEditedby', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
$this->addRelation('CcMusicDirs', 'CcMusicDirs', RelationMap::MANY_TO_ONE, array('directory' => 'id', ), null, null);
$this->addRelation('CloudFile', 'CloudFile', RelationMap::ONE_TO_MANY, array('id' => 'cc_file_id', ), 'CASCADE', null, 'CloudFiles');
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcShowInstancess');
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcPlaylistcontentss');
$this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcBlockcontentss');
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcSchedules');
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcPlayoutHistorys');
} // buildRelations()
} // CcFilesTableMap

View File

@ -14,44 +14,45 @@
*
* @package propel.generator.airtime.map
*/
class CcListenerCountTableMap extends TableMap {
class CcListenerCountTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcListenerCountTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcListenerCountTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_listener_count');
$this->setPhpName('CcListenerCount');
$this->setClassname('CcListenerCount');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_listener_count_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('TIMESTAMP_ID', 'DbTimestampId', 'INTEGER', 'cc_timestamp', 'ID', true, null, null);
$this->addForeignKey('MOUNT_NAME_ID', 'DbMountNameId', 'INTEGER', 'cc_mount_name', 'ID', true, null, null);
$this->addColumn('LISTENER_COUNT', 'DbListenerCount', 'INTEGER', true, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_listener_count');
$this->setPhpName('CcListenerCount');
$this->setClassname('CcListenerCount');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_listener_count_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('timestamp_id', 'DbTimestampId', 'INTEGER', 'cc_timestamp', 'id', true, null, null);
$this->addForeignKey('mount_name_id', 'DbMountNameId', 'INTEGER', 'cc_mount_name', 'id', true, null, null);
$this->addColumn('listener_count', 'DbListenerCount', 'INTEGER', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('timestamp_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcMountName', 'CcMountName', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcTimestamp', 'CcTimestamp', RelationMap::MANY_TO_ONE, array('timestamp_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcMountName', 'CcMountName', RelationMap::MANY_TO_ONE, array('mount_name_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcListenerCountTableMap

View File

@ -14,42 +14,43 @@
*
* @package propel.generator.airtime.map
*/
class CcLiveLogTableMap extends TableMap {
class CcLiveLogTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcLiveLogTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcLiveLogTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_live_log');
$this->setPhpName('CcLiveLog');
$this->setClassname('CcLiveLog');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_live_log_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('STATE', 'DbState', 'VARCHAR', true, 32, null);
$this->addColumn('START_TIME', 'DbStartTime', 'TIMESTAMP', true, null, null);
$this->addColumn('END_TIME', 'DbEndTime', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_live_log');
$this->setPhpName('CcLiveLog');
$this->setClassname('CcLiveLog');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_live_log_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('state', 'DbState', 'VARCHAR', true, 32, null);
$this->addColumn('start_time', 'DbStartTime', 'TIMESTAMP', true, null, null);
$this->addColumn('end_time', 'DbEndTime', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // CcLiveLogTableMap

View File

@ -14,41 +14,42 @@
*
* @package propel.generator.airtime.map
*/
class CcLocaleTableMap extends TableMap {
class CcLocaleTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcLocaleTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcLocaleTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_locale');
$this->setPhpName('CcLocale');
$this->setClassname('CcLocale');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_locale_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('LOCALE_CODE', 'DbLocaleCode', 'VARCHAR', true, 16, null);
$this->addColumn('LOCALE_LANG', 'DbLocaleLang', 'VARCHAR', true, 128, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_locale');
$this->setPhpName('CcLocale');
$this->setClassname('CcLocale');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_locale_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('locale_code', 'DbLocaleCode', 'VARCHAR', true, 16, null);
$this->addColumn('locale_lang', 'DbLocaleLang', 'VARCHAR', true, 128, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // CcLocaleTableMap

View File

@ -14,39 +14,40 @@
*
* @package propel.generator.airtime.map
*/
class CcLoginAttemptsTableMap extends TableMap {
class CcLoginAttemptsTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcLoginAttemptsTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcLoginAttemptsTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_login_attempts');
$this->setPhpName('CcLoginAttempts');
$this->setClassname('CcLoginAttempts');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('IP', 'DbIP', 'VARCHAR', true, 32, null);
$this->addColumn('ATTEMPTS', 'DbAttempts', 'INTEGER', false, null, 0);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_login_attempts');
$this->setPhpName('CcLoginAttempts');
$this->setClassname('CcLoginAttempts');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ip', 'DbIP', 'VARCHAR', true, 32, null);
$this->addColumn('attempts', 'DbAttempts', 'INTEGER', false, null, 0);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // CcLoginAttemptsTableMap

View File

@ -14,41 +14,42 @@
*
* @package propel.generator.airtime.map
*/
class CcMountNameTableMap extends TableMap {
class CcMountNameTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcMountNameTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcMountNameTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_mount_name');
$this->setPhpName('CcMountName');
$this->setClassname('CcMountName');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_mount_name_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('MOUNT_NAME', 'DbMountName', 'VARCHAR', true, 255, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_mount_name');
$this->setPhpName('CcMountName');
$this->setClassname('CcMountName');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_mount_name_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('mount_name', 'DbMountName', 'VARCHAR', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcListenerCount', 'CcListenerCount', RelationMap::ONE_TO_MANY, array('id' => 'mount_name_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcListenerCount', 'CcListenerCount', RelationMap::ONE_TO_MANY, array('id' => 'mount_name_id', ), 'CASCADE', null, 'CcListenerCounts');
} // buildRelations()
} // CcMountNameTableMap

View File

@ -14,44 +14,45 @@
*
* @package propel.generator.airtime.map
*/
class CcMusicDirsTableMap extends TableMap {
class CcMusicDirsTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcMusicDirsTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcMusicDirsTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_music_dirs');
$this->setPhpName('CcMusicDirs');
$this->setClassname('CcMusicDirs');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_music_dirs_id_seq');
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('DIRECTORY', 'Directory', 'LONGVARCHAR', false, null, null);
$this->addColumn('TYPE', 'Type', 'VARCHAR', false, 255, null);
$this->addColumn('EXISTS', 'Exists', 'BOOLEAN', false, null, true);
$this->addColumn('WATCHED', 'Watched', 'BOOLEAN', false, null, true);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_music_dirs');
$this->setPhpName('CcMusicDirs');
$this->setClassname('CcMusicDirs');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_music_dirs_id_seq');
// columns
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('directory', 'Directory', 'LONGVARCHAR', false, null, null);
$this->addColumn('type', 'Type', 'VARCHAR', false, 255, null);
$this->addColumn('exists', 'Exists', 'BOOLEAN', false, null, true);
$this->addColumn('watched', 'Watched', 'BOOLEAN', false, null, true);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'directory', ), null, null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'directory', ), null, null, 'CcFiless');
} // buildRelations()
} // CcMusicDirsTableMap

View File

@ -14,43 +14,44 @@
*
* @package propel.generator.airtime.map
*/
class CcPermsTableMap extends TableMap {
class CcPermsTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPermsTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPermsTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_perms');
$this->setPhpName('CcPerms');
$this->setClassname('CcPerms');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('PERMID', 'Permid', 'INTEGER', true, null, null);
$this->addForeignKey('SUBJ', 'Subj', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
$this->addColumn('ACTION', 'Action', 'VARCHAR', false, 20, null);
$this->addColumn('OBJ', 'Obj', 'INTEGER', false, null, null);
$this->addColumn('TYPE', 'Type', 'CHAR', false, 1, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_perms');
$this->setPhpName('CcPerms');
$this->setClassname('CcPerms');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('permid', 'Permid', 'INTEGER', true, null, null);
$this->addForeignKey('subj', 'Subj', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('action', 'Action', 'VARCHAR', false, 20, null);
$this->addColumn('obj', 'Obj', 'INTEGER', false, null, null);
$this->addColumn('type', 'Type', 'CHAR', false, 1, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subj' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subj' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcPermsTableMap

View File

@ -14,60 +14,67 @@
*
* @package propel.generator.airtime.map
*/
class CcPlaylistTableMap extends TableMap {
class CcPlaylistTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlaylistTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlaylistTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playlist');
$this->setPhpName('CcPlaylist');
$this->setClassname('CcPlaylist');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playlist_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', false, 6, null);
$this->addForeignKey('CREATOR_ID', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('LENGTH', 'DbLength', 'VARCHAR', false, null, '00:00:00');
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playlist');
$this->setPhpName('CcPlaylist');
$this->setClassname('CcPlaylist');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playlist_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('name', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('mtime', 'DbMtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('utime', 'DbUtime', 'TIMESTAMP', false, 6, null);
$this->addForeignKey('creator_id', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('length', 'DbLength', 'VARCHAR', false, null, '00:00:00');
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null, 'CcPlaylistcontentss');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column' => array('name' => 'length', 'expression' => 'SUM(cliplength)', 'foreign_table' => 'cc_playlistcontents', ),
);
} // getBehaviors()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column' => array (
'name' => 'length',
'expression' => 'SUM(cliplength)',
'condition' => NULL,
'foreign_table' => 'cc_playlistcontents',
'foreign_schema' => NULL,
),
);
} // getBehaviors()
} // CcPlaylistTableMap

View File

@ -14,67 +14,71 @@
*
* @package propel.generator.airtime.map
*/
class CcPlaylistcontentsTableMap extends TableMap {
class CcPlaylistcontentsTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlaylistcontentsTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlaylistcontentsTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playlistcontents');
$this->setPhpName('CcPlaylistcontents');
$this->setClassname('CcPlaylistcontents');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playlistcontents_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('PLAYLIST_ID', 'DbPlaylistId', 'INTEGER', 'cc_playlist', 'ID', false, null, null);
$this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null);
$this->addForeignKey('BLOCK_ID', 'DbBlockId', 'INTEGER', 'cc_block', 'ID', false, null, null);
$this->addColumn('STREAM_ID', 'DbStreamId', 'INTEGER', false, null, null);
$this->addColumn('TYPE', 'DbType', 'SMALLINT', true, null, 0);
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', false, null, null);
$this->addColumn('TRACKOFFSET', 'DbTrackOffset', 'REAL', true, null, 0);
$this->addColumn('CLIPLENGTH', 'DbCliplength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('CUEIN', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('CUEOUT', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('FADEIN', 'DbFadein', 'TIME', false, null, '00:00:00');
$this->addColumn('FADEOUT', 'DbFadeout', 'TIME', false, null, '00:00:00');
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playlistcontents');
$this->setPhpName('CcPlaylistcontents');
$this->setClassname('CcPlaylistcontents');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playlistcontents_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('playlist_id', 'DbPlaylistId', 'INTEGER', 'cc_playlist', 'id', false, null, null);
$this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_files', 'id', false, null, null);
$this->addForeignKey('block_id', 'DbBlockId', 'INTEGER', 'cc_block', 'id', false, null, null);
$this->addColumn('stream_id', 'DbStreamId', 'INTEGER', false, null, null);
$this->addColumn('type', 'DbType', 'SMALLINT', true, null, 0);
$this->addColumn('position', 'DbPosition', 'INTEGER', false, null, null);
$this->addColumn('trackoffset', 'DbTrackOffset', 'REAL', true, null, 0);
$this->addColumn('cliplength', 'DbCliplength', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('cuein', 'DbCuein', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('cueout', 'DbCueout', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('fadein', 'DbFadein', 'TIME', false, null, '00:00:00');
$this->addColumn('fadeout', 'DbFadeout', 'TIME', false, null, '00:00:00');
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcBlock', 'CcBlock', RelationMap::MANY_TO_ONE, array('block_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('playlist_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcBlock', 'CcBlock', RelationMap::MANY_TO_ONE, array('block_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('playlist_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column_relation' => array('foreign_table' => 'cc_playlist', 'update_method' => 'updateDbLength', ),
);
} // getBehaviors()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'aggregate_column_relation' => array (
'foreign_table' => 'cc_playlist',
'update_method' => 'updateDbLength',
),
);
} // getBehaviors()
} // CcPlaylistcontentsTableMap

View File

@ -14,43 +14,44 @@
*
* @package propel.generator.airtime.map
*/
class CcPlayoutHistoryMetaDataTableMap extends TableMap {
class CcPlayoutHistoryMetaDataTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryMetaDataTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryMetaDataTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history_metadata');
$this->setPhpName('CcPlayoutHistoryMetaData');
$this->setClassname('CcPlayoutHistoryMetaData');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_metadata_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('HISTORY_ID', 'DbHistoryId', 'INTEGER', 'cc_playout_history', 'ID', true, null, null);
$this->addColumn('KEY', 'DbKey', 'VARCHAR', true, 128, null);
$this->addColumn('VALUE', 'DbValue', 'VARCHAR', true, 128, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history_metadata');
$this->setPhpName('CcPlayoutHistoryMetaData');
$this->setClassname('CcPlayoutHistoryMetaData');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_metadata_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('history_id', 'DbHistoryId', 'INTEGER', 'cc_playout_history', 'id', true, null, null);
$this->addColumn('key', 'DbKey', 'VARCHAR', true, 128, null);
$this->addColumn('value', 'DbValue', 'VARCHAR', true, 128, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::MANY_TO_ONE, array('history_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::MANY_TO_ONE, array('history_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcPlayoutHistoryMetaDataTableMap

View File

@ -14,46 +14,47 @@
*
* @package propel.generator.airtime.map
*/
class CcPlayoutHistoryTableMap extends TableMap {
class CcPlayoutHistoryTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history');
$this->setPhpName('CcPlayoutHistory');
$this->setClassname('CcPlayoutHistory');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('FILE_ID', 'DbFileId', 'INTEGER', 'cc_files', 'ID', false, null, null);
$this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null);
$this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', false, null, null);
$this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', false, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history');
$this->setPhpName('CcPlayoutHistory');
$this->setClassname('CcPlayoutHistory');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_files', 'id', false, null, null);
$this->addColumn('starts', 'DbStarts', 'TIMESTAMP', true, null, null);
$this->addColumn('ends', 'DbEnds', 'TIMESTAMP', false, null, null);
$this->addForeignKey('instance_id', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'id', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'SET NULL', null);
$this->addRelation('CcPlayoutHistoryMetaData', 'CcPlayoutHistoryMetaData', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', null, 'CcPlayoutHistoryMetaDatas');
} // buildRelations()
} // CcPlayoutHistoryTableMap

View File

@ -14,46 +14,47 @@
*
* @package propel.generator.airtime.map
*/
class CcPlayoutHistoryTemplateFieldTableMap extends TableMap {
class CcPlayoutHistoryTemplateFieldTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryTemplateFieldTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryTemplateFieldTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history_template_field');
$this->setPhpName('CcPlayoutHistoryTemplateField');
$this->setClassname('CcPlayoutHistoryTemplateField');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_template_field_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('TEMPLATE_ID', 'DbTemplateId', 'INTEGER', 'cc_playout_history_template', 'ID', true, null, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 128, null);
$this->addColumn('LABEL', 'DbLabel', 'VARCHAR', true, 128, null);
$this->addColumn('TYPE', 'DbType', 'VARCHAR', true, 128, null);
$this->addColumn('IS_FILE_MD', 'DbIsFileMD', 'BOOLEAN', true, null, false);
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', true, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history_template_field');
$this->setPhpName('CcPlayoutHistoryTemplateField');
$this->setClassname('CcPlayoutHistoryTemplateField');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_template_field_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('template_id', 'DbTemplateId', 'INTEGER', 'cc_playout_history_template', 'id', true, null, null);
$this->addColumn('name', 'DbName', 'VARCHAR', true, 128, null);
$this->addColumn('label', 'DbLabel', 'VARCHAR', true, 128, null);
$this->addColumn('type', 'DbType', 'VARCHAR', true, 128, null);
$this->addColumn('is_file_md', 'DbIsFileMD', 'BOOLEAN', true, null, false);
$this->addColumn('position', 'DbPosition', 'INTEGER', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplate', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplate', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcPlayoutHistoryTemplateFieldTableMap

View File

@ -14,42 +14,43 @@
*
* @package propel.generator.airtime.map
*/
class CcPlayoutHistoryTemplateTableMap extends TableMap {
class CcPlayoutHistoryTemplateTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryTemplateTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPlayoutHistoryTemplateTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history_template');
$this->setPhpName('CcPlayoutHistoryTemplate');
$this->setClassname('CcPlayoutHistoryTemplate');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_template_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 128, null);
$this->addColumn('TYPE', 'DbType', 'VARCHAR', true, 35, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_playout_history_template');
$this->setPhpName('CcPlayoutHistoryTemplate');
$this->setClassname('CcPlayoutHistoryTemplate');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_playout_history_template_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('name', 'DbName', 'VARCHAR', true, 128, null);
$this->addColumn('type', 'DbType', 'VARCHAR', true, 35, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcPlayoutHistoryTemplateField', 'CcPlayoutHistoryTemplateField', RelationMap::ONE_TO_MANY, array('id' => 'template_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcPlayoutHistoryTemplateField', 'CcPlayoutHistoryTemplateField', RelationMap::ONE_TO_MANY, array('id' => 'template_id', ), 'CASCADE', null, 'CcPlayoutHistoryTemplateFields');
} // buildRelations()
} // CcPlayoutHistoryTemplateTableMap

View File

@ -14,43 +14,44 @@
*
* @package propel.generator.airtime.map
*/
class CcPrefTableMap extends TableMap {
class CcPrefTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPrefTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcPrefTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_pref');
$this->setPhpName('CcPref');
$this->setClassname('CcPref');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_pref_id_seq');
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('SUBJID', 'Subjid', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
$this->addColumn('KEYSTR', 'Keystr', 'VARCHAR', false, 255, null);
$this->addColumn('VALSTR', 'Valstr', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_pref');
$this->setPhpName('CcPref');
$this->setClassname('CcPref');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_pref_id_seq');
// columns
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('subjid', 'Subjid', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('keystr', 'Keystr', 'VARCHAR', false, 255, null);
$this->addColumn('valstr', 'Valstr', 'LONGVARCHAR', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subjid' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subjid' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcPrefTableMap

View File

@ -14,57 +14,58 @@
*
* @package propel.generator.airtime.map
*/
class CcScheduleTableMap extends TableMap {
class CcScheduleTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcScheduleTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcScheduleTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_schedule');
$this->setPhpName('CcSchedule');
$this->setClassname('CcSchedule');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_schedule_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$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');
$this->addColumn('CUE_IN', 'DbCueIn', 'VARCHAR', true, null, null);
$this->addColumn('CUE_OUT', 'DbCueOut', 'VARCHAR', true, null, null);
$this->addColumn('MEDIA_ITEM_PLAYED', 'DbMediaItemPlayed', 'BOOLEAN', false, null, false);
$this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'ID', true, null, null);
$this->addColumn('PLAYOUT_STATUS', 'DbPlayoutStatus', 'SMALLINT', true, null, 1);
$this->addColumn('BROADCASTED', 'DbBroadcasted', 'SMALLINT', true, null, 0);
$this->addColumn('POSITION', 'DbPosition', 'INTEGER', true, null, 0);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_schedule');
$this->setPhpName('CcSchedule');
$this->setClassname('CcSchedule');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_schedule_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$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');
$this->addColumn('cue_in', 'DbCueIn', 'VARCHAR', true, null, null);
$this->addColumn('cue_out', 'DbCueOut', 'VARCHAR', true, null, null);
$this->addColumn('media_item_played', 'DbMediaItemPlayed', 'BOOLEAN', false, null, false);
$this->addForeignKey('instance_id', 'DbInstanceId', 'INTEGER', 'cc_show_instances', 'id', true, null, null);
$this->addColumn('playout_status', 'DbPlayoutStatus', 'SMALLINT', true, null, 1);
$this->addColumn('broadcasted', 'DbBroadcasted', 'SMALLINT', true, null, 0);
$this->addColumn('position', 'DbPosition', 'INTEGER', true, null, 0);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$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);
$this->addRelation('CcWebstreamMetadata', 'CcWebstreamMetadata', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$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);
$this->addRelation('CcWebstreamMetadata', 'CcWebstreamMetadata', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null, 'CcWebstreamMetadatas');
} // buildRelations()
} // CcScheduleTableMap

View File

@ -14,39 +14,40 @@
*
* @package propel.generator.airtime.map
*/
class CcServiceRegisterTableMap extends TableMap {
class CcServiceRegisterTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcServiceRegisterTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcServiceRegisterTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_service_register');
$this->setPhpName('CcServiceRegister');
$this->setClassname('CcServiceRegister');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('NAME', 'DbName', 'VARCHAR', true, 32, null);
$this->addColumn('IP', 'DbIp', 'VARCHAR', true, 18, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_service_register');
$this->setPhpName('CcServiceRegister');
$this->setClassname('CcServiceRegister');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('name', 'DbName', 'VARCHAR', true, 32, null);
$this->addColumn('ip', 'DbIp', 'VARCHAR', true, 18, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // CcServiceRegisterTableMap

View File

@ -14,42 +14,43 @@
*
* @package propel.generator.airtime.map
*/
class CcSessTableMap extends TableMap {
class CcSessTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSessTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSessTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_sess');
$this->setPhpName('CcSess');
$this->setClassname('CcSess');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('SESSID', 'Sessid', 'CHAR', true, 32, null);
$this->addForeignKey('USERID', 'Userid', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
$this->addColumn('LOGIN', 'Login', 'VARCHAR', false, 255, null);
$this->addColumn('TS', 'Ts', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_sess');
$this->setPhpName('CcSess');
$this->setClassname('CcSess');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('sessid', 'Sessid', 'CHAR', true, 32, null);
$this->addForeignKey('userid', 'Userid', 'INTEGER', 'cc_subjs', 'id', false, null, null);
$this->addColumn('login', 'Login', 'VARCHAR', false, 255, null);
$this->addColumn('ts', 'Ts', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('userid' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('userid' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcSessTableMap

View File

@ -14,50 +14,51 @@
*
* @package propel.generator.airtime.map
*/
class CcShowDaysTableMap extends TableMap {
class CcShowDaysTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowDaysTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowDaysTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_days');
$this->setPhpName('CcShowDays');
$this->setClassname('CcShowDays');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_days_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('FIRST_SHOW', 'DbFirstShow', 'DATE', true, null, null);
$this->addColumn('LAST_SHOW', 'DbLastShow', 'DATE', false, null, null);
$this->addColumn('START_TIME', 'DbStartTime', 'TIME', true, null, null);
$this->addColumn('TIMEZONE', 'DbTimezone', 'VARCHAR', true, 255, null);
$this->addColumn('DURATION', 'DbDuration', 'VARCHAR', true, 255, null);
$this->addColumn('DAY', 'DbDay', 'TINYINT', false, null, null);
$this->addColumn('REPEAT_TYPE', 'DbRepeatType', 'TINYINT', true, null, null);
$this->addColumn('NEXT_POP_DATE', 'DbNextPopDate', 'DATE', false, null, null);
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
$this->addColumn('RECORD', 'DbRecord', 'TINYINT', false, null, 0);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_days');
$this->setPhpName('CcShowDays');
$this->setClassname('CcShowDays');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_days_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('first_show', 'DbFirstShow', 'DATE', true, null, null);
$this->addColumn('last_show', 'DbLastShow', 'DATE', false, null, null);
$this->addColumn('start_time', 'DbStartTime', 'TIME', true, null, null);
$this->addColumn('timezone', 'DbTimezone', 'VARCHAR', true, null, null);
$this->addColumn('duration', 'DbDuration', 'VARCHAR', true, null, null);
$this->addColumn('day', 'DbDay', 'TINYINT', false, null, null);
$this->addColumn('repeat_type', 'DbRepeatType', 'TINYINT', true, null, null);
$this->addColumn('next_pop_date', 'DbNextPopDate', 'DATE', false, null, null);
$this->addForeignKey('show_id', 'DbShowId', 'INTEGER', 'cc_show', 'id', true, null, null);
$this->addColumn('record', 'DbRecord', 'TINYINT', false, null, 0);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcShowDaysTableMap

View File

@ -14,43 +14,44 @@
*
* @package propel.generator.airtime.map
*/
class CcShowHostsTableMap extends TableMap {
class CcShowHostsTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowHostsTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowHostsTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_hosts');
$this->setPhpName('CcShowHosts');
$this->setClassname('CcShowHosts');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_hosts_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('SHOW_ID', 'DbShow', 'INTEGER', 'cc_show', 'ID', true, null, null);
$this->addForeignKey('SUBJS_ID', 'DbHost', 'INTEGER', 'cc_subjs', 'ID', true, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_hosts');
$this->setPhpName('CcShowHosts');
$this->setClassname('CcShowHosts');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_hosts_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('show_id', 'DbShow', 'INTEGER', 'cc_show', 'id', true, null, null);
$this->addForeignKey('subjs_id', 'DbHost', 'INTEGER', 'cc_subjs', 'id', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subjs_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('subjs_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcShowHostsTableMap

View File

@ -14,56 +14,57 @@
*
* @package propel.generator.airtime.map
*/
class CcShowInstancesTableMap extends TableMap {
class CcShowInstancesTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowInstancesTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowInstancesTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_instances');
$this->setPhpName('CcShowInstances');
$this->setClassname('CcShowInstances');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_instances_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('STARTS', 'DbStarts', 'TIMESTAMP', true, null, null);
$this->addColumn('ENDS', 'DbEnds', 'TIMESTAMP', true, null, null);
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
$this->addColumn('RECORD', 'DbRecord', 'TINYINT', false, null, 0);
$this->addColumn('REBROADCAST', 'DbRebroadcast', 'TINYINT', false, null, 0);
$this->addForeignKey('INSTANCE_ID', 'DbOriginalShow', 'INTEGER', 'cc_show_instances', 'ID', false, null, null);
$this->addForeignKey('FILE_ID', 'DbRecordedFile', 'INTEGER', 'cc_files', 'ID', false, null, null);
$this->addColumn('TIME_FILLED', 'DbTimeFilled', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('CREATED', 'DbCreated', 'TIMESTAMP', true, null, null);
$this->addColumn('LAST_SCHEDULED', 'DbLastScheduled', 'TIMESTAMP', false, null, null);
$this->addColumn('MODIFIED_INSTANCE', 'DbModifiedInstance', 'BOOLEAN', true, null, false);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_instances');
$this->setPhpName('CcShowInstances');
$this->setClassname('CcShowInstances');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_instances_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('starts', 'DbStarts', 'TIMESTAMP', true, null, null);
$this->addColumn('ends', 'DbEnds', 'TIMESTAMP', true, null, null);
$this->addForeignKey('show_id', 'DbShowId', 'INTEGER', 'cc_show', 'id', true, null, null);
$this->addColumn('record', 'DbRecord', 'TINYINT', false, null, 0);
$this->addColumn('rebroadcast', 'DbRebroadcast', 'TINYINT', false, null, 0);
$this->addForeignKey('instance_id', 'DbOriginalShow', 'INTEGER', 'cc_show_instances', 'id', false, null, null);
$this->addForeignKey('file_id', 'DbRecordedFile', 'INTEGER', 'cc_files', 'id', false, null, null);
$this->addColumn('time_filled', 'DbTimeFilled', 'VARCHAR', false, null, '00:00:00');
$this->addColumn('created', 'DbCreated', 'TIMESTAMP', true, null, null);
$this->addColumn('last_scheduled', 'DbLastScheduled', 'TIMESTAMP', false, null, null);
$this->addColumn('modified_instance', 'DbModifiedInstance', 'BOOLEAN', true, null, false);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcShowInstancesRelatedByDbOriginalShow', '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('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null);
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'SET NULL', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
$this->addRelation('CcShowInstancesRelatedByDbOriginalShow', '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('CcShowInstancesRelatedByDbId', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null, 'CcShowInstancessRelatedByDbId');
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'CASCADE', null, 'CcSchedules');
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'instance_id', ), 'SET NULL', null, 'CcPlayoutHistorys');
} // buildRelations()
} // CcShowInstancesTableMap

View File

@ -14,43 +14,44 @@
*
* @package propel.generator.airtime.map
*/
class CcShowRebroadcastTableMap extends TableMap {
class CcShowRebroadcastTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowRebroadcastTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowRebroadcastTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_rebroadcast');
$this->setPhpName('CcShowRebroadcast');
$this->setClassname('CcShowRebroadcast');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_rebroadcast_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('DAY_OFFSET', 'DbDayOffset', 'VARCHAR', true, 255, null);
$this->addColumn('START_TIME', 'DbStartTime', 'TIME', true, null, null);
$this->addForeignKey('SHOW_ID', 'DbShowId', 'INTEGER', 'cc_show', 'ID', true, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show_rebroadcast');
$this->setPhpName('CcShowRebroadcast');
$this->setClassname('CcShowRebroadcast');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_rebroadcast_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('day_offset', 'DbDayOffset', 'VARCHAR', true, null, null);
$this->addColumn('start_time', 'DbStartTime', 'TIME', true, null, null);
$this->addForeignKey('show_id', 'DbShowId', 'INTEGER', 'cc_show', 'id', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShow', 'CcShow', RelationMap::MANY_TO_ONE, array('show_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcShowRebroadcastTableMap

View File

@ -14,55 +14,56 @@
*
* @package propel.generator.airtime.map
*/
class CcShowTableMap extends TableMap {
class CcShowTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcShowTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show');
$this->setPhpName('CcShow');
$this->setClassname('CcShow');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('URL', 'DbUrl', 'VARCHAR', false, 255, '');
$this->addColumn('GENRE', 'DbGenre', 'VARCHAR', false, 255, '');
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('COLOR', 'DbColor', 'VARCHAR', false, 6, null);
$this->addColumn('BACKGROUND_COLOR', 'DbBackgroundColor', 'VARCHAR', false, 6, null);
$this->addColumn('LIVE_STREAM_USING_AIRTIME_AUTH', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, false);
$this->addColumn('LIVE_STREAM_USING_CUSTOM_AUTH', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, false);
$this->addColumn('LIVE_STREAM_USER', 'DbLiveStreamUser', 'VARCHAR', false, 255, null);
$this->addColumn('LIVE_STREAM_PASS', 'DbLiveStreamPass', 'VARCHAR', false, 255, null);
$this->addColumn('LINKED', 'DbLinked', 'BOOLEAN', true, null, false);
$this->addColumn('IS_LINKABLE', 'DbIsLinkable', 'BOOLEAN', true, null, true);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_show');
$this->setPhpName('CcShow');
$this->setClassname('CcShow');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_show_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('name', 'DbName', 'VARCHAR', true, 255, '');
$this->addColumn('url', 'DbUrl', 'VARCHAR', false, 255, '');
$this->addColumn('genre', 'DbGenre', 'VARCHAR', false, 255, '');
$this->addColumn('description', 'DbDescription', 'VARCHAR', false, 512, null);
$this->addColumn('color', 'DbColor', 'VARCHAR', false, 6, null);
$this->addColumn('background_color', 'DbBackgroundColor', 'VARCHAR', false, 6, null);
$this->addColumn('live_stream_using_airtime_auth', 'DbLiveStreamUsingAirtimeAuth', 'BOOLEAN', false, null, false);
$this->addColumn('live_stream_using_custom_auth', 'DbLiveStreamUsingCustomAuth', 'BOOLEAN', false, null, false);
$this->addColumn('live_stream_user', 'DbLiveStreamUser', 'VARCHAR', false, 255, null);
$this->addColumn('live_stream_pass', 'DbLiveStreamPass', 'VARCHAR', false, 255, null);
$this->addColumn('linked', 'DbLinked', 'BOOLEAN', true, null, false);
$this->addColumn('is_linkable', 'DbIsLinkable', 'BOOLEAN', true, null, true);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
$this->addRelation('CcShowDays', 'CcShowDays', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
$this->addRelation('CcShowRebroadcast', 'CcShowRebroadcast', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowInstancess');
$this->addRelation('CcShowDays', 'CcShowDays', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowDayss');
$this->addRelation('CcShowRebroadcast', 'CcShowRebroadcast', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowRebroadcasts');
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'show_id', ), 'CASCADE', null, 'CcShowHostss');
} // buildRelations()
} // CcShowTableMap

View File

@ -14,42 +14,43 @@
*
* @package propel.generator.airtime.map
*/
class CcSmembTableMap extends TableMap {
class CcSmembTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSmembTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSmembTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_smemb');
$this->setPhpName('CcSmemb');
$this->setClassname('CcSmemb');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('UID', 'Uid', 'INTEGER', true, null, 0);
$this->addColumn('GID', 'Gid', 'INTEGER', true, null, 0);
$this->addColumn('LEVEL', 'Level', 'INTEGER', true, null, 0);
$this->addColumn('MID', 'Mid', 'INTEGER', false, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_smemb');
$this->setPhpName('CcSmemb');
$this->setClassname('CcSmemb');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('uid', 'Uid', 'INTEGER', true, null, 0);
$this->addColumn('gid', 'Gid', 'INTEGER', true, null, 0);
$this->addColumn('level', 'Level', 'INTEGER', true, null, 0);
$this->addColumn('mid', 'Mid', 'INTEGER', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // CcSmembTableMap

View File

@ -14,40 +14,41 @@
*
* @package propel.generator.airtime.map
*/
class CcStreamSettingTableMap extends TableMap {
class CcStreamSettingTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcStreamSettingTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcStreamSettingTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_stream_setting');
$this->setPhpName('CcStreamSetting');
$this->setClassname('CcStreamSetting');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('KEYNAME', 'DbKeyName', 'VARCHAR', true, 64, null);
$this->addColumn('VALUE', 'DbValue', 'VARCHAR', false, 255, null);
$this->addColumn('TYPE', 'DbType', 'VARCHAR', true, 16, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_stream_setting');
$this->setPhpName('CcStreamSetting');
$this->setClassname('CcStreamSetting');
$this->setPackage('airtime');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('keyname', 'DbKeyName', 'VARCHAR', true, 64, null);
$this->addColumn('value', 'DbValue', 'VARCHAR', false, 255, null);
$this->addColumn('type', 'DbType', 'VARCHAR', true, 16, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // CcStreamSettingTableMap

View File

@ -14,60 +14,61 @@
*
* @package propel.generator.airtime.map
*/
class CcSubjsTableMap extends TableMap {
class CcSubjsTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSubjsTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSubjsTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_subjs');
$this->setPhpName('CcSubjs');
$this->setClassname('CcSubjs');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_subjs_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('LOGIN', 'DbLogin', 'VARCHAR', true, 255, '');
$this->addColumn('PASS', 'DbPass', 'VARCHAR', true, 255, '');
$this->addColumn('TYPE', 'DbType', 'CHAR', true, 1, 'U');
$this->addColumn('FIRST_NAME', 'DbFirstName', 'VARCHAR', true, 255, '');
$this->addColumn('LAST_NAME', 'DbLastName', 'VARCHAR', true, 255, '');
$this->addColumn('LASTLOGIN', 'DbLastlogin', 'TIMESTAMP', false, null, null);
$this->addColumn('LASTFAIL', 'DbLastfail', 'TIMESTAMP', false, null, null);
$this->addColumn('SKYPE_CONTACT', 'DbSkypeContact', 'VARCHAR', false, 255, null);
$this->addColumn('JABBER_CONTACT', 'DbJabberContact', 'VARCHAR', false, 255, null);
$this->addColumn('EMAIL', 'DbEmail', 'VARCHAR', false, 255, null);
$this->addColumn('CELL_PHONE', 'DbCellPhone', 'VARCHAR', false, 255, null);
$this->addColumn('LOGIN_ATTEMPTS', 'DbLoginAttempts', 'INTEGER', false, null, 0);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_subjs');
$this->setPhpName('CcSubjs');
$this->setClassname('CcSubjs');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_subjs_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('login', 'DbLogin', 'VARCHAR', true, 255, '');
$this->addColumn('pass', 'DbPass', 'VARCHAR', true, 255, '');
$this->addColumn('type', 'DbType', 'CHAR', true, 1, 'U');
$this->addColumn('first_name', 'DbFirstName', 'VARCHAR', true, 255, '');
$this->addColumn('last_name', 'DbLastName', 'VARCHAR', true, 255, '');
$this->addColumn('lastlogin', 'DbLastlogin', 'TIMESTAMP', false, null, null);
$this->addColumn('lastfail', 'DbLastfail', 'TIMESTAMP', false, null, null);
$this->addColumn('skype_contact', 'DbSkypeContact', 'VARCHAR', false, null, null);
$this->addColumn('jabber_contact', 'DbJabberContact', 'VARCHAR', false, null, null);
$this->addColumn('email', 'DbEmail', 'VARCHAR', false, null, null);
$this->addColumn('cell_phone', 'DbCellPhone', 'VARCHAR', false, null, null);
$this->addColumn('login_attempts', 'DbLoginAttempts', 'INTEGER', false, null, 0);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFilesRelatedByDbOwnerId', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'owner_id', ), null, null);
$this->addRelation('CcFilesRelatedByDbEditedby', '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);
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), 'CASCADE', null);
$this->addRelation('CcBlock', 'CcBlock', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), 'CASCADE', null);
$this->addRelation('CcPref', 'CcPref', RelationMap::ONE_TO_MANY, array('id' => 'subjid', ), 'CASCADE', null);
$this->addRelation('CcSess', 'CcSess', RelationMap::ONE_TO_MANY, array('id' => 'userid', ), 'CASCADE', null);
$this->addRelation('CcSubjsToken', 'CcSubjsToken', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFilesRelatedByDbOwnerId', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'owner_id', ), null, null, 'CcFilessRelatedByDbOwnerId');
$this->addRelation('CcFilesRelatedByDbEditedby', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'editedby', ), null, null, 'CcFilessRelatedByDbEditedby');
$this->addRelation('CcPerms', 'CcPerms', RelationMap::ONE_TO_MANY, array('id' => 'subj', ), 'CASCADE', null, 'CcPermss');
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'subjs_id', ), 'CASCADE', null, 'CcShowHostss');
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), 'CASCADE', null, 'CcPlaylists');
$this->addRelation('CcBlock', 'CcBlock', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), 'CASCADE', null, 'CcBlocks');
$this->addRelation('CcPref', 'CcPref', RelationMap::ONE_TO_MANY, array('id' => 'subjid', ), 'CASCADE', null, 'CcPrefs');
$this->addRelation('CcSess', 'CcSess', RelationMap::ONE_TO_MANY, array('id' => 'userid', ), 'CASCADE', null, 'CcSesss');
$this->addRelation('CcSubjsToken', 'CcSubjsToken', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'CcSubjsTokens');
} // buildRelations()
} // CcSubjsTableMap

View File

@ -14,44 +14,45 @@
*
* @package propel.generator.airtime.map
*/
class CcSubjsTokenTableMap extends TableMap {
class CcSubjsTokenTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSubjsTokenTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcSubjsTokenTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_subjs_token');
$this->setPhpName('CcSubjsToken');
$this->setClassname('CcSubjsToken');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_subjs_token_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('USER_ID', 'DbUserId', 'INTEGER', 'cc_subjs', 'ID', true, null, null);
$this->addColumn('ACTION', 'DbAction', 'VARCHAR', true, 255, null);
$this->addColumn('TOKEN', 'DbToken', 'VARCHAR', true, 40, null);
$this->addColumn('CREATED', 'DbCreated', 'TIMESTAMP', true, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_subjs_token');
$this->setPhpName('CcSubjsToken');
$this->setClassname('CcSubjsToken');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_subjs_token_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('user_id', 'DbUserId', 'INTEGER', 'cc_subjs', 'id', true, null, null);
$this->addColumn('action', 'DbAction', 'VARCHAR', true, 255, null);
$this->addColumn('token', 'DbToken', 'VARCHAR', true, 40, null);
$this->addColumn('created', 'DbCreated', 'TIMESTAMP', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcSubjsTokenTableMap

View File

@ -14,41 +14,42 @@
*
* @package propel.generator.airtime.map
*/
class CcTimestampTableMap extends TableMap {
class CcTimestampTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcTimestampTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcTimestampTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_timestamp');
$this->setPhpName('CcTimestamp');
$this->setClassname('CcTimestamp');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_timestamp_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('TIMESTAMP', 'DbTimestamp', 'TIMESTAMP', true, null, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_timestamp');
$this->setPhpName('CcTimestamp');
$this->setClassname('CcTimestamp');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_timestamp_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('timestamp', 'DbTimestamp', 'TIMESTAMP', true, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcListenerCount', 'CcListenerCount', RelationMap::ONE_TO_MANY, array('id' => 'timestamp_id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcListenerCount', 'CcListenerCount', RelationMap::ONE_TO_MANY, array('id' => 'timestamp_id', ), 'CASCADE', null, 'CcListenerCounts');
} // buildRelations()
} // CcTimestampTableMap

View File

@ -14,43 +14,44 @@
*
* @package propel.generator.airtime.map
*/
class CcWebstreamMetadataTableMap extends TableMap {
class CcWebstreamMetadataTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcWebstreamMetadataTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcWebstreamMetadataTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_webstream_metadata');
$this->setPhpName('CcWebstreamMetadata');
$this->setClassname('CcWebstreamMetadata');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_webstream_metadata_id_seq');
// columns
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('INSTANCE_ID', 'DbInstanceId', 'INTEGER', 'cc_schedule', 'ID', true, null, null);
$this->addColumn('START_TIME', 'DbStartTime', 'TIMESTAMP', true, null, null);
$this->addColumn('LIQUIDSOAP_DATA', 'DbLiquidsoapData', 'VARCHAR', true, 1024, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cc_webstream_metadata');
$this->setPhpName('CcWebstreamMetadata');
$this->setClassname('CcWebstreamMetadata');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_webstream_metadata_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addForeignKey('instance_id', 'DbInstanceId', 'INTEGER', 'cc_schedule', 'id', true, null, null);
$this->addColumn('start_time', 'DbStartTime', 'TIMESTAMP', true, null, null);
$this->addColumn('liquidsoap_data', 'DbLiquidsoapData', 'VARCHAR', true, 1024, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::MANY_TO_ONE, array('instance_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
} // CcWebstreamMetadataTableMap

View File

@ -14,49 +14,50 @@
*
* @package propel.generator.airtime.map
*/
class CcWebstreamTableMap extends TableMap {
class CcWebstreamTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcWebstreamTableMap';
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CcWebstreamTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->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, 512, null);
$this->addColumn('LENGTH', 'DbLength', 'VARCHAR', true, null, '00:00:00');
$this->addColumn('CREATOR_ID', 'DbCreatorId', 'INTEGER', true, null, null);
$this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', true, 6, null);
$this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', true, 6, null);
$this->addColumn('LPTIME', 'DbLPtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('MIME', 'DbMime', 'VARCHAR', false, 255, null);
// validators
} // initialize()
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->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, 512, null);
$this->addColumn('length', 'DbLength', 'VARCHAR', true, null, '00:00:00');
$this->addColumn('creator_id', 'DbCreatorId', 'INTEGER', true, null, null);
$this->addColumn('mtime', 'DbMtime', 'TIMESTAMP', true, 6, null);
$this->addColumn('utime', 'DbUtime', 'TIMESTAMP', true, 6, null);
$this->addColumn('lptime', 'DbLPtime', 'TIMESTAMP', false, 6, null);
$this->addColumn('mime', 'DbMime', 'VARCHAR', false, null, 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()
/**
* 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, 'CcSchedules');
} // buildRelations()
} // CcWebstreamTableMap

View File

@ -0,0 +1,72 @@
<?php
/**
* This class defines the structure of the 'cloud_file' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package propel.generator.airtime.map
*/
class CloudFileTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'airtime.map.CloudFileTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('cloud_file');
$this->setPhpName('CloudFile');
$this->setClassname('CloudFile');
$this->setPackage('airtime');
$this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cloud_file_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('storage_backend', 'StorageBackend', 'VARCHAR', true, 512, null);
$this->addColumn('resource_id', 'ResourceId', 'LONGVARCHAR', true, null, null);
$this->addForeignKey('cc_file_id', 'CcFileId', 'INTEGER', 'cc_files', 'id', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('cc_file_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'delegate' => array (
'to' => 'cc_files',
),
);
} // getBehaviors()
} // CloudFileTableMap

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,367 +6,531 @@
*
*
*
* @method CcBlockcriteriaQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcBlockcriteriaQuery orderByDbCriteria($order = Criteria::ASC) Order by the criteria column
* @method CcBlockcriteriaQuery orderByDbModifier($order = Criteria::ASC) Order by the modifier column
* @method CcBlockcriteriaQuery orderByDbValue($order = Criteria::ASC) Order by the value column
* @method CcBlockcriteriaQuery orderByDbExtra($order = Criteria::ASC) Order by the extra column
* @method CcBlockcriteriaQuery orderByDbBlockId($order = Criteria::ASC) Order by the block_id column
* @method CcBlockcriteriaQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcBlockcriteriaQuery orderByDbCriteria($order = Criteria::ASC) Order by the criteria column
* @method CcBlockcriteriaQuery orderByDbModifier($order = Criteria::ASC) Order by the modifier column
* @method CcBlockcriteriaQuery orderByDbValue($order = Criteria::ASC) Order by the value column
* @method CcBlockcriteriaQuery orderByDbExtra($order = Criteria::ASC) Order by the extra column
* @method CcBlockcriteriaQuery orderByDbBlockId($order = Criteria::ASC) Order by the block_id column
*
* @method CcBlockcriteriaQuery groupByDbId() Group by the id column
* @method CcBlockcriteriaQuery groupByDbCriteria() Group by the criteria column
* @method CcBlockcriteriaQuery groupByDbModifier() Group by the modifier column
* @method CcBlockcriteriaQuery groupByDbValue() Group by the value column
* @method CcBlockcriteriaQuery groupByDbExtra() Group by the extra column
* @method CcBlockcriteriaQuery groupByDbBlockId() Group by the block_id column
* @method CcBlockcriteriaQuery groupByDbId() Group by the id column
* @method CcBlockcriteriaQuery groupByDbCriteria() Group by the criteria column
* @method CcBlockcriteriaQuery groupByDbModifier() Group by the modifier column
* @method CcBlockcriteriaQuery groupByDbValue() Group by the value column
* @method CcBlockcriteriaQuery groupByDbExtra() Group by the extra column
* @method CcBlockcriteriaQuery groupByDbBlockId() Group by the block_id column
*
* @method CcBlockcriteriaQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcBlockcriteriaQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcBlockcriteriaQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcBlockcriteriaQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcBlockcriteriaQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcBlockcriteriaQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcBlockcriteriaQuery leftJoinCcBlock($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcBlock relation
* @method CcBlockcriteriaQuery rightJoinCcBlock($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcBlock relation
* @method CcBlockcriteriaQuery innerJoinCcBlock($relationAlias = '') Adds a INNER JOIN clause to the query using the CcBlock relation
* @method CcBlockcriteriaQuery leftJoinCcBlock($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcBlock relation
* @method CcBlockcriteriaQuery rightJoinCcBlock($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcBlock relation
* @method CcBlockcriteriaQuery innerJoinCcBlock($relationAlias = null) Adds a INNER JOIN clause to the query using the CcBlock relation
*
* @method CcBlockcriteria findOne(PropelPDO $con = null) Return the first CcBlockcriteria matching the query
* @method CcBlockcriteria findOneOrCreate(PropelPDO $con = null) Return the first CcBlockcriteria matching the query, or a new CcBlockcriteria object populated from the query conditions when no match is found
* @method CcBlockcriteria findOne(PropelPDO $con = null) Return the first CcBlockcriteria matching the query
* @method CcBlockcriteria findOneOrCreate(PropelPDO $con = null) Return the first CcBlockcriteria matching the query, or a new CcBlockcriteria object populated from the query conditions when no match is found
*
* @method CcBlockcriteria findOneByDbId(int $id) Return the first CcBlockcriteria filtered by the id column
* @method CcBlockcriteria findOneByDbCriteria(string $criteria) Return the first CcBlockcriteria filtered by the criteria column
* @method CcBlockcriteria findOneByDbModifier(string $modifier) Return the first CcBlockcriteria filtered by the modifier column
* @method CcBlockcriteria findOneByDbValue(string $value) Return the first CcBlockcriteria filtered by the value column
* @method CcBlockcriteria findOneByDbExtra(string $extra) Return the first CcBlockcriteria filtered by the extra column
* @method CcBlockcriteria findOneByDbBlockId(int $block_id) Return the first CcBlockcriteria filtered by the block_id column
* @method CcBlockcriteria findOneByDbCriteria(string $criteria) Return the first CcBlockcriteria filtered by the criteria column
* @method CcBlockcriteria findOneByDbModifier(string $modifier) Return the first CcBlockcriteria filtered by the modifier column
* @method CcBlockcriteria findOneByDbValue(string $value) Return the first CcBlockcriteria filtered by the value column
* @method CcBlockcriteria findOneByDbExtra(string $extra) Return the first CcBlockcriteria filtered by the extra column
* @method CcBlockcriteria findOneByDbBlockId(int $block_id) Return the first CcBlockcriteria filtered by the block_id column
*
* @method array findByDbId(int $id) Return CcBlockcriteria objects filtered by the id column
* @method array findByDbCriteria(string $criteria) Return CcBlockcriteria objects filtered by the criteria column
* @method array findByDbModifier(string $modifier) Return CcBlockcriteria objects filtered by the modifier column
* @method array findByDbValue(string $value) Return CcBlockcriteria objects filtered by the value column
* @method array findByDbExtra(string $extra) Return CcBlockcriteria objects filtered by the extra column
* @method array findByDbBlockId(int $block_id) Return CcBlockcriteria objects filtered by the block_id column
* @method array findByDbId(int $id) Return CcBlockcriteria objects filtered by the id column
* @method array findByDbCriteria(string $criteria) Return CcBlockcriteria objects filtered by the criteria column
* @method array findByDbModifier(string $modifier) Return CcBlockcriteria objects filtered by the modifier column
* @method array findByDbValue(string $value) Return CcBlockcriteria objects filtered by the value column
* @method array findByDbExtra(string $extra) Return CcBlockcriteria objects filtered by the extra column
* @method array findByDbBlockId(int $block_id) Return CcBlockcriteria objects filtered by the block_id column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcBlockcriteriaQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcBlockcriteriaQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcBlockcriteria';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcBlockcriteriaQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcBlockcriteria', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcBlockcriteriaQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcBlockcriteriaQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcBlockcriteriaQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcBlockcriteriaQuery) {
return $criteria;
}
$query = new CcBlockcriteriaQuery(null, null, $modelAlias);
/**
* Returns a new CcBlockcriteriaQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcBlockcriteriaQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcBlockcriteriaQuery) {
return $criteria;
}
$query = new CcBlockcriteriaQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcBlockcriteria|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcBlockcriteriaPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
// the object is alredy in the instance pool
return $obj;
} else {
// the object has not been requested yet, or the formatter is not an object formatter
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->getSelectStatement($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcBlockcriteria|CcBlockcriteria[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcBlockcriteriaPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcBlockcriteriaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcBlockcriteria A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbId($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcBlockcriteria A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "criteria", "modifier", "value", "extra", "block_id" FROM "cc_blockcriteria" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcBlockcriteria();
$obj->hydrate($row);
CcBlockcriteriaPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* Filter the query on the id column
*
* @param int|array $dbId The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbId($dbId = null, $comparison = null)
{
if (is_array($dbId) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the criteria column
*
* @param string $dbCriteria The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbCriteria($dbCriteria = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbCriteria)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbCriteria)) {
$dbCriteria = str_replace('*', '%', $dbCriteria);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::CRITERIA, $dbCriteria, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcBlockcriteria|CcBlockcriteria[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Filter the query on the modifier column
*
* @param string $dbModifier The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbModifier($dbModifier = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbModifier)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbModifier)) {
$dbModifier = str_replace('*', '%', $dbModifier);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::MODIFIER, $dbModifier, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the value column
*
* @param string $dbValue The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbValue($dbValue = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbValue)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbValue)) {
$dbValue = str_replace('*', '%', $dbValue);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::VALUE, $dbValue, $comparison);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcBlockcriteria[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
/**
* Filter the query on the extra column
*
* @param string $dbExtra The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbExtra($dbExtra = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbExtra)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbExtra)) {
$dbExtra = str_replace('*', '%', $dbExtra);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::EXTRA, $dbExtra, $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query on the block_id column
*
* @param int|array $dbBlockId The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbBlockId($dbBlockId = null, $comparison = null)
{
if (is_array($dbBlockId)) {
$useMinMax = false;
if (isset($dbBlockId['min'])) {
$this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbBlockId['max'])) {
$this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId, $comparison);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Filter the query by a related CcBlock object
*
* @param CcBlock $ccBlock the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByCcBlock($ccBlock, $comparison = null)
{
return $this
->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $ccBlock->getDbId(), $comparison);
}
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $key, Criteria::EQUAL);
}
/**
* Adds a JOIN clause to the query using the CcBlock relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function joinCcBlock($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcBlock');
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
// 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);
}
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $keys, Criteria::IN);
}
// add the ModelJoin to the current object
if($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcBlock');
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterByDbId(1234); // WHERE id = 1234
* $query->filterByDbId(array(12, 34)); // WHERE id IN (12, 34)
* $query->filterByDbId(array('min' => 12)); // WHERE id >= 12
* $query->filterByDbId(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $dbId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbId($dbId = null, $comparison = null)
{
if (is_array($dbId)) {
$useMinMax = false;
if (isset($dbId['min'])) {
$this->addUsingAlias(CcBlockcriteriaPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcBlockcriteriaPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this;
}
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $dbId, $comparison);
}
/**
* Use the CcBlock relation CcBlock object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcBlockQuery A secondary query class using the current class as primary query
*/
public function useCcBlockQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcBlock($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcBlock', 'CcBlockQuery');
}
/**
* Filter the query on the criteria column
*
* Example usage:
* <code>
* $query->filterByDbCriteria('fooValue'); // WHERE criteria = 'fooValue'
* $query->filterByDbCriteria('%fooValue%'); // WHERE criteria LIKE '%fooValue%'
* </code>
*
* @param string $dbCriteria The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbCriteria($dbCriteria = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbCriteria)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbCriteria)) {
$dbCriteria = str_replace('*', '%', $dbCriteria);
$comparison = Criteria::LIKE;
}
}
/**
* Exclude object from result
*
* @param CcBlockcriteria $ccBlockcriteria Object to remove from the list of results
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function prune($ccBlockcriteria = null)
{
if ($ccBlockcriteria) {
$this->addUsingAlias(CcBlockcriteriaPeer::ID, $ccBlockcriteria->getDbId(), Criteria::NOT_EQUAL);
}
return $this->addUsingAlias(CcBlockcriteriaPeer::CRITERIA, $dbCriteria, $comparison);
}
return $this;
}
/**
* Filter the query on the modifier column
*
* Example usage:
* <code>
* $query->filterByDbModifier('fooValue'); // WHERE modifier = 'fooValue'
* $query->filterByDbModifier('%fooValue%'); // WHERE modifier LIKE '%fooValue%'
* </code>
*
* @param string $dbModifier The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbModifier($dbModifier = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbModifier)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbModifier)) {
$dbModifier = str_replace('*', '%', $dbModifier);
$comparison = Criteria::LIKE;
}
}
} // BaseCcBlockcriteriaQuery
return $this->addUsingAlias(CcBlockcriteriaPeer::MODIFIER, $dbModifier, $comparison);
}
/**
* Filter the query on the value column
*
* Example usage:
* <code>
* $query->filterByDbValue('fooValue'); // WHERE value = 'fooValue'
* $query->filterByDbValue('%fooValue%'); // WHERE value LIKE '%fooValue%'
* </code>
*
* @param string $dbValue The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbValue($dbValue = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbValue)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbValue)) {
$dbValue = str_replace('*', '%', $dbValue);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::VALUE, $dbValue, $comparison);
}
/**
* Filter the query on the extra column
*
* Example usage:
* <code>
* $query->filterByDbExtra('fooValue'); // WHERE extra = 'fooValue'
* $query->filterByDbExtra('%fooValue%'); // WHERE extra LIKE '%fooValue%'
* </code>
*
* @param string $dbExtra The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbExtra($dbExtra = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbExtra)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbExtra)) {
$dbExtra = str_replace('*', '%', $dbExtra);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::EXTRA, $dbExtra, $comparison);
}
/**
* Filter the query on the block_id column
*
* Example usage:
* <code>
* $query->filterByDbBlockId(1234); // WHERE block_id = 1234
* $query->filterByDbBlockId(array(12, 34)); // WHERE block_id IN (12, 34)
* $query->filterByDbBlockId(array('min' => 12)); // WHERE block_id >= 12
* $query->filterByDbBlockId(array('max' => 12)); // WHERE block_id <= 12
* </code>
*
* @see filterByCcBlock()
*
* @param mixed $dbBlockId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function filterByDbBlockId($dbBlockId = null, $comparison = null)
{
if (is_array($dbBlockId)) {
$useMinMax = false;
if (isset($dbBlockId['min'])) {
$this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbBlockId['max'])) {
$this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $dbBlockId, $comparison);
}
/**
* Filter the query by a related CcBlock object
*
* @param CcBlock|PropelObjectCollection $ccBlock The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcBlock($ccBlock, $comparison = null)
{
if ($ccBlock instanceof CcBlock) {
return $this
->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $ccBlock->getDbId(), $comparison);
} elseif ($ccBlock instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcBlockcriteriaPeer::BLOCK_ID, $ccBlock->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcBlock() only accepts arguments of type CcBlock or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcBlock relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function joinCcBlock($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcBlock');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcBlock');
}
return $this;
}
/**
* Use the CcBlock relation CcBlock object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcBlockQuery A secondary query class using the current class as primary query
*/
public function useCcBlockQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcBlock($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcBlock', 'CcBlockQuery');
}
/**
* Exclude object from result
*
* @param CcBlockcriteria $ccBlockcriteria Object to remove from the list of results
*
* @return CcBlockcriteriaQuery The current query, for fluid interface
*/
public function prune($ccBlockcriteria = null)
{
if ($ccBlockcriteria) {
$this->addUsingAlias(CcBlockcriteriaPeer::ID, $ccBlockcriteria->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,191 +6,291 @@
*
*
*
* @method CcCountryQuery orderByDbIsoCode($order = Criteria::ASC) Order by the isocode column
* @method CcCountryQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcCountryQuery orderByDbIsoCode($order = Criteria::ASC) Order by the isocode column
* @method CcCountryQuery orderByDbName($order = Criteria::ASC) Order by the name column
*
* @method CcCountryQuery groupByDbIsoCode() Group by the isocode column
* @method CcCountryQuery groupByDbName() Group by the name column
* @method CcCountryQuery groupByDbIsoCode() Group by the isocode column
* @method CcCountryQuery groupByDbName() Group by the name column
*
* @method CcCountryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcCountryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcCountryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcCountryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcCountryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcCountryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcCountry findOne(PropelPDO $con = null) Return the first CcCountry matching the query
* @method CcCountry findOneOrCreate(PropelPDO $con = null) Return the first CcCountry matching the query, or a new CcCountry object populated from the query conditions when no match is found
* @method CcCountry findOne(PropelPDO $con = null) Return the first CcCountry matching the query
* @method CcCountry findOneOrCreate(PropelPDO $con = null) Return the first CcCountry matching the query, or a new CcCountry object populated from the query conditions when no match is found
*
* @method CcCountry findOneByDbIsoCode(string $isocode) Return the first CcCountry filtered by the isocode column
* @method CcCountry findOneByDbName(string $name) Return the first CcCountry filtered by the name column
* @method CcCountry findOneByDbName(string $name) Return the first CcCountry filtered by the name column
*
* @method array findByDbIsoCode(string $isocode) Return CcCountry objects filtered by the isocode column
* @method array findByDbName(string $name) Return CcCountry objects filtered by the name column
* @method array findByDbIsoCode(string $isocode) Return CcCountry objects filtered by the isocode column
* @method array findByDbName(string $name) Return CcCountry objects filtered by the name column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcCountryQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcCountryQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcCountry';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcCountryQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcCountry', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcCountryQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcCountryQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcCountryQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcCountryQuery) {
return $criteria;
}
$query = new CcCountryQuery(null, null, $modelAlias);
/**
* Returns a new CcCountryQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcCountryQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcCountryQuery) {
return $criteria;
}
$query = new CcCountryQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcCountry|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcCountryPeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcCountry|CcCountry[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcCountryPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcCountryPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcCountryQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcCountryPeer::ISOCODE, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcCountry A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbIsoCode($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcCountryQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcCountryPeer::ISOCODE, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcCountry A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "isocode", "name" FROM "cc_country" WHERE "isocode" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_STR);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcCountry();
$obj->hydrate($row);
CcCountryPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* Filter the query on the isocode column
*
* @param string $dbIsoCode 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 CcCountryQuery The current query, for fluid interface
*/
public function filterByDbIsoCode($dbIsoCode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbIsoCode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbIsoCode)) {
$dbIsoCode = str_replace('*', '%', $dbIsoCode);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcCountryPeer::ISOCODE, $dbIsoCode, $comparison);
}
return $obj;
}
/**
* 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 CcCountryQuery 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(CcCountryPeer::NAME, $dbName, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcCountry|CcCountry[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Exclude object from result
*
* @param CcCountry $ccCountry Object to remove from the list of results
*
* @return CcCountryQuery The current query, for fluid interface
*/
public function prune($ccCountry = null)
{
if ($ccCountry) {
$this->addUsingAlias(CcCountryPeer::ISOCODE, $ccCountry->getDbIsoCode(), Criteria::NOT_EQUAL);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
return $this;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcCountry[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
} // BaseCcCountryQuery
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcCountryQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcCountryPeer::ISOCODE, $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 CcCountryQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcCountryPeer::ISOCODE, $keys, Criteria::IN);
}
/**
* Filter the query on the isocode column
*
* Example usage:
* <code>
* $query->filterByDbIsoCode('fooValue'); // WHERE isocode = 'fooValue'
* $query->filterByDbIsoCode('%fooValue%'); // WHERE isocode LIKE '%fooValue%'
* </code>
*
* @param string $dbIsoCode 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 CcCountryQuery The current query, for fluid interface
*/
public function filterByDbIsoCode($dbIsoCode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbIsoCode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbIsoCode)) {
$dbIsoCode = str_replace('*', '%', $dbIsoCode);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcCountryPeer::ISOCODE, $dbIsoCode, $comparison);
}
/**
* Filter the query on the name column
*
* Example usage:
* <code>
* $query->filterByDbName('fooValue'); // WHERE name = 'fooValue'
* $query->filterByDbName('%fooValue%'); // WHERE name LIKE '%fooValue%'
* </code>
*
* @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 CcCountryQuery 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(CcCountryPeer::NAME, $dbName, $comparison);
}
/**
* Exclude object from result
*
* @param CcCountry $ccCountry Object to remove from the list of results
*
* @return CcCountryQuery The current query, for fluid interface
*/
public function prune($ccCountry = null)
{
if ($ccCountry) {
$this->addUsingAlias(CcCountryPeer::ISOCODE, $ccCountry->getDbIsoCode(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,401 +6,573 @@
*
*
*
* @method CcListenerCountQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcListenerCountQuery orderByDbTimestampId($order = Criteria::ASC) Order by the timestamp_id column
* @method CcListenerCountQuery orderByDbMountNameId($order = Criteria::ASC) Order by the mount_name_id column
* @method CcListenerCountQuery orderByDbListenerCount($order = Criteria::ASC) Order by the listener_count column
* @method CcListenerCountQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcListenerCountQuery orderByDbTimestampId($order = Criteria::ASC) Order by the timestamp_id column
* @method CcListenerCountQuery orderByDbMountNameId($order = Criteria::ASC) Order by the mount_name_id column
* @method CcListenerCountQuery orderByDbListenerCount($order = Criteria::ASC) Order by the listener_count column
*
* @method CcListenerCountQuery groupByDbId() Group by the id column
* @method CcListenerCountQuery groupByDbTimestampId() Group by the timestamp_id column
* @method CcListenerCountQuery groupByDbMountNameId() Group by the mount_name_id column
* @method CcListenerCountQuery groupByDbListenerCount() Group by the listener_count column
* @method CcListenerCountQuery groupByDbId() Group by the id column
* @method CcListenerCountQuery groupByDbTimestampId() Group by the timestamp_id column
* @method CcListenerCountQuery groupByDbMountNameId() Group by the mount_name_id column
* @method CcListenerCountQuery groupByDbListenerCount() Group by the listener_count column
*
* @method CcListenerCountQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcListenerCountQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcListenerCountQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcListenerCountQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcListenerCountQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcListenerCountQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcListenerCountQuery leftJoinCcTimestamp($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcTimestamp relation
* @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcTimestamp relation
* @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = '') Adds a INNER JOIN clause to the query using the CcTimestamp relation
* @method CcListenerCountQuery leftJoinCcTimestamp($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcTimestamp relation
* @method CcListenerCountQuery rightJoinCcTimestamp($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcTimestamp relation
* @method CcListenerCountQuery innerJoinCcTimestamp($relationAlias = null) Adds a INNER JOIN clause to the query using the CcTimestamp relation
*
* @method CcListenerCountQuery leftJoinCcMountName($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcMountName relation
* @method CcListenerCountQuery rightJoinCcMountName($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcMountName relation
* @method CcListenerCountQuery innerJoinCcMountName($relationAlias = '') Adds a INNER JOIN clause to the query using the CcMountName relation
* @method CcListenerCountQuery leftJoinCcMountName($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcMountName relation
* @method CcListenerCountQuery rightJoinCcMountName($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcMountName relation
* @method CcListenerCountQuery innerJoinCcMountName($relationAlias = null) Adds a INNER JOIN clause to the query using the CcMountName relation
*
* @method CcListenerCount findOne(PropelPDO $con = null) Return the first CcListenerCount matching the query
* @method CcListenerCount findOneOrCreate(PropelPDO $con = null) Return the first CcListenerCount matching the query, or a new CcListenerCount object populated from the query conditions when no match is found
* @method CcListenerCount findOne(PropelPDO $con = null) Return the first CcListenerCount matching the query
* @method CcListenerCount findOneOrCreate(PropelPDO $con = null) Return the first CcListenerCount matching the query, or a new CcListenerCount object populated from the query conditions when no match is found
*
* @method CcListenerCount findOneByDbId(int $id) Return the first CcListenerCount filtered by the id column
* @method CcListenerCount findOneByDbTimestampId(int $timestamp_id) Return the first CcListenerCount filtered by the timestamp_id column
* @method CcListenerCount findOneByDbMountNameId(int $mount_name_id) Return the first CcListenerCount filtered by the mount_name_id column
* @method CcListenerCount findOneByDbListenerCount(int $listener_count) Return the first CcListenerCount filtered by the listener_count column
* @method CcListenerCount findOneByDbTimestampId(int $timestamp_id) Return the first CcListenerCount filtered by the timestamp_id column
* @method CcListenerCount findOneByDbMountNameId(int $mount_name_id) Return the first CcListenerCount filtered by the mount_name_id column
* @method CcListenerCount findOneByDbListenerCount(int $listener_count) Return the first CcListenerCount filtered by the listener_count column
*
* @method array findByDbId(int $id) Return CcListenerCount objects filtered by the id column
* @method array findByDbTimestampId(int $timestamp_id) Return CcListenerCount objects filtered by the timestamp_id column
* @method array findByDbMountNameId(int $mount_name_id) Return CcListenerCount objects filtered by the mount_name_id column
* @method array findByDbListenerCount(int $listener_count) Return CcListenerCount objects filtered by the listener_count column
* @method array findByDbId(int $id) Return CcListenerCount objects filtered by the id column
* @method array findByDbTimestampId(int $timestamp_id) Return CcListenerCount objects filtered by the timestamp_id column
* @method array findByDbMountNameId(int $mount_name_id) Return CcListenerCount objects filtered by the mount_name_id column
* @method array findByDbListenerCount(int $listener_count) Return CcListenerCount objects filtered by the listener_count column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcListenerCountQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcListenerCountQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcListenerCount';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcListenerCountQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcListenerCount', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcListenerCountQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcListenerCountQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcListenerCountQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcListenerCountQuery) {
return $criteria;
}
$query = new CcListenerCountQuery(null, null, $modelAlias);
/**
* Returns a new CcListenerCountQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcListenerCountQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcListenerCountQuery) {
return $criteria;
}
$query = new CcListenerCountQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcListenerCount|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcListenerCountPeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcListenerCount|CcListenerCount[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcListenerCountPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcListenerCountPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcListenerCountPeer::ID, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcListenerCount A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbId($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcListenerCountPeer::ID, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcListenerCount A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "timestamp_id", "mount_name_id", "listener_count" FROM "cc_listener_count" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcListenerCount();
$obj->hydrate($row);
CcListenerCountPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* 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 CcListenerCountQuery 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(CcListenerCountPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the timestamp_id column
*
* @param int|array $dbTimestampId 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 CcListenerCountQuery The current query, for fluid interface
*/
public function filterByDbTimestampId($dbTimestampId = null, $comparison = null)
{
if (is_array($dbTimestampId)) {
$useMinMax = false;
if (isset($dbTimestampId['min'])) {
$this->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $dbTimestampId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbTimestampId['max'])) {
$this->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $dbTimestampId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $dbTimestampId, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcListenerCount|CcListenerCount[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Filter the query on the mount_name_id column
*
* @param int|array $dbMountNameId 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 CcListenerCountQuery The current query, for fluid interface
*/
public function filterByDbMountNameId($dbMountNameId = null, $comparison = null)
{
if (is_array($dbMountNameId)) {
$useMinMax = false;
if (isset($dbMountNameId['min'])) {
$this->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $dbMountNameId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbMountNameId['max'])) {
$this->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $dbMountNameId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $dbMountNameId, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the listener_count column
*
* @param int|array $dbListenerCount 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 CcListenerCountQuery The current query, for fluid interface
*/
public function filterByDbListenerCount($dbListenerCount = null, $comparison = null)
{
if (is_array($dbListenerCount)) {
$useMinMax = false;
if (isset($dbListenerCount['min'])) {
$this->addUsingAlias(CcListenerCountPeer::LISTENER_COUNT, $dbListenerCount['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbListenerCount['max'])) {
$this->addUsingAlias(CcListenerCountPeer::LISTENER_COUNT, $dbListenerCount['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcListenerCountPeer::LISTENER_COUNT, $dbListenerCount, $comparison);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcListenerCount[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
/**
* Filter the query by a related CcTimestamp object
*
* @param CcTimestamp $ccTimestamp the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByCcTimestamp($ccTimestamp, $comparison = null)
{
return $this
->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $ccTimestamp->getDbId(), $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Adds a JOIN clause to the query using the CcTimestamp relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function joinCcTimestamp($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcTimestamp');
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
// 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);
}
return $this->addUsingAlias(CcListenerCountPeer::ID, $key, Criteria::EQUAL);
}
// add the ModelJoin to the current object
if($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcTimestamp');
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this;
}
return $this->addUsingAlias(CcListenerCountPeer::ID, $keys, Criteria::IN);
}
/**
* Use the CcTimestamp relation CcTimestamp 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 CcTimestampQuery A secondary query class using the current class as primary query
*/
public function useCcTimestampQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcTimestamp($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcTimestamp', 'CcTimestampQuery');
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterByDbId(1234); // WHERE id = 1234
* $query->filterByDbId(array(12, 34)); // WHERE id IN (12, 34)
* $query->filterByDbId(array('min' => 12)); // WHERE id >= 12
* $query->filterByDbId(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $dbId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByDbId($dbId = null, $comparison = null)
{
if (is_array($dbId)) {
$useMinMax = false;
if (isset($dbId['min'])) {
$this->addUsingAlias(CcListenerCountPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcListenerCountPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
/**
* Filter the query by a related CcMountName object
*
* @param CcMountName $ccMountName the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByCcMountName($ccMountName, $comparison = null)
{
return $this
->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccMountName->getDbId(), $comparison);
}
return $this->addUsingAlias(CcListenerCountPeer::ID, $dbId, $comparison);
}
/**
* Adds a JOIN clause to the query using the CcMountName relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function joinCcMountName($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcMountName');
/**
* Filter the query on the timestamp_id column
*
* Example usage:
* <code>
* $query->filterByDbTimestampId(1234); // WHERE timestamp_id = 1234
* $query->filterByDbTimestampId(array(12, 34)); // WHERE timestamp_id IN (12, 34)
* $query->filterByDbTimestampId(array('min' => 12)); // WHERE timestamp_id >= 12
* $query->filterByDbTimestampId(array('max' => 12)); // WHERE timestamp_id <= 12
* </code>
*
* @see filterByCcTimestamp()
*
* @param mixed $dbTimestampId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByDbTimestampId($dbTimestampId = null, $comparison = null)
{
if (is_array($dbTimestampId)) {
$useMinMax = false;
if (isset($dbTimestampId['min'])) {
$this->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $dbTimestampId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbTimestampId['max'])) {
$this->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $dbTimestampId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
// 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);
}
return $this->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $dbTimestampId, $comparison);
}
// add the ModelJoin to the current object
if($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcMountName');
}
/**
* Filter the query on the mount_name_id column
*
* Example usage:
* <code>
* $query->filterByDbMountNameId(1234); // WHERE mount_name_id = 1234
* $query->filterByDbMountNameId(array(12, 34)); // WHERE mount_name_id IN (12, 34)
* $query->filterByDbMountNameId(array('min' => 12)); // WHERE mount_name_id >= 12
* $query->filterByDbMountNameId(array('max' => 12)); // WHERE mount_name_id <= 12
* </code>
*
* @see filterByCcMountName()
*
* @param mixed $dbMountNameId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByDbMountNameId($dbMountNameId = null, $comparison = null)
{
if (is_array($dbMountNameId)) {
$useMinMax = false;
if (isset($dbMountNameId['min'])) {
$this->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $dbMountNameId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbMountNameId['max'])) {
$this->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $dbMountNameId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this;
}
return $this->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $dbMountNameId, $comparison);
}
/**
* Use the CcMountName relation CcMountName 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 CcMountNameQuery A secondary query class using the current class as primary query
*/
public function useCcMountNameQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcMountName($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcMountName', 'CcMountNameQuery');
}
/**
* Filter the query on the listener_count column
*
* Example usage:
* <code>
* $query->filterByDbListenerCount(1234); // WHERE listener_count = 1234
* $query->filterByDbListenerCount(array(12, 34)); // WHERE listener_count IN (12, 34)
* $query->filterByDbListenerCount(array('min' => 12)); // WHERE listener_count >= 12
* $query->filterByDbListenerCount(array('max' => 12)); // WHERE listener_count <= 12
* </code>
*
* @param mixed $dbListenerCount The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function filterByDbListenerCount($dbListenerCount = null, $comparison = null)
{
if (is_array($dbListenerCount)) {
$useMinMax = false;
if (isset($dbListenerCount['min'])) {
$this->addUsingAlias(CcListenerCountPeer::LISTENER_COUNT, $dbListenerCount['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbListenerCount['max'])) {
$this->addUsingAlias(CcListenerCountPeer::LISTENER_COUNT, $dbListenerCount['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
/**
* Exclude object from result
*
* @param CcListenerCount $ccListenerCount Object to remove from the list of results
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function prune($ccListenerCount = null)
{
if ($ccListenerCount) {
$this->addUsingAlias(CcListenerCountPeer::ID, $ccListenerCount->getDbId(), Criteria::NOT_EQUAL);
}
return $this->addUsingAlias(CcListenerCountPeer::LISTENER_COUNT, $dbListenerCount, $comparison);
}
return $this;
}
/**
* Filter the query by a related CcTimestamp object
*
* @param CcTimestamp|PropelObjectCollection $ccTimestamp The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcTimestamp($ccTimestamp, $comparison = null)
{
if ($ccTimestamp instanceof CcTimestamp) {
return $this
->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $ccTimestamp->getDbId(), $comparison);
} elseif ($ccTimestamp instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
} // BaseCcListenerCountQuery
return $this
->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $ccTimestamp->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcTimestamp() only accepts arguments of type CcTimestamp or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcTimestamp relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function joinCcTimestamp($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcTimestamp');
// 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, 'CcTimestamp');
}
return $this;
}
/**
* Use the CcTimestamp relation CcTimestamp 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 CcTimestampQuery A secondary query class using the current class as primary query
*/
public function useCcTimestampQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcTimestamp($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcTimestamp', 'CcTimestampQuery');
}
/**
* Filter the query by a related CcMountName object
*
* @param CcMountName|PropelObjectCollection $ccMountName The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcListenerCountQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcMountName($ccMountName, $comparison = null)
{
if ($ccMountName instanceof CcMountName) {
return $this
->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccMountName->getDbId(), $comparison);
} elseif ($ccMountName instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $ccMountName->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcMountName() only accepts arguments of type CcMountName or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcMountName relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function joinCcMountName($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcMountName');
// 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, 'CcMountName');
}
return $this;
}
/**
* Use the CcMountName relation CcMountName 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 CcMountNameQuery A secondary query class using the current class as primary query
*/
public function useCcMountNameQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcMountName($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcMountName', 'CcMountNameQuery');
}
/**
* Exclude object from result
*
* @param CcListenerCount $ccListenerCount Object to remove from the list of results
*
* @return CcListenerCountQuery The current query, for fluid interface
*/
public function prune($ccListenerCount = null)
{
if ($ccListenerCount) {
$this->addUsingAlias(CcListenerCountPeer::ID, $ccListenerCount->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,256 +6,398 @@
*
*
*
* @method CcLiveLogQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcLiveLogQuery orderByDbState($order = Criteria::ASC) Order by the state column
* @method CcLiveLogQuery orderByDbStartTime($order = Criteria::ASC) Order by the start_time column
* @method CcLiveLogQuery orderByDbEndTime($order = Criteria::ASC) Order by the end_time column
* @method CcLiveLogQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcLiveLogQuery orderByDbState($order = Criteria::ASC) Order by the state column
* @method CcLiveLogQuery orderByDbStartTime($order = Criteria::ASC) Order by the start_time column
* @method CcLiveLogQuery orderByDbEndTime($order = Criteria::ASC) Order by the end_time column
*
* @method CcLiveLogQuery groupByDbId() Group by the id column
* @method CcLiveLogQuery groupByDbState() Group by the state column
* @method CcLiveLogQuery groupByDbStartTime() Group by the start_time column
* @method CcLiveLogQuery groupByDbEndTime() Group by the end_time column
* @method CcLiveLogQuery groupByDbId() Group by the id column
* @method CcLiveLogQuery groupByDbState() Group by the state column
* @method CcLiveLogQuery groupByDbStartTime() Group by the start_time column
* @method CcLiveLogQuery groupByDbEndTime() Group by the end_time column
*
* @method CcLiveLogQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcLiveLogQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcLiveLogQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcLiveLogQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcLiveLogQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcLiveLogQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcLiveLog findOne(PropelPDO $con = null) Return the first CcLiveLog matching the query
* @method CcLiveLog findOneOrCreate(PropelPDO $con = null) Return the first CcLiveLog matching the query, or a new CcLiveLog object populated from the query conditions when no match is found
* @method CcLiveLog findOne(PropelPDO $con = null) Return the first CcLiveLog matching the query
* @method CcLiveLog findOneOrCreate(PropelPDO $con = null) Return the first CcLiveLog matching the query, or a new CcLiveLog object populated from the query conditions when no match is found
*
* @method CcLiveLog findOneByDbId(int $id) Return the first CcLiveLog filtered by the id column
* @method CcLiveLog findOneByDbState(string $state) Return the first CcLiveLog filtered by the state column
* @method CcLiveLog findOneByDbStartTime(string $start_time) Return the first CcLiveLog filtered by the start_time column
* @method CcLiveLog findOneByDbEndTime(string $end_time) Return the first CcLiveLog filtered by the end_time column
* @method CcLiveLog findOneByDbState(string $state) Return the first CcLiveLog filtered by the state column
* @method CcLiveLog findOneByDbStartTime(string $start_time) Return the first CcLiveLog filtered by the start_time column
* @method CcLiveLog findOneByDbEndTime(string $end_time) Return the first CcLiveLog filtered by the end_time column
*
* @method array findByDbId(int $id) Return CcLiveLog objects filtered by the id column
* @method array findByDbState(string $state) Return CcLiveLog objects filtered by the state column
* @method array findByDbStartTime(string $start_time) Return CcLiveLog objects filtered by the start_time column
* @method array findByDbEndTime(string $end_time) Return CcLiveLog objects filtered by the end_time column
* @method array findByDbId(int $id) Return CcLiveLog objects filtered by the id column
* @method array findByDbState(string $state) Return CcLiveLog objects filtered by the state column
* @method array findByDbStartTime(string $start_time) Return CcLiveLog objects filtered by the start_time column
* @method array findByDbEndTime(string $end_time) Return CcLiveLog objects filtered by the end_time column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcLiveLogQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcLiveLogQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcLiveLog';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcLiveLogQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcLiveLog', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcLiveLogQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcLiveLogQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcLiveLogQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcLiveLogQuery) {
return $criteria;
}
$query = new CcLiveLogQuery(null, null, $modelAlias);
/**
* Returns a new CcLiveLogQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcLiveLogQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcLiveLogQuery) {
return $criteria;
}
$query = new CcLiveLogQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcLiveLog|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcLiveLogPeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcLiveLog|CcLiveLog[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcLiveLogPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcLiveLogPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcLiveLogPeer::ID, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLiveLog A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbId($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcLiveLogPeer::ID, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLiveLog A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "state", "start_time", "end_time" FROM "cc_live_log" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcLiveLog();
$obj->hydrate($row);
CcLiveLogPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* 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 CcLiveLogQuery 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(CcLiveLogPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the state column
*
* @param string $dbState 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 CcLiveLogQuery The current query, for fluid interface
*/
public function filterByDbState($dbState = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbState)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbState)) {
$dbState = str_replace('*', '%', $dbState);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLiveLogPeer::STATE, $dbState, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLiveLog|CcLiveLog[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Filter the query on the start_time column
*
* @param string|array $dbStartTime The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function filterByDbStartTime($dbStartTime = null, $comparison = null)
{
if (is_array($dbStartTime)) {
$useMinMax = false;
if (isset($dbStartTime['min'])) {
$this->addUsingAlias(CcLiveLogPeer::START_TIME, $dbStartTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbStartTime['max'])) {
$this->addUsingAlias(CcLiveLogPeer::START_TIME, $dbStartTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLiveLogPeer::START_TIME, $dbStartTime, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the end_time column
*
* @param string|array $dbEndTime 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 CcLiveLogQuery The current query, for fluid interface
*/
public function filterByDbEndTime($dbEndTime = null, $comparison = null)
{
if (is_array($dbEndTime)) {
$useMinMax = false;
if (isset($dbEndTime['min'])) {
$this->addUsingAlias(CcLiveLogPeer::END_TIME, $dbEndTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbEndTime['max'])) {
$this->addUsingAlias(CcLiveLogPeer::END_TIME, $dbEndTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLiveLogPeer::END_TIME, $dbEndTime, $comparison);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcLiveLog[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
/**
* Exclude object from result
*
* @param CcLiveLog $ccLiveLog Object to remove from the list of results
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function prune($ccLiveLog = null)
{
if ($ccLiveLog) {
$this->addUsingAlias(CcLiveLogPeer::ID, $ccLiveLog->getDbId(), Criteria::NOT_EQUAL);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
return $this;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
} // BaseCcLiveLogQuery
return $this->addUsingAlias(CcLiveLogPeer::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 CcLiveLogQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcLiveLogPeer::ID, $keys, Criteria::IN);
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterByDbId(1234); // WHERE id = 1234
* $query->filterByDbId(array(12, 34)); // WHERE id IN (12, 34)
* $query->filterByDbId(array('min' => 12)); // WHERE id >= 12
* $query->filterByDbId(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $dbId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function filterByDbId($dbId = null, $comparison = null)
{
if (is_array($dbId)) {
$useMinMax = false;
if (isset($dbId['min'])) {
$this->addUsingAlias(CcLiveLogPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcLiveLogPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLiveLogPeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the state column
*
* Example usage:
* <code>
* $query->filterByDbState('fooValue'); // WHERE state = 'fooValue'
* $query->filterByDbState('%fooValue%'); // WHERE state LIKE '%fooValue%'
* </code>
*
* @param string $dbState 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 CcLiveLogQuery The current query, for fluid interface
*/
public function filterByDbState($dbState = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbState)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbState)) {
$dbState = str_replace('*', '%', $dbState);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLiveLogPeer::STATE, $dbState, $comparison);
}
/**
* Filter the query on the start_time column
*
* Example usage:
* <code>
* $query->filterByDbStartTime('2011-03-14'); // WHERE start_time = '2011-03-14'
* $query->filterByDbStartTime('now'); // WHERE start_time = '2011-03-14'
* $query->filterByDbStartTime(array('max' => 'yesterday')); // WHERE start_time < '2011-03-13'
* </code>
*
* @param mixed $dbStartTime The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function filterByDbStartTime($dbStartTime = null, $comparison = null)
{
if (is_array($dbStartTime)) {
$useMinMax = false;
if (isset($dbStartTime['min'])) {
$this->addUsingAlias(CcLiveLogPeer::START_TIME, $dbStartTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbStartTime['max'])) {
$this->addUsingAlias(CcLiveLogPeer::START_TIME, $dbStartTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLiveLogPeer::START_TIME, $dbStartTime, $comparison);
}
/**
* Filter the query on the end_time column
*
* Example usage:
* <code>
* $query->filterByDbEndTime('2011-03-14'); // WHERE end_time = '2011-03-14'
* $query->filterByDbEndTime('now'); // WHERE end_time = '2011-03-14'
* $query->filterByDbEndTime(array('max' => 'yesterday')); // WHERE end_time < '2011-03-13'
* </code>
*
* @param mixed $dbEndTime The value to use as filter.
* Values can be integers (unix timestamps), DateTime objects, or strings.
* Empty strings are treated as NULL.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function filterByDbEndTime($dbEndTime = null, $comparison = null)
{
if (is_array($dbEndTime)) {
$useMinMax = false;
if (isset($dbEndTime['min'])) {
$this->addUsingAlias(CcLiveLogPeer::END_TIME, $dbEndTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbEndTime['max'])) {
$this->addUsingAlias(CcLiveLogPeer::END_TIME, $dbEndTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLiveLogPeer::END_TIME, $dbEndTime, $comparison);
}
/**
* Exclude object from result
*
* @param CcLiveLog $ccLiveLog Object to remove from the list of results
*
* @return CcLiveLogQuery The current query, for fluid interface
*/
public function prune($ccLiveLog = null)
{
if ($ccLiveLog) {
$this->addUsingAlias(CcLiveLogPeer::ID, $ccLiveLog->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,212 +6,337 @@
*
*
*
* @method CcLocaleQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcLocaleQuery orderByDbLocaleCode($order = Criteria::ASC) Order by the locale_code column
* @method CcLocaleQuery orderByDbLocaleLang($order = Criteria::ASC) Order by the locale_lang column
* @method CcLocaleQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcLocaleQuery orderByDbLocaleCode($order = Criteria::ASC) Order by the locale_code column
* @method CcLocaleQuery orderByDbLocaleLang($order = Criteria::ASC) Order by the locale_lang column
*
* @method CcLocaleQuery groupByDbId() Group by the id column
* @method CcLocaleQuery groupByDbLocaleCode() Group by the locale_code column
* @method CcLocaleQuery groupByDbLocaleLang() Group by the locale_lang column
* @method CcLocaleQuery groupByDbId() Group by the id column
* @method CcLocaleQuery groupByDbLocaleCode() Group by the locale_code column
* @method CcLocaleQuery groupByDbLocaleLang() Group by the locale_lang column
*
* @method CcLocaleQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcLocaleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcLocaleQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcLocaleQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcLocaleQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcLocaleQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcLocale findOne(PropelPDO $con = null) Return the first CcLocale matching the query
* @method CcLocale findOneOrCreate(PropelPDO $con = null) Return the first CcLocale matching the query, or a new CcLocale object populated from the query conditions when no match is found
* @method CcLocale findOne(PropelPDO $con = null) Return the first CcLocale matching the query
* @method CcLocale findOneOrCreate(PropelPDO $con = null) Return the first CcLocale matching the query, or a new CcLocale object populated from the query conditions when no match is found
*
* @method CcLocale findOneByDbId(int $id) Return the first CcLocale filtered by the id column
* @method CcLocale findOneByDbLocaleCode(string $locale_code) Return the first CcLocale filtered by the locale_code column
* @method CcLocale findOneByDbLocaleLang(string $locale_lang) Return the first CcLocale filtered by the locale_lang column
* @method CcLocale findOneByDbLocaleCode(string $locale_code) Return the first CcLocale filtered by the locale_code column
* @method CcLocale findOneByDbLocaleLang(string $locale_lang) Return the first CcLocale filtered by the locale_lang column
*
* @method array findByDbId(int $id) Return CcLocale objects filtered by the id column
* @method array findByDbLocaleCode(string $locale_code) Return CcLocale objects filtered by the locale_code column
* @method array findByDbLocaleLang(string $locale_lang) Return CcLocale objects filtered by the locale_lang column
* @method array findByDbId(int $id) Return CcLocale objects filtered by the id column
* @method array findByDbLocaleCode(string $locale_code) Return CcLocale objects filtered by the locale_code column
* @method array findByDbLocaleLang(string $locale_lang) Return CcLocale objects filtered by the locale_lang column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcLocaleQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcLocaleQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcLocale';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcLocaleQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcLocale', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcLocaleQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcLocaleQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcLocaleQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcLocaleQuery) {
return $criteria;
}
$query = new CcLocaleQuery(null, null, $modelAlias);
/**
* Returns a new CcLocaleQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcLocaleQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcLocaleQuery) {
return $criteria;
}
$query = new CcLocaleQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcLocale|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcLocalePeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcLocale|CcLocale[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcLocalePeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcLocalePeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcLocaleQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcLocalePeer::ID, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLocale A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbId($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcLocaleQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcLocalePeer::ID, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLocale A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "locale_code", "locale_lang" FROM "cc_locale" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcLocale();
$obj->hydrate($row);
CcLocalePeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* 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 CcLocaleQuery 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(CcLocalePeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the locale_code column
*
* @param string $dbLocaleCode 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 CcLocaleQuery The current query, for fluid interface
*/
public function filterByDbLocaleCode($dbLocaleCode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLocaleCode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLocaleCode)) {
$dbLocaleCode = str_replace('*', '%', $dbLocaleCode);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLocalePeer::LOCALE_CODE, $dbLocaleCode, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLocale|CcLocale[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Filter the query on the locale_lang column
*
* @param string $dbLocaleLang 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 CcLocaleQuery The current query, for fluid interface
*/
public function filterByDbLocaleLang($dbLocaleLang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLocaleLang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLocaleLang)) {
$dbLocaleLang = str_replace('*', '%', $dbLocaleLang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLocalePeer::LOCALE_LANG, $dbLocaleLang, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Exclude object from result
*
* @param CcLocale $ccLocale Object to remove from the list of results
*
* @return CcLocaleQuery The current query, for fluid interface
*/
public function prune($ccLocale = null)
{
if ($ccLocale) {
$this->addUsingAlias(CcLocalePeer::ID, $ccLocale->getDbId(), Criteria::NOT_EQUAL);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcLocale[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $this;
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
} // BaseCcLocaleQuery
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcLocaleQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcLocalePeer::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 CcLocaleQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcLocalePeer::ID, $keys, Criteria::IN);
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterByDbId(1234); // WHERE id = 1234
* $query->filterByDbId(array(12, 34)); // WHERE id IN (12, 34)
* $query->filterByDbId(array('min' => 12)); // WHERE id >= 12
* $query->filterByDbId(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $dbId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcLocaleQuery The current query, for fluid interface
*/
public function filterByDbId($dbId = null, $comparison = null)
{
if (is_array($dbId)) {
$useMinMax = false;
if (isset($dbId['min'])) {
$this->addUsingAlias(CcLocalePeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcLocalePeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLocalePeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the locale_code column
*
* Example usage:
* <code>
* $query->filterByDbLocaleCode('fooValue'); // WHERE locale_code = 'fooValue'
* $query->filterByDbLocaleCode('%fooValue%'); // WHERE locale_code LIKE '%fooValue%'
* </code>
*
* @param string $dbLocaleCode 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 CcLocaleQuery The current query, for fluid interface
*/
public function filterByDbLocaleCode($dbLocaleCode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLocaleCode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLocaleCode)) {
$dbLocaleCode = str_replace('*', '%', $dbLocaleCode);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLocalePeer::LOCALE_CODE, $dbLocaleCode, $comparison);
}
/**
* Filter the query on the locale_lang column
*
* Example usage:
* <code>
* $query->filterByDbLocaleLang('fooValue'); // WHERE locale_lang = 'fooValue'
* $query->filterByDbLocaleLang('%fooValue%'); // WHERE locale_lang LIKE '%fooValue%'
* </code>
*
* @param string $dbLocaleLang 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 CcLocaleQuery The current query, for fluid interface
*/
public function filterByDbLocaleLang($dbLocaleLang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLocaleLang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLocaleLang)) {
$dbLocaleLang = str_replace('*', '%', $dbLocaleLang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLocalePeer::LOCALE_LANG, $dbLocaleLang, $comparison);
}
/**
* Exclude object from result
*
* @param CcLocale $ccLocale Object to remove from the list of results
*
* @return CcLocaleQuery The current query, for fluid interface
*/
public function prune($ccLocale = null)
{
if ($ccLocale) {
$this->addUsingAlias(CcLocalePeer::ID, $ccLocale->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

View File

@ -6,200 +6,304 @@
*
*
*
* @method CcLoginAttemptsQuery orderByDbIP($order = Criteria::ASC) Order by the ip column
* @method CcLoginAttemptsQuery orderByDbAttempts($order = Criteria::ASC) Order by the attempts column
* @method CcLoginAttemptsQuery orderByDbIP($order = Criteria::ASC) Order by the ip column
* @method CcLoginAttemptsQuery orderByDbAttempts($order = Criteria::ASC) Order by the attempts column
*
* @method CcLoginAttemptsQuery groupByDbIP() Group by the ip column
* @method CcLoginAttemptsQuery groupByDbAttempts() Group by the attempts column
* @method CcLoginAttemptsQuery groupByDbIP() Group by the ip column
* @method CcLoginAttemptsQuery groupByDbAttempts() Group by the attempts column
*
* @method CcLoginAttemptsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcLoginAttemptsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcLoginAttemptsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcLoginAttemptsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcLoginAttemptsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcLoginAttemptsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcLoginAttempts findOne(PropelPDO $con = null) Return the first CcLoginAttempts matching the query
* @method CcLoginAttempts findOneOrCreate(PropelPDO $con = null) Return the first CcLoginAttempts matching the query, or a new CcLoginAttempts object populated from the query conditions when no match is found
* @method CcLoginAttempts findOne(PropelPDO $con = null) Return the first CcLoginAttempts matching the query
* @method CcLoginAttempts findOneOrCreate(PropelPDO $con = null) Return the first CcLoginAttempts matching the query, or a new CcLoginAttempts object populated from the query conditions when no match is found
*
* @method CcLoginAttempts findOneByDbIP(string $ip) Return the first CcLoginAttempts filtered by the ip column
* @method CcLoginAttempts findOneByDbAttempts(int $attempts) Return the first CcLoginAttempts filtered by the attempts column
* @method CcLoginAttempts findOneByDbAttempts(int $attempts) Return the first CcLoginAttempts filtered by the attempts column
*
* @method array findByDbIP(string $ip) Return CcLoginAttempts objects filtered by the ip column
* @method array findByDbAttempts(int $attempts) Return CcLoginAttempts objects filtered by the attempts column
* @method array findByDbIP(string $ip) Return CcLoginAttempts objects filtered by the ip column
* @method array findByDbAttempts(int $attempts) Return CcLoginAttempts objects filtered by the attempts column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcLoginAttemptsQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcLoginAttemptsQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcLoginAttempts';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcLoginAttemptsQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcLoginAttempts', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcLoginAttemptsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcLoginAttemptsQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcLoginAttemptsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcLoginAttemptsQuery) {
return $criteria;
}
$query = new CcLoginAttemptsQuery(null, null, $modelAlias);
/**
* Returns a new CcLoginAttemptsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcLoginAttemptsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcLoginAttemptsQuery) {
return $criteria;
}
$query = new CcLoginAttemptsQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcLoginAttempts|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcLoginAttemptsPeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcLoginAttempts|CcLoginAttempts[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcLoginAttemptsPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcLoginAttemptsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcLoginAttemptsPeer::IP, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLoginAttempts A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbIP($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcLoginAttemptsPeer::IP, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLoginAttempts A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "ip", "attempts" FROM "cc_login_attempts" WHERE "ip" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_STR);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcLoginAttempts();
$obj->hydrate($row);
CcLoginAttemptsPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* Filter the query on the ip column
*
* @param string $dbIP 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 CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByDbIP($dbIP = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbIP)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbIP)) {
$dbIP = str_replace('*', '%', $dbIP);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLoginAttemptsPeer::IP, $dbIP, $comparison);
}
return $obj;
}
/**
* Filter the query on the attempts column
*
* @param int|array $dbAttempts 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 CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByDbAttempts($dbAttempts = null, $comparison = null)
{
if (is_array($dbAttempts)) {
$useMinMax = false;
if (isset($dbAttempts['min'])) {
$this->addUsingAlias(CcLoginAttemptsPeer::ATTEMPTS, $dbAttempts['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbAttempts['max'])) {
$this->addUsingAlias(CcLoginAttemptsPeer::ATTEMPTS, $dbAttempts['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLoginAttemptsPeer::ATTEMPTS, $dbAttempts, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcLoginAttempts|CcLoginAttempts[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Exclude object from result
*
* @param CcLoginAttempts $ccLoginAttempts Object to remove from the list of results
*
* @return CcLoginAttemptsQuery The current query, for fluid interface
*/
public function prune($ccLoginAttempts = null)
{
if ($ccLoginAttempts) {
$this->addUsingAlias(CcLoginAttemptsPeer::IP, $ccLoginAttempts->getDbIP(), Criteria::NOT_EQUAL);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
return $this;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcLoginAttempts[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
} // BaseCcLoginAttemptsQuery
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcLoginAttemptsPeer::IP, $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 CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcLoginAttemptsPeer::IP, $keys, Criteria::IN);
}
/**
* Filter the query on the ip column
*
* Example usage:
* <code>
* $query->filterByDbIP('fooValue'); // WHERE ip = 'fooValue'
* $query->filterByDbIP('%fooValue%'); // WHERE ip LIKE '%fooValue%'
* </code>
*
* @param string $dbIP 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 CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByDbIP($dbIP = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbIP)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbIP)) {
$dbIP = str_replace('*', '%', $dbIP);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcLoginAttemptsPeer::IP, $dbIP, $comparison);
}
/**
* Filter the query on the attempts column
*
* Example usage:
* <code>
* $query->filterByDbAttempts(1234); // WHERE attempts = 1234
* $query->filterByDbAttempts(array(12, 34)); // WHERE attempts IN (12, 34)
* $query->filterByDbAttempts(array('min' => 12)); // WHERE attempts >= 12
* $query->filterByDbAttempts(array('max' => 12)); // WHERE attempts <= 12
* </code>
*
* @param mixed $dbAttempts The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcLoginAttemptsQuery The current query, for fluid interface
*/
public function filterByDbAttempts($dbAttempts = null, $comparison = null)
{
if (is_array($dbAttempts)) {
$useMinMax = false;
if (isset($dbAttempts['min'])) {
$this->addUsingAlias(CcLoginAttemptsPeer::ATTEMPTS, $dbAttempts['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbAttempts['max'])) {
$this->addUsingAlias(CcLoginAttemptsPeer::ATTEMPTS, $dbAttempts['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcLoginAttemptsPeer::ATTEMPTS, $dbAttempts, $comparison);
}
/**
* Exclude object from result
*
* @param CcLoginAttempts $ccLoginAttempts Object to remove from the list of results
*
* @return CcLoginAttemptsQuery The current query, for fluid interface
*/
public function prune($ccLoginAttempts = null)
{
if ($ccLoginAttempts) {
$this->addUsingAlias(CcLoginAttemptsPeer::IP, $ccLoginAttempts->getDbIP(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -6,254 +6,382 @@
*
*
*
* @method CcMountNameQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcMountNameQuery orderByDbMountName($order = Criteria::ASC) Order by the mount_name column
* @method CcMountNameQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcMountNameQuery orderByDbMountName($order = Criteria::ASC) Order by the mount_name column
*
* @method CcMountNameQuery groupByDbId() Group by the id column
* @method CcMountNameQuery groupByDbMountName() Group by the mount_name column
* @method CcMountNameQuery groupByDbId() Group by the id column
* @method CcMountNameQuery groupByDbMountName() Group by the mount_name column
*
* @method CcMountNameQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcMountNameQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcMountNameQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcMountNameQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcMountNameQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcMountNameQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcMountNameQuery leftJoinCcListenerCount($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcListenerCount relation
* @method CcMountNameQuery rightJoinCcListenerCount($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcListenerCount relation
* @method CcMountNameQuery innerJoinCcListenerCount($relationAlias = '') Adds a INNER JOIN clause to the query using the CcListenerCount relation
* @method CcMountNameQuery leftJoinCcListenerCount($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcListenerCount relation
* @method CcMountNameQuery rightJoinCcListenerCount($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcListenerCount relation
* @method CcMountNameQuery innerJoinCcListenerCount($relationAlias = null) Adds a INNER JOIN clause to the query using the CcListenerCount relation
*
* @method CcMountName findOne(PropelPDO $con = null) Return the first CcMountName matching the query
* @method CcMountName findOneOrCreate(PropelPDO $con = null) Return the first CcMountName matching the query, or a new CcMountName object populated from the query conditions when no match is found
* @method CcMountName findOne(PropelPDO $con = null) Return the first CcMountName matching the query
* @method CcMountName findOneOrCreate(PropelPDO $con = null) Return the first CcMountName matching the query, or a new CcMountName object populated from the query conditions when no match is found
*
* @method CcMountName findOneByDbId(int $id) Return the first CcMountName filtered by the id column
* @method CcMountName findOneByDbMountName(string $mount_name) Return the first CcMountName filtered by the mount_name column
* @method CcMountName findOneByDbMountName(string $mount_name) Return the first CcMountName filtered by the mount_name column
*
* @method array findByDbId(int $id) Return CcMountName objects filtered by the id column
* @method array findByDbMountName(string $mount_name) Return CcMountName objects filtered by the mount_name column
* @method array findByDbId(int $id) Return CcMountName objects filtered by the id column
* @method array findByDbMountName(string $mount_name) Return CcMountName objects filtered by the mount_name column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcMountNameQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcMountNameQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcMountName';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcMountNameQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcMountName', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcMountNameQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcMountNameQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcMountNameQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcMountNameQuery) {
return $criteria;
}
$query = new CcMountNameQuery(null, null, $modelAlias);
/**
* Returns a new CcMountNameQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcMountNameQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcMountNameQuery) {
return $criteria;
}
$query = new CcMountNameQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcMountName|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcMountNamePeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcMountName|CcMountName[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcMountNamePeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcMountNamePeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcMountNamePeer::ID, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcMountName A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbId($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcMountNamePeer::ID, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcMountName A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "mount_name" FROM "cc_mount_name" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcMountName();
$obj->hydrate($row);
CcMountNamePeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* 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 CcMountNameQuery 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(CcMountNamePeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the mount_name column
*
* @param string $dbMountName 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 CcMountNameQuery The current query, for fluid interface
*/
public function filterByDbMountName($dbMountName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbMountName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbMountName)) {
$dbMountName = str_replace('*', '%', $dbMountName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcMountNamePeer::MOUNT_NAME, $dbMountName, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcMountName|CcMountName[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Filter the query by a related CcListenerCount object
*
* @param CcListenerCount $ccListenerCount the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function filterByCcListenerCount($ccListenerCount, $comparison = null)
{
return $this
->addUsingAlias(CcMountNamePeer::ID, $ccListenerCount->getDbMountNameId(), $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Adds a JOIN clause to the query using the CcListenerCount relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function joinCcListenerCount($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcListenerCount');
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcMountName[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
// 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);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
// add the ModelJoin to the current object
if($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcListenerCount');
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this;
}
return $this->addUsingAlias(CcMountNamePeer::ID, $key, Criteria::EQUAL);
}
/**
* Use the CcListenerCount relation CcListenerCount 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 CcListenerCountQuery A secondary query class using the current class as primary query
*/
public function useCcListenerCountQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcListenerCount($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcListenerCount', 'CcListenerCountQuery');
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
/**
* Exclude object from result
*
* @param CcMountName $ccMountName Object to remove from the list of results
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function prune($ccMountName = null)
{
if ($ccMountName) {
$this->addUsingAlias(CcMountNamePeer::ID, $ccMountName->getDbId(), Criteria::NOT_EQUAL);
}
return $this->addUsingAlias(CcMountNamePeer::ID, $keys, Criteria::IN);
}
return $this;
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterByDbId(1234); // WHERE id = 1234
* $query->filterByDbId(array(12, 34)); // WHERE id IN (12, 34)
* $query->filterByDbId(array('min' => 12)); // WHERE id >= 12
* $query->filterByDbId(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $dbId The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function filterByDbId($dbId = null, $comparison = null)
{
if (is_array($dbId)) {
$useMinMax = false;
if (isset($dbId['min'])) {
$this->addUsingAlias(CcMountNamePeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcMountNamePeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
} // BaseCcMountNameQuery
return $this->addUsingAlias(CcMountNamePeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the mount_name column
*
* Example usage:
* <code>
* $query->filterByDbMountName('fooValue'); // WHERE mount_name = 'fooValue'
* $query->filterByDbMountName('%fooValue%'); // WHERE mount_name LIKE '%fooValue%'
* </code>
*
* @param string $dbMountName 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 CcMountNameQuery The current query, for fluid interface
*/
public function filterByDbMountName($dbMountName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbMountName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbMountName)) {
$dbMountName = str_replace('*', '%', $dbMountName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcMountNamePeer::MOUNT_NAME, $dbMountName, $comparison);
}
/**
* Filter the query by a related CcListenerCount object
*
* @param CcListenerCount|PropelObjectCollection $ccListenerCount the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMountNameQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcListenerCount($ccListenerCount, $comparison = null)
{
if ($ccListenerCount instanceof CcListenerCount) {
return $this
->addUsingAlias(CcMountNamePeer::ID, $ccListenerCount->getDbMountNameId(), $comparison);
} elseif ($ccListenerCount instanceof PropelObjectCollection) {
return $this
->useCcListenerCountQuery()
->filterByPrimaryKeys($ccListenerCount->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcListenerCount() only accepts arguments of type CcListenerCount or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcListenerCount relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function joinCcListenerCount($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcListenerCount');
// 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, 'CcListenerCount');
}
return $this;
}
/**
* Use the CcListenerCount relation CcListenerCount 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 CcListenerCountQuery A secondary query class using the current class as primary query
*/
public function useCcListenerCountQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcListenerCount($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcListenerCount', 'CcListenerCountQuery');
}
/**
* Exclude object from result
*
* @param CcMountName $ccMountName Object to remove from the list of results
*
* @return CcMountNameQuery The current query, for fluid interface
*/
public function prune($ccMountName = null)
{
if ($ccMountName) {
$this->addUsingAlias(CcMountNamePeer::ID, $ccMountName->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -6,322 +6,477 @@
*
*
*
* @method CcMusicDirsQuery orderById($order = Criteria::ASC) Order by the id column
* @method CcMusicDirsQuery orderByDirectory($order = Criteria::ASC) Order by the directory column
* @method CcMusicDirsQuery orderByType($order = Criteria::ASC) Order by the type column
* @method CcMusicDirsQuery orderByExists($order = Criteria::ASC) Order by the exists column
* @method CcMusicDirsQuery orderByWatched($order = Criteria::ASC) Order by the watched column
* @method CcMusicDirsQuery orderById($order = Criteria::ASC) Order by the id column
* @method CcMusicDirsQuery orderByDirectory($order = Criteria::ASC) Order by the directory column
* @method CcMusicDirsQuery orderByType($order = Criteria::ASC) Order by the type column
* @method CcMusicDirsQuery orderByExists($order = Criteria::ASC) Order by the exists column
* @method CcMusicDirsQuery orderByWatched($order = Criteria::ASC) Order by the watched column
*
* @method CcMusicDirsQuery groupById() Group by the id column
* @method CcMusicDirsQuery groupByDirectory() Group by the directory column
* @method CcMusicDirsQuery groupByType() Group by the type column
* @method CcMusicDirsQuery groupByExists() Group by the exists column
* @method CcMusicDirsQuery groupByWatched() Group by the watched column
* @method CcMusicDirsQuery groupById() Group by the id column
* @method CcMusicDirsQuery groupByDirectory() Group by the directory column
* @method CcMusicDirsQuery groupByType() Group by the type column
* @method CcMusicDirsQuery groupByExists() Group by the exists column
* @method CcMusicDirsQuery groupByWatched() Group by the watched column
*
* @method CcMusicDirsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcMusicDirsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcMusicDirsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcMusicDirsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcMusicDirsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcMusicDirsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcMusicDirsQuery leftJoinCcFiles($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFiles relation
* @method CcMusicDirsQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
* @method CcMusicDirsQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
* @method CcMusicDirsQuery leftJoinCcFiles($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcFiles relation
* @method CcMusicDirsQuery rightJoinCcFiles($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcFiles relation
* @method CcMusicDirsQuery innerJoinCcFiles($relationAlias = null) Adds a INNER JOIN clause to the query using the CcFiles relation
*
* @method CcMusicDirs findOne(PropelPDO $con = null) Return the first CcMusicDirs matching the query
* @method CcMusicDirs findOneOrCreate(PropelPDO $con = null) Return the first CcMusicDirs matching the query, or a new CcMusicDirs object populated from the query conditions when no match is found
* @method CcMusicDirs findOne(PropelPDO $con = null) Return the first CcMusicDirs matching the query
* @method CcMusicDirs findOneOrCreate(PropelPDO $con = null) Return the first CcMusicDirs matching the query, or a new CcMusicDirs object populated from the query conditions when no match is found
*
* @method CcMusicDirs findOneById(int $id) Return the first CcMusicDirs filtered by the id column
* @method CcMusicDirs findOneByDirectory(string $directory) Return the first CcMusicDirs filtered by the directory column
* @method CcMusicDirs findOneByType(string $type) Return the first CcMusicDirs filtered by the type column
* @method CcMusicDirs findOneByExists(boolean $exists) Return the first CcMusicDirs filtered by the exists column
* @method CcMusicDirs findOneByWatched(boolean $watched) Return the first CcMusicDirs filtered by the watched column
* @method CcMusicDirs findOneByDirectory(string $directory) Return the first CcMusicDirs filtered by the directory column
* @method CcMusicDirs findOneByType(string $type) Return the first CcMusicDirs filtered by the type column
* @method CcMusicDirs findOneByExists(boolean $exists) Return the first CcMusicDirs filtered by the exists column
* @method CcMusicDirs findOneByWatched(boolean $watched) Return the first CcMusicDirs filtered by the watched column
*
* @method array findById(int $id) Return CcMusicDirs objects filtered by the id column
* @method array findByDirectory(string $directory) Return CcMusicDirs objects filtered by the directory column
* @method array findByType(string $type) Return CcMusicDirs objects filtered by the type column
* @method array findByExists(boolean $exists) Return CcMusicDirs objects filtered by the exists column
* @method array findByWatched(boolean $watched) Return CcMusicDirs objects filtered by the watched column
* @method array findById(int $id) Return CcMusicDirs objects filtered by the id column
* @method array findByDirectory(string $directory) Return CcMusicDirs objects filtered by the directory column
* @method array findByType(string $type) Return CcMusicDirs objects filtered by the type column
* @method array findByExists(boolean $exists) Return CcMusicDirs objects filtered by the exists column
* @method array findByWatched(boolean $watched) Return CcMusicDirs objects filtered by the watched column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcMusicDirsQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcMusicDirsQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcMusicDirs';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcMusicDirsQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcMusicDirs', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcMusicDirsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcMusicDirsQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcMusicDirsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcMusicDirsQuery) {
return $criteria;
}
$query = new CcMusicDirsQuery(null, null, $modelAlias);
/**
* Returns a new CcMusicDirsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcMusicDirsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcMusicDirsQuery) {
return $criteria;
}
$query = new CcMusicDirsQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcMusicDirs|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcMusicDirsPeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcMusicDirs|CcMusicDirs[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcMusicDirsPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcMusicDirsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcMusicDirsPeer::ID, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcMusicDirs A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneById($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcMusicDirsPeer::ID, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcMusicDirs A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "directory", "type", "exists", "watched" FROM "cc_music_dirs" WHERE "id" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcMusicDirs();
$obj->hydrate($row);
CcMusicDirsPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* Filter the query on the id column
*
* @param int|array $id 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 CcMusicDirsQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(CcMusicDirsPeer::ID, $id, $comparison);
}
return $obj;
}
/**
* Filter the query on the directory column
*
* @param string $directory 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 CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByDirectory($directory = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($directory)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $directory)) {
$directory = str_replace('*', '%', $directory);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcMusicDirsPeer::DIRECTORY, $directory, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcMusicDirs|CcMusicDirs[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Filter the query on the type column
*
* @param string $type 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 CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByType($type = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($type)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $type)) {
$type = str_replace('*', '%', $type);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcMusicDirsPeer::TYPE, $type, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the exists column
*
* @param boolean|string $exists The value to use as filter.
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByExists($exists = null, $comparison = null)
{
if (is_string($exists)) {
$exists = in_array(strtolower($exists), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
}
return $this->addUsingAlias(CcMusicDirsPeer::EXISTS, $exists, $comparison);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcMusicDirs[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
/**
* Filter the query on the watched column
*
* @param boolean|string $watched The value to use as filter.
* Accepts strings ('false', 'off', '-', 'no', 'n', and '0' are false, the rest is true)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByWatched($watched = null, $comparison = null)
{
if (is_string($watched)) {
$watched = in_array(strtolower($watched), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
}
return $this->addUsingAlias(CcMusicDirsPeer::WATCHED, $watched, $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by a related CcFiles object
*
* @param CcFiles $ccFiles the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByCcFiles($ccFiles, $comparison = null)
{
return $this
->addUsingAlias(CcMusicDirsPeer::ID, $ccFiles->getDbDirectory(), $comparison);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Adds a JOIN clause to the query using the CcFiles relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function joinCcFiles($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcFiles');
return $this->addUsingAlias(CcMusicDirsPeer::ID, $key, Criteria::EQUAL);
}
// 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);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
// add the ModelJoin to the current object
if($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcFiles');
}
return $this->addUsingAlias(CcMusicDirsPeer::ID, $keys, Criteria::IN);
}
return $this;
}
/**
* Filter the query on the id column
*
* Example usage:
* <code>
* $query->filterById(1234); // WHERE id = 1234
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
* $query->filterById(array('min' => 12)); // WHERE id >= 12
* $query->filterById(array('max' => 12)); // WHERE id <= 12
* </code>
*
* @param mixed $id The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id)) {
$useMinMax = false;
if (isset($id['min'])) {
$this->addUsingAlias(CcMusicDirsPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(CcMusicDirsPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
/**
* Use the CcFiles relation CcFiles object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcFilesQuery A secondary query class using the current class as primary query
*/
public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcFiles($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
}
return $this->addUsingAlias(CcMusicDirsPeer::ID, $id, $comparison);
}
/**
* Exclude object from result
*
* @param CcMusicDirs $ccMusicDirs Object to remove from the list of results
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function prune($ccMusicDirs = null)
{
if ($ccMusicDirs) {
$this->addUsingAlias(CcMusicDirsPeer::ID, $ccMusicDirs->getId(), Criteria::NOT_EQUAL);
}
/**
* Filter the query on the directory column
*
* Example usage:
* <code>
* $query->filterByDirectory('fooValue'); // WHERE directory = 'fooValue'
* $query->filterByDirectory('%fooValue%'); // WHERE directory LIKE '%fooValue%'
* </code>
*
* @param string $directory 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 CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByDirectory($directory = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($directory)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $directory)) {
$directory = str_replace('*', '%', $directory);
$comparison = Criteria::LIKE;
}
}
return $this;
}
return $this->addUsingAlias(CcMusicDirsPeer::DIRECTORY, $directory, $comparison);
}
} // BaseCcMusicDirsQuery
/**
* Filter the query on the type column
*
* Example usage:
* <code>
* $query->filterByType('fooValue'); // WHERE type = 'fooValue'
* $query->filterByType('%fooValue%'); // WHERE type LIKE '%fooValue%'
* </code>
*
* @param string $type 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 CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByType($type = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($type)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $type)) {
$type = str_replace('*', '%', $type);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcMusicDirsPeer::TYPE, $type, $comparison);
}
/**
* Filter the query on the exists column
*
* Example usage:
* <code>
* $query->filterByExists(true); // WHERE exists = true
* $query->filterByExists('yes'); // WHERE exists = true
* </code>
*
* @param boolean|string $exists The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByExists($exists = null, $comparison = null)
{
if (is_string($exists)) {
$exists = in_array(strtolower($exists), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(CcMusicDirsPeer::EXISTS, $exists, $comparison);
}
/**
* Filter the query on the watched column
*
* Example usage:
* <code>
* $query->filterByWatched(true); // WHERE watched = true
* $query->filterByWatched('yes'); // WHERE watched = true
* </code>
*
* @param boolean|string $watched The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function filterByWatched($watched = null, $comparison = null)
{
if (is_string($watched)) {
$watched = in_array(strtolower($watched), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(CcMusicDirsPeer::WATCHED, $watched, $comparison);
}
/**
* Filter the query by a related CcFiles object
*
* @param CcFiles|PropelObjectCollection $ccFiles the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcMusicDirsQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcFiles($ccFiles, $comparison = null)
{
if ($ccFiles instanceof CcFiles) {
return $this
->addUsingAlias(CcMusicDirsPeer::ID, $ccFiles->getDbDirectory(), $comparison);
} elseif ($ccFiles instanceof PropelObjectCollection) {
return $this
->useCcFilesQuery()
->filterByPrimaryKeys($ccFiles->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcFiles() only accepts arguments of type CcFiles or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcFiles relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function joinCcFiles($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcFiles');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcFiles');
}
return $this;
}
/**
* Use the CcFiles relation CcFiles object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcFilesQuery A secondary query class using the current class as primary query
*/
public function useCcFilesQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcFiles($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
}
/**
* Exclude object from result
*
* @param CcMusicDirs $ccMusicDirs Object to remove from the list of results
*
* @return CcMusicDirsQuery The current query, for fluid interface
*/
public function prune($ccMusicDirs = null)
{
if ($ccMusicDirs) {
$this->addUsingAlias(CcMusicDirsPeer::ID, $ccMusicDirs->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,350 +6,511 @@
*
*
*
* @method CcPermsQuery orderByPermid($order = Criteria::ASC) Order by the permid column
* @method CcPermsQuery orderBySubj($order = Criteria::ASC) Order by the subj column
* @method CcPermsQuery orderByAction($order = Criteria::ASC) Order by the action column
* @method CcPermsQuery orderByObj($order = Criteria::ASC) Order by the obj column
* @method CcPermsQuery orderByType($order = Criteria::ASC) Order by the type column
* @method CcPermsQuery orderByPermid($order = Criteria::ASC) Order by the permid column
* @method CcPermsQuery orderBySubj($order = Criteria::ASC) Order by the subj column
* @method CcPermsQuery orderByAction($order = Criteria::ASC) Order by the action column
* @method CcPermsQuery orderByObj($order = Criteria::ASC) Order by the obj column
* @method CcPermsQuery orderByType($order = Criteria::ASC) Order by the type column
*
* @method CcPermsQuery groupByPermid() Group by the permid column
* @method CcPermsQuery groupBySubj() Group by the subj column
* @method CcPermsQuery groupByAction() Group by the action column
* @method CcPermsQuery groupByObj() Group by the obj column
* @method CcPermsQuery groupByType() Group by the type column
* @method CcPermsQuery groupByPermid() Group by the permid column
* @method CcPermsQuery groupBySubj() Group by the subj column
* @method CcPermsQuery groupByAction() Group by the action column
* @method CcPermsQuery groupByObj() Group by the obj column
* @method CcPermsQuery groupByType() Group by the type column
*
* @method CcPermsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPermsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPermsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcPermsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPermsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPermsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcPermsQuery leftJoinCcSubjs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcPermsQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcPermsQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
* @method CcPermsQuery leftJoinCcSubjs($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcPermsQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcPermsQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
*
* @method CcPerms findOne(PropelPDO $con = null) Return the first CcPerms matching the query
* @method CcPerms findOneOrCreate(PropelPDO $con = null) Return the first CcPerms matching the query, or a new CcPerms object populated from the query conditions when no match is found
* @method CcPerms findOne(PropelPDO $con = null) Return the first CcPerms matching the query
* @method CcPerms findOneOrCreate(PropelPDO $con = null) Return the first CcPerms matching the query, or a new CcPerms object populated from the query conditions when no match is found
*
* @method CcPerms findOneByPermid(int $permid) Return the first CcPerms filtered by the permid column
* @method CcPerms findOneBySubj(int $subj) Return the first CcPerms filtered by the subj column
* @method CcPerms findOneByAction(string $action) Return the first CcPerms filtered by the action column
* @method CcPerms findOneByObj(int $obj) Return the first CcPerms filtered by the obj column
* @method CcPerms findOneByType(string $type) Return the first CcPerms filtered by the type column
* @method CcPerms findOneBySubj(int $subj) Return the first CcPerms filtered by the subj column
* @method CcPerms findOneByAction(string $action) Return the first CcPerms filtered by the action column
* @method CcPerms findOneByObj(int $obj) Return the first CcPerms filtered by the obj column
* @method CcPerms findOneByType(string $type) Return the first CcPerms filtered by the type column
*
* @method array findByPermid(int $permid) Return CcPerms objects filtered by the permid column
* @method array findBySubj(int $subj) Return CcPerms objects filtered by the subj column
* @method array findByAction(string $action) Return CcPerms objects filtered by the action column
* @method array findByObj(int $obj) Return CcPerms objects filtered by the obj column
* @method array findByType(string $type) Return CcPerms objects filtered by the type column
* @method array findByPermid(int $permid) Return CcPerms objects filtered by the permid column
* @method array findBySubj(int $subj) Return CcPerms objects filtered by the subj column
* @method array findByAction(string $action) Return CcPerms objects filtered by the action column
* @method array findByObj(int $obj) Return CcPerms objects filtered by the obj column
* @method array findByType(string $type) Return CcPerms objects filtered by the type column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcPermsQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcPermsQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = null, $modelName = null, $modelAlias = null)
{
if (null === $dbName) {
$dbName = 'airtime';
}
if (null === $modelName) {
$modelName = 'CcPerms';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcPermsQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'airtime', $modelName = 'CcPerms', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcPermsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcPermsQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcPermsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPermsQuery) {
return $criteria;
}
$query = new CcPermsQuery(null, null, $modelAlias);
/**
* Returns a new CcPermsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcPermsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPermsQuery) {
return $criteria;
}
$query = new CcPermsQuery();
if (null !== $modelAlias) {
$query->setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
* <code>
* $obj = $c->findPk(12, $con);
* </code>
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcPerms|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcPermsPeer::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);
}
}
return $query;
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @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);
}
/**
* Find object by primary key.
* Propel uses the instance pool to skip the database if the object exists.
* Go fast if the query is untouched.
*
* <code>
* $obj = $c->findPk(12, $con);
* </code>
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcPerms|CcPerms[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcPermsPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcPermsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|| $this->map || $this->having || $this->joins) {
return $this->findPkComplex($key, $con);
} else {
return $this->findPkSimple($key, $con);
}
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcPermsPeer::PERMID, $key, Criteria::EQUAL);
}
/**
* Alias of findPk to use instance pooling
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcPerms A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByPermid($key, $con = null)
{
return $this->findPk($key, $con);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcPermsPeer::PERMID, $keys, Criteria::IN);
}
/**
* Find object by primary key using raw SQL to go fast.
* Bypass doSelect() and the object formatter by using generated code.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcPerms A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "permid", "subj", "action", "obj", "type" FROM "cc_perms" WHERE "permid" = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
$stmt->execute();
} catch (Exception $e) {
Propel::log($e->getMessage(), Propel::LOG_ERR);
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CcPerms();
$obj->hydrate($row);
CcPermsPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* Filter the query on the permid column
*
* @param int|array $permid 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 CcPermsQuery The current query, for fluid interface
*/
public function filterByPermid($permid = null, $comparison = null)
{
if (is_array($permid) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(CcPermsPeer::PERMID, $permid, $comparison);
}
return $obj;
}
/**
* Filter the query on the subj column
*
* @param int|array $subj 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 CcPermsQuery The current query, for fluid interface
*/
public function filterBySubj($subj = null, $comparison = null)
{
if (is_array($subj)) {
$useMinMax = false;
if (isset($subj['min'])) {
$this->addUsingAlias(CcPermsPeer::SUBJ, $subj['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($subj['max'])) {
$this->addUsingAlias(CcPermsPeer::SUBJ, $subj['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPermsPeer::SUBJ, $subj, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcPerms|CcPerms[]|mixed the result, formatted by the current formatter
*/
protected function findPkComplex($key, $con)
{
// As the query uses a PK condition, no limit(1) is necessary.
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
/**
* Filter the query on the action column
*
* @param string $action 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 CcPermsQuery The current query, for fluid interface
*/
public function filterByAction($action = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($action)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $action)) {
$action = str_replace('*', '%', $action);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPermsPeer::ACTION, $action, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the obj column
*
* @param int|array $obj 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 CcPermsQuery The current query, for fluid interface
*/
public function filterByObj($obj = null, $comparison = null)
{
if (is_array($obj)) {
$useMinMax = false;
if (isset($obj['min'])) {
$this->addUsingAlias(CcPermsPeer::OBJ, $obj['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($obj['max'])) {
$this->addUsingAlias(CcPermsPeer::OBJ, $obj['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPermsPeer::OBJ, $obj, $comparison);
}
/**
* Find objects by primary key
* <code>
* $objs = $c->findPks(array(12, 56, 832), $con);
* </code>
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CcPerms[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
/**
* Filter the query on the type column
*
* @param string $type 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 CcPermsQuery The current query, for fluid interface
*/
public function filterByType($type = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($type)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $type)) {
$type = str_replace('*', '%', $type);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPermsPeer::TYPE, $type, $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by a related CcSubjs object
*
* @param CcSubjs $ccSubjs the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterByCcSubjs($ccSubjs, $comparison = null)
{
return $this
->addUsingAlias(CcPermsPeer::SUBJ, $ccSubjs->getDbId(), $comparison);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Adds a JOIN clause to the query using the CcSubjs relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcSubjs');
return $this->addUsingAlias(CcPermsPeer::PERMID, $key, Criteria::EQUAL);
}
// 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);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
// add the ModelJoin to the current object
if($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcSubjs');
}
return $this->addUsingAlias(CcPermsPeer::PERMID, $keys, Criteria::IN);
}
return $this;
}
/**
* Filter the query on the permid column
*
* Example usage:
* <code>
* $query->filterByPermid(1234); // WHERE permid = 1234
* $query->filterByPermid(array(12, 34)); // WHERE permid IN (12, 34)
* $query->filterByPermid(array('min' => 12)); // WHERE permid >= 12
* $query->filterByPermid(array('max' => 12)); // WHERE permid <= 12
* </code>
*
* @param mixed $permid The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterByPermid($permid = null, $comparison = null)
{
if (is_array($permid)) {
$useMinMax = false;
if (isset($permid['min'])) {
$this->addUsingAlias(CcPermsPeer::PERMID, $permid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($permid['max'])) {
$this->addUsingAlias(CcPermsPeer::PERMID, $permid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
/**
* Use the CcSubjs relation CcSubjs object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcSubjsQuery A secondary query class using the current class as primary query
*/
public function useCcSubjsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcSubjs($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
}
return $this->addUsingAlias(CcPermsPeer::PERMID, $permid, $comparison);
}
/**
* Exclude object from result
*
* @param CcPerms $ccPerms Object to remove from the list of results
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function prune($ccPerms = null)
{
if ($ccPerms) {
$this->addUsingAlias(CcPermsPeer::PERMID, $ccPerms->getPermid(), Criteria::NOT_EQUAL);
}
/**
* Filter the query on the subj column
*
* Example usage:
* <code>
* $query->filterBySubj(1234); // WHERE subj = 1234
* $query->filterBySubj(array(12, 34)); // WHERE subj IN (12, 34)
* $query->filterBySubj(array('min' => 12)); // WHERE subj >= 12
* $query->filterBySubj(array('max' => 12)); // WHERE subj <= 12
* </code>
*
* @see filterByCcSubjs()
*
* @param mixed $subj The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterBySubj($subj = null, $comparison = null)
{
if (is_array($subj)) {
$useMinMax = false;
if (isset($subj['min'])) {
$this->addUsingAlias(CcPermsPeer::SUBJ, $subj['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($subj['max'])) {
$this->addUsingAlias(CcPermsPeer::SUBJ, $subj['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this;
}
return $this->addUsingAlias(CcPermsPeer::SUBJ, $subj, $comparison);
}
} // BaseCcPermsQuery
/**
* Filter the query on the action column
*
* Example usage:
* <code>
* $query->filterByAction('fooValue'); // WHERE action = 'fooValue'
* $query->filterByAction('%fooValue%'); // WHERE action LIKE '%fooValue%'
* </code>
*
* @param string $action 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 CcPermsQuery The current query, for fluid interface
*/
public function filterByAction($action = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($action)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $action)) {
$action = str_replace('*', '%', $action);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPermsPeer::ACTION, $action, $comparison);
}
/**
* Filter the query on the obj column
*
* Example usage:
* <code>
* $query->filterByObj(1234); // WHERE obj = 1234
* $query->filterByObj(array(12, 34)); // WHERE obj IN (12, 34)
* $query->filterByObj(array('min' => 12)); // WHERE obj >= 12
* $query->filterByObj(array('max' => 12)); // WHERE obj <= 12
* </code>
*
* @param mixed $obj The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function filterByObj($obj = null, $comparison = null)
{
if (is_array($obj)) {
$useMinMax = false;
if (isset($obj['min'])) {
$this->addUsingAlias(CcPermsPeer::OBJ, $obj['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($obj['max'])) {
$this->addUsingAlias(CcPermsPeer::OBJ, $obj['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPermsPeer::OBJ, $obj, $comparison);
}
/**
* Filter the query on the type column
*
* Example usage:
* <code>
* $query->filterByType('fooValue'); // WHERE type = 'fooValue'
* $query->filterByType('%fooValue%'); // WHERE type LIKE '%fooValue%'
* </code>
*
* @param string $type 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 CcPermsQuery The current query, for fluid interface
*/
public function filterByType($type = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($type)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $type)) {
$type = str_replace('*', '%', $type);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPermsPeer::TYPE, $type, $comparison);
}
/**
* Filter the query by a related CcSubjs object
*
* @param CcSubjs|PropelObjectCollection $ccSubjs The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPermsQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcSubjs($ccSubjs, $comparison = null)
{
if ($ccSubjs instanceof CcSubjs) {
return $this
->addUsingAlias(CcPermsPeer::SUBJ, $ccSubjs->getDbId(), $comparison);
} elseif ($ccSubjs instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcPermsPeer::SUBJ, $ccSubjs->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcSubjs() only accepts arguments of type CcSubjs or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcSubjs relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcSubjs');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcSubjs');
}
return $this;
}
/**
* Use the CcSubjs relation CcSubjs object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcSubjsQuery A secondary query class using the current class as primary query
*/
public function useCcSubjsQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinCcSubjs($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
}
/**
* Exclude object from result
*
* @param CcPerms $ccPerms Object to remove from the list of results
*
* @return CcPermsQuery The current query, for fluid interface
*/
public function prune($ccPerms = null)
{
if ($ccPerms) {
$this->addUsingAlias(CcPermsPeer::PERMID, $ccPerms->getPermid(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More