setModelAlias($modelAlias);
}
if ($criteria instanceof Criteria) {
$query->mergeWith($criteria);
}
return $query;
}
/**
* Find object by primary key
* Use instance pooling to avoid a database query if the object exists
*
* $obj = $c->findPk(12, $con);
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
* @return CcTrans|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ((null !== ($obj = CcTransPeer::getInstanceFromPool((string) $key))) && $this->getFormatter()->isObjectFormatter()) {
// the object is alredy in the instance pool
return $obj;
} else {
// the object has not been requested yet, or the formatter is not an object formatter
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKey($key)
->getSelectStatement($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
}
/**
* Find objects by primary key
*
* $objs = $c->findPks(array(12, 56, 832), $con);
*
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
$criteria = $this->isKeepQuery() ? clone $this : $this;
return $this
->filterByPrimaryKeys($keys)
->find($con);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CcTransQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CcTransPeer::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 CcTransQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CcTransPeer::ID, $keys, Criteria::IN);
}
/**
* 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 CcTransQuery 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(CcTransPeer::ID, $id, $comparison);
}
/**
* Filter the query on the trtok column
*
* @param string $trtok 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 CcTransQuery The current query, for fluid interface
*/
public function filterByTrtok($trtok = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($trtok)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $trtok)) {
$trtok = str_replace('*', '%', $trtok);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::TRTOK, $trtok, $comparison);
}
/**
* Filter the query on the direction column
*
* @param string $direction 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 CcTransQuery The current query, for fluid interface
*/
public function filterByDirection($direction = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($direction)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $direction)) {
$direction = str_replace('*', '%', $direction);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::DIRECTION, $direction, $comparison);
}
/**
* Filter the query on the state column
*
* @param string $state 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 CcTransQuery The current query, for fluid interface
*/
public function filterByState($state = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($state)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $state)) {
$state = str_replace('*', '%', $state);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::STATE, $state, $comparison);
}
/**
* Filter the query on the trtype column
*
* @param string $trtype 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 CcTransQuery The current query, for fluid interface
*/
public function filterByTrtype($trtype = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($trtype)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $trtype)) {
$trtype = str_replace('*', '%', $trtype);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::TRTYPE, $trtype, $comparison);
}
/**
* Filter the query on the lock column
*
* @param string $lock 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 CcTransQuery The current query, for fluid interface
*/
public function filterByLock($lock = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lock)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lock)) {
$lock = str_replace('*', '%', $lock);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::LOCK, $lock, $comparison);
}
/**
* Filter the query on the target column
*
* @param string $target 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 CcTransQuery The current query, for fluid interface
*/
public function filterByTarget($target = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($target)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $target)) {
$target = str_replace('*', '%', $target);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::TARGET, $target, $comparison);
}
/**
* Filter the query on the rtrtok column
*
* @param string $rtrtok 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 CcTransQuery The current query, for fluid interface
*/
public function filterByRtrtok($rtrtok = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($rtrtok)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $rtrtok)) {
$rtrtok = str_replace('*', '%', $rtrtok);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::RTRTOK, $rtrtok, $comparison);
}
/**
* Filter the query on the mdtrtok column
*
* @param string $mdtrtok 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 CcTransQuery The current query, for fluid interface
*/
public function filterByMdtrtok($mdtrtok = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($mdtrtok)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $mdtrtok)) {
$mdtrtok = str_replace('*', '%', $mdtrtok);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::MDTRTOK, $mdtrtok, $comparison);
}
/**
* Filter the query on the gunid column
*
* @param string $gunid 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 CcTransQuery The current query, for fluid interface
*/
public function filterByGunid($gunid = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($gunid)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $gunid)) {
$gunid = str_replace('*', '%', $gunid);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::GUNID, $gunid, $comparison);
}
/**
* Filter the query on the pdtoken column
*
* @param string|array $pdtoken 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 CcTransQuery The current query, for fluid interface
*/
public function filterByPdtoken($pdtoken = null, $comparison = null)
{
if (is_array($pdtoken)) {
$useMinMax = false;
if (isset($pdtoken['min'])) {
$this->addUsingAlias(CcTransPeer::PDTOKEN, $pdtoken['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($pdtoken['max'])) {
$this->addUsingAlias(CcTransPeer::PDTOKEN, $pdtoken['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTransPeer::PDTOKEN, $pdtoken, $comparison);
}
/**
* Filter the query on the url column
*
* @param string $url 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 CcTransQuery The current query, for fluid interface
*/
public function filterByUrl($url = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($url)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $url)) {
$url = str_replace('*', '%', $url);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::URL, $url, $comparison);
}
/**
* Filter the query on the localfile column
*
* @param string $localfile 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 CcTransQuery The current query, for fluid interface
*/
public function filterByLocalfile($localfile = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($localfile)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $localfile)) {
$localfile = str_replace('*', '%', $localfile);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::LOCALFILE, $localfile, $comparison);
}
/**
* Filter the query on the fname column
*
* @param string $fname 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 CcTransQuery The current query, for fluid interface
*/
public function filterByFname($fname = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($fname)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $fname)) {
$fname = str_replace('*', '%', $fname);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::FNAME, $fname, $comparison);
}
/**
* Filter the query on the title column
*
* @param string $title 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 CcTransQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the expectedsum column
*
* @param string $expectedsum 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 CcTransQuery The current query, for fluid interface
*/
public function filterByExpectedsum($expectedsum = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($expectedsum)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $expectedsum)) {
$expectedsum = str_replace('*', '%', $expectedsum);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::EXPECTEDSUM, $expectedsum, $comparison);
}
/**
* Filter the query on the realsum column
*
* @param string $realsum 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 CcTransQuery The current query, for fluid interface
*/
public function filterByRealsum($realsum = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($realsum)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $realsum)) {
$realsum = str_replace('*', '%', $realsum);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::REALSUM, $realsum, $comparison);
}
/**
* Filter the query on the expectedsize column
*
* @param int|array $expectedsize 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 CcTransQuery The current query, for fluid interface
*/
public function filterByExpectedsize($expectedsize = null, $comparison = null)
{
if (is_array($expectedsize)) {
$useMinMax = false;
if (isset($expectedsize['min'])) {
$this->addUsingAlias(CcTransPeer::EXPECTEDSIZE, $expectedsize['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($expectedsize['max'])) {
$this->addUsingAlias(CcTransPeer::EXPECTEDSIZE, $expectedsize['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTransPeer::EXPECTEDSIZE, $expectedsize, $comparison);
}
/**
* Filter the query on the realsize column
*
* @param int|array $realsize 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 CcTransQuery The current query, for fluid interface
*/
public function filterByRealsize($realsize = null, $comparison = null)
{
if (is_array($realsize)) {
$useMinMax = false;
if (isset($realsize['min'])) {
$this->addUsingAlias(CcTransPeer::REALSIZE, $realsize['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($realsize['max'])) {
$this->addUsingAlias(CcTransPeer::REALSIZE, $realsize['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTransPeer::REALSIZE, $realsize, $comparison);
}
/**
* 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 CcTransQuery 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(CcTransPeer::UID, $uid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($uid['max'])) {
$this->addUsingAlias(CcTransPeer::UID, $uid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTransPeer::UID, $uid, $comparison);
}
/**
* Filter the query on the errmsg column
*
* @param string $errmsg 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 CcTransQuery The current query, for fluid interface
*/
public function filterByErrmsg($errmsg = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($errmsg)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $errmsg)) {
$errmsg = str_replace('*', '%', $errmsg);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTransPeer::ERRMSG, $errmsg, $comparison);
}
/**
* Filter the query on the jobpid column
*
* @param int|array $jobpid 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 CcTransQuery The current query, for fluid interface
*/
public function filterByJobpid($jobpid = null, $comparison = null)
{
if (is_array($jobpid)) {
$useMinMax = false;
if (isset($jobpid['min'])) {
$this->addUsingAlias(CcTransPeer::JOBPID, $jobpid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($jobpid['max'])) {
$this->addUsingAlias(CcTransPeer::JOBPID, $jobpid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTransPeer::JOBPID, $jobpid, $comparison);
}
/**
* Filter the query on the start column
*
* @param string|array $start 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 CcTransQuery The current query, for fluid interface
*/
public function filterByStart($start = null, $comparison = null)
{
if (is_array($start)) {
$useMinMax = false;
if (isset($start['min'])) {
$this->addUsingAlias(CcTransPeer::START, $start['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($start['max'])) {
$this->addUsingAlias(CcTransPeer::START, $start['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTransPeer::START, $start, $comparison);
}
/**
* 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 CcTransQuery 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(CcTransPeer::TS, $ts['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($ts['max'])) {
$this->addUsingAlias(CcTransPeer::TS, $ts['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcTransPeer::TS, $ts, $comparison);
}
/**
* Exclude object from result
*
* @param CcTrans $ccTrans Object to remove from the list of results
*
* @return CcTransQuery The current query, for fluid interface
*/
public function prune($ccTrans = null)
{
if ($ccTrans) {
$this->addUsingAlias(CcTransPeer::ID, $ccTrans->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
} // BaseCcTransQuery