Overview

Namespaces

  • Thelia
    • Action
    • Controller
    • Core
      • Bundle
      • Event
      • EventListener
      • Template
        • BaseParam
    • Exception
    • Log
      • Destination
    • Model
      • map
      • om
    • Routing
      • Matcher
    • Tools
    • Tpex
      • BaseParam
      • Exception
      • Loop
      • Tests

Classes

  • BaseAccessory
  • BaseAccessoryPeer
  • BaseAccessoryQuery
  • BaseAddress
  • BaseAddressPeer
  • BaseAddressQuery
  • BaseAdmin
  • BaseAdminGroup
  • BaseAdminGroupPeer
  • BaseAdminGroupQuery
  • BaseAdminLog
  • BaseAdminLogPeer
  • BaseAdminLogQuery
  • BaseAdminPeer
  • BaseAdminQuery
  • BaseArea
  • BaseAreaPeer
  • BaseAreaQuery
  • BaseAttribute
  • BaseAttributeAv
  • BaseAttributeAvDesc
  • BaseAttributeAvDescPeer
  • BaseAttributeAvDescQuery
  • BaseAttributeAvI18n
  • BaseAttributeAvI18nPeer
  • BaseAttributeAvI18nQuery
  • BaseAttributeAvPeer
  • BaseAttributeAvQuery
  • BaseAttributeCategory
  • BaseAttributeCategoryPeer
  • BaseAttributeCategoryQuery
  • BaseAttributeCombination
  • BaseAttributeCombinationPeer
  • BaseAttributeCombinationQuery
  • BaseAttributeDesc
  • BaseAttributeDescPeer
  • BaseAttributeDescQuery
  • BaseAttributeI18n
  • BaseAttributeI18nPeer
  • BaseAttributeI18nQuery
  • BaseAttributePeer
  • BaseAttributeQuery
  • BaseCategory
  • BaseCategoryDesc
  • BaseCategoryDescPeer
  • BaseCategoryDescQuery
  • BaseCategoryI18n
  • BaseCategoryI18nPeer
  • BaseCategoryI18nQuery
  • BaseCategoryPeer
  • BaseCategoryQuery
  • BaseCategoryVersion
  • BaseCategoryVersionPeer
  • BaseCategoryVersionQuery
  • BaseCombination
  • BaseCombinationPeer
  • BaseCombinationQuery
  • BaseConfig
  • BaseConfigDesc
  • BaseConfigDescPeer
  • BaseConfigDescQuery
  • BaseConfigI18n
  • BaseConfigI18nPeer
  • BaseConfigI18nQuery
  • BaseConfigPeer
  • BaseConfigQuery
  • BaseContent
  • BaseContentAssoc
  • BaseContentAssocPeer
  • BaseContentAssocQuery
  • BaseContentDesc
  • BaseContentDescPeer
  • BaseContentDescQuery
  • BaseContentFolder
  • BaseContentFolderPeer
  • BaseContentFolderQuery
  • BaseContentI18n
  • BaseContentI18nPeer
  • BaseContentI18nQuery
  • BaseContentPeer
  • BaseContentQuery
  • BaseContentVersion
  • BaseContentVersionPeer
  • BaseContentVersionQuery
  • BaseCountry
  • BaseCountryDesc
  • BaseCountryDescPeer
  • BaseCountryDescQuery
  • BaseCountryI18n
  • BaseCountryI18nPeer
  • BaseCountryI18nQuery
  • BaseCountryPeer
  • BaseCountryQuery
  • BaseCoupon
  • BaseCouponOrder
  • BaseCouponOrderPeer
  • BaseCouponOrderQuery
  • BaseCouponPeer
  • BaseCouponQuery
  • BaseCouponRule
  • BaseCouponRulePeer
  • BaseCouponRuleQuery
  • BaseCurrency
  • BaseCurrencyPeer
  • BaseCurrencyQuery
  • BaseCustomer
  • BaseCustomerPeer
  • BaseCustomerQuery
  • BaseCustomerTitle
  • BaseCustomerTitleDesc
  • BaseCustomerTitleDescPeer
  • BaseCustomerTitleDescQuery
  • BaseCustomerTitleI18n
  • BaseCustomerTitleI18nPeer
  • BaseCustomerTitleI18nQuery
  • BaseCustomerTitlePeer
  • BaseCustomerTitleQuery
  • BaseDelivzone
  • BaseDelivzonePeer
  • BaseDelivzoneQuery
  • BaseDocument
  • BaseDocumentDesc
  • BaseDocumentDescPeer
  • BaseDocumentDescQuery
  • BaseDocumentI18n
  • BaseDocumentI18nPeer
  • BaseDocumentI18nQuery
  • BaseDocumentPeer
  • BaseDocumentQuery
  • BaseFeature
  • BaseFeatureAv
  • BaseFeatureAvDesc
  • BaseFeatureAvDescPeer
  • BaseFeatureAvDescQuery
  • BaseFeatureAvI18n
  • BaseFeatureAvI18nPeer
  • BaseFeatureAvI18nQuery
  • BaseFeatureAvPeer
  • BaseFeatureAvQuery
  • BaseFeatureCategory
  • BaseFeatureCategoryPeer
  • BaseFeatureCategoryQuery
  • BaseFeatureDesc
  • BaseFeatureDescPeer
  • BaseFeatureDescQuery
  • BaseFeatureI18n
  • BaseFeatureI18nPeer
  • BaseFeatureI18nQuery
  • BaseFeaturePeer
  • BaseFeatureProd
  • BaseFeatureProdPeer
  • BaseFeatureProdQuery
  • BaseFeatureQuery
  • BaseFolder
  • BaseFolderDesc
  • BaseFolderDescPeer
  • BaseFolderDescQuery
  • BaseFolderI18n
  • BaseFolderI18nPeer
  • BaseFolderI18nQuery
  • BaseFolderPeer
  • BaseFolderQuery
  • BaseFolderVersion
  • BaseFolderVersionPeer
  • BaseFolderVersionQuery
  • BaseGroup
  • BaseGroupDesc
  • BaseGroupDescPeer
  • BaseGroupDescQuery
  • BaseGroupI18n
  • BaseGroupI18nPeer
  • BaseGroupI18nQuery
  • BaseGroupModule
  • BaseGroupModulePeer
  • BaseGroupModuleQuery
  • BaseGroupPeer
  • BaseGroupQuery
  • BaseGroupResource
  • BaseGroupResourcePeer
  • BaseGroupResourceQuery
  • BaseImage
  • BaseImageDesc
  • BaseImageDescPeer
  • BaseImageDescQuery
  • BaseImageI18n
  • BaseImageI18nPeer
  • BaseImageI18nQuery
  • BaseImagePeer
  • BaseImageQuery
  • BaseLang
  • BaseLangPeer
  • BaseLangQuery
  • BaseMessage
  • BaseMessageDesc
  • BaseMessageDescPeer
  • BaseMessageDescQuery
  • BaseMessageI18n
  • BaseMessageI18nPeer
  • BaseMessageI18nQuery
  • BaseMessagePeer
  • BaseMessageQuery
  • BaseMessageVersion
  • BaseMessageVersionPeer
  • BaseMessageVersionQuery
  • BaseModuleDesc
  • BaseModuleDescPeer
  • BaseModuleDescQuery
  • BaseModuleI18n
  • BaseModuleI18nPeer
  • BaseModuleI18nQuery
  • BaseModulePeer
  • BaseOrder
  • BaseOrderAddress
  • BaseOrderAddressPeer
  • BaseOrderAddressQuery
  • BaseOrderFeature
  • BaseOrderFeaturePeer
  • BaseOrderFeatureQuery
  • BaseOrderPeer
  • BaseOrderProduct
  • BaseOrderProductPeer
  • BaseOrderProductQuery
  • BaseOrderQuery
  • BaseOrderStatus
  • BaseOrderStatusDesc
  • BaseOrderStatusDescPeer
  • BaseOrderStatusDescQuery
  • BaseOrderStatusI18n
  • BaseOrderStatusI18nPeer
  • BaseOrderStatusI18nQuery
  • BaseOrderStatusPeer
  • BaseOrderStatusQuery
  • BaseProduct
  • BaseProductCategory
  • BaseProductCategoryPeer
  • BaseProductCategoryQuery
  • BaseProductDesc
  • BaseProductDescPeer
  • BaseProductDescQuery
  • BaseProductI18n
  • BaseProductI18nPeer
  • BaseProductI18nQuery
  • BaseProductPeer
  • BaseProductQuery
  • BaseProductVersion
  • BaseProductVersionPeer
  • BaseProductVersionQuery
  • BaseResource
  • BaseResourceDesc
  • BaseResourceDescPeer
  • BaseResourceDescQuery
  • BaseResourceI18n
  • BaseResourceI18nPeer
  • BaseResourceI18nQuery
  • BaseResourcePeer
  • BaseResourceQuery
  • BaseRewriting
  • BaseRewritingPeer
  • BaseRewritingQuery
  • BaseStock
  • BaseStockPeer
  • BaseStockQuery
  • BaseTax
  • BaseTaxDesc
  • BaseTaxDescPeer
  • BaseTaxDescQuery
  • BaseTaxI18n
  • BaseTaxI18nPeer
  • BaseTaxI18nQuery
  • BaseTaxPeer
  • BaseTaxQuery
  • BaseTaxRule
  • BaseTaxRuleCountry
  • BaseTaxRuleCountryPeer
  • BaseTaxRuleCountryQuery
  • BaseTaxRuleDesc
  • BaseTaxRuleDescPeer
  • BaseTaxRuleDescQuery
  • BaseTaxRuleI18n
  • BaseTaxRuleI18nPeer
  • BaseTaxRuleI18nQuery
  • BaseTaxRulePeer
  • BaseTaxRuleQuery
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Thelia\Model\om;
  4: 
  5: use \Criteria;
  6: use \Exception;
  7: use \ModelCriteria;
  8: use \ModelJoin;
  9: use \PDO;
 10: use \Propel;
 11: use \PropelCollection;
 12: use \PropelException;
 13: use \PropelObjectCollection;
 14: use \PropelPDO;
 15: use Thelia\Model\AttributeAv;
 16: use Thelia\Model\AttributeAvDesc;
 17: use Thelia\Model\AttributeAvDescPeer;
 18: use Thelia\Model\AttributeAvDescQuery;
 19: 
 20: /**
 21:  * Base class that represents a query for the 'attribute_av_desc' table.
 22:  *
 23:  *
 24:  *
 25:  * @method AttributeAvDescQuery orderById($order = Criteria::ASC) Order by the id column
 26:  * @method AttributeAvDescQuery orderByAttributeAvId($order = Criteria::ASC) Order by the attribute_av_id column
 27:  * @method AttributeAvDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
 28:  * @method AttributeAvDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
 29:  * @method AttributeAvDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
 30:  * @method AttributeAvDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
 31:  * @method AttributeAvDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
 32:  * @method AttributeAvDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
 33:  *
 34:  * @method AttributeAvDescQuery groupById() Group by the id column
 35:  * @method AttributeAvDescQuery groupByAttributeAvId() Group by the attribute_av_id column
 36:  * @method AttributeAvDescQuery groupByLang() Group by the lang column
 37:  * @method AttributeAvDescQuery groupByTitle() Group by the title column
 38:  * @method AttributeAvDescQuery groupByDescription() Group by the description column
 39:  * @method AttributeAvDescQuery groupByChapo() Group by the chapo column
 40:  * @method AttributeAvDescQuery groupByCreatedAt() Group by the created_at column
 41:  * @method AttributeAvDescQuery groupByUpdatedAt() Group by the updated_at column
 42:  *
 43:  * @method AttributeAvDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 44:  * @method AttributeAvDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 45:  * @method AttributeAvDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 46:  *
 47:  * @method AttributeAvDescQuery leftJoinAttributeAv($relationAlias = null) Adds a LEFT JOIN clause to the query using the AttributeAv relation
 48:  * @method AttributeAvDescQuery rightJoinAttributeAv($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AttributeAv relation
 49:  * @method AttributeAvDescQuery innerJoinAttributeAv($relationAlias = null) Adds a INNER JOIN clause to the query using the AttributeAv relation
 50:  *
 51:  * @method AttributeAvDesc findOne(PropelPDO $con = null) Return the first AttributeAvDesc matching the query
 52:  * @method AttributeAvDesc findOneOrCreate(PropelPDO $con = null) Return the first AttributeAvDesc matching the query, or a new AttributeAvDesc object populated from the query conditions when no match is found
 53:  *
 54:  * @method AttributeAvDesc findOneById(int $id) Return the first AttributeAvDesc filtered by the id column
 55:  * @method AttributeAvDesc findOneByAttributeAvId(int $attribute_av_id) Return the first AttributeAvDesc filtered by the attribute_av_id column
 56:  * @method AttributeAvDesc findOneByLang(string $lang) Return the first AttributeAvDesc filtered by the lang column
 57:  * @method AttributeAvDesc findOneByTitle(string $title) Return the first AttributeAvDesc filtered by the title column
 58:  * @method AttributeAvDesc findOneByDescription(string $description) Return the first AttributeAvDesc filtered by the description column
 59:  * @method AttributeAvDesc findOneByChapo(string $chapo) Return the first AttributeAvDesc filtered by the chapo column
 60:  * @method AttributeAvDesc findOneByCreatedAt(string $created_at) Return the first AttributeAvDesc filtered by the created_at column
 61:  * @method AttributeAvDesc findOneByUpdatedAt(string $updated_at) Return the first AttributeAvDesc filtered by the updated_at column
 62:  *
 63:  * @method array findById(int $id) Return AttributeAvDesc objects filtered by the id column
 64:  * @method array findByAttributeAvId(int $attribute_av_id) Return AttributeAvDesc objects filtered by the attribute_av_id column
 65:  * @method array findByLang(string $lang) Return AttributeAvDesc objects filtered by the lang column
 66:  * @method array findByTitle(string $title) Return AttributeAvDesc objects filtered by the title column
 67:  * @method array findByDescription(string $description) Return AttributeAvDesc objects filtered by the description column
 68:  * @method array findByChapo(string $chapo) Return AttributeAvDesc objects filtered by the chapo column
 69:  * @method array findByCreatedAt(string $created_at) Return AttributeAvDesc objects filtered by the created_at column
 70:  * @method array findByUpdatedAt(string $updated_at) Return AttributeAvDesc objects filtered by the updated_at column
 71:  *
 72:  * @package    propel.generator.Thelia.Model.om
 73:  */
 74: abstract class BaseAttributeAvDescQuery extends ModelCriteria
 75: {
 76:     /**
 77:      * Initializes internal state of BaseAttributeAvDescQuery object.
 78:      *
 79:      * @param     string $dbName The dabase name
 80:      * @param     string $modelName The phpName of a model, e.g. 'Book'
 81:      * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
 82:      */
 83:     public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\AttributeAvDesc', $modelAlias = null)
 84:     {
 85:         parent::__construct($dbName, $modelName, $modelAlias);
 86:     }
 87: 
 88:     /**
 89:      * Returns a new AttributeAvDescQuery object.
 90:      *
 91:      * @param     string $modelAlias The alias of a model in the query
 92:      * @param     AttributeAvDescQuery|Criteria $criteria Optional Criteria to build the query from
 93:      *
 94:      * @return AttributeAvDescQuery
 95:      */
 96:     public static function create($modelAlias = null, $criteria = null)
 97:     {
 98:         if ($criteria instanceof AttributeAvDescQuery) {
 99:             return $criteria;
100:         }
101:         $query = new AttributeAvDescQuery();
102:         if (null !== $modelAlias) {
103:             $query->setModelAlias($modelAlias);
104:         }
105:         if ($criteria instanceof Criteria) {
106:             $query->mergeWith($criteria);
107:         }
108: 
109:         return $query;
110:     }
111: 
112:     /**
113:      * Find object by primary key.
114:      * Propel uses the instance pool to skip the database if the object exists.
115:      * Go fast if the query is untouched.
116:      *
117:      * <code>
118:      * $obj  = $c->findPk(12, $con);
119:      * </code>
120:      *
121:      * @param mixed $key Primary key to use for the query
122:      * @param     PropelPDO $con an optional connection object
123:      *
124:      * @return   AttributeAvDesc|AttributeAvDesc[]|mixed the result, formatted by the current formatter
125:      */
126:     public function findPk($key, $con = null)
127:     {
128:         if ($key === null) {
129:             return null;
130:         }
131:         if ((null !== ($obj = AttributeAvDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
132:             // the object is alredy in the instance pool
133:             return $obj;
134:         }
135:         if ($con === null) {
136:             $con = Propel::getConnection(AttributeAvDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
137:         }
138:         $this->basePreSelect($con);
139:         if ($this->formatter || $this->modelAlias || $this->with || $this->select
140:          || $this->selectColumns || $this->asColumns || $this->selectModifiers
141:          || $this->map || $this->having || $this->joins) {
142:             return $this->findPkComplex($key, $con);
143:         } else {
144:             return $this->findPkSimple($key, $con);
145:         }
146:     }
147: 
148:     /**
149:      * Find object by primary key using raw SQL to go fast.
150:      * Bypass doSelect() and the object formatter by using generated code.
151:      *
152:      * @param     mixed $key Primary key to use for the query
153:      * @param     PropelPDO $con A connection object
154:      *
155:      * @return   AttributeAvDesc A model object, or null if the key is not found
156:      * @throws   PropelException
157:      */
158:     protected function findPkSimple($key, $con)
159:     {
160:         $sql = 'SELECT `ID`, `ATTRIBUTE_AV_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `attribute_av_desc` WHERE `ID` = :p0';
161:         try {
162:             $stmt = $con->prepare($sql);
163:             $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
164:             $stmt->execute();
165:         } catch (Exception $e) {
166:             Propel::log($e->getMessage(), Propel::LOG_ERR);
167:             throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
168:         }
169:         $obj = null;
170:         if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
171:             $obj = new AttributeAvDesc();
172:             $obj->hydrate($row);
173:             AttributeAvDescPeer::addInstanceToPool($obj, (string) $key);
174:         }
175:         $stmt->closeCursor();
176: 
177:         return $obj;
178:     }
179: 
180:     /**
181:      * Find object by primary key.
182:      *
183:      * @param     mixed $key Primary key to use for the query
184:      * @param     PropelPDO $con A connection object
185:      *
186:      * @return AttributeAvDesc|AttributeAvDesc[]|mixed the result, formatted by the current formatter
187:      */
188:     protected function findPkComplex($key, $con)
189:     {
190:         // As the query uses a PK condition, no limit(1) is necessary.
191:         $criteria = $this->isKeepQuery() ? clone $this : $this;
192:         $stmt = $criteria
193:             ->filterByPrimaryKey($key)
194:             ->doSelect($con);
195: 
196:         return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
197:     }
198: 
199:     /**
200:      * Find objects by primary key
201:      * <code>
202:      * $objs = $c->findPks(array(12, 56, 832), $con);
203:      * </code>
204:      * @param     array $keys Primary keys to use for the query
205:      * @param     PropelPDO $con an optional connection object
206:      *
207:      * @return PropelObjectCollection|AttributeAvDesc[]|mixed the list of results, formatted by the current formatter
208:      */
209:     public function findPks($keys, $con = null)
210:     {
211:         if ($con === null) {
212:             $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
213:         }
214:         $this->basePreSelect($con);
215:         $criteria = $this->isKeepQuery() ? clone $this : $this;
216:         $stmt = $criteria
217:             ->filterByPrimaryKeys($keys)
218:             ->doSelect($con);
219: 
220:         return $criteria->getFormatter()->init($criteria)->format($stmt);
221:     }
222: 
223:     /**
224:      * Filter the query by primary key
225:      *
226:      * @param     mixed $key Primary key to use for the query
227:      *
228:      * @return AttributeAvDescQuery The current query, for fluid interface
229:      */
230:     public function filterByPrimaryKey($key)
231:     {
232: 
233:         return $this->addUsingAlias(AttributeAvDescPeer::ID, $key, Criteria::EQUAL);
234:     }
235: 
236:     /**
237:      * Filter the query by a list of primary keys
238:      *
239:      * @param     array $keys The list of primary key to use for the query
240:      *
241:      * @return AttributeAvDescQuery The current query, for fluid interface
242:      */
243:     public function filterByPrimaryKeys($keys)
244:     {
245: 
246:         return $this->addUsingAlias(AttributeAvDescPeer::ID, $keys, Criteria::IN);
247:     }
248: 
249:     /**
250:      * Filter the query on the id column
251:      *
252:      * Example usage:
253:      * <code>
254:      * $query->filterById(1234); // WHERE id = 1234
255:      * $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
256:      * $query->filterById(array('min' => 12)); // WHERE id > 12
257:      * </code>
258:      *
259:      * @param     mixed $id The value to use as filter.
260:      *              Use scalar values for equality.
261:      *              Use array values for in_array() equivalent.
262:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
263:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
264:      *
265:      * @return AttributeAvDescQuery The current query, for fluid interface
266:      */
267:     public function filterById($id = null, $comparison = null)
268:     {
269:         if (is_array($id) && null === $comparison) {
270:             $comparison = Criteria::IN;
271:         }
272: 
273:         return $this->addUsingAlias(AttributeAvDescPeer::ID, $id, $comparison);
274:     }
275: 
276:     /**
277:      * Filter the query on the attribute_av_id column
278:      *
279:      * Example usage:
280:      * <code>
281:      * $query->filterByAttributeAvId(1234); // WHERE attribute_av_id = 1234
282:      * $query->filterByAttributeAvId(array(12, 34)); // WHERE attribute_av_id IN (12, 34)
283:      * $query->filterByAttributeAvId(array('min' => 12)); // WHERE attribute_av_id > 12
284:      * </code>
285:      *
286:      * @see       filterByAttributeAv()
287:      *
288:      * @param     mixed $attributeAvId The value to use as filter.
289:      *              Use scalar values for equality.
290:      *              Use array values for in_array() equivalent.
291:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
292:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
293:      *
294:      * @return AttributeAvDescQuery The current query, for fluid interface
295:      */
296:     public function filterByAttributeAvId($attributeAvId = null, $comparison = null)
297:     {
298:         if (is_array($attributeAvId)) {
299:             $useMinMax = false;
300:             if (isset($attributeAvId['min'])) {
301:                 $this->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAvId['min'], Criteria::GREATER_EQUAL);
302:                 $useMinMax = true;
303:             }
304:             if (isset($attributeAvId['max'])) {
305:                 $this->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAvId['max'], Criteria::LESS_EQUAL);
306:                 $useMinMax = true;
307:             }
308:             if ($useMinMax) {
309:                 return $this;
310:             }
311:             if (null === $comparison) {
312:                 $comparison = Criteria::IN;
313:             }
314:         }
315: 
316:         return $this->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAvId, $comparison);
317:     }
318: 
319:     /**
320:      * Filter the query on the lang column
321:      *
322:      * Example usage:
323:      * <code>
324:      * $query->filterByLang('fooValue');   // WHERE lang = 'fooValue'
325:      * $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
326:      * </code>
327:      *
328:      * @param     string $lang The value to use as filter.
329:      *              Accepts wildcards (* and % trigger a LIKE)
330:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
331:      *
332:      * @return AttributeAvDescQuery The current query, for fluid interface
333:      */
334:     public function filterByLang($lang = null, $comparison = null)
335:     {
336:         if (null === $comparison) {
337:             if (is_array($lang)) {
338:                 $comparison = Criteria::IN;
339:             } elseif (preg_match('/[\%\*]/', $lang)) {
340:                 $lang = str_replace('*', '%', $lang);
341:                 $comparison = Criteria::LIKE;
342:             }
343:         }
344: 
345:         return $this->addUsingAlias(AttributeAvDescPeer::LANG, $lang, $comparison);
346:     }
347: 
348:     /**
349:      * Filter the query on the title column
350:      *
351:      * Example usage:
352:      * <code>
353:      * $query->filterByTitle('fooValue');   // WHERE title = 'fooValue'
354:      * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
355:      * </code>
356:      *
357:      * @param     string $title The value to use as filter.
358:      *              Accepts wildcards (* and % trigger a LIKE)
359:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
360:      *
361:      * @return AttributeAvDescQuery The current query, for fluid interface
362:      */
363:     public function filterByTitle($title = null, $comparison = null)
364:     {
365:         if (null === $comparison) {
366:             if (is_array($title)) {
367:                 $comparison = Criteria::IN;
368:             } elseif (preg_match('/[\%\*]/', $title)) {
369:                 $title = str_replace('*', '%', $title);
370:                 $comparison = Criteria::LIKE;
371:             }
372:         }
373: 
374:         return $this->addUsingAlias(AttributeAvDescPeer::TITLE, $title, $comparison);
375:     }
376: 
377:     /**
378:      * Filter the query on the description column
379:      *
380:      * Example usage:
381:      * <code>
382:      * $query->filterByDescription('fooValue');   // WHERE description = 'fooValue'
383:      * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
384:      * </code>
385:      *
386:      * @param     string $description The value to use as filter.
387:      *              Accepts wildcards (* and % trigger a LIKE)
388:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
389:      *
390:      * @return AttributeAvDescQuery The current query, for fluid interface
391:      */
392:     public function filterByDescription($description = null, $comparison = null)
393:     {
394:         if (null === $comparison) {
395:             if (is_array($description)) {
396:                 $comparison = Criteria::IN;
397:             } elseif (preg_match('/[\%\*]/', $description)) {
398:                 $description = str_replace('*', '%', $description);
399:                 $comparison = Criteria::LIKE;
400:             }
401:         }
402: 
403:         return $this->addUsingAlias(AttributeAvDescPeer::DESCRIPTION, $description, $comparison);
404:     }
405: 
406:     /**
407:      * Filter the query on the chapo column
408:      *
409:      * Example usage:
410:      * <code>
411:      * $query->filterByChapo('fooValue');   // WHERE chapo = 'fooValue'
412:      * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
413:      * </code>
414:      *
415:      * @param     string $chapo The value to use as filter.
416:      *              Accepts wildcards (* and % trigger a LIKE)
417:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
418:      *
419:      * @return AttributeAvDescQuery The current query, for fluid interface
420:      */
421:     public function filterByChapo($chapo = null, $comparison = null)
422:     {
423:         if (null === $comparison) {
424:             if (is_array($chapo)) {
425:                 $comparison = Criteria::IN;
426:             } elseif (preg_match('/[\%\*]/', $chapo)) {
427:                 $chapo = str_replace('*', '%', $chapo);
428:                 $comparison = Criteria::LIKE;
429:             }
430:         }
431: 
432:         return $this->addUsingAlias(AttributeAvDescPeer::CHAPO, $chapo, $comparison);
433:     }
434: 
435:     /**
436:      * Filter the query on the created_at column
437:      *
438:      * Example usage:
439:      * <code>
440:      * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
441:      * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
442:      * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
443:      * </code>
444:      *
445:      * @param     mixed $createdAt The value to use as filter.
446:      *              Values can be integers (unix timestamps), DateTime objects, or strings.
447:      *              Empty strings are treated as NULL.
448:      *              Use scalar values for equality.
449:      *              Use array values for in_array() equivalent.
450:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
451:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
452:      *
453:      * @return AttributeAvDescQuery The current query, for fluid interface
454:      */
455:     public function filterByCreatedAt($createdAt = null, $comparison = null)
456:     {
457:         if (is_array($createdAt)) {
458:             $useMinMax = false;
459:             if (isset($createdAt['min'])) {
460:                 $this->addUsingAlias(AttributeAvDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
461:                 $useMinMax = true;
462:             }
463:             if (isset($createdAt['max'])) {
464:                 $this->addUsingAlias(AttributeAvDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
465:                 $useMinMax = true;
466:             }
467:             if ($useMinMax) {
468:                 return $this;
469:             }
470:             if (null === $comparison) {
471:                 $comparison = Criteria::IN;
472:             }
473:         }
474: 
475:         return $this->addUsingAlias(AttributeAvDescPeer::CREATED_AT, $createdAt, $comparison);
476:     }
477: 
478:     /**
479:      * Filter the query on the updated_at column
480:      *
481:      * Example usage:
482:      * <code>
483:      * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
484:      * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
485:      * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
486:      * </code>
487:      *
488:      * @param     mixed $updatedAt The value to use as filter.
489:      *              Values can be integers (unix timestamps), DateTime objects, or strings.
490:      *              Empty strings are treated as NULL.
491:      *              Use scalar values for equality.
492:      *              Use array values for in_array() equivalent.
493:      *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
494:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
495:      *
496:      * @return AttributeAvDescQuery The current query, for fluid interface
497:      */
498:     public function filterByUpdatedAt($updatedAt = null, $comparison = null)
499:     {
500:         if (is_array($updatedAt)) {
501:             $useMinMax = false;
502:             if (isset($updatedAt['min'])) {
503:                 $this->addUsingAlias(AttributeAvDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
504:                 $useMinMax = true;
505:             }
506:             if (isset($updatedAt['max'])) {
507:                 $this->addUsingAlias(AttributeAvDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
508:                 $useMinMax = true;
509:             }
510:             if ($useMinMax) {
511:                 return $this;
512:             }
513:             if (null === $comparison) {
514:                 $comparison = Criteria::IN;
515:             }
516:         }
517: 
518:         return $this->addUsingAlias(AttributeAvDescPeer::UPDATED_AT, $updatedAt, $comparison);
519:     }
520: 
521:     /**
522:      * Filter the query by a related AttributeAv object
523:      *
524:      * @param   AttributeAv|PropelObjectCollection $attributeAv The related object(s) to use as filter
525:      * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
526:      *
527:      * @return   AttributeAvDescQuery The current query, for fluid interface
528:      * @throws   PropelException - if the provided filter is invalid.
529:      */
530:     public function filterByAttributeAv($attributeAv, $comparison = null)
531:     {
532:         if ($attributeAv instanceof AttributeAv) {
533:             return $this
534:                 ->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAv->getId(), $comparison);
535:         } elseif ($attributeAv instanceof PropelObjectCollection) {
536:             if (null === $comparison) {
537:                 $comparison = Criteria::IN;
538:             }
539: 
540:             return $this
541:                 ->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAv->toKeyValue('PrimaryKey', 'Id'), $comparison);
542:         } else {
543:             throw new PropelException('filterByAttributeAv() only accepts arguments of type AttributeAv or PropelCollection');
544:         }
545:     }
546: 
547:     /**
548:      * Adds a JOIN clause to the query using the AttributeAv relation
549:      *
550:      * @param     string $relationAlias optional alias for the relation
551:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
552:      *
553:      * @return AttributeAvDescQuery The current query, for fluid interface
554:      */
555:     public function joinAttributeAv($relationAlias = null, $joinType = Criteria::INNER_JOIN)
556:     {
557:         $tableMap = $this->getTableMap();
558:         $relationMap = $tableMap->getRelation('AttributeAv');
559: 
560:         // create a ModelJoin object for this join
561:         $join = new ModelJoin();
562:         $join->setJoinType($joinType);
563:         $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
564:         if ($previousJoin = $this->getPreviousJoin()) {
565:             $join->setPreviousJoin($previousJoin);
566:         }
567: 
568:         // add the ModelJoin to the current object
569:         if ($relationAlias) {
570:             $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
571:             $this->addJoinObject($join, $relationAlias);
572:         } else {
573:             $this->addJoinObject($join, 'AttributeAv');
574:         }
575: 
576:         return $this;
577:     }
578: 
579:     /**
580:      * Use the AttributeAv relation AttributeAv object
581:      *
582:      * @see       useQuery()
583:      *
584:      * @param     string $relationAlias optional alias for the relation,
585:      *                                   to be used as main alias in the secondary query
586:      * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
587:      *
588:      * @return   \Thelia\Model\AttributeAvQuery A secondary query class using the current class as primary query
589:      */
590:     public function useAttributeAvQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
591:     {
592:         return $this
593:             ->joinAttributeAv($relationAlias, $joinType)
594:             ->useQuery($relationAlias ? $relationAlias : 'AttributeAv', '\Thelia\Model\AttributeAvQuery');
595:     }
596: 
597:     /**
598:      * Exclude object from result
599:      *
600:      * @param   AttributeAvDesc $attributeAvDesc Object to remove from the list of results
601:      *
602:      * @return AttributeAvDescQuery The current query, for fluid interface
603:      */
604:     public function prune($attributeAvDesc = null)
605:     {
606:         if ($attributeAvDesc) {
607:             $this->addUsingAlias(AttributeAvDescPeer::ID, $attributeAvDesc->getId(), Criteria::NOT_EQUAL);
608:         }
609: 
610:         return $this;
611:     }
612: 
613:     // timestampable behavior
614: 
615:     /**
616:      * Filter by the latest updated
617:      *
618:      * @param      int $nbDays Maximum age of the latest update in days
619:      *
620:      * @return     AttributeAvDescQuery The current query, for fluid interface
621:      */
622:     public function recentlyUpdated($nbDays = 7)
623:     {
624:         return $this->addUsingAlias(AttributeAvDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
625:     }
626: 
627:     /**
628:      * Order by update date desc
629:      *
630:      * @return     AttributeAvDescQuery The current query, for fluid interface
631:      */
632:     public function lastUpdatedFirst()
633:     {
634:         return $this->addDescendingOrderByColumn(AttributeAvDescPeer::UPDATED_AT);
635:     }
636: 
637:     /**
638:      * Order by update date asc
639:      *
640:      * @return     AttributeAvDescQuery The current query, for fluid interface
641:      */
642:     public function firstUpdatedFirst()
643:     {
644:         return $this->addAscendingOrderByColumn(AttributeAvDescPeer::UPDATED_AT);
645:     }
646: 
647:     /**
648:      * Filter by the latest created
649:      *
650:      * @param      int $nbDays Maximum age of in days
651:      *
652:      * @return     AttributeAvDescQuery The current query, for fluid interface
653:      */
654:     public function recentlyCreated($nbDays = 7)
655:     {
656:         return $this->addUsingAlias(AttributeAvDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
657:     }
658: 
659:     /**
660:      * Order by create date desc
661:      *
662:      * @return     AttributeAvDescQuery The current query, for fluid interface
663:      */
664:     public function lastCreatedFirst()
665:     {
666:         return $this->addDescendingOrderByColumn(AttributeAvDescPeer::CREATED_AT);
667:     }
668: 
669:     /**
670:      * Order by create date asc
671:      *
672:      * @return     AttributeAvDescQuery The current query, for fluid interface
673:      */
674:     public function firstCreatedFirst()
675:     {
676:         return $this->addAscendingOrderByColumn(AttributeAvDescPeer::CREATED_AT);
677:     }
678: }
679: 
thelia API documentation generated by ApiGen 2.8.0