CC-5895: Upgrade Propel to 1.7

Used composer to download Propel 1.7
The Propel library will no longer be stored in the Airtime repo
This commit is contained in:
drigato 2014-07-23 15:03:51 -04:00
parent 46542d2b2b
commit 72841de714
143 changed files with 114551 additions and 97418 deletions

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

@ -4,369 +4,533 @@
/**
* Base class that represents a query for the 'cc_blockcriteria' table.
*
*
*
* @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 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 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 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 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 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 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 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 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 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 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 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
*
* @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');
// 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;
}
/**
* 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)
{
/**
* 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');
}
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $keys, Criteria::IN);
}
/**
* 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;
}
/**
* 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;
}
}
} // BaseCcBlockcriteriaQuery
return $this->addUsingAlias(CcBlockcriteriaPeer::ID, $dbId, $comparison);
}
/**
* 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;
}
}
return $this->addUsingAlias(CcBlockcriteriaPeer::CRITERIA, $dbCriteria, $comparison);
}
/**
* 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;
}
}
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

@ -4,193 +4,293 @@
/**
* Base class that represents a query for the 'cc_country' table.
*
*
*
* @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 orderByDbIsoCode($order = Criteria::ASC) Order by the isocode column
* @method CcCountryQuery orderByDbName($order = Criteria::ASC) Order 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 groupByDbIsoCode() Group by the isocode column
* @method CcCountryQuery groupByDbName() Group by the name column
*
* @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 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 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 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 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 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
*
* @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 $this;
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
} // BaseCcCountryQuery
/**
* 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);
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

@ -4,403 +4,575 @@
/**
* Base class that represents a query for the 'cc_listener_count' table.
*
*
*
* @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 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 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 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 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 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 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 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 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 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 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 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 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 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
*
* @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');
// 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;
}
/**
* 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)
{
/**
* 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');
}
return $this->addUsingAlias(CcListenerCountPeer::ID, $key, Criteria::EQUAL);
}
/**
* 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);
}
/**
* 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)
{
/**
* 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');
// 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;
}
return $this->addUsingAlias(CcListenerCountPeer::ID, $keys, Criteria::IN);
}
/**
* 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 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;
}
}
/**
* 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;
}
return $this->addUsingAlias(CcListenerCountPeer::ID, $dbId, $comparison);
}
} // BaseCcListenerCountQuery
/**
* 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;
}
}
return $this->addUsingAlias(CcListenerCountPeer::TIMESTAMP_ID, $dbTimestampId, $comparison);
}
/**
* 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->addUsingAlias(CcListenerCountPeer::MOUNT_NAME_ID, $dbMountNameId, $comparison);
}
/**
* 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;
}
}
return $this->addUsingAlias(CcListenerCountPeer::LISTENER_COUNT, $dbListenerCount, $comparison);
}
/**
* 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;
}
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

@ -4,258 +4,400 @@
/**
* Base class that represents a query for the 'cc_live_log' table.
*
*
*
* @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 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 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 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 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 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 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 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 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 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
*
* @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 $this;
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
} // BaseCcLiveLogQuery
/**
* 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);
}
/**
* 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

@ -4,214 +4,339 @@
/**
* Base class that represents a query for the 'cc_locale' table.
*
*
*
* @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 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 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 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 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 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 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 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 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 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
*
* @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);
}
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|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);
} // BaseCcLocaleQuery
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* 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

@ -4,202 +4,306 @@
/**
* Base class that represents a query for the 'cc_login_attempts' table.
*
*
*
* @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 orderByDbIP($order = Criteria::ASC) Order by the ip column
* @method CcLoginAttemptsQuery orderByDbAttempts($order = Criteria::ASC) Order 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 groupByDbIP() Group by the ip column
* @method CcLoginAttemptsQuery groupByDbAttempts() Group by the attempts column
*
* @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 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 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 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 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 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
*
* @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 $this;
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
} // BaseCcLoginAttemptsQuery
/**
* 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);
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

@ -4,256 +4,384 @@
/**
* Base class that represents a query for the 'cc_mount_name' table.
*
*
*
* @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 orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcMountNameQuery orderByDbMountName($order = Criteria::ASC) Order 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 groupByDbId() Group by the id column
* @method CcMountNameQuery groupByDbMountName() Group by the mount_name column
*
* @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 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 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 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 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 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 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 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
*
* @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');
// 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;
}
/**
* 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);
/**
* 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');
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* 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;
}
/**
* 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)
{
} // BaseCcMountNameQuery
return $this->addUsingAlias(CcMountNamePeer::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 CcMountNameQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcMountNamePeer::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 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;
}
}
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

@ -4,324 +4,479 @@
/**
* Base class that represents a query for the 'cc_music_dirs' table.
*
*
*
* @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 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 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 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 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 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 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 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 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 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 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 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
*
* @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');
// 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;
}
return $this->addUsingAlias(CcMusicDirsPeer::ID, $key, Criteria::EQUAL);
}
/**
* 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');
}
/**
* 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)
{
/**
* 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;
}
return $this->addUsingAlias(CcMusicDirsPeer::ID, $keys, Criteria::IN);
}
} // BaseCcMusicDirsQuery
/**
* 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;
}
}
return $this->addUsingAlias(CcMusicDirsPeer::ID, $id, $comparison);
}
/**
* 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->addUsingAlias(CcMusicDirsPeer::DIRECTORY, $directory, $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 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

@ -4,352 +4,513 @@
/**
* Base class that represents a query for the 'cc_perms' table.
*
*
*
* @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 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 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 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 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 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 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 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 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 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 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 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
*
* @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');
// 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;
}
return $this->addUsingAlias(CcPermsPeer::PERMID, $key, Criteria::EQUAL);
}
/**
* 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');
}
/**
* 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)
{
/**
* 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;
}
return $this->addUsingAlias(CcPermsPeer::PERMID, $keys, Criteria::IN);
}
} // BaseCcPermsQuery
/**
* 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;
}
}
return $this->addUsingAlias(CcPermsPeer::PERMID, $permid, $comparison);
}
/**
* 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->addUsingAlias(CcPermsPeer::SUBJ, $subj, $comparison);
}
/**
* 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

View file

@ -4,317 +4,467 @@
/**
* Base class that represents a query for the 'cc_playout_history_metadata' table.
*
*
*
* @method CcPlayoutHistoryMetaDataQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcPlayoutHistoryMetaDataQuery orderByDbHistoryId($order = Criteria::ASC) Order by the history_id column
* @method CcPlayoutHistoryMetaDataQuery orderByDbKey($order = Criteria::ASC) Order by the key column
* @method CcPlayoutHistoryMetaDataQuery orderByDbValue($order = Criteria::ASC) Order by the value column
*
* @method CcPlayoutHistoryMetaDataQuery groupByDbId() Group by the id column
* @method CcPlayoutHistoryMetaDataQuery groupByDbHistoryId() Group by the history_id column
* @method CcPlayoutHistoryMetaDataQuery groupByDbKey() Group by the key column
* @method CcPlayoutHistoryMetaDataQuery groupByDbValue() Group by the value column
* @method CcPlayoutHistoryMetaDataQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcPlayoutHistoryMetaDataQuery orderByDbHistoryId($order = Criteria::ASC) Order by the history_id column
* @method CcPlayoutHistoryMetaDataQuery orderByDbKey($order = Criteria::ASC) Order by the key column
* @method CcPlayoutHistoryMetaDataQuery orderByDbValue($order = Criteria::ASC) Order by the value column
*
* @method CcPlayoutHistoryMetaDataQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPlayoutHistoryMetaDataQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPlayoutHistoryMetaDataQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcPlayoutHistoryMetaDataQuery groupByDbId() Group by the id column
* @method CcPlayoutHistoryMetaDataQuery groupByDbHistoryId() Group by the history_id column
* @method CcPlayoutHistoryMetaDataQuery groupByDbKey() Group by the key column
* @method CcPlayoutHistoryMetaDataQuery groupByDbValue() Group by the value column
*
* @method CcPlayoutHistoryMetaDataQuery leftJoinCcPlayoutHistory($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation
* @method CcPlayoutHistoryMetaDataQuery rightJoinCcPlayoutHistory($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation
* @method CcPlayoutHistoryMetaDataQuery innerJoinCcPlayoutHistory($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation
* @method CcPlayoutHistoryMetaDataQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPlayoutHistoryMetaDataQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPlayoutHistoryMetaDataQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcPlayoutHistoryMetaData findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query
* @method CcPlayoutHistoryMetaData findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query, or a new CcPlayoutHistoryMetaData object populated from the query conditions when no match is found
* @method CcPlayoutHistoryMetaDataQuery leftJoinCcPlayoutHistory($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlayoutHistory relation
* @method CcPlayoutHistoryMetaDataQuery rightJoinCcPlayoutHistory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation
* @method CcPlayoutHistoryMetaDataQuery innerJoinCcPlayoutHistory($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation
*
* @method CcPlayoutHistoryMetaData findOneByDbId(int $id) Return the first CcPlayoutHistoryMetaData filtered by the id column
* @method CcPlayoutHistoryMetaData findOneByDbHistoryId(int $history_id) Return the first CcPlayoutHistoryMetaData filtered by the history_id column
* @method CcPlayoutHistoryMetaData findOneByDbKey(string $key) Return the first CcPlayoutHistoryMetaData filtered by the key column
* @method CcPlayoutHistoryMetaData findOneByDbValue(string $value) Return the first CcPlayoutHistoryMetaData filtered by the value column
* @method CcPlayoutHistoryMetaData findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query
* @method CcPlayoutHistoryMetaData findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryMetaData matching the query, or a new CcPlayoutHistoryMetaData object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcPlayoutHistoryMetaData objects filtered by the id column
* @method array findByDbHistoryId(int $history_id) Return CcPlayoutHistoryMetaData objects filtered by the history_id column
* @method array findByDbKey(string $key) Return CcPlayoutHistoryMetaData objects filtered by the key column
* @method array findByDbValue(string $value) Return CcPlayoutHistoryMetaData objects filtered by the value column
* @method CcPlayoutHistoryMetaData findOneByDbHistoryId(int $history_id) Return the first CcPlayoutHistoryMetaData filtered by the history_id column
* @method CcPlayoutHistoryMetaData findOneByDbKey(string $key) Return the first CcPlayoutHistoryMetaData filtered by the key column
* @method CcPlayoutHistoryMetaData findOneByDbValue(string $value) Return the first CcPlayoutHistoryMetaData filtered by the value column
*
* @method array findByDbId(int $id) Return CcPlayoutHistoryMetaData objects filtered by the id column
* @method array findByDbHistoryId(int $history_id) Return CcPlayoutHistoryMetaData objects filtered by the history_id column
* @method array findByDbKey(string $key) Return CcPlayoutHistoryMetaData objects filtered by the key column
* @method array findByDbValue(string $value) Return CcPlayoutHistoryMetaData objects filtered by the value column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcPlayoutHistoryMetaDataQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcPlayoutHistoryMetaDataQuery 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 = 'CcPlayoutHistoryMetaData';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcPlayoutHistoryMetaDataQuery 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 = 'CcPlayoutHistoryMetaData', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcPlayoutHistoryMetaDataQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcPlayoutHistoryMetaDataQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcPlayoutHistoryMetaDataQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPlayoutHistoryMetaDataQuery) {
return $criteria;
}
$query = new CcPlayoutHistoryMetaDataQuery(null, null, $modelAlias);
/**
* Returns a new CcPlayoutHistoryMetaDataQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcPlayoutHistoryMetaDataQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPlayoutHistoryMetaDataQuery) {
return $criteria;
}
$query = new CcPlayoutHistoryMetaDataQuery();
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 CcPlayoutHistoryMetaData|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcPlayoutHistoryMetaDataPeer::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 CcPlayoutHistoryMetaData|CcPlayoutHistoryMetaData[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcPlayoutHistoryMetaDataPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcPlayoutHistoryMetaDataPeer::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 CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::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 CcPlayoutHistoryMetaData 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 CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::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 CcPlayoutHistoryMetaData A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "history_id", "key", "value" FROM "cc_playout_history_metadata" 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 CcPlayoutHistoryMetaData();
$obj->hydrate($row);
CcPlayoutHistoryMetaDataPeer::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 CcPlayoutHistoryMetaDataQuery 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(CcPlayoutHistoryMetaDataPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the history_id column
*
* @param int|array $dbHistoryId 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 CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByDbHistoryId($dbHistoryId = null, $comparison = null)
{
if (is_array($dbHistoryId)) {
$useMinMax = false;
if (isset($dbHistoryId['min'])) {
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbHistoryId['max'])) {
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcPlayoutHistoryMetaData|CcPlayoutHistoryMetaData[]|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 key column
*
* @param string $dbKey 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 CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByDbKey($dbKey = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbKey)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbKey)) {
$dbKey = str_replace('*', '%', $dbKey);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::KEY, $dbKey, $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 CcPlayoutHistoryMetaDataQuery 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(CcPlayoutHistoryMetaDataPeer::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|CcPlayoutHistoryMetaData[]|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 CcPlayoutHistory object
*
* @param CcPlayoutHistory $ccPlayoutHistory the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null)
{
return $this
->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $ccPlayoutHistory->getDbId(), $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Adds a JOIN clause to the query using the CcPlayoutHistory relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function joinCcPlayoutHistory($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlayoutHistory');
// 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, 'CcPlayoutHistory');
}
return $this;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Use the CcPlayoutHistory relation CcPlayoutHistory 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 CcPlayoutHistoryQuery A secondary query class using the current class as primary query
*/
public function useCcPlayoutHistoryQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcPlayoutHistory($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery');
}
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $key, Criteria::EQUAL);
}
/**
* Exclude object from result
*
* @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData Object to remove from the list of results
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function prune($ccPlayoutHistoryMetaData = null)
{
if ($ccPlayoutHistoryMetaData) {
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $ccPlayoutHistoryMetaData->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
} // BaseCcPlayoutHistoryMetaDataQuery
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::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 CcPlayoutHistoryMetaDataQuery 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(CcPlayoutHistoryMetaDataPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the history_id column
*
* Example usage:
* <code>
* $query->filterByDbHistoryId(1234); // WHERE history_id = 1234
* $query->filterByDbHistoryId(array(12, 34)); // WHERE history_id IN (12, 34)
* $query->filterByDbHistoryId(array('min' => 12)); // WHERE history_id >= 12
* $query->filterByDbHistoryId(array('max' => 12)); // WHERE history_id <= 12
* </code>
*
* @see filterByCcPlayoutHistory()
*
* @param mixed $dbHistoryId 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 CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByDbHistoryId($dbHistoryId = null, $comparison = null)
{
if (is_array($dbHistoryId)) {
$useMinMax = false;
if (isset($dbHistoryId['min'])) {
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbHistoryId['max'])) {
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $dbHistoryId, $comparison);
}
/**
* Filter the query on the key column
*
* Example usage:
* <code>
* $query->filterByDbKey('fooValue'); // WHERE key = 'fooValue'
* $query->filterByDbKey('%fooValue%'); // WHERE key LIKE '%fooValue%'
* </code>
*
* @param string $dbKey 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 CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function filterByDbKey($dbKey = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbKey)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbKey)) {
$dbKey = str_replace('*', '%', $dbKey);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::KEY, $dbKey, $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 CcPlayoutHistoryMetaDataQuery 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(CcPlayoutHistoryMetaDataPeer::VALUE, $dbValue, $comparison);
}
/**
* Filter the query by a related CcPlayoutHistory object
*
* @param CcPlayoutHistory|PropelObjectCollection $ccPlayoutHistory The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlayoutHistory($ccPlayoutHistory, $comparison = null)
{
if ($ccPlayoutHistory instanceof CcPlayoutHistory) {
return $this
->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $ccPlayoutHistory->getDbId(), $comparison);
} elseif ($ccPlayoutHistory instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcPlayoutHistoryMetaDataPeer::HISTORY_ID, $ccPlayoutHistory->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcPlayoutHistory() only accepts arguments of type CcPlayoutHistory or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlayoutHistory relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function joinCcPlayoutHistory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlayoutHistory');
// 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, 'CcPlayoutHistory');
}
return $this;
}
/**
* Use the CcPlayoutHistory relation CcPlayoutHistory 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 CcPlayoutHistoryQuery A secondary query class using the current class as primary query
*/
public function useCcPlayoutHistoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcPlayoutHistory($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery');
}
/**
* Exclude object from result
*
* @param CcPlayoutHistoryMetaData $ccPlayoutHistoryMetaData Object to remove from the list of results
*
* @return CcPlayoutHistoryMetaDataQuery The current query, for fluid interface
*/
public function prune($ccPlayoutHistoryMetaData = null)
{
if ($ccPlayoutHistoryMetaData) {
$this->addUsingAlias(CcPlayoutHistoryMetaDataPeer::ID, $ccPlayoutHistoryMetaData->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

View file

@ -4,399 +4,577 @@
/**
* Base class that represents a query for the 'cc_playout_history_template_field' table.
*
*
*
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbTemplateId($order = Criteria::ASC) Order by the template_id column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbLabel($order = Criteria::ASC) Order by the label column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbType($order = Criteria::ASC) Order by the type column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbIsFileMD($order = Criteria::ASC) Order by the is_file_md column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
*
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbId() Group by the id column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbTemplateId() Group by the template_id column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbName() Group by the name column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbLabel() Group by the label column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbType() Group by the type column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbIsFileMD() Group by the is_file_md column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbPosition() Group by the position column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbTemplateId($order = Criteria::ASC) Order by the template_id column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbLabel($order = Criteria::ASC) Order by the label column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbType($order = Criteria::ASC) Order by the type column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbIsFileMD($order = Criteria::ASC) Order by the is_file_md column
* @method CcPlayoutHistoryTemplateFieldQuery orderByDbPosition($order = Criteria::ASC) Order by the position column
*
* @method CcPlayoutHistoryTemplateFieldQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPlayoutHistoryTemplateFieldQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPlayoutHistoryTemplateFieldQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbId() Group by the id column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbTemplateId() Group by the template_id column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbName() Group by the name column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbLabel() Group by the label column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbType() Group by the type column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbIsFileMD() Group by the is_file_md column
* @method CcPlayoutHistoryTemplateFieldQuery groupByDbPosition() Group by the position column
*
* @method CcPlayoutHistoryTemplateFieldQuery leftJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryTemplate relation
* @method CcPlayoutHistoryTemplateFieldQuery rightJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryTemplate relation
* @method CcPlayoutHistoryTemplateFieldQuery innerJoinCcPlayoutHistoryTemplate($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryTemplate relation
* @method CcPlayoutHistoryTemplateFieldQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPlayoutHistoryTemplateFieldQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPlayoutHistoryTemplateFieldQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcPlayoutHistoryTemplateField findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateField matching the query
* @method CcPlayoutHistoryTemplateField findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateField matching the query, or a new CcPlayoutHistoryTemplateField object populated from the query conditions when no match is found
* @method CcPlayoutHistoryTemplateFieldQuery leftJoinCcPlayoutHistoryTemplate($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryTemplate relation
* @method CcPlayoutHistoryTemplateFieldQuery rightJoinCcPlayoutHistoryTemplate($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryTemplate relation
* @method CcPlayoutHistoryTemplateFieldQuery innerJoinCcPlayoutHistoryTemplate($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlayoutHistoryTemplate relation
*
* @method CcPlayoutHistoryTemplateField findOneByDbId(int $id) Return the first CcPlayoutHistoryTemplateField filtered by the id column
* @method CcPlayoutHistoryTemplateField findOneByDbTemplateId(int $template_id) Return the first CcPlayoutHistoryTemplateField filtered by the template_id column
* @method CcPlayoutHistoryTemplateField findOneByDbName(string $name) Return the first CcPlayoutHistoryTemplateField filtered by the name column
* @method CcPlayoutHistoryTemplateField findOneByDbLabel(string $label) Return the first CcPlayoutHistoryTemplateField filtered by the label column
* @method CcPlayoutHistoryTemplateField findOneByDbType(string $type) Return the first CcPlayoutHistoryTemplateField filtered by the type column
* @method CcPlayoutHistoryTemplateField findOneByDbIsFileMD(boolean $is_file_md) Return the first CcPlayoutHistoryTemplateField filtered by the is_file_md column
* @method CcPlayoutHistoryTemplateField findOneByDbPosition(int $position) Return the first CcPlayoutHistoryTemplateField filtered by the position column
* @method CcPlayoutHistoryTemplateField findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateField matching the query
* @method CcPlayoutHistoryTemplateField findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplateField matching the query, or a new CcPlayoutHistoryTemplateField object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcPlayoutHistoryTemplateField objects filtered by the id column
* @method array findByDbTemplateId(int $template_id) Return CcPlayoutHistoryTemplateField objects filtered by the template_id column
* @method array findByDbName(string $name) Return CcPlayoutHistoryTemplateField objects filtered by the name column
* @method array findByDbLabel(string $label) Return CcPlayoutHistoryTemplateField objects filtered by the label column
* @method array findByDbType(string $type) Return CcPlayoutHistoryTemplateField objects filtered by the type column
* @method array findByDbIsFileMD(boolean $is_file_md) Return CcPlayoutHistoryTemplateField objects filtered by the is_file_md column
* @method array findByDbPosition(int $position) Return CcPlayoutHistoryTemplateField objects filtered by the position column
* @method CcPlayoutHistoryTemplateField findOneByDbTemplateId(int $template_id) Return the first CcPlayoutHistoryTemplateField filtered by the template_id column
* @method CcPlayoutHistoryTemplateField findOneByDbName(string $name) Return the first CcPlayoutHistoryTemplateField filtered by the name column
* @method CcPlayoutHistoryTemplateField findOneByDbLabel(string $label) Return the first CcPlayoutHistoryTemplateField filtered by the label column
* @method CcPlayoutHistoryTemplateField findOneByDbType(string $type) Return the first CcPlayoutHistoryTemplateField filtered by the type column
* @method CcPlayoutHistoryTemplateField findOneByDbIsFileMD(boolean $is_file_md) Return the first CcPlayoutHistoryTemplateField filtered by the is_file_md column
* @method CcPlayoutHistoryTemplateField findOneByDbPosition(int $position) Return the first CcPlayoutHistoryTemplateField filtered by the position column
*
* @method array findByDbId(int $id) Return CcPlayoutHistoryTemplateField objects filtered by the id column
* @method array findByDbTemplateId(int $template_id) Return CcPlayoutHistoryTemplateField objects filtered by the template_id column
* @method array findByDbName(string $name) Return CcPlayoutHistoryTemplateField objects filtered by the name column
* @method array findByDbLabel(string $label) Return CcPlayoutHistoryTemplateField objects filtered by the label column
* @method array findByDbType(string $type) Return CcPlayoutHistoryTemplateField objects filtered by the type column
* @method array findByDbIsFileMD(boolean $is_file_md) Return CcPlayoutHistoryTemplateField objects filtered by the is_file_md column
* @method array findByDbPosition(int $position) Return CcPlayoutHistoryTemplateField objects filtered by the position column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcPlayoutHistoryTemplateFieldQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcPlayoutHistoryTemplateFieldQuery 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 = 'CcPlayoutHistoryTemplateField';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcPlayoutHistoryTemplateFieldQuery 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 = 'CcPlayoutHistoryTemplateField', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcPlayoutHistoryTemplateFieldQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcPlayoutHistoryTemplateFieldQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcPlayoutHistoryTemplateFieldQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPlayoutHistoryTemplateFieldQuery) {
return $criteria;
}
$query = new CcPlayoutHistoryTemplateFieldQuery(null, null, $modelAlias);
/**
* Returns a new CcPlayoutHistoryTemplateFieldQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcPlayoutHistoryTemplateFieldQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPlayoutHistoryTemplateFieldQuery) {
return $criteria;
}
$query = new CcPlayoutHistoryTemplateFieldQuery();
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 CcPlayoutHistoryTemplateField|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcPlayoutHistoryTemplateFieldPeer::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 CcPlayoutHistoryTemplateField|CcPlayoutHistoryTemplateField[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcPlayoutHistoryTemplateFieldPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcPlayoutHistoryTemplateFieldPeer::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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::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 CcPlayoutHistoryTemplateField 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::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 CcPlayoutHistoryTemplateField A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "template_id", "name", "label", "type", "is_file_md", "position" FROM "cc_playout_history_template_field" 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 CcPlayoutHistoryTemplateField();
$obj->hydrate($row);
CcPlayoutHistoryTemplateFieldPeer::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 CcPlayoutHistoryTemplateFieldQuery 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(CcPlayoutHistoryTemplateFieldPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the template_id column
*
* @param int|array $dbTemplateId 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbTemplateId($dbTemplateId = null, $comparison = null)
{
if (is_array($dbTemplateId)) {
$useMinMax = false;
if (isset($dbTemplateId['min'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbTemplateId['max'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcPlayoutHistoryTemplateField|CcPlayoutHistoryTemplateField[]|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 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 CcPlayoutHistoryTemplateFieldQuery 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(CcPlayoutHistoryTemplateFieldPeer::NAME, $dbName, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the label column
*
* @param string $dbLabel 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbLabel($dbLabel = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLabel)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLabel)) {
$dbLabel = str_replace('*', '%', $dbLabel);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::LABEL, $dbLabel, $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|CcPlayoutHistoryTemplateField[]|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 $dbType 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbType($dbType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbType)) {
$dbType = str_replace('*', '%', $dbType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TYPE, $dbType, $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query on the is_file_md column
*
* @param boolean|string $dbIsFileMD 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbIsFileMD($dbIsFileMD = null, $comparison = null)
{
if (is_string($dbIsFileMD)) {
$is_file_md = in_array(strtolower($dbIsFileMD), array('false', 'off', '-', 'no', 'n', '0')) ? false : true;
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD, $dbIsFileMD, $comparison);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Filter the query on the position column
*
* @param int|array $dbPosition 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbPosition($dbPosition = null, $comparison = null)
{
if (is_array($dbPosition)) {
$useMinMax = false;
if (isset($dbPosition['min'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbPosition['max'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition, $comparison);
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $key, Criteria::EQUAL);
}
/**
* Filter the query by a related CcPlayoutHistoryTemplate object
*
* @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByCcPlayoutHistoryTemplate($ccPlayoutHistoryTemplate, $comparison = null)
{
return $this
->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $ccPlayoutHistoryTemplate->getDbId(), $comparison);
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
/**
* Adds a JOIN clause to the query using the CcPlayoutHistoryTemplate relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function joinCcPlayoutHistoryTemplate($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplate');
// 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, 'CcPlayoutHistoryTemplate');
}
return $this;
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $keys, Criteria::IN);
}
/**
* Use the CcPlayoutHistoryTemplate relation CcPlayoutHistoryTemplate 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 CcPlayoutHistoryTemplateQuery A secondary query class using the current class as primary query
*/
public function useCcPlayoutHistoryTemplateQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcPlayoutHistoryTemplate($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplateQuery');
}
/**
* 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 CcPlayoutHistoryTemplateFieldQuery 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(CcPlayoutHistoryTemplateFieldPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
/**
* Exclude object from result
*
* @param CcPlayoutHistoryTemplateField $ccPlayoutHistoryTemplateField Object to remove from the list of results
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function prune($ccPlayoutHistoryTemplateField = null)
{
if ($ccPlayoutHistoryTemplateField) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $ccPlayoutHistoryTemplateField->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $dbId, $comparison);
}
} // BaseCcPlayoutHistoryTemplateFieldQuery
/**
* Filter the query on the template_id column
*
* Example usage:
* <code>
* $query->filterByDbTemplateId(1234); // WHERE template_id = 1234
* $query->filterByDbTemplateId(array(12, 34)); // WHERE template_id IN (12, 34)
* $query->filterByDbTemplateId(array('min' => 12)); // WHERE template_id >= 12
* $query->filterByDbTemplateId(array('max' => 12)); // WHERE template_id <= 12
* </code>
*
* @see filterByCcPlayoutHistoryTemplate()
*
* @param mixed $dbTemplateId 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbTemplateId($dbTemplateId = null, $comparison = null)
{
if (is_array($dbTemplateId)) {
$useMinMax = false;
if (isset($dbTemplateId['min'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbTemplateId['max'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $dbTemplateId, $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 CcPlayoutHistoryTemplateFieldQuery 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(CcPlayoutHistoryTemplateFieldPeer::NAME, $dbName, $comparison);
}
/**
* Filter the query on the label column
*
* Example usage:
* <code>
* $query->filterByDbLabel('fooValue'); // WHERE label = 'fooValue'
* $query->filterByDbLabel('%fooValue%'); // WHERE label LIKE '%fooValue%'
* </code>
*
* @param string $dbLabel 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbLabel($dbLabel = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLabel)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLabel)) {
$dbLabel = str_replace('*', '%', $dbLabel);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::LABEL, $dbLabel, $comparison);
}
/**
* Filter the query on the type column
*
* Example usage:
* <code>
* $query->filterByDbType('fooValue'); // WHERE type = 'fooValue'
* $query->filterByDbType('%fooValue%'); // WHERE type LIKE '%fooValue%'
* </code>
*
* @param string $dbType 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbType($dbType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbType)) {
$dbType = str_replace('*', '%', $dbType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TYPE, $dbType, $comparison);
}
/**
* Filter the query on the is_file_md column
*
* Example usage:
* <code>
* $query->filterByDbIsFileMD(true); // WHERE is_file_md = true
* $query->filterByDbIsFileMD('yes'); // WHERE is_file_md = true
* </code>
*
* @param boolean|string $dbIsFileMD 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbIsFileMD($dbIsFileMD = null, $comparison = null)
{
if (is_string($dbIsFileMD)) {
$dbIsFileMD = in_array(strtolower($dbIsFileMD), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::IS_FILE_MD, $dbIsFileMD, $comparison);
}
/**
* Filter the query on the position column
*
* Example usage:
* <code>
* $query->filterByDbPosition(1234); // WHERE position = 1234
* $query->filterByDbPosition(array(12, 34)); // WHERE position IN (12, 34)
* $query->filterByDbPosition(array('min' => 12)); // WHERE position >= 12
* $query->filterByDbPosition(array('max' => 12)); // WHERE position <= 12
* </code>
*
* @param mixed $dbPosition 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 CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function filterByDbPosition($dbPosition = null, $comparison = null)
{
if (is_array($dbPosition)) {
$useMinMax = false;
if (isset($dbPosition['min'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbPosition['max'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::POSITION, $dbPosition, $comparison);
}
/**
* Filter the query by a related CcPlayoutHistoryTemplate object
*
* @param CcPlayoutHistoryTemplate|PropelObjectCollection $ccPlayoutHistoryTemplate The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlayoutHistoryTemplate($ccPlayoutHistoryTemplate, $comparison = null)
{
if ($ccPlayoutHistoryTemplate instanceof CcPlayoutHistoryTemplate) {
return $this
->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $ccPlayoutHistoryTemplate->getDbId(), $comparison);
} elseif ($ccPlayoutHistoryTemplate instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::TEMPLATE_ID, $ccPlayoutHistoryTemplate->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcPlayoutHistoryTemplate() only accepts arguments of type CcPlayoutHistoryTemplate or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlayoutHistoryTemplate relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function joinCcPlayoutHistoryTemplate($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplate');
// 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, 'CcPlayoutHistoryTemplate');
}
return $this;
}
/**
* Use the CcPlayoutHistoryTemplate relation CcPlayoutHistoryTemplate 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 CcPlayoutHistoryTemplateQuery A secondary query class using the current class as primary query
*/
public function useCcPlayoutHistoryTemplateQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcPlayoutHistoryTemplate($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplateQuery');
}
/**
* Exclude object from result
*
* @param CcPlayoutHistoryTemplateField $ccPlayoutHistoryTemplateField Object to remove from the list of results
*
* @return CcPlayoutHistoryTemplateFieldQuery The current query, for fluid interface
*/
public function prune($ccPlayoutHistoryTemplateField = null)
{
if ($ccPlayoutHistoryTemplateField) {
$this->addUsingAlias(CcPlayoutHistoryTemplateFieldPeer::ID, $ccPlayoutHistoryTemplateField->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

View file

@ -4,282 +4,417 @@
/**
* Base class that represents a query for the 'cc_playout_history_template' table.
*
*
*
* @method CcPlayoutHistoryTemplateQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcPlayoutHistoryTemplateQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcPlayoutHistoryTemplateQuery orderByDbType($order = Criteria::ASC) Order by the type column
*
* @method CcPlayoutHistoryTemplateQuery groupByDbId() Group by the id column
* @method CcPlayoutHistoryTemplateQuery groupByDbName() Group by the name column
* @method CcPlayoutHistoryTemplateQuery groupByDbType() Group by the type column
* @method CcPlayoutHistoryTemplateQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcPlayoutHistoryTemplateQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcPlayoutHistoryTemplateQuery orderByDbType($order = Criteria::ASC) Order by the type column
*
* @method CcPlayoutHistoryTemplateQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPlayoutHistoryTemplateQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPlayoutHistoryTemplateQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcPlayoutHistoryTemplateQuery groupByDbId() Group by the id column
* @method CcPlayoutHistoryTemplateQuery groupByDbName() Group by the name column
* @method CcPlayoutHistoryTemplateQuery groupByDbType() Group by the type column
*
* @method CcPlayoutHistoryTemplateQuery leftJoinCcPlayoutHistoryTemplateField($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
* @method CcPlayoutHistoryTemplateQuery rightJoinCcPlayoutHistoryTemplateField($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
* @method CcPlayoutHistoryTemplateQuery innerJoinCcPlayoutHistoryTemplateField($relationAlias = '') Adds a INNER JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
* @method CcPlayoutHistoryTemplateQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPlayoutHistoryTemplateQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPlayoutHistoryTemplateQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcPlayoutHistoryTemplate findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplate matching the query
* @method CcPlayoutHistoryTemplate findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplate matching the query, or a new CcPlayoutHistoryTemplate object populated from the query conditions when no match is found
* @method CcPlayoutHistoryTemplateQuery leftJoinCcPlayoutHistoryTemplateField($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
* @method CcPlayoutHistoryTemplateQuery rightJoinCcPlayoutHistoryTemplateField($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
* @method CcPlayoutHistoryTemplateQuery innerJoinCcPlayoutHistoryTemplateField($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
*
* @method CcPlayoutHistoryTemplate findOneByDbId(int $id) Return the first CcPlayoutHistoryTemplate filtered by the id column
* @method CcPlayoutHistoryTemplate findOneByDbName(string $name) Return the first CcPlayoutHistoryTemplate filtered by the name column
* @method CcPlayoutHistoryTemplate findOneByDbType(string $type) Return the first CcPlayoutHistoryTemplate filtered by the type column
* @method CcPlayoutHistoryTemplate findOne(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplate matching the query
* @method CcPlayoutHistoryTemplate findOneOrCreate(PropelPDO $con = null) Return the first CcPlayoutHistoryTemplate matching the query, or a new CcPlayoutHistoryTemplate object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcPlayoutHistoryTemplate objects filtered by the id column
* @method array findByDbName(string $name) Return CcPlayoutHistoryTemplate objects filtered by the name column
* @method array findByDbType(string $type) Return CcPlayoutHistoryTemplate objects filtered by the type column
* @method CcPlayoutHistoryTemplate findOneByDbName(string $name) Return the first CcPlayoutHistoryTemplate filtered by the name column
* @method CcPlayoutHistoryTemplate findOneByDbType(string $type) Return the first CcPlayoutHistoryTemplate filtered by the type column
*
* @method array findByDbId(int $id) Return CcPlayoutHistoryTemplate objects filtered by the id column
* @method array findByDbName(string $name) Return CcPlayoutHistoryTemplate objects filtered by the name column
* @method array findByDbType(string $type) Return CcPlayoutHistoryTemplate objects filtered by the type column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcPlayoutHistoryTemplateQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcPlayoutHistoryTemplateQuery 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 = 'CcPlayoutHistoryTemplate';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcPlayoutHistoryTemplateQuery 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 = 'CcPlayoutHistoryTemplate', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcPlayoutHistoryTemplateQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcPlayoutHistoryTemplateQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcPlayoutHistoryTemplateQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPlayoutHistoryTemplateQuery) {
return $criteria;
}
$query = new CcPlayoutHistoryTemplateQuery(null, null, $modelAlias);
/**
* Returns a new CcPlayoutHistoryTemplateQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcPlayoutHistoryTemplateQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPlayoutHistoryTemplateQuery) {
return $criteria;
}
$query = new CcPlayoutHistoryTemplateQuery();
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 CcPlayoutHistoryTemplate|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcPlayoutHistoryTemplatePeer::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 CcPlayoutHistoryTemplate|CcPlayoutHistoryTemplate[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcPlayoutHistoryTemplatePeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcPlayoutHistoryTemplatePeer::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 CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::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 CcPlayoutHistoryTemplate 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 CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::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 CcPlayoutHistoryTemplate A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "name", "type" FROM "cc_playout_history_template" 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 CcPlayoutHistoryTemplate();
$obj->hydrate($row);
CcPlayoutHistoryTemplatePeer::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 CcPlayoutHistoryTemplateQuery 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(CcPlayoutHistoryTemplatePeer::ID, $dbId, $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 CcPlayoutHistoryTemplateQuery 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(CcPlayoutHistoryTemplatePeer::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 CcPlayoutHistoryTemplate|CcPlayoutHistoryTemplate[]|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 $dbType 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 CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function filterByDbType($dbType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbType)) {
$dbType = str_replace('*', '%', $dbType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::TYPE, $dbType, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query by a related CcPlayoutHistoryTemplateField object
*
* @param CcPlayoutHistoryTemplateField $ccPlayoutHistoryTemplateField the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function filterByCcPlayoutHistoryTemplateField($ccPlayoutHistoryTemplateField, $comparison = null)
{
return $this
->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplateField->getDbTemplateId(), $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|CcPlayoutHistoryTemplate[]|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);
/**
* Adds a JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function joinCcPlayoutHistoryTemplateField($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplateField');
// 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, 'CcPlayoutHistoryTemplateField');
}
return $this;
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Use the CcPlayoutHistoryTemplateField relation CcPlayoutHistoryTemplateField 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 CcPlayoutHistoryTemplateFieldQuery A secondary query class using the current class as primary query
*/
public function useCcPlayoutHistoryTemplateFieldQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcPlayoutHistoryTemplateField($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplateField', 'CcPlayoutHistoryTemplateFieldQuery');
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Exclude object from result
*
* @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate Object to remove from the list of results
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function prune($ccPlayoutHistoryTemplate = null)
{
if ($ccPlayoutHistoryTemplate) {
$this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplate->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $key, Criteria::EQUAL);
}
} // BaseCcPlayoutHistoryTemplateQuery
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::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 CcPlayoutHistoryTemplateQuery 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(CcPlayoutHistoryTemplatePeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $dbId, $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 CcPlayoutHistoryTemplateQuery 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(CcPlayoutHistoryTemplatePeer::NAME, $dbName, $comparison);
}
/**
* Filter the query on the type column
*
* Example usage:
* <code>
* $query->filterByDbType('fooValue'); // WHERE type = 'fooValue'
* $query->filterByDbType('%fooValue%'); // WHERE type LIKE '%fooValue%'
* </code>
*
* @param string $dbType 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 CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function filterByDbType($dbType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbType)) {
$dbType = str_replace('*', '%', $dbType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPlayoutHistoryTemplatePeer::TYPE, $dbType, $comparison);
}
/**
* Filter the query by a related CcPlayoutHistoryTemplateField object
*
* @param CcPlayoutHistoryTemplateField|PropelObjectCollection $ccPlayoutHistoryTemplateField the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcPlayoutHistoryTemplateField($ccPlayoutHistoryTemplateField, $comparison = null)
{
if ($ccPlayoutHistoryTemplateField instanceof CcPlayoutHistoryTemplateField) {
return $this
->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplateField->getDbTemplateId(), $comparison);
} elseif ($ccPlayoutHistoryTemplateField instanceof PropelObjectCollection) {
return $this
->useCcPlayoutHistoryTemplateFieldQuery()
->filterByPrimaryKeys($ccPlayoutHistoryTemplateField->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByCcPlayoutHistoryTemplateField() only accepts arguments of type CcPlayoutHistoryTemplateField or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcPlayoutHistoryTemplateField relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function joinCcPlayoutHistoryTemplateField($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcPlayoutHistoryTemplateField');
// 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, 'CcPlayoutHistoryTemplateField');
}
return $this;
}
/**
* Use the CcPlayoutHistoryTemplateField relation CcPlayoutHistoryTemplateField 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 CcPlayoutHistoryTemplateFieldQuery A secondary query class using the current class as primary query
*/
public function useCcPlayoutHistoryTemplateFieldQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcPlayoutHistoryTemplateField($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistoryTemplateField', 'CcPlayoutHistoryTemplateFieldQuery');
}
/**
* Exclude object from result
*
* @param CcPlayoutHistoryTemplate $ccPlayoutHistoryTemplate Object to remove from the list of results
*
* @return CcPlayoutHistoryTemplateQuery The current query, for fluid interface
*/
public function prune($ccPlayoutHistoryTemplate = null)
{
if ($ccPlayoutHistoryTemplate) {
$this->addUsingAlias(CcPlayoutHistoryTemplatePeer::ID, $ccPlayoutHistoryTemplate->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

@ -4,317 +4,467 @@
/**
* Base class that represents a query for the 'cc_pref' table.
*
*
*
* @method CcPrefQuery orderById($order = Criteria::ASC) Order by the id column
* @method CcPrefQuery orderBySubjid($order = Criteria::ASC) Order by the subjid column
* @method CcPrefQuery orderByKeystr($order = Criteria::ASC) Order by the keystr column
* @method CcPrefQuery orderByValstr($order = Criteria::ASC) Order by the valstr column
*
* @method CcPrefQuery groupById() Group by the id column
* @method CcPrefQuery groupBySubjid() Group by the subjid column
* @method CcPrefQuery groupByKeystr() Group by the keystr column
* @method CcPrefQuery groupByValstr() Group by the valstr column
* @method CcPrefQuery orderById($order = Criteria::ASC) Order by the id column
* @method CcPrefQuery orderBySubjid($order = Criteria::ASC) Order by the subjid column
* @method CcPrefQuery orderByKeystr($order = Criteria::ASC) Order by the keystr column
* @method CcPrefQuery orderByValstr($order = Criteria::ASC) Order by the valstr column
*
* @method CcPrefQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPrefQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPrefQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcPrefQuery groupById() Group by the id column
* @method CcPrefQuery groupBySubjid() Group by the subjid column
* @method CcPrefQuery groupByKeystr() Group by the keystr column
* @method CcPrefQuery groupByValstr() Group by the valstr column
*
* @method CcPrefQuery leftJoinCcSubjs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcPrefQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcPrefQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
* @method CcPrefQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcPrefQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcPrefQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcPref findOne(PropelPDO $con = null) Return the first CcPref matching the query
* @method CcPref findOneOrCreate(PropelPDO $con = null) Return the first CcPref matching the query, or a new CcPref object populated from the query conditions when no match is found
* @method CcPrefQuery leftJoinCcSubjs($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcPrefQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcPrefQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
*
* @method CcPref findOneById(int $id) Return the first CcPref filtered by the id column
* @method CcPref findOneBySubjid(int $subjid) Return the first CcPref filtered by the subjid column
* @method CcPref findOneByKeystr(string $keystr) Return the first CcPref filtered by the keystr column
* @method CcPref findOneByValstr(string $valstr) Return the first CcPref filtered by the valstr column
* @method CcPref findOne(PropelPDO $con = null) Return the first CcPref matching the query
* @method CcPref findOneOrCreate(PropelPDO $con = null) Return the first CcPref matching the query, or a new CcPref object populated from the query conditions when no match is found
*
* @method array findById(int $id) Return CcPref objects filtered by the id column
* @method array findBySubjid(int $subjid) Return CcPref objects filtered by the subjid column
* @method array findByKeystr(string $keystr) Return CcPref objects filtered by the keystr column
* @method array findByValstr(string $valstr) Return CcPref objects filtered by the valstr column
* @method CcPref findOneBySubjid(int $subjid) Return the first CcPref filtered by the subjid column
* @method CcPref findOneByKeystr(string $keystr) Return the first CcPref filtered by the keystr column
* @method CcPref findOneByValstr(string $valstr) Return the first CcPref filtered by the valstr column
*
* @method array findById(int $id) Return CcPref objects filtered by the id column
* @method array findBySubjid(int $subjid) Return CcPref objects filtered by the subjid column
* @method array findByKeystr(string $keystr) Return CcPref objects filtered by the keystr column
* @method array findByValstr(string $valstr) Return CcPref objects filtered by the valstr column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcPrefQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcPrefQuery 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 = 'CcPref';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcPrefQuery 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 = 'CcPref', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcPrefQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcPrefQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcPrefQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPrefQuery) {
return $criteria;
}
$query = new CcPrefQuery(null, null, $modelAlias);
/**
* Returns a new CcPrefQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcPrefQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcPrefQuery) {
return $criteria;
}
$query = new CcPrefQuery();
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 CcPref|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcPrefPeer::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 CcPref|CcPref[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcPrefPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcPrefPeer::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 CcPrefQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcPrefPeer::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 CcPref 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 CcPrefQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcPrefPeer::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 CcPref A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "subjid", "keystr", "valstr" FROM "cc_pref" 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 CcPref();
$obj->hydrate($row);
CcPrefPeer::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 CcPrefQuery 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(CcPrefPeer::ID, $id, $comparison);
}
return $obj;
}
/**
* Filter the query on the subjid column
*
* @param int|array $subjid 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 CcPrefQuery The current query, for fluid interface
*/
public function filterBySubjid($subjid = null, $comparison = null)
{
if (is_array($subjid)) {
$useMinMax = false;
if (isset($subjid['min'])) {
$this->addUsingAlias(CcPrefPeer::SUBJID, $subjid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($subjid['max'])) {
$this->addUsingAlias(CcPrefPeer::SUBJID, $subjid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPrefPeer::SUBJID, $subjid, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcPref|CcPref[]|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 keystr column
*
* @param string $keystr 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 CcPrefQuery The current query, for fluid interface
*/
public function filterByKeystr($keystr = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($keystr)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $keystr)) {
$keystr = str_replace('*', '%', $keystr);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPrefPeer::KEYSTR, $keystr, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the valstr column
*
* @param string $valstr 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 CcPrefQuery The current query, for fluid interface
*/
public function filterByValstr($valstr = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($valstr)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $valstr)) {
$valstr = str_replace('*', '%', $valstr);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPrefPeer::VALSTR, $valstr, $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|CcPref[]|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 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 CcPrefQuery The current query, for fluid interface
*/
public function filterByCcSubjs($ccSubjs, $comparison = null)
{
return $this
->addUsingAlias(CcPrefPeer::SUBJID, $ccSubjs->getDbId(), $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* 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 CcPrefQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = '', $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;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcPrefQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* 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(CcPrefPeer::ID, $key, Criteria::EQUAL);
}
/**
* Exclude object from result
*
* @param CcPref $ccPref Object to remove from the list of results
*
* @return CcPrefQuery The current query, for fluid interface
*/
public function prune($ccPref = null)
{
if ($ccPref) {
$this->addUsingAlias(CcPrefPeer::ID, $ccPref->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcPrefQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
} // BaseCcPrefQuery
return $this->addUsingAlias(CcPrefPeer::ID, $keys, Criteria::IN);
}
/**
* 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 CcPrefQuery 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(CcPrefPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(CcPrefPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPrefPeer::ID, $id, $comparison);
}
/**
* Filter the query on the subjid column
*
* Example usage:
* <code>
* $query->filterBySubjid(1234); // WHERE subjid = 1234
* $query->filterBySubjid(array(12, 34)); // WHERE subjid IN (12, 34)
* $query->filterBySubjid(array('min' => 12)); // WHERE subjid >= 12
* $query->filterBySubjid(array('max' => 12)); // WHERE subjid <= 12
* </code>
*
* @see filterByCcSubjs()
*
* @param mixed $subjid 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 CcPrefQuery The current query, for fluid interface
*/
public function filterBySubjid($subjid = null, $comparison = null)
{
if (is_array($subjid)) {
$useMinMax = false;
if (isset($subjid['min'])) {
$this->addUsingAlias(CcPrefPeer::SUBJID, $subjid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($subjid['max'])) {
$this->addUsingAlias(CcPrefPeer::SUBJID, $subjid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcPrefPeer::SUBJID, $subjid, $comparison);
}
/**
* Filter the query on the keystr column
*
* Example usage:
* <code>
* $query->filterByKeystr('fooValue'); // WHERE keystr = 'fooValue'
* $query->filterByKeystr('%fooValue%'); // WHERE keystr LIKE '%fooValue%'
* </code>
*
* @param string $keystr 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 CcPrefQuery The current query, for fluid interface
*/
public function filterByKeystr($keystr = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($keystr)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $keystr)) {
$keystr = str_replace('*', '%', $keystr);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPrefPeer::KEYSTR, $keystr, $comparison);
}
/**
* Filter the query on the valstr column
*
* Example usage:
* <code>
* $query->filterByValstr('fooValue'); // WHERE valstr = 'fooValue'
* $query->filterByValstr('%fooValue%'); // WHERE valstr LIKE '%fooValue%'
* </code>
*
* @param string $valstr 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 CcPrefQuery The current query, for fluid interface
*/
public function filterByValstr($valstr = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($valstr)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $valstr)) {
$valstr = str_replace('*', '%', $valstr);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcPrefPeer::VALSTR, $valstr, $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 CcPrefQuery 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(CcPrefPeer::SUBJID, $ccSubjs->getDbId(), $comparison);
} elseif ($ccSubjs instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcPrefPeer::SUBJID, $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 CcPrefQuery 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 CcPref $ccPref Object to remove from the list of results
*
* @return CcPrefQuery The current query, for fluid interface
*/
public function prune($ccPref = null)
{
if ($ccPref) {
$this->addUsingAlias(CcPrefPeer::ID, $ccPref->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load diff

View file

@ -4,193 +4,293 @@
/**
* Base class that represents a query for the 'cc_service_register' table.
*
*
*
* @method CcServiceRegisterQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcServiceRegisterQuery orderByDbIp($order = Criteria::ASC) Order by the ip column
*
* @method CcServiceRegisterQuery groupByDbName() Group by the name column
* @method CcServiceRegisterQuery groupByDbIp() Group by the ip column
* @method CcServiceRegisterQuery orderByDbName($order = Criteria::ASC) Order by the name column
* @method CcServiceRegisterQuery orderByDbIp($order = Criteria::ASC) Order by the ip column
*
* @method CcServiceRegisterQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcServiceRegisterQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcServiceRegisterQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcServiceRegisterQuery groupByDbName() Group by the name column
* @method CcServiceRegisterQuery groupByDbIp() Group by the ip column
*
* @method CcServiceRegister findOne(PropelPDO $con = null) Return the first CcServiceRegister matching the query
* @method CcServiceRegister findOneOrCreate(PropelPDO $con = null) Return the first CcServiceRegister matching the query, or a new CcServiceRegister object populated from the query conditions when no match is found
* @method CcServiceRegisterQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcServiceRegisterQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcServiceRegisterQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcServiceRegister findOneByDbName(string $name) Return the first CcServiceRegister filtered by the name column
* @method CcServiceRegister findOneByDbIp(string $ip) Return the first CcServiceRegister filtered by the ip column
* @method CcServiceRegister findOne(PropelPDO $con = null) Return the first CcServiceRegister matching the query
* @method CcServiceRegister findOneOrCreate(PropelPDO $con = null) Return the first CcServiceRegister matching the query, or a new CcServiceRegister object populated from the query conditions when no match is found
*
* @method array findByDbName(string $name) Return CcServiceRegister objects filtered by the name column
* @method array findByDbIp(string $ip) Return CcServiceRegister objects filtered by the ip column
* @method CcServiceRegister findOneByDbIp(string $ip) Return the first CcServiceRegister filtered by the ip column
*
* @method array findByDbName(string $name) Return CcServiceRegister objects filtered by the name column
* @method array findByDbIp(string $ip) Return CcServiceRegister objects filtered by the ip column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcServiceRegisterQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcServiceRegisterQuery 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 = 'CcServiceRegister';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcServiceRegisterQuery 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 = 'CcServiceRegister', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcServiceRegisterQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcServiceRegisterQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcServiceRegisterQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcServiceRegisterQuery) {
return $criteria;
}
$query = new CcServiceRegisterQuery(null, null, $modelAlias);
/**
* Returns a new CcServiceRegisterQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcServiceRegisterQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcServiceRegisterQuery) {
return $criteria;
}
$query = new CcServiceRegisterQuery();
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 CcServiceRegister|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcServiceRegisterPeer::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 CcServiceRegister|CcServiceRegister[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcServiceRegisterPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcServiceRegisterPeer::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 CcServiceRegisterQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcServiceRegisterPeer::NAME, $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 CcServiceRegister A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbName($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 CcServiceRegisterQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcServiceRegisterPeer::NAME, $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 CcServiceRegister A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "name", "ip" FROM "cc_service_register" WHERE "name" = :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 CcServiceRegister();
$obj->hydrate($row);
CcServiceRegisterPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* 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 CcServiceRegisterQuery 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(CcServiceRegisterPeer::NAME, $dbName, $comparison);
}
return $obj;
}
/**
* 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 CcServiceRegisterQuery 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(CcServiceRegisterPeer::IP, $dbIp, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcServiceRegister|CcServiceRegister[]|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 CcServiceRegister $ccServiceRegister Object to remove from the list of results
*
* @return CcServiceRegisterQuery The current query, for fluid interface
*/
public function prune($ccServiceRegister = null)
{
if ($ccServiceRegister) {
$this->addUsingAlias(CcServiceRegisterPeer::NAME, $ccServiceRegister->getDbName(), Criteria::NOT_EQUAL);
}
return $this;
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
} // BaseCcServiceRegisterQuery
/**
* 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|CcServiceRegister[]|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 $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcServiceRegisterQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcServiceRegisterPeer::NAME, $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 CcServiceRegisterQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcServiceRegisterPeer::NAME, $keys, Criteria::IN);
}
/**
* 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 CcServiceRegisterQuery 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(CcServiceRegisterPeer::NAME, $dbName, $comparison);
}
/**
* 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 CcServiceRegisterQuery 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(CcServiceRegisterPeer::IP, $dbIp, $comparison);
}
/**
* Exclude object from result
*
* @param CcServiceRegister $ccServiceRegister Object to remove from the list of results
*
* @return CcServiceRegisterQuery The current query, for fluid interface
*/
public function prune($ccServiceRegister = null)
{
if ($ccServiceRegister) {
$this->addUsingAlias(CcServiceRegisterPeer::NAME, $ccServiceRegister->getDbName(), 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

@ -4,331 +4,468 @@
/**
* Base class that represents a query for the 'cc_sess' table.
*
*
*
* @method CcSessQuery orderBySessid($order = Criteria::ASC) Order by the sessid column
* @method CcSessQuery orderByUserid($order = Criteria::ASC) Order by the userid column
* @method CcSessQuery orderByLogin($order = Criteria::ASC) Order by the login column
* @method CcSessQuery orderByTs($order = Criteria::ASC) Order by the ts column
*
* @method CcSessQuery groupBySessid() Group by the sessid column
* @method CcSessQuery groupByUserid() Group by the userid column
* @method CcSessQuery groupByLogin() Group by the login column
* @method CcSessQuery groupByTs() Group by the ts column
* @method CcSessQuery orderBySessid($order = Criteria::ASC) Order by the sessid column
* @method CcSessQuery orderByUserid($order = Criteria::ASC) Order by the userid column
* @method CcSessQuery orderByLogin($order = Criteria::ASC) Order by the login column
* @method CcSessQuery orderByTs($order = Criteria::ASC) Order by the ts column
*
* @method CcSessQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSessQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSessQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcSessQuery groupBySessid() Group by the sessid column
* @method CcSessQuery groupByUserid() Group by the userid column
* @method CcSessQuery groupByLogin() Group by the login column
* @method CcSessQuery groupByTs() Group by the ts column
*
* @method CcSessQuery leftJoinCcSubjs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcSessQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcSessQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
* @method CcSessQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSessQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSessQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcSess findOne(PropelPDO $con = null) Return the first CcSess matching the query
* @method CcSess findOneOrCreate(PropelPDO $con = null) Return the first CcSess matching the query, or a new CcSess object populated from the query conditions when no match is found
* @method CcSessQuery leftJoinCcSubjs($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcSessQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcSessQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
*
* @method CcSess findOneBySessid(string $sessid) Return the first CcSess filtered by the sessid column
* @method CcSess findOneByUserid(int $userid) Return the first CcSess filtered by the userid column
* @method CcSess findOneByLogin(string $login) Return the first CcSess filtered by the login column
* @method CcSess findOneByTs(string $ts) Return the first CcSess filtered by the ts column
* @method CcSess findOne(PropelPDO $con = null) Return the first CcSess matching the query
* @method CcSess findOneOrCreate(PropelPDO $con = null) Return the first CcSess matching the query, or a new CcSess object populated from the query conditions when no match is found
*
* @method array findBySessid(string $sessid) Return CcSess objects filtered by the sessid column
* @method array findByUserid(int $userid) Return CcSess objects filtered by the userid column
* @method array findByLogin(string $login) Return CcSess objects filtered by the login column
* @method array findByTs(string $ts) Return CcSess objects filtered by the ts column
* @method CcSess findOneByUserid(int $userid) Return the first CcSess filtered by the userid column
* @method CcSess findOneByLogin(string $login) Return the first CcSess filtered by the login column
* @method CcSess findOneByTs(string $ts) Return the first CcSess filtered by the ts column
*
* @method array findBySessid(string $sessid) Return CcSess objects filtered by the sessid column
* @method array findByUserid(int $userid) Return CcSess objects filtered by the userid column
* @method array findByLogin(string $login) Return CcSess objects filtered by the login column
* @method array findByTs(string $ts) Return CcSess objects filtered by the ts column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcSessQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcSessQuery 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 = 'CcSess';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcSessQuery 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 = 'CcSess', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcSessQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcSessQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcSessQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcSessQuery) {
return $criteria;
}
$query = new CcSessQuery(null, null, $modelAlias);
/**
* Returns a new CcSessQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcSessQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcSessQuery) {
return $criteria;
}
$query = new CcSessQuery();
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 CcSess|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcSessPeer::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 CcSess|CcSess[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcSessPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcSessPeer::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 CcSessQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcSessPeer::SESSID, $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 CcSess A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneBySessid($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 CcSessQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcSessPeer::SESSID, $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 CcSess A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "sessid", "userid", "login", "ts" FROM "cc_sess" WHERE "sessid" = :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 CcSess();
$obj->hydrate($row);
CcSessPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* Filter the query on the sessid column
*
* @param string $sessid 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 CcSessQuery The current query, for fluid interface
*/
public function filterBySessid($sessid = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($sessid)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $sessid)) {
$sessid = str_replace('*', '%', $sessid);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSessPeer::SESSID, $sessid, $comparison);
}
return $obj;
}
/**
* Filter the query on the userid column
*
* @param int|array $userid 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 CcSessQuery The current query, for fluid interface
*/
public function filterByUserid($userid = null, $comparison = null)
{
if (is_array($userid)) {
$useMinMax = false;
if (isset($userid['min'])) {
$this->addUsingAlias(CcSessPeer::USERID, $userid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($userid['max'])) {
$this->addUsingAlias(CcSessPeer::USERID, $userid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSessPeer::USERID, $userid, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcSess|CcSess[]|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 login column
*
* @param string $login 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 CcSessQuery The current query, for fluid interface
*/
public function filterByLogin($login = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($login)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $login)) {
$login = str_replace('*', '%', $login);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSessPeer::LOGIN, $login, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the ts column
*
* @param string|array $ts 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 CcSessQuery The current query, for fluid interface
*/
public function filterByTs($ts = null, $comparison = null)
{
if (is_array($ts)) {
$useMinMax = false;
if (isset($ts['min'])) {
$this->addUsingAlias(CcSessPeer::TS, $ts['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($ts['max'])) {
$this->addUsingAlias(CcSessPeer::TS, $ts['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSessPeer::TS, $ts, $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|CcSess[]|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 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 CcSessQuery The current query, for fluid interface
*/
public function filterByCcSubjs($ccSubjs, $comparison = null)
{
return $this
->addUsingAlias(CcSessPeer::USERID, $ccSubjs->getDbId(), $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* 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 CcSessQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = '', $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;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcSessQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* 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(CcSessPeer::SESSID, $key, Criteria::EQUAL);
}
/**
* Exclude object from result
*
* @param CcSess $ccSess Object to remove from the list of results
*
* @return CcSessQuery The current query, for fluid interface
*/
public function prune($ccSess = null)
{
if ($ccSess) {
$this->addUsingAlias(CcSessPeer::SESSID, $ccSess->getSessid(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcSessQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
} // BaseCcSessQuery
return $this->addUsingAlias(CcSessPeer::SESSID, $keys, Criteria::IN);
}
/**
* Filter the query on the sessid column
*
* Example usage:
* <code>
* $query->filterBySessid('fooValue'); // WHERE sessid = 'fooValue'
* $query->filterBySessid('%fooValue%'); // WHERE sessid LIKE '%fooValue%'
* </code>
*
* @param string $sessid 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 CcSessQuery The current query, for fluid interface
*/
public function filterBySessid($sessid = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($sessid)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $sessid)) {
$sessid = str_replace('*', '%', $sessid);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSessPeer::SESSID, $sessid, $comparison);
}
/**
* Filter the query on the userid column
*
* Example usage:
* <code>
* $query->filterByUserid(1234); // WHERE userid = 1234
* $query->filterByUserid(array(12, 34)); // WHERE userid IN (12, 34)
* $query->filterByUserid(array('min' => 12)); // WHERE userid >= 12
* $query->filterByUserid(array('max' => 12)); // WHERE userid <= 12
* </code>
*
* @see filterByCcSubjs()
*
* @param mixed $userid 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 CcSessQuery The current query, for fluid interface
*/
public function filterByUserid($userid = null, $comparison = null)
{
if (is_array($userid)) {
$useMinMax = false;
if (isset($userid['min'])) {
$this->addUsingAlias(CcSessPeer::USERID, $userid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($userid['max'])) {
$this->addUsingAlias(CcSessPeer::USERID, $userid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSessPeer::USERID, $userid, $comparison);
}
/**
* Filter the query on the login column
*
* Example usage:
* <code>
* $query->filterByLogin('fooValue'); // WHERE login = 'fooValue'
* $query->filterByLogin('%fooValue%'); // WHERE login LIKE '%fooValue%'
* </code>
*
* @param string $login 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 CcSessQuery The current query, for fluid interface
*/
public function filterByLogin($login = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($login)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $login)) {
$login = str_replace('*', '%', $login);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSessPeer::LOGIN, $login, $comparison);
}
/**
* Filter the query on the ts column
*
* Example usage:
* <code>
* $query->filterByTs('2011-03-14'); // WHERE ts = '2011-03-14'
* $query->filterByTs('now'); // WHERE ts = '2011-03-14'
* $query->filterByTs(array('max' => 'yesterday')); // WHERE ts < '2011-03-13'
* </code>
*
* @param mixed $ts 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 CcSessQuery The current query, for fluid interface
*/
public function filterByTs($ts = null, $comparison = null)
{
if (is_array($ts)) {
$useMinMax = false;
if (isset($ts['min'])) {
$this->addUsingAlias(CcSessPeer::TS, $ts['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($ts['max'])) {
$this->addUsingAlias(CcSessPeer::TS, $ts['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSessPeer::TS, $ts, $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 CcSessQuery 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(CcSessPeer::USERID, $ccSubjs->getDbId(), $comparison);
} elseif ($ccSubjs instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcSessPeer::USERID, $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 CcSessQuery 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 CcSess $ccSess Object to remove from the list of results
*
* @return CcSessQuery The current query, for fluid interface
*/
public function prune($ccSess = null)
{
if ($ccSess) {
$this->addUsingAlias(CcSessPeer::SESSID, $ccSess->getSessid(), 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

@ -4,368 +4,529 @@
/**
* Base class that represents a query for the 'cc_show_hosts' table.
*
*
*
* @method CcShowHostsQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcShowHostsQuery orderByDbShow($order = Criteria::ASC) Order by the show_id column
* @method CcShowHostsQuery orderByDbHost($order = Criteria::ASC) Order by the subjs_id column
*
* @method CcShowHostsQuery groupByDbId() Group by the id column
* @method CcShowHostsQuery groupByDbShow() Group by the show_id column
* @method CcShowHostsQuery groupByDbHost() Group by the subjs_id column
* @method CcShowHostsQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcShowHostsQuery orderByDbShow($order = Criteria::ASC) Order by the show_id column
* @method CcShowHostsQuery orderByDbHost($order = Criteria::ASC) Order by the subjs_id column
*
* @method CcShowHostsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcShowHostsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcShowHostsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcShowHostsQuery groupByDbId() Group by the id column
* @method CcShowHostsQuery groupByDbShow() Group by the show_id column
* @method CcShowHostsQuery groupByDbHost() Group by the subjs_id column
*
* @method CcShowHostsQuery leftJoinCcShow($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShow relation
* @method CcShowHostsQuery rightJoinCcShow($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShow relation
* @method CcShowHostsQuery innerJoinCcShow($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShow relation
* @method CcShowHostsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcShowHostsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcShowHostsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcShowHostsQuery leftJoinCcSubjs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcShowHostsQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcShowHostsQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
* @method CcShowHostsQuery leftJoinCcShow($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShow relation
* @method CcShowHostsQuery rightJoinCcShow($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShow relation
* @method CcShowHostsQuery innerJoinCcShow($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShow relation
*
* @method CcShowHosts findOne(PropelPDO $con = null) Return the first CcShowHosts matching the query
* @method CcShowHosts findOneOrCreate(PropelPDO $con = null) Return the first CcShowHosts matching the query, or a new CcShowHosts object populated from the query conditions when no match is found
* @method CcShowHostsQuery leftJoinCcSubjs($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcShowHostsQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcShowHostsQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
*
* @method CcShowHosts findOneByDbId(int $id) Return the first CcShowHosts filtered by the id column
* @method CcShowHosts findOneByDbShow(int $show_id) Return the first CcShowHosts filtered by the show_id column
* @method CcShowHosts findOneByDbHost(int $subjs_id) Return the first CcShowHosts filtered by the subjs_id column
* @method CcShowHosts findOne(PropelPDO $con = null) Return the first CcShowHosts matching the query
* @method CcShowHosts findOneOrCreate(PropelPDO $con = null) Return the first CcShowHosts matching the query, or a new CcShowHosts object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcShowHosts objects filtered by the id column
* @method array findByDbShow(int $show_id) Return CcShowHosts objects filtered by the show_id column
* @method array findByDbHost(int $subjs_id) Return CcShowHosts objects filtered by the subjs_id column
* @method CcShowHosts findOneByDbShow(int $show_id) Return the first CcShowHosts filtered by the show_id column
* @method CcShowHosts findOneByDbHost(int $subjs_id) Return the first CcShowHosts filtered by the subjs_id column
*
* @method array findByDbId(int $id) Return CcShowHosts objects filtered by the id column
* @method array findByDbShow(int $show_id) Return CcShowHosts objects filtered by the show_id column
* @method array findByDbHost(int $subjs_id) Return CcShowHosts objects filtered by the subjs_id column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcShowHostsQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcShowHostsQuery 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 = 'CcShowHosts';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcShowHostsQuery 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 = 'CcShowHosts', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcShowHostsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcShowHostsQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcShowHostsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcShowHostsQuery) {
return $criteria;
}
$query = new CcShowHostsQuery(null, null, $modelAlias);
/**
* Returns a new CcShowHostsQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcShowHostsQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcShowHostsQuery) {
return $criteria;
}
$query = new CcShowHostsQuery();
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 CcShowHosts|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcShowHostsPeer::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 CcShowHosts|CcShowHosts[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcShowHostsPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcShowHostsPeer::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 CcShowHostsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcShowHostsPeer::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 CcShowHosts 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 CcShowHostsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcShowHostsPeer::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 CcShowHosts A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "show_id", "subjs_id" FROM "cc_show_hosts" 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 CcShowHosts();
$obj->hydrate($row);
CcShowHostsPeer::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 CcShowHostsQuery 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(CcShowHostsPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the show_id column
*
* @param int|array $dbShow 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 CcShowHostsQuery The current query, for fluid interface
*/
public function filterByDbShow($dbShow = null, $comparison = null)
{
if (is_array($dbShow)) {
$useMinMax = false;
if (isset($dbShow['min'])) {
$this->addUsingAlias(CcShowHostsPeer::SHOW_ID, $dbShow['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbShow['max'])) {
$this->addUsingAlias(CcShowHostsPeer::SHOW_ID, $dbShow['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowHostsPeer::SHOW_ID, $dbShow, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcShowHosts|CcShowHosts[]|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 subjs_id column
*
* @param int|array $dbHost 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 CcShowHostsQuery The current query, for fluid interface
*/
public function filterByDbHost($dbHost = null, $comparison = null)
{
if (is_array($dbHost)) {
$useMinMax = false;
if (isset($dbHost['min'])) {
$this->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $dbHost['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbHost['max'])) {
$this->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $dbHost['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $dbHost, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query by a related CcShow object
*
* @param CcShow $ccShow the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowHostsQuery The current query, for fluid interface
*/
public function filterByCcShow($ccShow, $comparison = null)
{
return $this
->addUsingAlias(CcShowHostsPeer::SHOW_ID, $ccShow->getDbId(), $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|CcShowHosts[]|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);
/**
* Adds a JOIN clause to the query using the CcShow relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowHostsQuery The current query, for fluid interface
*/
public function joinCcShow($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShow');
// 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, 'CcShow');
}
return $this;
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Use the CcShow relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcShow($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcShowHostsQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* 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 CcShowHostsQuery The current query, for fluid interface
*/
public function filterByCcSubjs($ccSubjs, $comparison = null)
{
return $this
->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $ccSubjs->getDbId(), $comparison);
}
return $this->addUsingAlias(CcShowHostsPeer::ID, $key, Criteria::EQUAL);
}
/**
* 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 CcShowHostsQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = '', $joinType = Criteria::INNER_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;
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcShowHostsQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
/**
* 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::INNER_JOIN)
{
return $this
->joinCcSubjs($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
}
return $this->addUsingAlias(CcShowHostsPeer::ID, $keys, Criteria::IN);
}
/**
* Exclude object from result
*
* @param CcShowHosts $ccShowHosts Object to remove from the list of results
*
* @return CcShowHostsQuery The current query, for fluid interface
*/
public function prune($ccShowHosts = null)
{
if ($ccShowHosts) {
$this->addUsingAlias(CcShowHostsPeer::ID, $ccShowHosts->getDbId(), Criteria::NOT_EQUAL);
}
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 CcShowHostsQuery 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(CcShowHostsPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcShowHostsPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
} // BaseCcShowHostsQuery
return $this->addUsingAlias(CcShowHostsPeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the show_id column
*
* Example usage:
* <code>
* $query->filterByDbShow(1234); // WHERE show_id = 1234
* $query->filterByDbShow(array(12, 34)); // WHERE show_id IN (12, 34)
* $query->filterByDbShow(array('min' => 12)); // WHERE show_id >= 12
* $query->filterByDbShow(array('max' => 12)); // WHERE show_id <= 12
* </code>
*
* @see filterByCcShow()
*
* @param mixed $dbShow 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 CcShowHostsQuery The current query, for fluid interface
*/
public function filterByDbShow($dbShow = null, $comparison = null)
{
if (is_array($dbShow)) {
$useMinMax = false;
if (isset($dbShow['min'])) {
$this->addUsingAlias(CcShowHostsPeer::SHOW_ID, $dbShow['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbShow['max'])) {
$this->addUsingAlias(CcShowHostsPeer::SHOW_ID, $dbShow['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowHostsPeer::SHOW_ID, $dbShow, $comparison);
}
/**
* Filter the query on the subjs_id column
*
* Example usage:
* <code>
* $query->filterByDbHost(1234); // WHERE subjs_id = 1234
* $query->filterByDbHost(array(12, 34)); // WHERE subjs_id IN (12, 34)
* $query->filterByDbHost(array('min' => 12)); // WHERE subjs_id >= 12
* $query->filterByDbHost(array('max' => 12)); // WHERE subjs_id <= 12
* </code>
*
* @see filterByCcSubjs()
*
* @param mixed $dbHost 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 CcShowHostsQuery The current query, for fluid interface
*/
public function filterByDbHost($dbHost = null, $comparison = null)
{
if (is_array($dbHost)) {
$useMinMax = false;
if (isset($dbHost['min'])) {
$this->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $dbHost['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbHost['max'])) {
$this->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $dbHost['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $dbHost, $comparison);
}
/**
* Filter the query by a related CcShow object
*
* @param CcShow|PropelObjectCollection $ccShow The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowHostsQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcShow($ccShow, $comparison = null)
{
if ($ccShow instanceof CcShow) {
return $this
->addUsingAlias(CcShowHostsPeer::SHOW_ID, $ccShow->getDbId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcShowHostsPeer::SHOW_ID, $ccShow->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcShow() only accepts arguments of type CcShow or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcShow relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowHostsQuery The current query, for fluid interface
*/
public function joinCcShow($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShow');
// 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, 'CcShow');
}
return $this;
}
/**
* Use the CcShow relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcShow($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
}
/**
* 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 CcShowHostsQuery 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(CcShowHostsPeer::SUBJS_ID, $ccSubjs->getDbId(), $comparison);
} elseif ($ccSubjs instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $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 CcShowHostsQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = null, $joinType = Criteria::INNER_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::INNER_JOIN)
{
return $this
->joinCcSubjs($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
}
/**
* Exclude object from result
*
* @param CcShowHosts $ccShowHosts Object to remove from the list of results
*
* @return CcShowHostsQuery The current query, for fluid interface
*/
public function prune($ccShowHosts = null)
{
if ($ccShowHosts) {
$this->addUsingAlias(CcShowHostsPeer::ID, $ccShowHosts->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

@ -4,326 +4,481 @@
/**
* Base class that represents a query for the 'cc_show_rebroadcast' table.
*
*
*
* @method CcShowRebroadcastQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcShowRebroadcastQuery orderByDbDayOffset($order = Criteria::ASC) Order by the day_offset column
* @method CcShowRebroadcastQuery orderByDbStartTime($order = Criteria::ASC) Order by the start_time column
* @method CcShowRebroadcastQuery orderByDbShowId($order = Criteria::ASC) Order by the show_id column
*
* @method CcShowRebroadcastQuery groupByDbId() Group by the id column
* @method CcShowRebroadcastQuery groupByDbDayOffset() Group by the day_offset column
* @method CcShowRebroadcastQuery groupByDbStartTime() Group by the start_time column
* @method CcShowRebroadcastQuery groupByDbShowId() Group by the show_id column
* @method CcShowRebroadcastQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcShowRebroadcastQuery orderByDbDayOffset($order = Criteria::ASC) Order by the day_offset column
* @method CcShowRebroadcastQuery orderByDbStartTime($order = Criteria::ASC) Order by the start_time column
* @method CcShowRebroadcastQuery orderByDbShowId($order = Criteria::ASC) Order by the show_id column
*
* @method CcShowRebroadcastQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcShowRebroadcastQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcShowRebroadcastQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcShowRebroadcastQuery groupByDbId() Group by the id column
* @method CcShowRebroadcastQuery groupByDbDayOffset() Group by the day_offset column
* @method CcShowRebroadcastQuery groupByDbStartTime() Group by the start_time column
* @method CcShowRebroadcastQuery groupByDbShowId() Group by the show_id column
*
* @method CcShowRebroadcastQuery leftJoinCcShow($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcShow relation
* @method CcShowRebroadcastQuery rightJoinCcShow($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcShow relation
* @method CcShowRebroadcastQuery innerJoinCcShow($relationAlias = '') Adds a INNER JOIN clause to the query using the CcShow relation
* @method CcShowRebroadcastQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcShowRebroadcastQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcShowRebroadcastQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcShowRebroadcast findOne(PropelPDO $con = null) Return the first CcShowRebroadcast matching the query
* @method CcShowRebroadcast findOneOrCreate(PropelPDO $con = null) Return the first CcShowRebroadcast matching the query, or a new CcShowRebroadcast object populated from the query conditions when no match is found
* @method CcShowRebroadcastQuery leftJoinCcShow($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcShow relation
* @method CcShowRebroadcastQuery rightJoinCcShow($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcShow relation
* @method CcShowRebroadcastQuery innerJoinCcShow($relationAlias = null) Adds a INNER JOIN clause to the query using the CcShow relation
*
* @method CcShowRebroadcast findOneByDbId(int $id) Return the first CcShowRebroadcast filtered by the id column
* @method CcShowRebroadcast findOneByDbDayOffset(string $day_offset) Return the first CcShowRebroadcast filtered by the day_offset column
* @method CcShowRebroadcast findOneByDbStartTime(string $start_time) Return the first CcShowRebroadcast filtered by the start_time column
* @method CcShowRebroadcast findOneByDbShowId(int $show_id) Return the first CcShowRebroadcast filtered by the show_id column
* @method CcShowRebroadcast findOne(PropelPDO $con = null) Return the first CcShowRebroadcast matching the query
* @method CcShowRebroadcast findOneOrCreate(PropelPDO $con = null) Return the first CcShowRebroadcast matching the query, or a new CcShowRebroadcast object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcShowRebroadcast objects filtered by the id column
* @method array findByDbDayOffset(string $day_offset) Return CcShowRebroadcast objects filtered by the day_offset column
* @method array findByDbStartTime(string $start_time) Return CcShowRebroadcast objects filtered by the start_time column
* @method array findByDbShowId(int $show_id) Return CcShowRebroadcast objects filtered by the show_id column
* @method CcShowRebroadcast findOneByDbDayOffset(string $day_offset) Return the first CcShowRebroadcast filtered by the day_offset column
* @method CcShowRebroadcast findOneByDbStartTime(string $start_time) Return the first CcShowRebroadcast filtered by the start_time column
* @method CcShowRebroadcast findOneByDbShowId(int $show_id) Return the first CcShowRebroadcast filtered by the show_id column
*
* @method array findByDbId(int $id) Return CcShowRebroadcast objects filtered by the id column
* @method array findByDbDayOffset(string $day_offset) Return CcShowRebroadcast objects filtered by the day_offset column
* @method array findByDbStartTime(string $start_time) Return CcShowRebroadcast objects filtered by the start_time column
* @method array findByDbShowId(int $show_id) Return CcShowRebroadcast objects filtered by the show_id column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcShowRebroadcastQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcShowRebroadcastQuery 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 = 'CcShowRebroadcast';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcShowRebroadcastQuery 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 = 'CcShowRebroadcast', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcShowRebroadcastQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcShowRebroadcastQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcShowRebroadcastQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcShowRebroadcastQuery) {
return $criteria;
}
$query = new CcShowRebroadcastQuery(null, null, $modelAlias);
/**
* Returns a new CcShowRebroadcastQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcShowRebroadcastQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcShowRebroadcastQuery) {
return $criteria;
}
$query = new CcShowRebroadcastQuery();
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 CcShowRebroadcast|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcShowRebroadcastPeer::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 CcShowRebroadcast|CcShowRebroadcast[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcShowRebroadcastPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcShowRebroadcastPeer::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 CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcShowRebroadcastPeer::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 CcShowRebroadcast 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 CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcShowRebroadcastPeer::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 CcShowRebroadcast A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "day_offset", "start_time", "show_id" FROM "cc_show_rebroadcast" 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 CcShowRebroadcast();
$obj->hydrate($row);
CcShowRebroadcastPeer::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 CcShowRebroadcastQuery 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(CcShowRebroadcastPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the day_offset column
*
* @param string $dbDayOffset 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 CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByDbDayOffset($dbDayOffset = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbDayOffset)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbDayOffset)) {
$dbDayOffset = str_replace('*', '%', $dbDayOffset);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcShowRebroadcastPeer::DAY_OFFSET, $dbDayOffset, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcShowRebroadcast|CcShowRebroadcast[]|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 CcShowRebroadcastQuery 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(CcShowRebroadcastPeer::START_TIME, $dbStartTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbStartTime['max'])) {
$this->addUsingAlias(CcShowRebroadcastPeer::START_TIME, $dbStartTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowRebroadcastPeer::START_TIME, $dbStartTime, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the show_id column
*
* @param int|array $dbShowId 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 CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByDbShowId($dbShowId = null, $comparison = null)
{
if (is_array($dbShowId)) {
$useMinMax = false;
if (isset($dbShowId['min'])) {
$this->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $dbShowId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbShowId['max'])) {
$this->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $dbShowId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $dbShowId, $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|CcShowRebroadcast[]|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 CcShow object
*
* @param CcShow $ccShow the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByCcShow($ccShow, $comparison = null)
{
return $this
->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $ccShow->getDbId(), $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Adds a JOIN clause to the query using the CcShow relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
*/
public function joinCcShow($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShow');
// 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, 'CcShow');
}
return $this;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Use the CcShow relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcShow($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
}
return $this->addUsingAlias(CcShowRebroadcastPeer::ID, $key, Criteria::EQUAL);
}
/**
* Exclude object from result
*
* @param CcShowRebroadcast $ccShowRebroadcast Object to remove from the list of results
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
*/
public function prune($ccShowRebroadcast = null)
{
if ($ccShowRebroadcast) {
$this->addUsingAlias(CcShowRebroadcastPeer::ID, $ccShowRebroadcast->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
} // BaseCcShowRebroadcastQuery
return $this->addUsingAlias(CcShowRebroadcastPeer::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 CcShowRebroadcastQuery 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(CcShowRebroadcastPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcShowRebroadcastPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowRebroadcastPeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the day_offset column
*
* Example usage:
* <code>
* $query->filterByDbDayOffset('fooValue'); // WHERE day_offset = 'fooValue'
* $query->filterByDbDayOffset('%fooValue%'); // WHERE day_offset LIKE '%fooValue%'
* </code>
*
* @param string $dbDayOffset 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 CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByDbDayOffset($dbDayOffset = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbDayOffset)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbDayOffset)) {
$dbDayOffset = str_replace('*', '%', $dbDayOffset);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcShowRebroadcastPeer::DAY_OFFSET, $dbDayOffset, $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 CcShowRebroadcastQuery 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(CcShowRebroadcastPeer::START_TIME, $dbStartTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbStartTime['max'])) {
$this->addUsingAlias(CcShowRebroadcastPeer::START_TIME, $dbStartTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowRebroadcastPeer::START_TIME, $dbStartTime, $comparison);
}
/**
* Filter the query on the show_id column
*
* Example usage:
* <code>
* $query->filterByDbShowId(1234); // WHERE show_id = 1234
* $query->filterByDbShowId(array(12, 34)); // WHERE show_id IN (12, 34)
* $query->filterByDbShowId(array('min' => 12)); // WHERE show_id >= 12
* $query->filterByDbShowId(array('max' => 12)); // WHERE show_id <= 12
* </code>
*
* @see filterByCcShow()
*
* @param mixed $dbShowId 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 CcShowRebroadcastQuery The current query, for fluid interface
*/
public function filterByDbShowId($dbShowId = null, $comparison = null)
{
if (is_array($dbShowId)) {
$useMinMax = false;
if (isset($dbShowId['min'])) {
$this->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $dbShowId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbShowId['max'])) {
$this->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $dbShowId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $dbShowId, $comparison);
}
/**
* Filter the query by a related CcShow object
*
* @param CcShow|PropelObjectCollection $ccShow The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcShow($ccShow, $comparison = null)
{
if ($ccShow instanceof CcShow) {
return $this
->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $ccShow->getDbId(), $comparison);
} elseif ($ccShow instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcShowRebroadcastPeer::SHOW_ID, $ccShow->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcShow() only accepts arguments of type CcShow or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcShow relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
*/
public function joinCcShow($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcShow');
// 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, 'CcShow');
}
return $this;
}
/**
* Use the CcShow relation CcShow object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcShowQuery A secondary query class using the current class as primary query
*/
public function useCcShowQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcShow($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcShow', 'CcShowQuery');
}
/**
* Exclude object from result
*
* @param CcShowRebroadcast $ccShowRebroadcast Object to remove from the list of results
*
* @return CcShowRebroadcastQuery The current query, for fluid interface
*/
public function prune($ccShowRebroadcast = null)
{
if ($ccShowRebroadcast) {
$this->addUsingAlias(CcShowRebroadcastPeer::ID, $ccShowRebroadcast->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

@ -4,302 +4,457 @@
/**
* Base class that represents a query for the 'cc_smemb' table.
*
*
*
* @method CcSmembQuery orderById($order = Criteria::ASC) Order by the id column
* @method CcSmembQuery orderByUid($order = Criteria::ASC) Order by the uid column
* @method CcSmembQuery orderByGid($order = Criteria::ASC) Order by the gid column
* @method CcSmembQuery orderByLevel($order = Criteria::ASC) Order by the level column
* @method CcSmembQuery orderByMid($order = Criteria::ASC) Order by the mid column
*
* @method CcSmembQuery groupById() Group by the id column
* @method CcSmembQuery groupByUid() Group by the uid column
* @method CcSmembQuery groupByGid() Group by the gid column
* @method CcSmembQuery groupByLevel() Group by the level column
* @method CcSmembQuery groupByMid() Group by the mid column
* @method CcSmembQuery orderById($order = Criteria::ASC) Order by the id column
* @method CcSmembQuery orderByUid($order = Criteria::ASC) Order by the uid column
* @method CcSmembQuery orderByGid($order = Criteria::ASC) Order by the gid column
* @method CcSmembQuery orderByLevel($order = Criteria::ASC) Order by the level column
* @method CcSmembQuery orderByMid($order = Criteria::ASC) Order by the mid column
*
* @method CcSmembQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSmembQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSmembQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcSmembQuery groupById() Group by the id column
* @method CcSmembQuery groupByUid() Group by the uid column
* @method CcSmembQuery groupByGid() Group by the gid column
* @method CcSmembQuery groupByLevel() Group by the level column
* @method CcSmembQuery groupByMid() Group by the mid column
*
* @method CcSmemb findOne(PropelPDO $con = null) Return the first CcSmemb matching the query
* @method CcSmemb findOneOrCreate(PropelPDO $con = null) Return the first CcSmemb matching the query, or a new CcSmemb object populated from the query conditions when no match is found
* @method CcSmembQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSmembQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSmembQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcSmemb findOneById(int $id) Return the first CcSmemb filtered by the id column
* @method CcSmemb findOneByUid(int $uid) Return the first CcSmemb filtered by the uid column
* @method CcSmemb findOneByGid(int $gid) Return the first CcSmemb filtered by the gid column
* @method CcSmemb findOneByLevel(int $level) Return the first CcSmemb filtered by the level column
* @method CcSmemb findOneByMid(int $mid) Return the first CcSmemb filtered by the mid column
* @method CcSmemb findOne(PropelPDO $con = null) Return the first CcSmemb matching the query
* @method CcSmemb findOneOrCreate(PropelPDO $con = null) Return the first CcSmemb matching the query, or a new CcSmemb object populated from the query conditions when no match is found
*
* @method array findById(int $id) Return CcSmemb objects filtered by the id column
* @method array findByUid(int $uid) Return CcSmemb objects filtered by the uid column
* @method array findByGid(int $gid) Return CcSmemb objects filtered by the gid column
* @method array findByLevel(int $level) Return CcSmemb objects filtered by the level column
* @method array findByMid(int $mid) Return CcSmemb objects filtered by the mid column
* @method CcSmemb findOneByUid(int $uid) Return the first CcSmemb filtered by the uid column
* @method CcSmemb findOneByGid(int $gid) Return the first CcSmemb filtered by the gid column
* @method CcSmemb findOneByLevel(int $level) Return the first CcSmemb filtered by the level column
* @method CcSmemb findOneByMid(int $mid) Return the first CcSmemb filtered by the mid column
*
* @method array findById(int $id) Return CcSmemb objects filtered by the id column
* @method array findByUid(int $uid) Return CcSmemb objects filtered by the uid column
* @method array findByGid(int $gid) Return CcSmemb objects filtered by the gid column
* @method array findByLevel(int $level) Return CcSmemb objects filtered by the level column
* @method array findByMid(int $mid) Return CcSmemb objects filtered by the mid column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcSmembQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcSmembQuery 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 = 'CcSmemb';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcSmembQuery 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 = 'CcSmemb', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcSmembQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcSmembQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcSmembQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcSmembQuery) {
return $criteria;
}
$query = new CcSmembQuery(null, null, $modelAlias);
/**
* Returns a new CcSmembQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcSmembQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcSmembQuery) {
return $criteria;
}
$query = new CcSmembQuery();
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 CcSmemb|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcSmembPeer::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 CcSmemb|CcSmemb[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcSmembPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcSmembPeer::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 CcSmembQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcSmembPeer::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 CcSmemb 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcSmembPeer::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 CcSmemb A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "uid", "gid", "level", "mid" FROM "cc_smemb" 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 CcSmemb();
$obj->hydrate($row);
CcSmembPeer::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 CcSmembQuery 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(CcSmembPeer::ID, $id, $comparison);
}
return $obj;
}
/**
* Filter the query on the uid column
*
* @param int|array $uid 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByUid($uid = null, $comparison = null)
{
if (is_array($uid)) {
$useMinMax = false;
if (isset($uid['min'])) {
$this->addUsingAlias(CcSmembPeer::UID, $uid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($uid['max'])) {
$this->addUsingAlias(CcSmembPeer::UID, $uid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::UID, $uid, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcSmemb|CcSmemb[]|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 gid column
*
* @param int|array $gid 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByGid($gid = null, $comparison = null)
{
if (is_array($gid)) {
$useMinMax = false;
if (isset($gid['min'])) {
$this->addUsingAlias(CcSmembPeer::GID, $gid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($gid['max'])) {
$this->addUsingAlias(CcSmembPeer::GID, $gid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::GID, $gid, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the level column
*
* @param int|array $level 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByLevel($level = null, $comparison = null)
{
if (is_array($level)) {
$useMinMax = false;
if (isset($level['min'])) {
$this->addUsingAlias(CcSmembPeer::LEVEL, $level['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($level['max'])) {
$this->addUsingAlias(CcSmembPeer::LEVEL, $level['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::LEVEL, $level, $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|CcSmemb[]|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 mid column
*
* @param int|array $mid 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByMid($mid = null, $comparison = null)
{
if (is_array($mid)) {
$useMinMax = false;
if (isset($mid['min'])) {
$this->addUsingAlias(CcSmembPeer::MID, $mid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($mid['max'])) {
$this->addUsingAlias(CcSmembPeer::MID, $mid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::MID, $mid, $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Exclude object from result
*
* @param CcSmemb $ccSmemb Object to remove from the list of results
*
* @return CcSmembQuery The current query, for fluid interface
*/
public function prune($ccSmemb = null)
{
if ($ccSmemb) {
$this->addUsingAlias(CcSmembPeer::ID, $ccSmemb->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcSmembQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
} // BaseCcSmembQuery
return $this->addUsingAlias(CcSmembPeer::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 CcSmembQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcSmembPeer::ID, $keys, Criteria::IN);
}
/**
* 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 CcSmembQuery 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(CcSmembPeer::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(CcSmembPeer::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::ID, $id, $comparison);
}
/**
* Filter the query on the uid column
*
* Example usage:
* <code>
* $query->filterByUid(1234); // WHERE uid = 1234
* $query->filterByUid(array(12, 34)); // WHERE uid IN (12, 34)
* $query->filterByUid(array('min' => 12)); // WHERE uid >= 12
* $query->filterByUid(array('max' => 12)); // WHERE uid <= 12
* </code>
*
* @param mixed $uid 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByUid($uid = null, $comparison = null)
{
if (is_array($uid)) {
$useMinMax = false;
if (isset($uid['min'])) {
$this->addUsingAlias(CcSmembPeer::UID, $uid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($uid['max'])) {
$this->addUsingAlias(CcSmembPeer::UID, $uid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::UID, $uid, $comparison);
}
/**
* Filter the query on the gid column
*
* Example usage:
* <code>
* $query->filterByGid(1234); // WHERE gid = 1234
* $query->filterByGid(array(12, 34)); // WHERE gid IN (12, 34)
* $query->filterByGid(array('min' => 12)); // WHERE gid >= 12
* $query->filterByGid(array('max' => 12)); // WHERE gid <= 12
* </code>
*
* @param mixed $gid 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByGid($gid = null, $comparison = null)
{
if (is_array($gid)) {
$useMinMax = false;
if (isset($gid['min'])) {
$this->addUsingAlias(CcSmembPeer::GID, $gid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($gid['max'])) {
$this->addUsingAlias(CcSmembPeer::GID, $gid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::GID, $gid, $comparison);
}
/**
* Filter the query on the level column
*
* Example usage:
* <code>
* $query->filterByLevel(1234); // WHERE level = 1234
* $query->filterByLevel(array(12, 34)); // WHERE level IN (12, 34)
* $query->filterByLevel(array('min' => 12)); // WHERE level >= 12
* $query->filterByLevel(array('max' => 12)); // WHERE level <= 12
* </code>
*
* @param mixed $level 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByLevel($level = null, $comparison = null)
{
if (is_array($level)) {
$useMinMax = false;
if (isset($level['min'])) {
$this->addUsingAlias(CcSmembPeer::LEVEL, $level['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($level['max'])) {
$this->addUsingAlias(CcSmembPeer::LEVEL, $level['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::LEVEL, $level, $comparison);
}
/**
* Filter the query on the mid column
*
* Example usage:
* <code>
* $query->filterByMid(1234); // WHERE mid = 1234
* $query->filterByMid(array(12, 34)); // WHERE mid IN (12, 34)
* $query->filterByMid(array('min' => 12)); // WHERE mid >= 12
* $query->filterByMid(array('max' => 12)); // WHERE mid <= 12
* </code>
*
* @param mixed $mid 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 CcSmembQuery The current query, for fluid interface
*/
public function filterByMid($mid = null, $comparison = null)
{
if (is_array($mid)) {
$useMinMax = false;
if (isset($mid['min'])) {
$this->addUsingAlias(CcSmembPeer::MID, $mid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($mid['max'])) {
$this->addUsingAlias(CcSmembPeer::MID, $mid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSmembPeer::MID, $mid, $comparison);
}
/**
* Exclude object from result
*
* @param CcSmemb $ccSmemb Object to remove from the list of results
*
* @return CcSmembQuery The current query, for fluid interface
*/
public function prune($ccSmemb = null)
{
if ($ccSmemb) {
$this->addUsingAlias(CcSmembPeer::ID, $ccSmemb->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

View file

@ -4,219 +4,326 @@
/**
* Base class that represents a query for the 'cc_stream_setting' table.
*
*
*
* @method CcStreamSettingQuery orderByDbKeyName($order = Criteria::ASC) Order by the keyname column
* @method CcStreamSettingQuery orderByDbValue($order = Criteria::ASC) Order by the value column
* @method CcStreamSettingQuery orderByDbType($order = Criteria::ASC) Order by the type column
*
* @method CcStreamSettingQuery groupByDbKeyName() Group by the keyname column
* @method CcStreamSettingQuery groupByDbValue() Group by the value column
* @method CcStreamSettingQuery groupByDbType() Group by the type column
* @method CcStreamSettingQuery orderByDbKeyName($order = Criteria::ASC) Order by the keyname column
* @method CcStreamSettingQuery orderByDbValue($order = Criteria::ASC) Order by the value column
* @method CcStreamSettingQuery orderByDbType($order = Criteria::ASC) Order by the type column
*
* @method CcStreamSettingQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcStreamSettingQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcStreamSettingQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcStreamSettingQuery groupByDbKeyName() Group by the keyname column
* @method CcStreamSettingQuery groupByDbValue() Group by the value column
* @method CcStreamSettingQuery groupByDbType() Group by the type column
*
* @method CcStreamSetting findOne(PropelPDO $con = null) Return the first CcStreamSetting matching the query
* @method CcStreamSetting findOneOrCreate(PropelPDO $con = null) Return the first CcStreamSetting matching the query, or a new CcStreamSetting object populated from the query conditions when no match is found
* @method CcStreamSettingQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcStreamSettingQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcStreamSettingQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcStreamSetting findOneByDbKeyName(string $keyname) Return the first CcStreamSetting filtered by the keyname column
* @method CcStreamSetting findOneByDbValue(string $value) Return the first CcStreamSetting filtered by the value column
* @method CcStreamSetting findOneByDbType(string $type) Return the first CcStreamSetting filtered by the type column
* @method CcStreamSetting findOne(PropelPDO $con = null) Return the first CcStreamSetting matching the query
* @method CcStreamSetting findOneOrCreate(PropelPDO $con = null) Return the first CcStreamSetting matching the query, or a new CcStreamSetting object populated from the query conditions when no match is found
*
* @method array findByDbKeyName(string $keyname) Return CcStreamSetting objects filtered by the keyname column
* @method array findByDbValue(string $value) Return CcStreamSetting objects filtered by the value column
* @method array findByDbType(string $type) Return CcStreamSetting objects filtered by the type column
* @method CcStreamSetting findOneByDbValue(string $value) Return the first CcStreamSetting filtered by the value column
* @method CcStreamSetting findOneByDbType(string $type) Return the first CcStreamSetting filtered by the type column
*
* @method array findByDbKeyName(string $keyname) Return CcStreamSetting objects filtered by the keyname column
* @method array findByDbValue(string $value) Return CcStreamSetting objects filtered by the value column
* @method array findByDbType(string $type) Return CcStreamSetting objects filtered by the type column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcStreamSettingQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcStreamSettingQuery 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 = 'CcStreamSetting';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcStreamSettingQuery 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 = 'CcStreamSetting', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcStreamSettingQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcStreamSettingQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcStreamSettingQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcStreamSettingQuery) {
return $criteria;
}
$query = new CcStreamSettingQuery(null, null, $modelAlias);
/**
* Returns a new CcStreamSettingQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcStreamSettingQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcStreamSettingQuery) {
return $criteria;
}
$query = new CcStreamSettingQuery();
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 CcStreamSetting|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcStreamSettingPeer::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 CcStreamSetting|CcStreamSetting[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcStreamSettingPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcStreamSettingPeer::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 CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $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 CcStreamSetting A model object, or null if the key is not found
* @throws PropelException
*/
public function findOneByDbKeyName($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 CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $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 CcStreamSetting A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "keyname", "value", "type" FROM "cc_stream_setting" WHERE "keyname" = :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 CcStreamSetting();
$obj->hydrate($row);
CcStreamSettingPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
/**
* Filter the query on the keyname column
*
* @param string $dbKeyName 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 CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByDbKeyName($dbKeyName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbKeyName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbKeyName)) {
$dbKeyName = str_replace('*', '%', $dbKeyName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $dbKeyName, $comparison);
}
return $obj;
}
/**
* 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 CcStreamSettingQuery 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(CcStreamSettingPeer::VALUE, $dbValue, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcStreamSetting|CcStreamSetting[]|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 $dbType 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 CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByDbType($dbType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbType)) {
$dbType = str_replace('*', '%', $dbType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcStreamSettingPeer::TYPE, $dbType, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Exclude object from result
*
* @param CcStreamSetting $ccStreamSetting Object to remove from the list of results
*
* @return CcStreamSettingQuery The current query, for fluid interface
*/
public function prune($ccStreamSetting = null)
{
if ($ccStreamSetting) {
$this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $ccStreamSetting->getDbKeyName(), Criteria::NOT_EQUAL);
}
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|CcStreamSetting[]|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);
} // BaseCcStreamSettingQuery
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $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 CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $keys, Criteria::IN);
}
/**
* Filter the query on the keyname column
*
* Example usage:
* <code>
* $query->filterByDbKeyName('fooValue'); // WHERE keyname = 'fooValue'
* $query->filterByDbKeyName('%fooValue%'); // WHERE keyname LIKE '%fooValue%'
* </code>
*
* @param string $dbKeyName 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 CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByDbKeyName($dbKeyName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbKeyName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbKeyName)) {
$dbKeyName = str_replace('*', '%', $dbKeyName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $dbKeyName, $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 CcStreamSettingQuery 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(CcStreamSettingPeer::VALUE, $dbValue, $comparison);
}
/**
* Filter the query on the type column
*
* Example usage:
* <code>
* $query->filterByDbType('fooValue'); // WHERE type = 'fooValue'
* $query->filterByDbType('%fooValue%'); // WHERE type LIKE '%fooValue%'
* </code>
*
* @param string $dbType 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 CcStreamSettingQuery The current query, for fluid interface
*/
public function filterByDbType($dbType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbType)) {
$dbType = str_replace('*', '%', $dbType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcStreamSettingPeer::TYPE, $dbType, $comparison);
}
/**
* Exclude object from result
*
* @param CcStreamSetting $ccStreamSetting Object to remove from the list of results
*
* @return CcStreamSettingQuery The current query, for fluid interface
*/
public function prune($ccStreamSetting = null)
{
if ($ccStreamSetting) {
$this->addUsingAlias(CcStreamSettingPeer::KEYNAME, $ccStreamSetting->getDbKeyName(), 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

File diff suppressed because it is too large Load diff

View file

@ -4,352 +4,514 @@
/**
* Base class that represents a query for the 'cc_subjs_token' table.
*
*
*
* @method CcSubjsTokenQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcSubjsTokenQuery orderByDbUserId($order = Criteria::ASC) Order by the user_id column
* @method CcSubjsTokenQuery orderByDbAction($order = Criteria::ASC) Order by the action column
* @method CcSubjsTokenQuery orderByDbToken($order = Criteria::ASC) Order by the token column
* @method CcSubjsTokenQuery orderByDbCreated($order = Criteria::ASC) Order by the created column
*
* @method CcSubjsTokenQuery groupByDbId() Group by the id column
* @method CcSubjsTokenQuery groupByDbUserId() Group by the user_id column
* @method CcSubjsTokenQuery groupByDbAction() Group by the action column
* @method CcSubjsTokenQuery groupByDbToken() Group by the token column
* @method CcSubjsTokenQuery groupByDbCreated() Group by the created column
* @method CcSubjsTokenQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcSubjsTokenQuery orderByDbUserId($order = Criteria::ASC) Order by the user_id column
* @method CcSubjsTokenQuery orderByDbAction($order = Criteria::ASC) Order by the action column
* @method CcSubjsTokenQuery orderByDbToken($order = Criteria::ASC) Order by the token column
* @method CcSubjsTokenQuery orderByDbCreated($order = Criteria::ASC) Order by the created column
*
* @method CcSubjsTokenQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSubjsTokenQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSubjsTokenQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcSubjsTokenQuery groupByDbId() Group by the id column
* @method CcSubjsTokenQuery groupByDbUserId() Group by the user_id column
* @method CcSubjsTokenQuery groupByDbAction() Group by the action column
* @method CcSubjsTokenQuery groupByDbToken() Group by the token column
* @method CcSubjsTokenQuery groupByDbCreated() Group by the created column
*
* @method CcSubjsTokenQuery leftJoinCcSubjs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcSubjsTokenQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcSubjsTokenQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
* @method CcSubjsTokenQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSubjsTokenQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcSubjsTokenQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcSubjsToken findOne(PropelPDO $con = null) Return the first CcSubjsToken matching the query
* @method CcSubjsToken findOneOrCreate(PropelPDO $con = null) Return the first CcSubjsToken matching the query, or a new CcSubjsToken object populated from the query conditions when no match is found
* @method CcSubjsTokenQuery leftJoinCcSubjs($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSubjs relation
* @method CcSubjsTokenQuery rightJoinCcSubjs($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSubjs relation
* @method CcSubjsTokenQuery innerJoinCcSubjs($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSubjs relation
*
* @method CcSubjsToken findOneByDbId(int $id) Return the first CcSubjsToken filtered by the id column
* @method CcSubjsToken findOneByDbUserId(int $user_id) Return the first CcSubjsToken filtered by the user_id column
* @method CcSubjsToken findOneByDbAction(string $action) Return the first CcSubjsToken filtered by the action column
* @method CcSubjsToken findOneByDbToken(string $token) Return the first CcSubjsToken filtered by the token column
* @method CcSubjsToken findOneByDbCreated(string $created) Return the first CcSubjsToken filtered by the created column
* @method CcSubjsToken findOne(PropelPDO $con = null) Return the first CcSubjsToken matching the query
* @method CcSubjsToken findOneOrCreate(PropelPDO $con = null) Return the first CcSubjsToken matching the query, or a new CcSubjsToken object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcSubjsToken objects filtered by the id column
* @method array findByDbUserId(int $user_id) Return CcSubjsToken objects filtered by the user_id column
* @method array findByDbAction(string $action) Return CcSubjsToken objects filtered by the action column
* @method array findByDbToken(string $token) Return CcSubjsToken objects filtered by the token column
* @method array findByDbCreated(string $created) Return CcSubjsToken objects filtered by the created column
* @method CcSubjsToken findOneByDbUserId(int $user_id) Return the first CcSubjsToken filtered by the user_id column
* @method CcSubjsToken findOneByDbAction(string $action) Return the first CcSubjsToken filtered by the action column
* @method CcSubjsToken findOneByDbToken(string $token) Return the first CcSubjsToken filtered by the token column
* @method CcSubjsToken findOneByDbCreated(string $created) Return the first CcSubjsToken filtered by the created column
*
* @method array findByDbId(int $id) Return CcSubjsToken objects filtered by the id column
* @method array findByDbUserId(int $user_id) Return CcSubjsToken objects filtered by the user_id column
* @method array findByDbAction(string $action) Return CcSubjsToken objects filtered by the action column
* @method array findByDbToken(string $token) Return CcSubjsToken objects filtered by the token column
* @method array findByDbCreated(string $created) Return CcSubjsToken objects filtered by the created column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcSubjsTokenQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcSubjsTokenQuery 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 = 'CcSubjsToken';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcSubjsTokenQuery 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 = 'CcSubjsToken', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcSubjsTokenQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcSubjsTokenQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcSubjsTokenQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcSubjsTokenQuery) {
return $criteria;
}
$query = new CcSubjsTokenQuery(null, null, $modelAlias);
/**
* Returns a new CcSubjsTokenQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcSubjsTokenQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcSubjsTokenQuery) {
return $criteria;
}
$query = new CcSubjsTokenQuery();
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 CcSubjsToken|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcSubjsTokenPeer::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 CcSubjsToken|CcSubjsToken[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcSubjsTokenPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcSubjsTokenPeer::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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcSubjsTokenPeer::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 CcSubjsToken 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcSubjsTokenPeer::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 CcSubjsToken A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "user_id", "action", "token", "created" FROM "cc_subjs_token" 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 CcSubjsToken();
$obj->hydrate($row);
CcSubjsTokenPeer::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 CcSubjsTokenQuery 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(CcSubjsTokenPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the user_id column
*
* @param int|array $dbUserId 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbUserId($dbUserId = null, $comparison = null)
{
if (is_array($dbUserId)) {
$useMinMax = false;
if (isset($dbUserId['min'])) {
$this->addUsingAlias(CcSubjsTokenPeer::USER_ID, $dbUserId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbUserId['max'])) {
$this->addUsingAlias(CcSubjsTokenPeer::USER_ID, $dbUserId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::USER_ID, $dbUserId, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcSubjsToken|CcSubjsToken[]|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 $dbAction 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbAction($dbAction = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbAction)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbAction)) {
$dbAction = str_replace('*', '%', $dbAction);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::ACTION, $dbAction, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the token column
*
* @param string $dbToken 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbToken($dbToken = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbToken)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbToken)) {
$dbToken = str_replace('*', '%', $dbToken);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::TOKEN, $dbToken, $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|CcSubjsToken[]|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 created column
*
* @param string|array $dbCreated 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbCreated($dbCreated = null, $comparison = null)
{
if (is_array($dbCreated)) {
$useMinMax = false;
if (isset($dbCreated['min'])) {
$this->addUsingAlias(CcSubjsTokenPeer::CREATED, $dbCreated['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbCreated['max'])) {
$this->addUsingAlias(CcSubjsTokenPeer::CREATED, $dbCreated['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::CREATED, $dbCreated, $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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByCcSubjs($ccSubjs, $comparison = null)
{
return $this
->addUsingAlias(CcSubjsTokenPeer::USER_ID, $ccSubjs->getDbId(), $comparison);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcSubjsTokenQuery 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = '', $joinType = Criteria::INNER_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;
}
return $this->addUsingAlias(CcSubjsTokenPeer::ID, $key, Criteria::EQUAL);
}
/**
* 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::INNER_JOIN)
{
return $this
->joinCcSubjs($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
/**
* Exclude object from result
*
* @param CcSubjsToken $ccSubjsToken Object to remove from the list of results
*
* @return CcSubjsTokenQuery The current query, for fluid interface
*/
public function prune($ccSubjsToken = null)
{
if ($ccSubjsToken) {
$this->addUsingAlias(CcSubjsTokenPeer::ID, $ccSubjsToken->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
return $this->addUsingAlias(CcSubjsTokenPeer::ID, $keys, Criteria::IN);
}
} // BaseCcSubjsTokenQuery
/**
* 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 CcSubjsTokenQuery 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(CcSubjsTokenPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcSubjsTokenPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the user_id column
*
* Example usage:
* <code>
* $query->filterByDbUserId(1234); // WHERE user_id = 1234
* $query->filterByDbUserId(array(12, 34)); // WHERE user_id IN (12, 34)
* $query->filterByDbUserId(array('min' => 12)); // WHERE user_id >= 12
* $query->filterByDbUserId(array('max' => 12)); // WHERE user_id <= 12
* </code>
*
* @see filterByCcSubjs()
*
* @param mixed $dbUserId 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbUserId($dbUserId = null, $comparison = null)
{
if (is_array($dbUserId)) {
$useMinMax = false;
if (isset($dbUserId['min'])) {
$this->addUsingAlias(CcSubjsTokenPeer::USER_ID, $dbUserId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbUserId['max'])) {
$this->addUsingAlias(CcSubjsTokenPeer::USER_ID, $dbUserId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::USER_ID, $dbUserId, $comparison);
}
/**
* Filter the query on the action column
*
* Example usage:
* <code>
* $query->filterByDbAction('fooValue'); // WHERE action = 'fooValue'
* $query->filterByDbAction('%fooValue%'); // WHERE action LIKE '%fooValue%'
* </code>
*
* @param string $dbAction 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbAction($dbAction = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbAction)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbAction)) {
$dbAction = str_replace('*', '%', $dbAction);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::ACTION, $dbAction, $comparison);
}
/**
* Filter the query on the token column
*
* Example usage:
* <code>
* $query->filterByDbToken('fooValue'); // WHERE token = 'fooValue'
* $query->filterByDbToken('%fooValue%'); // WHERE token LIKE '%fooValue%'
* </code>
*
* @param string $dbToken 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbToken($dbToken = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbToken)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbToken)) {
$dbToken = str_replace('*', '%', $dbToken);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::TOKEN, $dbToken, $comparison);
}
/**
* Filter the query on the created column
*
* Example usage:
* <code>
* $query->filterByDbCreated('2011-03-14'); // WHERE created = '2011-03-14'
* $query->filterByDbCreated('now'); // WHERE created = '2011-03-14'
* $query->filterByDbCreated(array('max' => 'yesterday')); // WHERE created < '2011-03-13'
* </code>
*
* @param mixed $dbCreated 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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function filterByDbCreated($dbCreated = null, $comparison = null)
{
if (is_array($dbCreated)) {
$useMinMax = false;
if (isset($dbCreated['min'])) {
$this->addUsingAlias(CcSubjsTokenPeer::CREATED, $dbCreated['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbCreated['max'])) {
$this->addUsingAlias(CcSubjsTokenPeer::CREATED, $dbCreated['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcSubjsTokenPeer::CREATED, $dbCreated, $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 CcSubjsTokenQuery 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(CcSubjsTokenPeer::USER_ID, $ccSubjs->getDbId(), $comparison);
} elseif ($ccSubjs instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcSubjsTokenPeer::USER_ID, $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 CcSubjsTokenQuery The current query, for fluid interface
*/
public function joinCcSubjs($relationAlias = null, $joinType = Criteria::INNER_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::INNER_JOIN)
{
return $this
->joinCcSubjs($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
}
/**
* Exclude object from result
*
* @param CcSubjsToken $ccSubjsToken Object to remove from the list of results
*
* @return CcSubjsTokenQuery The current query, for fluid interface
*/
public function prune($ccSubjsToken = null)
{
if ($ccSubjsToken) {
$this->addUsingAlias(CcSubjsTokenPeer::ID, $ccSubjsToken->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load diff

View file

@ -4,265 +4,398 @@
/**
* Base class that represents a query for the 'cc_timestamp' table.
*
*
*
* @method CcTimestampQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcTimestampQuery orderByDbTimestamp($order = Criteria::ASC) Order by the timestamp column
*
* @method CcTimestampQuery groupByDbId() Group by the id column
* @method CcTimestampQuery groupByDbTimestamp() Group by the timestamp column
* @method CcTimestampQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcTimestampQuery orderByDbTimestamp($order = Criteria::ASC) Order by the timestamp column
*
* @method CcTimestampQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcTimestampQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcTimestampQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcTimestampQuery groupByDbId() Group by the id column
* @method CcTimestampQuery groupByDbTimestamp() Group by the timestamp column
*
* @method CcTimestampQuery leftJoinCcListenerCount($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcListenerCount relation
* @method CcTimestampQuery rightJoinCcListenerCount($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcListenerCount relation
* @method CcTimestampQuery innerJoinCcListenerCount($relationAlias = '') Adds a INNER JOIN clause to the query using the CcListenerCount relation
* @method CcTimestampQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcTimestampQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcTimestampQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcTimestamp findOne(PropelPDO $con = null) Return the first CcTimestamp matching the query
* @method CcTimestamp findOneOrCreate(PropelPDO $con = null) Return the first CcTimestamp matching the query, or a new CcTimestamp object populated from the query conditions when no match is found
* @method CcTimestampQuery leftJoinCcListenerCount($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcListenerCount relation
* @method CcTimestampQuery rightJoinCcListenerCount($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcListenerCount relation
* @method CcTimestampQuery innerJoinCcListenerCount($relationAlias = null) Adds a INNER JOIN clause to the query using the CcListenerCount relation
*
* @method CcTimestamp findOneByDbId(int $id) Return the first CcTimestamp filtered by the id column
* @method CcTimestamp findOneByDbTimestamp(string $timestamp) Return the first CcTimestamp filtered by the timestamp column
* @method CcTimestamp findOne(PropelPDO $con = null) Return the first CcTimestamp matching the query
* @method CcTimestamp findOneOrCreate(PropelPDO $con = null) Return the first CcTimestamp matching the query, or a new CcTimestamp object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcTimestamp objects filtered by the id column
* @method array findByDbTimestamp(string $timestamp) Return CcTimestamp objects filtered by the timestamp column
* @method CcTimestamp findOneByDbTimestamp(string $timestamp) Return the first CcTimestamp filtered by the timestamp column
*
* @method array findByDbId(int $id) Return CcTimestamp objects filtered by the id column
* @method array findByDbTimestamp(string $timestamp) Return CcTimestamp objects filtered by the timestamp column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcTimestampQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcTimestampQuery 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 = 'CcTimestamp';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcTimestampQuery 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 = 'CcTimestamp', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcTimestampQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcTimestampQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcTimestampQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcTimestampQuery) {
return $criteria;
}
$query = new CcTimestampQuery(null, null, $modelAlias);
/**
* Returns a new CcTimestampQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcTimestampQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcTimestampQuery) {
return $criteria;
}
$query = new CcTimestampQuery();
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 CcTimestamp|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcTimestampPeer::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 CcTimestamp|CcTimestamp[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcTimestampPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcTimestampPeer::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 CcTimestampQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcTimestampPeer::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 CcTimestamp 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 CcTimestampQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcTimestampPeer::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 CcTimestamp A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "timestamp" FROM "cc_timestamp" 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 CcTimestamp();
$obj->hydrate($row);
CcTimestampPeer::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 CcTimestampQuery 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(CcTimestampPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the timestamp column
*
* @param string|array $dbTimestamp 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 CcTimestampQuery The current query, for fluid interface
*/
public function filterByDbTimestamp($dbTimestamp = null, $comparison = null)
{
if (is_array($dbTimestamp)) {
$useMinMax = false;
if (isset($dbTimestamp['min'])) {
$this->addUsingAlias(CcTimestampPeer::TIMESTAMP, $dbTimestamp['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbTimestamp['max'])) {
$this->addUsingAlias(CcTimestampPeer::TIMESTAMP, $dbTimestamp['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTimestampPeer::TIMESTAMP, $dbTimestamp, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcTimestamp|CcTimestamp[]|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 CcTimestampQuery The current query, for fluid interface
*/
public function filterByCcListenerCount($ccListenerCount, $comparison = null)
{
return $this
->addUsingAlias(CcTimestampPeer::ID, $ccListenerCount->getDbTimestampId(), $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 CcTimestampQuery The current query, for fluid interface
*/
public function joinCcListenerCount($relationAlias = '', $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;
}
/**
* 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|CcTimestamp[]|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);
/**
* 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');
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Exclude object from result
*
* @param CcTimestamp $ccTimestamp Object to remove from the list of results
*
* @return CcTimestampQuery The current query, for fluid interface
*/
public function prune($ccTimestamp = null)
{
if ($ccTimestamp) {
$this->addUsingAlias(CcTimestampPeer::ID, $ccTimestamp->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcTimestampQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
} // BaseCcTimestampQuery
return $this->addUsingAlias(CcTimestampPeer::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 CcTimestampQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcTimestampPeer::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 CcTimestampQuery 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(CcTimestampPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcTimestampPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTimestampPeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the timestamp column
*
* Example usage:
* <code>
* $query->filterByDbTimestamp('2011-03-14'); // WHERE timestamp = '2011-03-14'
* $query->filterByDbTimestamp('now'); // WHERE timestamp = '2011-03-14'
* $query->filterByDbTimestamp(array('max' => 'yesterday')); // WHERE timestamp < '2011-03-13'
* </code>
*
* @param mixed $dbTimestamp 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 CcTimestampQuery The current query, for fluid interface
*/
public function filterByDbTimestamp($dbTimestamp = null, $comparison = null)
{
if (is_array($dbTimestamp)) {
$useMinMax = false;
if (isset($dbTimestamp['min'])) {
$this->addUsingAlias(CcTimestampPeer::TIMESTAMP, $dbTimestamp['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbTimestamp['max'])) {
$this->addUsingAlias(CcTimestampPeer::TIMESTAMP, $dbTimestamp['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTimestampPeer::TIMESTAMP, $dbTimestamp, $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 CcTimestampQuery 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(CcTimestampPeer::ID, $ccListenerCount->getDbTimestampId(), $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 CcTimestampQuery 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 CcTimestamp $ccTimestamp Object to remove from the list of results
*
* @return CcTimestampQuery The current query, for fluid interface
*/
public function prune($ccTimestamp = null)
{
if ($ccTimestamp) {
$this->addUsingAlias(CcTimestampPeer::ID, $ccTimestamp->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

File diff suppressed because it is too large Load diff

View file

@ -4,326 +4,481 @@
/**
* Base class that represents a query for the 'cc_webstream_metadata' table.
*
*
*
* @method CcWebstreamMetadataQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcWebstreamMetadataQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column
* @method CcWebstreamMetadataQuery orderByDbStartTime($order = Criteria::ASC) Order by the start_time column
* @method CcWebstreamMetadataQuery orderByDbLiquidsoapData($order = Criteria::ASC) Order by the liquidsoap_data column
*
* @method CcWebstreamMetadataQuery groupByDbId() Group by the id column
* @method CcWebstreamMetadataQuery groupByDbInstanceId() Group by the instance_id column
* @method CcWebstreamMetadataQuery groupByDbStartTime() Group by the start_time column
* @method CcWebstreamMetadataQuery groupByDbLiquidsoapData() Group by the liquidsoap_data column
* @method CcWebstreamMetadataQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcWebstreamMetadataQuery orderByDbInstanceId($order = Criteria::ASC) Order by the instance_id column
* @method CcWebstreamMetadataQuery orderByDbStartTime($order = Criteria::ASC) Order by the start_time column
* @method CcWebstreamMetadataQuery orderByDbLiquidsoapData($order = Criteria::ASC) Order by the liquidsoap_data column
*
* @method CcWebstreamMetadataQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcWebstreamMetadataQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcWebstreamMetadataQuery innerJoin($relation) Adds a INNER JOIN clause to the query
* @method CcWebstreamMetadataQuery groupByDbId() Group by the id column
* @method CcWebstreamMetadataQuery groupByDbInstanceId() Group by the instance_id column
* @method CcWebstreamMetadataQuery groupByDbStartTime() Group by the start_time column
* @method CcWebstreamMetadataQuery groupByDbLiquidsoapData() Group by the liquidsoap_data column
*
* @method CcWebstreamMetadataQuery leftJoinCcSchedule($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSchedule relation
* @method CcWebstreamMetadataQuery rightJoinCcSchedule($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSchedule relation
* @method CcWebstreamMetadataQuery innerJoinCcSchedule($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSchedule relation
* @method CcWebstreamMetadataQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcWebstreamMetadataQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcWebstreamMetadataQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CcWebstreamMetadata findOne(PropelPDO $con = null) Return the first CcWebstreamMetadata matching the query
* @method CcWebstreamMetadata findOneOrCreate(PropelPDO $con = null) Return the first CcWebstreamMetadata matching the query, or a new CcWebstreamMetadata object populated from the query conditions when no match is found
* @method CcWebstreamMetadataQuery leftJoinCcSchedule($relationAlias = null) Adds a LEFT JOIN clause to the query using the CcSchedule relation
* @method CcWebstreamMetadataQuery rightJoinCcSchedule($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcSchedule relation
* @method CcWebstreamMetadataQuery innerJoinCcSchedule($relationAlias = null) Adds a INNER JOIN clause to the query using the CcSchedule relation
*
* @method CcWebstreamMetadata findOneByDbId(int $id) Return the first CcWebstreamMetadata filtered by the id column
* @method CcWebstreamMetadata findOneByDbInstanceId(int $instance_id) Return the first CcWebstreamMetadata filtered by the instance_id column
* @method CcWebstreamMetadata findOneByDbStartTime(string $start_time) Return the first CcWebstreamMetadata filtered by the start_time column
* @method CcWebstreamMetadata findOneByDbLiquidsoapData(string $liquidsoap_data) Return the first CcWebstreamMetadata filtered by the liquidsoap_data column
* @method CcWebstreamMetadata findOne(PropelPDO $con = null) Return the first CcWebstreamMetadata matching the query
* @method CcWebstreamMetadata findOneOrCreate(PropelPDO $con = null) Return the first CcWebstreamMetadata matching the query, or a new CcWebstreamMetadata object populated from the query conditions when no match is found
*
* @method array findByDbId(int $id) Return CcWebstreamMetadata objects filtered by the id column
* @method array findByDbInstanceId(int $instance_id) Return CcWebstreamMetadata objects filtered by the instance_id column
* @method array findByDbStartTime(string $start_time) Return CcWebstreamMetadata objects filtered by the start_time column
* @method array findByDbLiquidsoapData(string $liquidsoap_data) Return CcWebstreamMetadata objects filtered by the liquidsoap_data column
* @method CcWebstreamMetadata findOneByDbInstanceId(int $instance_id) Return the first CcWebstreamMetadata filtered by the instance_id column
* @method CcWebstreamMetadata findOneByDbStartTime(string $start_time) Return the first CcWebstreamMetadata filtered by the start_time column
* @method CcWebstreamMetadata findOneByDbLiquidsoapData(string $liquidsoap_data) Return the first CcWebstreamMetadata filtered by the liquidsoap_data column
*
* @method array findByDbId(int $id) Return CcWebstreamMetadata objects filtered by the id column
* @method array findByDbInstanceId(int $instance_id) Return CcWebstreamMetadata objects filtered by the instance_id column
* @method array findByDbStartTime(string $start_time) Return CcWebstreamMetadata objects filtered by the start_time column
* @method array findByDbLiquidsoapData(string $liquidsoap_data) Return CcWebstreamMetadata objects filtered by the liquidsoap_data column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcWebstreamMetadataQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCcWebstreamMetadataQuery 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 = 'CcWebstreamMetadata';
}
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Initializes internal state of BaseCcWebstreamMetadataQuery 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 = 'CcWebstreamMetadata', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CcWebstreamMetadataQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CcWebstreamMetadataQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CcWebstreamMetadataQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcWebstreamMetadataQuery) {
return $criteria;
}
$query = new CcWebstreamMetadataQuery(null, null, $modelAlias);
/**
* Returns a new CcWebstreamMetadataQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return CcWebstreamMetadataQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CcWebstreamMetadataQuery) {
return $criteria;
}
$query = new CcWebstreamMetadataQuery();
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 CcWebstreamMetadata|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcWebstreamMetadataPeer::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 CcWebstreamMetadata|CcWebstreamMetadata[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CcWebstreamMetadataPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CcWebstreamMetadataPeer::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 CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcWebstreamMetadataPeer::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 CcWebstreamMetadata 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 CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcWebstreamMetadataPeer::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 CcWebstreamMetadata A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT "id", "instance_id", "start_time", "liquidsoap_data" FROM "cc_webstream_metadata" 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 CcWebstreamMetadata();
$obj->hydrate($row);
CcWebstreamMetadataPeer::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 CcWebstreamMetadataQuery 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(CcWebstreamMetadataPeer::ID, $dbId, $comparison);
}
return $obj;
}
/**
* Filter the query on the instance_id column
*
* @param int|array $dbInstanceId 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 CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByDbInstanceId($dbInstanceId = null, $comparison = null)
{
if (is_array($dbInstanceId)) {
$useMinMax = false;
if (isset($dbInstanceId['min'])) {
$this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbInstanceId['max'])) {
$this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId, $comparison);
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CcWebstreamMetadata|CcWebstreamMetadata[]|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 CcWebstreamMetadataQuery 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(CcWebstreamMetadataPeer::START_TIME, $dbStartTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbStartTime['max'])) {
$this->addUsingAlias(CcWebstreamMetadataPeer::START_TIME, $dbStartTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::START_TIME, $dbStartTime, $comparison);
}
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* Filter the query on the liquidsoap_data column
*
* @param string $dbLiquidsoapData 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 CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByDbLiquidsoapData($dbLiquidsoapData = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLiquidsoapData)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLiquidsoapData)) {
$dbLiquidsoapData = str_replace('*', '%', $dbLiquidsoapData);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::LIQUIDSOAP_DATA, $dbLiquidsoapData, $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|CcWebstreamMetadata[]|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 CcSchedule object
*
* @param CcSchedule $ccSchedule the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByCcSchedule($ccSchedule, $comparison = null)
{
return $this
->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $ccSchedule->getDbId(), $comparison);
}
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Adds a JOIN clause to the query using the CcSchedule relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function joinCcSchedule($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcSchedule');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcSchedule');
}
return $this;
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
/**
* Use the CcSchedule relation CcSchedule object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcScheduleQuery A secondary query class using the current class as primary query
*/
public function useCcScheduleQuery($relationAlias = '', $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcSchedule($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery');
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::ID, $key, Criteria::EQUAL);
}
/**
* Exclude object from result
*
* @param CcWebstreamMetadata $ccWebstreamMetadata Object to remove from the list of results
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function prune($ccWebstreamMetadata = null)
{
if ($ccWebstreamMetadata) {
$this->addUsingAlias(CcWebstreamMetadataPeer::ID, $ccWebstreamMetadata->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Filter the query by a list of primary keys
*
* @param array $keys The list of primary key to use for the query
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
} // BaseCcWebstreamMetadataQuery
return $this->addUsingAlias(CcWebstreamMetadataPeer::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 CcWebstreamMetadataQuery 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(CcWebstreamMetadataPeer::ID, $dbId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbId['max'])) {
$this->addUsingAlias(CcWebstreamMetadataPeer::ID, $dbId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::ID, $dbId, $comparison);
}
/**
* Filter the query on the instance_id column
*
* Example usage:
* <code>
* $query->filterByDbInstanceId(1234); // WHERE instance_id = 1234
* $query->filterByDbInstanceId(array(12, 34)); // WHERE instance_id IN (12, 34)
* $query->filterByDbInstanceId(array('min' => 12)); // WHERE instance_id >= 12
* $query->filterByDbInstanceId(array('max' => 12)); // WHERE instance_id <= 12
* </code>
*
* @see filterByCcSchedule()
*
* @param mixed $dbInstanceId 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 CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByDbInstanceId($dbInstanceId = null, $comparison = null)
{
if (is_array($dbInstanceId)) {
$useMinMax = false;
if (isset($dbInstanceId['min'])) {
$this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbInstanceId['max'])) {
$this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $dbInstanceId, $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 CcWebstreamMetadataQuery 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(CcWebstreamMetadataPeer::START_TIME, $dbStartTime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbStartTime['max'])) {
$this->addUsingAlias(CcWebstreamMetadataPeer::START_TIME, $dbStartTime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::START_TIME, $dbStartTime, $comparison);
}
/**
* Filter the query on the liquidsoap_data column
*
* Example usage:
* <code>
* $query->filterByDbLiquidsoapData('fooValue'); // WHERE liquidsoap_data = 'fooValue'
* $query->filterByDbLiquidsoapData('%fooValue%'); // WHERE liquidsoap_data LIKE '%fooValue%'
* </code>
*
* @param string $dbLiquidsoapData 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 CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function filterByDbLiquidsoapData($dbLiquidsoapData = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLiquidsoapData)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLiquidsoapData)) {
$dbLiquidsoapData = str_replace('*', '%', $dbLiquidsoapData);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcWebstreamMetadataPeer::LIQUIDSOAP_DATA, $dbLiquidsoapData, $comparison);
}
/**
* Filter the query by a related CcSchedule object
*
* @param CcSchedule|PropelObjectCollection $ccSchedule The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCcSchedule($ccSchedule, $comparison = null)
{
if ($ccSchedule instanceof CcSchedule) {
return $this
->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $ccSchedule->getDbId(), $comparison);
} elseif ($ccSchedule instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CcWebstreamMetadataPeer::INSTANCE_ID, $ccSchedule->toKeyValue('PrimaryKey', 'DbId'), $comparison);
} else {
throw new PropelException('filterByCcSchedule() only accepts arguments of type CcSchedule or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CcSchedule relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function joinCcSchedule($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CcSchedule');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'CcSchedule');
}
return $this;
}
/**
* Use the CcSchedule relation CcSchedule object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcScheduleQuery A secondary query class using the current class as primary query
*/
public function useCcScheduleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCcSchedule($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CcSchedule', 'CcScheduleQuery');
}
/**
* Exclude object from result
*
* @param CcWebstreamMetadata $ccWebstreamMetadata Object to remove from the list of results
*
* @return CcWebstreamMetadataQuery The current query, for fluid interface
*/
public function prune($ccWebstreamMetadata = null)
{
if ($ccWebstreamMetadata) {
$this->addUsingAlias(CcWebstreamMetadataPeer::ID, $ccWebstreamMetadata->getDbId(), Criteria::NOT_EQUAL);
}
return $this;
}
}

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