\Thelia\ModelCouponRuleQuery

Skeleton subclass for performing query and update operations on the 'coupon_rule' table.

You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.

Summary

Methods
Properties
Constants
__construct()
create()
findPk()
findPks()
filterByPrimaryKey()
filterByPrimaryKeys()
filterById()
filterByCouponId()
filterByController()
filterByOperation()
filterByValue()
filterByCreatedAt()
filterByUpdatedAt()
filterByCoupon()
joinCoupon()
useCouponQuery()
prune()
doDeleteAll()
delete()
recentlyUpdated()
recentlyCreated()
lastUpdatedFirst()
firstUpdatedFirst()
lastCreatedFirst()
firstCreatedFirst()
orderById()
orderByCouponId()
orderByController()
orderByOperation()
orderByValue()
orderByCreatedAt()
orderByUpdatedAt()
groupById()
groupByCouponId()
groupByController()
groupByOperation()
groupByValue()
groupByCreatedAt()
groupByUpdatedAt()
leftJoin()
rightJoin()
innerJoin()
leftJoinCoupon()
rightJoinCoupon()
innerJoinCoupon()
findOne()
findOneOrCreate()
findOneById()
findOneByCouponId()
findOneByController()
findOneByOperation()
findOneByValue()
findOneByCreatedAt()
findOneByUpdatedAt()
findById()
findByCouponId()
findByController()
findByOperation()
findByValue()
findByCreatedAt()
findByUpdatedAt()
No public properties found
No constants found
findPkSimple()
findPkComplex()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string $dbName, string $modelName, string $modelAlias)

Initializes internal state of \Thelia\Model\Base\CouponRuleQuery object.

Parameters

string $dbName

The database name

string $modelName

The phpName of a model, e.g. 'Book'

string $modelAlias

The alias for the model in this query, e.g. 'b'

create()

create(string $modelAlias, \Propel\Runtime\ActiveQuery\Criteria $criteria) : \Thelia\Model\CouponRuleQuery

Returns a new ChildCouponRuleQuery object.

Parameters

string $modelAlias

The alias of a model in the query

\Propel\Runtime\ActiveQuery\Criteria $criteria

Optional Criteria to build the query from

Returns

\Thelia\Model\CouponRuleQuery

findPk()

findPk(mixed $key, \Propel\Runtime\Connection\ConnectionInterface $con) : \Thelia\Model\CouponRule|array|mixed

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.

$obj = $c->findPk(12, $con);

Parameters

mixed $key

Primary key to use for the query

\Propel\Runtime\Connection\ConnectionInterface $con

an optional connection object

Returns

\Thelia\Model\CouponRule|array|mixed —

the result, formatted by the current formatter

findPks()

findPks(array $keys, \Propel\Runtime\Connection\ConnectionInterface $con) : \Propel\Runtime\Collection\ObjectCollection|array|mixed

Find objects by primary key <code> $objs = $c->findPks(array(12, 56, 832), $con); </code>

Parameters

array $keys

Primary keys to use for the query

\Propel\Runtime\Connection\ConnectionInterface $con

an optional connection object

Returns

\Propel\Runtime\Collection\ObjectCollection|array|mixed —

the list of results, formatted by the current formatter

filterByPrimaryKey()

filterByPrimaryKey(mixed $key) : \Thelia\Model\CouponRuleQuery

Filter the query by primary key

Parameters

mixed $key

Primary key to use for the query

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByPrimaryKeys()

filterByPrimaryKeys(array $keys) : \Thelia\Model\CouponRuleQuery

Filter the query by a list of primary keys

Parameters

array $keys

The list of primary key to use for the query

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterById()

filterById(mixed $id, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query on the id column

Example usage: $query->filterById(1234); // WHERE id = 1234 $query->filterById(array(12, 34)); // WHERE id IN (12, 34) $query->filterById(array('min' => 12)); // WHERE id > 12

Parameters

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.

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByCouponId()

filterByCouponId(mixed $couponId, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query on the coupon_id column

Example usage: $query->filterByCouponId(1234); // WHERE coupon_id = 1234 $query->filterByCouponId(array(12, 34)); // WHERE coupon_id IN (12, 34) $query->filterByCouponId(array('min' => 12)); // WHERE coupon_id > 12

Parameters

mixed $couponId

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.

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByController()

filterByController(string $controller, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query on the controller column

Example usage: $query->filterByController('fooValue'); // WHERE controller = 'fooValue' $query->filterByController('%fooValue%'); // WHERE controller LIKE '%fooValue%'

Parameters

string $controller

The value to use as filter. Accepts wildcards (* and % trigger a LIKE)

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByOperation()

filterByOperation(string $operation, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query on the operation column

Example usage: $query->filterByOperation('fooValue'); // WHERE operation = 'fooValue' $query->filterByOperation('%fooValue%'); // WHERE operation LIKE '%fooValue%'

Parameters

string $operation

The value to use as filter. Accepts wildcards (* and % trigger a LIKE)

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByValue()

filterByValue(mixed $value, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query on the value column

Example usage: $query->filterByValue(1234); // WHERE value = 1234 $query->filterByValue(array(12, 34)); // WHERE value IN (12, 34) $query->filterByValue(array('min' => 12)); // WHERE value > 12

Parameters

mixed $value

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.

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByCreatedAt()

filterByCreatedAt(mixed $createdAt, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query on the created_at column

Example usage: $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'

Parameters

mixed $createdAt

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.

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByUpdatedAt()

filterByUpdatedAt(mixed $updatedAt, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query on the updated_at column

Example usage: $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'

Parameters

mixed $updatedAt

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.

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

filterByCoupon()

filterByCoupon(\Thelia\Model\Coupon|\Propel\Runtime\Collection\ObjectCollection $coupon, string $comparison) : \Thelia\Model\CouponRuleQuery

Filter the query by a related \Thelia\Model\Coupon object

Parameters

\Thelia\Model\Coupon|\Propel\Runtime\Collection\ObjectCollection $coupon

The related object(s) to use as filter

string $comparison

Operator to use for the column comparison, defaults to Criteria::EQUAL

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

joinCoupon()

joinCoupon(string $relationAlias, string $joinType) : \Thelia\Model\CouponRuleQuery

Adds a JOIN clause to the query using the Coupon relation

Parameters

string $relationAlias

optional alias for the relation

string $joinType

Accepted values are null, 'left join', 'right join', 'inner join'

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

useCouponQuery()

useCouponQuery(string $relationAlias, string $joinType) : \Thelia\Model\CouponQuery

Use the Coupon relation Coupon object

Parameters

string $relationAlias

optional alias for the relation, to be used as main alias in the secondary query

string $joinType

Accepted values are null, 'left join', 'right join', 'inner join'

Returns

\Thelia\Model\CouponQuery

A secondary query class using the current class as primary query

prune()

prune(\Thelia\Model\CouponRule $couponRule) : \Thelia\Model\CouponRuleQuery

Exclude object from result

Parameters

\Thelia\Model\CouponRule $couponRule

Object to remove from the list of results

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

doDeleteAll()

doDeleteAll(\Propel\Runtime\Connection\ConnectionInterface $con) : int

Deletes all rows from the coupon_rule table.

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

the connection to use

Returns

int —

The number of affected rows (if supported by underlying database driver).

delete()

delete(\Propel\Runtime\Connection\ConnectionInterface $con) : int

Performs a DELETE on the database, given a ChildCouponRule or Criteria object OR a primary key value.

Parameters

\Propel\Runtime\Connection\ConnectionInterface $con

the connection to use

Throws

\Propel\Runtime\Exception\PropelException

Any exceptions caught during processing will be rethrown wrapped into a PropelException.

Returns

int —

The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows if supported by native driver or if emulated using Propel.

recentlyUpdated()

recentlyUpdated(int $nbDays) : \Thelia\Model\CouponRuleQuery

Filter by the latest updated

Parameters

int $nbDays

Maximum age of the latest update in days

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

recentlyCreated()

recentlyCreated(int $nbDays) : \Thelia\Model\CouponRuleQuery

Filter by the latest created

Parameters

int $nbDays

Maximum age of in days

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

lastUpdatedFirst()

lastUpdatedFirst() : \Thelia\Model\CouponRuleQuery

Order by update date desc

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

firstUpdatedFirst()

firstUpdatedFirst() : \Thelia\Model\CouponRuleQuery

Order by update date asc

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

lastCreatedFirst()

lastCreatedFirst() : \Thelia\Model\CouponRuleQuery

Order by create date desc

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

firstCreatedFirst()

firstCreatedFirst() : \Thelia\Model\CouponRuleQuery

Order by create date asc

Returns

\Thelia\Model\CouponRuleQuery

The current query, for fluid interface

orderById()

orderById($order =) : \Thelia\Model\CouponRuleQuery

Order by the id column

Parameters

$order =

Returns

\Thelia\Model\CouponRuleQuery

orderByCouponId()

orderByCouponId($order =) : \Thelia\Model\CouponRuleQuery

Order by the coupon_id column

Parameters

$order =

Returns

\Thelia\Model\CouponRuleQuery

orderByController()

orderByController($order =) : \Thelia\Model\CouponRuleQuery

Order by the controller column

Parameters

$order =

Returns

\Thelia\Model\CouponRuleQuery

orderByOperation()

orderByOperation($order =) : \Thelia\Model\CouponRuleQuery

Order by the operation column

Parameters

$order =

Returns

\Thelia\Model\CouponRuleQuery

orderByValue()

orderByValue($order =) : \Thelia\Model\CouponRuleQuery

Order by the value column

Parameters

$order =

Returns

\Thelia\Model\CouponRuleQuery

orderByCreatedAt()

orderByCreatedAt($order =) : \Thelia\Model\CouponRuleQuery

Order by the created_at column

Parameters

$order =

Returns

\Thelia\Model\CouponRuleQuery

orderByUpdatedAt()

orderByUpdatedAt($order =) : \Thelia\Model\CouponRuleQuery

Order by the updated_at column

Parameters

$order =

Returns

\Thelia\Model\CouponRuleQuery

groupById()

groupById() : \Thelia\Model\CouponRuleQuery

Group by the id column

Returns

\Thelia\Model\CouponRuleQuery

groupByCouponId()

groupByCouponId() : \Thelia\Model\CouponRuleQuery

Group by the coupon_id column

Returns

\Thelia\Model\CouponRuleQuery

groupByController()

groupByController() : \Thelia\Model\CouponRuleQuery

Group by the controller column

Returns

\Thelia\Model\CouponRuleQuery

groupByOperation()

groupByOperation() : \Thelia\Model\CouponRuleQuery

Group by the operation column

Returns

\Thelia\Model\CouponRuleQuery

groupByValue()

groupByValue() : \Thelia\Model\CouponRuleQuery

Group by the value column

Returns

\Thelia\Model\CouponRuleQuery

groupByCreatedAt()

groupByCreatedAt() : \Thelia\Model\CouponRuleQuery

Group by the created_at column

Returns

\Thelia\Model\CouponRuleQuery

groupByUpdatedAt()

groupByUpdatedAt() : \Thelia\Model\CouponRuleQuery

Group by the updated_at column

Returns

\Thelia\Model\CouponRuleQuery

leftJoin()

leftJoin(mixed $relation) : \Thelia\Model\CouponRuleQuery

Adds a LEFT JOIN clause to the query

Parameters

mixed $relation

Returns

\Thelia\Model\CouponRuleQuery

rightJoin()

rightJoin(mixed $relation) : \Thelia\Model\CouponRuleQuery

Adds a RIGHT JOIN clause to the query

Parameters

mixed $relation

Returns

\Thelia\Model\CouponRuleQuery

innerJoin()

innerJoin(mixed $relation) : \Thelia\Model\CouponRuleQuery

Adds a INNER JOIN clause to the query

Parameters

mixed $relation

Returns

\Thelia\Model\CouponRuleQuery

leftJoinCoupon()

leftJoinCoupon($relationAlias =) : \Thelia\Model\CouponRuleQuery

Adds a LEFT JOIN clause to the query using the Coupon relation

Parameters

$relationAlias =

Returns

\Thelia\Model\CouponRuleQuery

rightJoinCoupon()

rightJoinCoupon($relationAlias =) : \Thelia\Model\CouponRuleQuery

Adds a RIGHT JOIN clause to the query using the Coupon relation

Parameters

$relationAlias =

Returns

\Thelia\Model\CouponRuleQuery

innerJoinCoupon()

innerJoinCoupon($relationAlias =) : \Thelia\Model\CouponRuleQuery

Adds a INNER JOIN clause to the query using the Coupon relation

Parameters

$relationAlias =

Returns

\Thelia\Model\CouponRuleQuery

findOne()

findOne(ConnectionInterface $con) : \Thelia\Model\CouponRule

Return the first ChildCouponRule matching the query

Parameters

ConnectionInterface $con

Returns

\Thelia\Model\CouponRule

findOneOrCreate()

findOneOrCreate(ConnectionInterface $con) : \Thelia\Model\CouponRule

Return the first ChildCouponRule matching the query, or a new ChildCouponRule object populated from the query conditions when no match is found

Parameters

ConnectionInterface $con

Returns

\Thelia\Model\CouponRule

findOneById()

findOneById(int $id) : \Thelia\Model\CouponRule

Return the first ChildCouponRule filtered by the id column

Parameters

int $id

Returns

\Thelia\Model\CouponRule

findOneByCouponId()

findOneByCouponId(int $coupon_id) : \Thelia\Model\CouponRule

Return the first ChildCouponRule filtered by the coupon_id column

Parameters

int $coupon_id

Returns

\Thelia\Model\CouponRule

findOneByController()

findOneByController(string $controller) : \Thelia\Model\CouponRule

Return the first ChildCouponRule filtered by the controller column

Parameters

string $controller

Returns

\Thelia\Model\CouponRule

findOneByOperation()

findOneByOperation(string $operation) : \Thelia\Model\CouponRule

Return the first ChildCouponRule filtered by the operation column

Parameters

string $operation

Returns

\Thelia\Model\CouponRule

findOneByValue()

findOneByValue(double $value) : \Thelia\Model\CouponRule

Return the first ChildCouponRule filtered by the value column

Parameters

double $value

Returns

\Thelia\Model\CouponRule

findOneByCreatedAt()

findOneByCreatedAt(string $created_at) : \Thelia\Model\CouponRule

Return the first ChildCouponRule filtered by the created_at column

Parameters

string $created_at

Returns

\Thelia\Model\CouponRule

findOneByUpdatedAt()

findOneByUpdatedAt(string $updated_at) : \Thelia\Model\CouponRule

Return the first ChildCouponRule filtered by the updated_at column

Parameters

string $updated_at

Returns

\Thelia\Model\CouponRule

findById()

findById(int $id) : array

Return ChildCouponRule objects filtered by the id column

Parameters

int $id

Returns

array

findByCouponId()

findByCouponId(int $coupon_id) : array

Return ChildCouponRule objects filtered by the coupon_id column

Parameters

int $coupon_id

Returns

array

findByController()

findByController(string $controller) : array

Return ChildCouponRule objects filtered by the controller column

Parameters

string $controller

Returns

array

findByOperation()

findByOperation(string $operation) : array

Return ChildCouponRule objects filtered by the operation column

Parameters

string $operation

Returns

array

findByValue()

findByValue(double $value) : array

Return ChildCouponRule objects filtered by the value column

Parameters

double $value

Returns

array

findByCreatedAt()

findByCreatedAt(string $created_at) : array

Return ChildCouponRule objects filtered by the created_at column

Parameters

string $created_at

Returns

array

findByUpdatedAt()

findByUpdatedAt(string $updated_at) : array

Return ChildCouponRule objects filtered by the updated_at column

Parameters

string $updated_at

Returns

array

findPkSimple()

findPkSimple(mixed $key, \Propel\Runtime\Connection\ConnectionInterface $con) : \Thelia\Model\CouponRule

Find object by primary key using raw SQL to go fast.

Bypass doSelect() and the object formatter by using generated code.

Parameters

mixed $key

Primary key to use for the query

\Propel\Runtime\Connection\ConnectionInterface $con

A connection object

Returns

\Thelia\Model\CouponRule

A model object, or null if the key is not found

findPkComplex()

findPkComplex(mixed $key, \Propel\Runtime\Connection\ConnectionInterface $con) : \Thelia\Model\CouponRule|array|mixed

Find object by primary key.

Parameters

mixed $key

Primary key to use for the query

\Propel\Runtime\Connection\ConnectionInterface $con

A connection object

Returns

\Thelia\Model\CouponRule|array|mixed —

the result, formatted by the current formatter