Working catalog branch

This commit is contained in:
franck
2013-09-20 15:54:50 +02:00
parent 4e6aac8917
commit e27b3cfbae
28 changed files with 3112 additions and 1992 deletions

View File

@@ -78,6 +78,13 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
protected $product_sale_elements_id;
/**
* The value for the is_default field.
* Note: this column has a database default value of: false
* @var boolean
*/
protected $is_default;
/**
* The value for the created_at field.
* @var string
@@ -113,11 +120,24 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
protected $alreadyInSave = false;
/**
* Applies default values to this object.
* This method should be called from the object's constructor (or
* equivalent initialization method).
* @see __construct()
*/
public function applyDefaultValues()
{
$this->is_default = false;
}
/**
* Initializes internal state of Thelia\Model\Base\AttributeCombination object.
* @see applyDefaults()
*/
public function __construct()
{
$this->applyDefaultValues();
}
/**
@@ -400,6 +420,17 @@ abstract class AttributeCombination implements ActiveRecordInterface
return $this->product_sale_elements_id;
}
/**
* Get the [is_default] column value.
*
* @return boolean
*/
public function getIsDefault()
{
return $this->is_default;
}
/**
* Get the [optionally formatted] temporal [created_at] column value.
*
@@ -515,6 +546,35 @@ abstract class AttributeCombination implements ActiveRecordInterface
return $this;
} // setProductSaleElementsId()
/**
* Sets the value of the [is_default] column.
* 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 boolean|integer|string $v The new value
* @return \Thelia\Model\AttributeCombination The current object (for fluent API support)
*/
public function setIsDefault($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->is_default !== $v) {
$this->is_default = $v;
$this->modifiedColumns[] = AttributeCombinationTableMap::IS_DEFAULT;
}
return $this;
} // setIsDefault()
/**
* Sets the value of [created_at] column to a normalized version of the date/time value specified.
*
@@ -567,6 +627,10 @@ abstract class AttributeCombination implements ActiveRecordInterface
*/
public function hasOnlyDefaultValues()
{
if ($this->is_default !== false) {
return false;
}
// otherwise, everything was equal, so return TRUE
return true;
} // hasOnlyDefaultValues()
@@ -603,13 +667,16 @@ abstract class AttributeCombination implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : AttributeCombinationTableMap::translateFieldName('ProductSaleElementsId', TableMap::TYPE_PHPNAME, $indexType)];
$this->product_sale_elements_id = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : AttributeCombinationTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : AttributeCombinationTableMap::translateFieldName('IsDefault', TableMap::TYPE_PHPNAME, $indexType)];
$this->is_default = (null !== $col) ? (boolean) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : AttributeCombinationTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : AttributeCombinationTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : AttributeCombinationTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
if ($col === '0000-00-00 00:00:00') {
$col = null;
}
@@ -622,7 +689,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$this->ensureConsistency();
}
return $startcol + 5; // 5 = AttributeCombinationTableMap::NUM_HYDRATE_COLUMNS.
return $startcol + 6; // 6 = AttributeCombinationTableMap::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) {
throw new PropelException("Error populating \Thelia\Model\AttributeCombination object", 0, $e);
@@ -885,6 +952,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) {
$modifiedColumns[':p' . $index++] = 'PRODUCT_SALE_ELEMENTS_ID';
}
if ($this->isColumnModified(AttributeCombinationTableMap::IS_DEFAULT)) {
$modifiedColumns[':p' . $index++] = 'IS_DEFAULT';
}
if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) {
$modifiedColumns[':p' . $index++] = 'CREATED_AT';
}
@@ -911,6 +981,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
case 'PRODUCT_SALE_ELEMENTS_ID':
$stmt->bindValue($identifier, $this->product_sale_elements_id, PDO::PARAM_INT);
break;
case 'IS_DEFAULT':
$stmt->bindValue($identifier, (int) $this->is_default, PDO::PARAM_INT);
break;
case 'CREATED_AT':
$stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR);
break;
@@ -982,9 +1055,12 @@ abstract class AttributeCombination implements ActiveRecordInterface
return $this->getProductSaleElementsId();
break;
case 3:
return $this->getCreatedAt();
return $this->getIsDefault();
break;
case 4:
return $this->getCreatedAt();
break;
case 5:
return $this->getUpdatedAt();
break;
default:
@@ -1019,8 +1095,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
$keys[0] => $this->getAttributeId(),
$keys[1] => $this->getAttributeAvId(),
$keys[2] => $this->getProductSaleElementsId(),
$keys[3] => $this->getCreatedAt(),
$keys[4] => $this->getUpdatedAt(),
$keys[3] => $this->getIsDefault(),
$keys[4] => $this->getCreatedAt(),
$keys[5] => $this->getUpdatedAt(),
);
$virtualColumns = $this->virtualColumns;
foreach($virtualColumns as $key => $virtualColumn)
@@ -1082,9 +1159,12 @@ abstract class AttributeCombination implements ActiveRecordInterface
$this->setProductSaleElementsId($value);
break;
case 3:
$this->setCreatedAt($value);
$this->setIsDefault($value);
break;
case 4:
$this->setCreatedAt($value);
break;
case 5:
$this->setUpdatedAt($value);
break;
} // switch()
@@ -1114,8 +1194,9 @@ abstract class AttributeCombination implements ActiveRecordInterface
if (array_key_exists($keys[0], $arr)) $this->setAttributeId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setAttributeAvId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setProductSaleElementsId($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
if (array_key_exists($keys[3], $arr)) $this->setIsDefault($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
}
/**
@@ -1130,6 +1211,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_ID)) $criteria->add(AttributeCombinationTableMap::ATTRIBUTE_ID, $this->attribute_id);
if ($this->isColumnModified(AttributeCombinationTableMap::ATTRIBUTE_AV_ID)) $criteria->add(AttributeCombinationTableMap::ATTRIBUTE_AV_ID, $this->attribute_av_id);
if ($this->isColumnModified(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID)) $criteria->add(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $this->product_sale_elements_id);
if ($this->isColumnModified(AttributeCombinationTableMap::IS_DEFAULT)) $criteria->add(AttributeCombinationTableMap::IS_DEFAULT, $this->is_default);
if ($this->isColumnModified(AttributeCombinationTableMap::CREATED_AT)) $criteria->add(AttributeCombinationTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(AttributeCombinationTableMap::UPDATED_AT)) $criteria->add(AttributeCombinationTableMap::UPDATED_AT, $this->updated_at);
@@ -1208,6 +1290,7 @@ abstract class AttributeCombination implements ActiveRecordInterface
$copyObj->setAttributeId($this->getAttributeId());
$copyObj->setAttributeAvId($this->getAttributeAvId());
$copyObj->setProductSaleElementsId($this->getProductSaleElementsId());
$copyObj->setIsDefault($this->getIsDefault());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
if ($makeNew) {
@@ -1398,10 +1481,12 @@ abstract class AttributeCombination implements ActiveRecordInterface
$this->attribute_id = null;
$this->attribute_av_id = null;
$this->product_sale_elements_id = null;
$this->is_default = null;
$this->created_at = null;
$this->updated_at = null;
$this->alreadyInSave = false;
$this->clearAllReferences();
$this->applyDefaultValues();
$this->resetModified();
$this->setNew(true);
$this->setDeleted(false);

View File

@@ -24,12 +24,14 @@ use Thelia\Model\Map\AttributeCombinationTableMap;
* @method ChildAttributeCombinationQuery orderByAttributeId($order = Criteria::ASC) Order by the attribute_id column
* @method ChildAttributeCombinationQuery orderByAttributeAvId($order = Criteria::ASC) Order by the attribute_av_id column
* @method ChildAttributeCombinationQuery orderByProductSaleElementsId($order = Criteria::ASC) Order by the product_sale_elements_id column
* @method ChildAttributeCombinationQuery orderByIsDefault($order = Criteria::ASC) Order by the is_default column
* @method ChildAttributeCombinationQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildAttributeCombinationQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ChildAttributeCombinationQuery groupByAttributeId() Group by the attribute_id column
* @method ChildAttributeCombinationQuery groupByAttributeAvId() Group by the attribute_av_id column
* @method ChildAttributeCombinationQuery groupByProductSaleElementsId() Group by the product_sale_elements_id column
* @method ChildAttributeCombinationQuery groupByIsDefault() Group by the is_default column
* @method ChildAttributeCombinationQuery groupByCreatedAt() Group by the created_at column
* @method ChildAttributeCombinationQuery groupByUpdatedAt() Group by the updated_at column
*
@@ -55,12 +57,14 @@ use Thelia\Model\Map\AttributeCombinationTableMap;
* @method ChildAttributeCombination findOneByAttributeId(int $attribute_id) Return the first ChildAttributeCombination filtered by the attribute_id column
* @method ChildAttributeCombination findOneByAttributeAvId(int $attribute_av_id) Return the first ChildAttributeCombination filtered by the attribute_av_id column
* @method ChildAttributeCombination findOneByProductSaleElementsId(int $product_sale_elements_id) Return the first ChildAttributeCombination filtered by the product_sale_elements_id column
* @method ChildAttributeCombination findOneByIsDefault(boolean $is_default) Return the first ChildAttributeCombination filtered by the is_default column
* @method ChildAttributeCombination findOneByCreatedAt(string $created_at) Return the first ChildAttributeCombination filtered by the created_at column
* @method ChildAttributeCombination findOneByUpdatedAt(string $updated_at) Return the first ChildAttributeCombination filtered by the updated_at column
*
* @method array findByAttributeId(int $attribute_id) Return ChildAttributeCombination objects filtered by the attribute_id column
* @method array findByAttributeAvId(int $attribute_av_id) Return ChildAttributeCombination objects filtered by the attribute_av_id column
* @method array findByProductSaleElementsId(int $product_sale_elements_id) Return ChildAttributeCombination objects filtered by the product_sale_elements_id column
* @method array findByIsDefault(boolean $is_default) Return ChildAttributeCombination objects filtered by the is_default column
* @method array findByCreatedAt(string $created_at) Return ChildAttributeCombination objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildAttributeCombination objects filtered by the updated_at column
*
@@ -151,7 +155,7 @@ abstract class AttributeCombinationQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ATTRIBUTE_ID, ATTRIBUTE_AV_ID, PRODUCT_SALE_ELEMENTS_ID, CREATED_AT, UPDATED_AT FROM attribute_combination WHERE ATTRIBUTE_ID = :p0 AND ATTRIBUTE_AV_ID = :p1 AND PRODUCT_SALE_ELEMENTS_ID = :p2';
$sql = 'SELECT ATTRIBUTE_ID, ATTRIBUTE_AV_ID, PRODUCT_SALE_ELEMENTS_ID, IS_DEFAULT, CREATED_AT, UPDATED_AT FROM attribute_combination WHERE ATTRIBUTE_ID = :p0 AND ATTRIBUTE_AV_ID = :p1 AND PRODUCT_SALE_ELEMENTS_ID = :p2';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
@@ -385,6 +389,33 @@ abstract class AttributeCombinationQuery extends ModelCriteria
return $this->addUsingAlias(AttributeCombinationTableMap::PRODUCT_SALE_ELEMENTS_ID, $productSaleElementsId, $comparison);
}
/**
* Filter the query on the is_default column
*
* Example usage:
* <code>
* $query->filterByIsDefault(true); // WHERE is_default = true
* $query->filterByIsDefault('yes'); // WHERE is_default = true
* </code>
*
* @param boolean|string $isDefault 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 ChildAttributeCombinationQuery The current query, for fluid interface
*/
public function filterByIsDefault($isDefault = null, $comparison = null)
{
if (is_string($isDefault)) {
$is_default = in_array(strtolower($isDefault), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(AttributeCombinationTableMap::IS_DEFAULT, $isDefault, $comparison);
}
/**
* Filter the query on the created_at column
*

View File

@@ -85,10 +85,10 @@ abstract class FeatureProduct implements ActiveRecordInterface
protected $feature_av_id;
/**
* The value for the by_default field.
* The value for the free_text_value field.
* @var string
*/
protected $by_default;
protected $free_text_value;
/**
* The value for the position field.
@@ -430,14 +430,14 @@ abstract class FeatureProduct implements ActiveRecordInterface
}
/**
* Get the [by_default] column value.
* Get the [free_text_value] column value.
*
* @return string
*/
public function getByDefault()
public function getFreeTextValue()
{
return $this->by_default;
return $this->free_text_value;
}
/**
@@ -588,25 +588,25 @@ abstract class FeatureProduct implements ActiveRecordInterface
} // setFeatureAvId()
/**
* Set the value of [by_default] column.
* Set the value of [free_text_value] column.
*
* @param string $v new value
* @return \Thelia\Model\FeatureProduct The current object (for fluent API support)
*/
public function setByDefault($v)
public function setFreeTextValue($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->by_default !== $v) {
$this->by_default = $v;
$this->modifiedColumns[] = FeatureProductTableMap::BY_DEFAULT;
if ($this->free_text_value !== $v) {
$this->free_text_value = $v;
$this->modifiedColumns[] = FeatureProductTableMap::FREE_TEXT_VALUE;
}
return $this;
} // setByDefault()
} // setFreeTextValue()
/**
* Set the value of [position] column.
@@ -720,8 +720,8 @@ abstract class FeatureProduct implements ActiveRecordInterface
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : FeatureProductTableMap::translateFieldName('FeatureAvId', TableMap::TYPE_PHPNAME, $indexType)];
$this->feature_av_id = (null !== $col) ? (int) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FeatureProductTableMap::translateFieldName('ByDefault', TableMap::TYPE_PHPNAME, $indexType)];
$this->by_default = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : FeatureProductTableMap::translateFieldName('FreeTextValue', TableMap::TYPE_PHPNAME, $indexType)];
$this->free_text_value = (null !== $col) ? (string) $col : null;
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : FeatureProductTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)];
$this->position = (null !== $col) ? (int) $col : null;
@@ -1015,8 +1015,8 @@ abstract class FeatureProduct implements ActiveRecordInterface
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_AV_ID)) {
$modifiedColumns[':p' . $index++] = 'FEATURE_AV_ID';
}
if ($this->isColumnModified(FeatureProductTableMap::BY_DEFAULT)) {
$modifiedColumns[':p' . $index++] = 'BY_DEFAULT';
if ($this->isColumnModified(FeatureProductTableMap::FREE_TEXT_VALUE)) {
$modifiedColumns[':p' . $index++] = 'FREE_TEXT_VALUE';
}
if ($this->isColumnModified(FeatureProductTableMap::POSITION)) {
$modifiedColumns[':p' . $index++] = 'POSITION';
@@ -1050,8 +1050,8 @@ abstract class FeatureProduct implements ActiveRecordInterface
case 'FEATURE_AV_ID':
$stmt->bindValue($identifier, $this->feature_av_id, PDO::PARAM_INT);
break;
case 'BY_DEFAULT':
$stmt->bindValue($identifier, $this->by_default, PDO::PARAM_STR);
case 'FREE_TEXT_VALUE':
$stmt->bindValue($identifier, $this->free_text_value, PDO::PARAM_STR);
break;
case 'POSITION':
$stmt->bindValue($identifier, $this->position, PDO::PARAM_INT);
@@ -1137,7 +1137,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
return $this->getFeatureAvId();
break;
case 4:
return $this->getByDefault();
return $this->getFreeTextValue();
break;
case 5:
return $this->getPosition();
@@ -1181,7 +1181,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
$keys[1] => $this->getProductId(),
$keys[2] => $this->getFeatureId(),
$keys[3] => $this->getFeatureAvId(),
$keys[4] => $this->getByDefault(),
$keys[4] => $this->getFreeTextValue(),
$keys[5] => $this->getPosition(),
$keys[6] => $this->getCreatedAt(),
$keys[7] => $this->getUpdatedAt(),
@@ -1249,7 +1249,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
$this->setFeatureAvId($value);
break;
case 4:
$this->setByDefault($value);
$this->setFreeTextValue($value);
break;
case 5:
$this->setPosition($value);
@@ -1288,7 +1288,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
if (array_key_exists($keys[1], $arr)) $this->setProductId($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setFeatureId($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setFeatureAvId($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setByDefault($arr[$keys[4]]);
if (array_key_exists($keys[4], $arr)) $this->setFreeTextValue($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setPosition($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]);
@@ -1307,7 +1307,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
if ($this->isColumnModified(FeatureProductTableMap::PRODUCT_ID)) $criteria->add(FeatureProductTableMap::PRODUCT_ID, $this->product_id);
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_ID)) $criteria->add(FeatureProductTableMap::FEATURE_ID, $this->feature_id);
if ($this->isColumnModified(FeatureProductTableMap::FEATURE_AV_ID)) $criteria->add(FeatureProductTableMap::FEATURE_AV_ID, $this->feature_av_id);
if ($this->isColumnModified(FeatureProductTableMap::BY_DEFAULT)) $criteria->add(FeatureProductTableMap::BY_DEFAULT, $this->by_default);
if ($this->isColumnModified(FeatureProductTableMap::FREE_TEXT_VALUE)) $criteria->add(FeatureProductTableMap::FREE_TEXT_VALUE, $this->free_text_value);
if ($this->isColumnModified(FeatureProductTableMap::POSITION)) $criteria->add(FeatureProductTableMap::POSITION, $this->position);
if ($this->isColumnModified(FeatureProductTableMap::CREATED_AT)) $criteria->add(FeatureProductTableMap::CREATED_AT, $this->created_at);
if ($this->isColumnModified(FeatureProductTableMap::UPDATED_AT)) $criteria->add(FeatureProductTableMap::UPDATED_AT, $this->updated_at);
@@ -1377,7 +1377,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
$copyObj->setProductId($this->getProductId());
$copyObj->setFeatureId($this->getFeatureId());
$copyObj->setFeatureAvId($this->getFeatureAvId());
$copyObj->setByDefault($this->getByDefault());
$copyObj->setFreeTextValue($this->getFreeTextValue());
$copyObj->setPosition($this->getPosition());
$copyObj->setCreatedAt($this->getCreatedAt());
$copyObj->setUpdatedAt($this->getUpdatedAt());
@@ -1571,7 +1571,7 @@ abstract class FeatureProduct implements ActiveRecordInterface
$this->product_id = null;
$this->feature_id = null;
$this->feature_av_id = null;
$this->by_default = null;
$this->free_text_value = null;
$this->position = null;
$this->created_at = null;
$this->updated_at = null;

View File

@@ -25,7 +25,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
* @method ChildFeatureProductQuery orderByProductId($order = Criteria::ASC) Order by the product_id column
* @method ChildFeatureProductQuery orderByFeatureId($order = Criteria::ASC) Order by the feature_id column
* @method ChildFeatureProductQuery orderByFeatureAvId($order = Criteria::ASC) Order by the feature_av_id column
* @method ChildFeatureProductQuery orderByByDefault($order = Criteria::ASC) Order by the by_default column
* @method ChildFeatureProductQuery orderByFreeTextValue($order = Criteria::ASC) Order by the free_text_value column
* @method ChildFeatureProductQuery orderByPosition($order = Criteria::ASC) Order by the position column
* @method ChildFeatureProductQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildFeatureProductQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
@@ -34,7 +34,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
* @method ChildFeatureProductQuery groupByProductId() Group by the product_id column
* @method ChildFeatureProductQuery groupByFeatureId() Group by the feature_id column
* @method ChildFeatureProductQuery groupByFeatureAvId() Group by the feature_av_id column
* @method ChildFeatureProductQuery groupByByDefault() Group by the by_default column
* @method ChildFeatureProductQuery groupByFreeTextValue() Group by the free_text_value column
* @method ChildFeatureProductQuery groupByPosition() Group by the position column
* @method ChildFeatureProductQuery groupByCreatedAt() Group by the created_at column
* @method ChildFeatureProductQuery groupByUpdatedAt() Group by the updated_at column
@@ -62,7 +62,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
* @method ChildFeatureProduct findOneByProductId(int $product_id) Return the first ChildFeatureProduct filtered by the product_id column
* @method ChildFeatureProduct findOneByFeatureId(int $feature_id) Return the first ChildFeatureProduct filtered by the feature_id column
* @method ChildFeatureProduct findOneByFeatureAvId(int $feature_av_id) Return the first ChildFeatureProduct filtered by the feature_av_id column
* @method ChildFeatureProduct findOneByByDefault(string $by_default) Return the first ChildFeatureProduct filtered by the by_default column
* @method ChildFeatureProduct findOneByFreeTextValue(string $free_text_value) Return the first ChildFeatureProduct filtered by the free_text_value column
* @method ChildFeatureProduct findOneByPosition(int $position) Return the first ChildFeatureProduct filtered by the position column
* @method ChildFeatureProduct findOneByCreatedAt(string $created_at) Return the first ChildFeatureProduct filtered by the created_at column
* @method ChildFeatureProduct findOneByUpdatedAt(string $updated_at) Return the first ChildFeatureProduct filtered by the updated_at column
@@ -71,7 +71,7 @@ use Thelia\Model\Map\FeatureProductTableMap;
* @method array findByProductId(int $product_id) Return ChildFeatureProduct objects filtered by the product_id column
* @method array findByFeatureId(int $feature_id) Return ChildFeatureProduct objects filtered by the feature_id column
* @method array findByFeatureAvId(int $feature_av_id) Return ChildFeatureProduct objects filtered by the feature_av_id column
* @method array findByByDefault(string $by_default) Return ChildFeatureProduct objects filtered by the by_default column
* @method array findByFreeTextValue(string $free_text_value) Return ChildFeatureProduct objects filtered by the free_text_value column
* @method array findByPosition(int $position) Return ChildFeatureProduct objects filtered by the position column
* @method array findByCreatedAt(string $created_at) Return ChildFeatureProduct objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildFeatureProduct objects filtered by the updated_at column
@@ -163,7 +163,7 @@ abstract class FeatureProductQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, PRODUCT_ID, FEATURE_ID, FEATURE_AV_ID, BY_DEFAULT, POSITION, CREATED_AT, UPDATED_AT FROM feature_product WHERE ID = :p0';
$sql = 'SELECT ID, PRODUCT_ID, FEATURE_ID, FEATURE_AV_ID, FREE_TEXT_VALUE, POSITION, CREATED_AT, UPDATED_AT FROM feature_product WHERE ID = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -423,32 +423,32 @@ abstract class FeatureProductQuery extends ModelCriteria
}
/**
* Filter the query on the by_default column
* Filter the query on the free_text_value column
*
* Example usage:
* <code>
* $query->filterByByDefault('fooValue'); // WHERE by_default = 'fooValue'
* $query->filterByByDefault('%fooValue%'); // WHERE by_default LIKE '%fooValue%'
* $query->filterByFreeTextValue('fooValue'); // WHERE free_text_value = 'fooValue'
* $query->filterByFreeTextValue('%fooValue%'); // WHERE free_text_value LIKE '%fooValue%'
* </code>
*
* @param string $byDefault The value to use as filter.
* @param string $freeTextValue 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 ChildFeatureProductQuery The current query, for fluid interface
*/
public function filterByByDefault($byDefault = null, $comparison = null)
public function filterByFreeTextValue($freeTextValue = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($byDefault)) {
if (is_array($freeTextValue)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $byDefault)) {
$byDefault = str_replace('*', '%', $byDefault);
} elseif (preg_match('/[\%\*]/', $freeTextValue)) {
$freeTextValue = str_replace('*', '%', $freeTextValue);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureProductTableMap::BY_DEFAULT, $byDefault, $comparison);
return $this->addUsingAlias(FeatureProductTableMap::FREE_TEXT_VALUE, $freeTextValue, $comparison);
}
/**

File diff suppressed because it is too large Load Diff

View File

@@ -24,12 +24,19 @@ use Thelia\Model\Map\OrderProductTableMap;
* @method ChildOrderProductQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildOrderProductQuery orderByOrderId($order = Criteria::ASC) Order by the order_id column
* @method ChildOrderProductQuery orderByProductRef($order = Criteria::ASC) Order by the product_ref column
* @method ChildOrderProductQuery orderByProductSaleElementsRef($order = Criteria::ASC) Order by the product_sale_elements_ref column
* @method ChildOrderProductQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method ChildOrderProductQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ChildOrderProductQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method ChildOrderProductQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ChildOrderProductQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
* @method ChildOrderProductQuery orderByQuantity($order = Criteria::ASC) Order by the quantity column
* @method ChildOrderProductQuery orderByPrice($order = Criteria::ASC) Order by the price column
* @method ChildOrderProductQuery orderByTax($order = Criteria::ASC) Order by the tax column
* @method ChildOrderProductQuery orderByPromoPrice($order = Criteria::ASC) Order by the promo_price column
* @method ChildOrderProductQuery orderByWasNew($order = Criteria::ASC) Order by the was_new column
* @method ChildOrderProductQuery orderByWasInPromo($order = Criteria::ASC) Order by the was_in_promo column
* @method ChildOrderProductQuery orderByWeight($order = Criteria::ASC) Order by the weight column
* @method ChildOrderProductQuery orderByTaxRuleTitle($order = Criteria::ASC) Order by the tax_rule_title column
* @method ChildOrderProductQuery orderByTaxRuleDescription($order = Criteria::ASC) Order by the tax_rule_description column
* @method ChildOrderProductQuery orderByParent($order = Criteria::ASC) Order by the parent column
* @method ChildOrderProductQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ChildOrderProductQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
@@ -37,12 +44,19 @@ use Thelia\Model\Map\OrderProductTableMap;
* @method ChildOrderProductQuery groupById() Group by the id column
* @method ChildOrderProductQuery groupByOrderId() Group by the order_id column
* @method ChildOrderProductQuery groupByProductRef() Group by the product_ref column
* @method ChildOrderProductQuery groupByProductSaleElementsRef() Group by the product_sale_elements_ref column
* @method ChildOrderProductQuery groupByTitle() Group by the title column
* @method ChildOrderProductQuery groupByDescription() Group by the description column
* @method ChildOrderProductQuery groupByChapo() Group by the chapo column
* @method ChildOrderProductQuery groupByDescription() Group by the description column
* @method ChildOrderProductQuery groupByPostscriptum() Group by the postscriptum column
* @method ChildOrderProductQuery groupByQuantity() Group by the quantity column
* @method ChildOrderProductQuery groupByPrice() Group by the price column
* @method ChildOrderProductQuery groupByTax() Group by the tax column
* @method ChildOrderProductQuery groupByPromoPrice() Group by the promo_price column
* @method ChildOrderProductQuery groupByWasNew() Group by the was_new column
* @method ChildOrderProductQuery groupByWasInPromo() Group by the was_in_promo column
* @method ChildOrderProductQuery groupByWeight() Group by the weight column
* @method ChildOrderProductQuery groupByTaxRuleTitle() Group by the tax_rule_title column
* @method ChildOrderProductQuery groupByTaxRuleDescription() Group by the tax_rule_description column
* @method ChildOrderProductQuery groupByParent() Group by the parent column
* @method ChildOrderProductQuery groupByCreatedAt() Group by the created_at column
* @method ChildOrderProductQuery groupByUpdatedAt() Group by the updated_at column
@@ -55,9 +69,13 @@ use Thelia\Model\Map\OrderProductTableMap;
* @method ChildOrderProductQuery rightJoinOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Order relation
* @method ChildOrderProductQuery innerJoinOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the Order relation
*
* @method ChildOrderProductQuery leftJoinOrderFeature($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderFeature relation
* @method ChildOrderProductQuery rightJoinOrderFeature($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderFeature relation
* @method ChildOrderProductQuery innerJoinOrderFeature($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderFeature relation
* @method ChildOrderProductQuery leftJoinOrderProductAttributeCombination($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProductAttributeCombination relation
* @method ChildOrderProductQuery rightJoinOrderProductAttributeCombination($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProductAttributeCombination relation
* @method ChildOrderProductQuery innerJoinOrderProductAttributeCombination($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProductAttributeCombination relation
*
* @method ChildOrderProductQuery leftJoinOrderProductTax($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderProductTax relation
* @method ChildOrderProductQuery rightJoinOrderProductTax($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderProductTax relation
* @method ChildOrderProductQuery innerJoinOrderProductTax($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderProductTax relation
*
* @method ChildOrderProduct findOne(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query
* @method ChildOrderProduct findOneOrCreate(ConnectionInterface $con = null) Return the first ChildOrderProduct matching the query, or a new ChildOrderProduct object populated from the query conditions when no match is found
@@ -65,12 +83,19 @@ use Thelia\Model\Map\OrderProductTableMap;
* @method ChildOrderProduct findOneById(int $id) Return the first ChildOrderProduct filtered by the id column
* @method ChildOrderProduct findOneByOrderId(int $order_id) Return the first ChildOrderProduct filtered by the order_id column
* @method ChildOrderProduct findOneByProductRef(string $product_ref) Return the first ChildOrderProduct filtered by the product_ref column
* @method ChildOrderProduct findOneByProductSaleElementsRef(string $product_sale_elements_ref) Return the first ChildOrderProduct filtered by the product_sale_elements_ref column
* @method ChildOrderProduct findOneByTitle(string $title) Return the first ChildOrderProduct filtered by the title column
* @method ChildOrderProduct findOneByDescription(string $description) Return the first ChildOrderProduct filtered by the description column
* @method ChildOrderProduct findOneByChapo(string $chapo) Return the first ChildOrderProduct filtered by the chapo column
* @method ChildOrderProduct findOneByDescription(string $description) Return the first ChildOrderProduct filtered by the description column
* @method ChildOrderProduct findOneByPostscriptum(string $postscriptum) Return the first ChildOrderProduct filtered by the postscriptum column
* @method ChildOrderProduct findOneByQuantity(double $quantity) Return the first ChildOrderProduct filtered by the quantity column
* @method ChildOrderProduct findOneByPrice(double $price) Return the first ChildOrderProduct filtered by the price column
* @method ChildOrderProduct findOneByTax(double $tax) Return the first ChildOrderProduct filtered by the tax column
* @method ChildOrderProduct findOneByPromoPrice(string $promo_price) Return the first ChildOrderProduct filtered by the promo_price column
* @method ChildOrderProduct findOneByWasNew(int $was_new) Return the first ChildOrderProduct filtered by the was_new column
* @method ChildOrderProduct findOneByWasInPromo(int $was_in_promo) Return the first ChildOrderProduct filtered by the was_in_promo column
* @method ChildOrderProduct findOneByWeight(string $weight) Return the first ChildOrderProduct filtered by the weight column
* @method ChildOrderProduct findOneByTaxRuleTitle(string $tax_rule_title) Return the first ChildOrderProduct filtered by the tax_rule_title column
* @method ChildOrderProduct findOneByTaxRuleDescription(string $tax_rule_description) Return the first ChildOrderProduct filtered by the tax_rule_description column
* @method ChildOrderProduct findOneByParent(int $parent) Return the first ChildOrderProduct filtered by the parent column
* @method ChildOrderProduct findOneByCreatedAt(string $created_at) Return the first ChildOrderProduct filtered by the created_at column
* @method ChildOrderProduct findOneByUpdatedAt(string $updated_at) Return the first ChildOrderProduct filtered by the updated_at column
@@ -78,12 +103,19 @@ use Thelia\Model\Map\OrderProductTableMap;
* @method array findById(int $id) Return ChildOrderProduct objects filtered by the id column
* @method array findByOrderId(int $order_id) Return ChildOrderProduct objects filtered by the order_id column
* @method array findByProductRef(string $product_ref) Return ChildOrderProduct objects filtered by the product_ref column
* @method array findByProductSaleElementsRef(string $product_sale_elements_ref) Return ChildOrderProduct objects filtered by the product_sale_elements_ref column
* @method array findByTitle(string $title) Return ChildOrderProduct objects filtered by the title column
* @method array findByDescription(string $description) Return ChildOrderProduct objects filtered by the description column
* @method array findByChapo(string $chapo) Return ChildOrderProduct objects filtered by the chapo column
* @method array findByDescription(string $description) Return ChildOrderProduct objects filtered by the description column
* @method array findByPostscriptum(string $postscriptum) Return ChildOrderProduct objects filtered by the postscriptum column
* @method array findByQuantity(double $quantity) Return ChildOrderProduct objects filtered by the quantity column
* @method array findByPrice(double $price) Return ChildOrderProduct objects filtered by the price column
* @method array findByTax(double $tax) Return ChildOrderProduct objects filtered by the tax column
* @method array findByPromoPrice(string $promo_price) Return ChildOrderProduct objects filtered by the promo_price column
* @method array findByWasNew(int $was_new) Return ChildOrderProduct objects filtered by the was_new column
* @method array findByWasInPromo(int $was_in_promo) Return ChildOrderProduct objects filtered by the was_in_promo column
* @method array findByWeight(string $weight) Return ChildOrderProduct objects filtered by the weight column
* @method array findByTaxRuleTitle(string $tax_rule_title) Return ChildOrderProduct objects filtered by the tax_rule_title column
* @method array findByTaxRuleDescription(string $tax_rule_description) Return ChildOrderProduct objects filtered by the tax_rule_description column
* @method array findByParent(int $parent) Return ChildOrderProduct objects filtered by the parent column
* @method array findByCreatedAt(string $created_at) Return ChildOrderProduct objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ChildOrderProduct objects filtered by the updated_at column
@@ -175,7 +207,7 @@ abstract class OrderProductQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, ORDER_ID, PRODUCT_REF, TITLE, DESCRIPTION, CHAPO, QUANTITY, PRICE, TAX, PARENT, CREATED_AT, UPDATED_AT FROM order_product WHERE ID = :p0';
$sql = 'SELECT ID, ORDER_ID, PRODUCT_REF, PRODUCT_SALE_ELEMENTS_REF, TITLE, CHAPO, DESCRIPTION, POSTSCRIPTUM, QUANTITY, PRICE, PROMO_PRICE, WAS_NEW, WAS_IN_PROMO, WEIGHT, TAX_RULE_TITLE, TAX_RULE_DESCRIPTION, PARENT, CREATED_AT, UPDATED_AT FROM order_product WHERE ID = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -377,6 +409,35 @@ abstract class OrderProductQuery extends ModelCriteria
return $this->addUsingAlias(OrderProductTableMap::PRODUCT_REF, $productRef, $comparison);
}
/**
* Filter the query on the product_sale_elements_ref column
*
* Example usage:
* <code>
* $query->filterByProductSaleElementsRef('fooValue'); // WHERE product_sale_elements_ref = 'fooValue'
* $query->filterByProductSaleElementsRef('%fooValue%'); // WHERE product_sale_elements_ref LIKE '%fooValue%'
* </code>
*
* @param string $productSaleElementsRef 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByProductSaleElementsRef($productSaleElementsRef = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($productSaleElementsRef)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $productSaleElementsRef)) {
$productSaleElementsRef = str_replace('*', '%', $productSaleElementsRef);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderProductTableMap::PRODUCT_SALE_ELEMENTS_REF, $productSaleElementsRef, $comparison);
}
/**
* Filter the query on the title column
*
@@ -406,6 +467,35 @@ abstract class OrderProductQuery extends ModelCriteria
return $this->addUsingAlias(OrderProductTableMap::TITLE, $title, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderProductTableMap::CHAPO, $chapo, $comparison);
}
/**
* Filter the query on the description column
*
@@ -436,32 +526,32 @@ abstract class OrderProductQuery extends ModelCriteria
}
/**
* Filter the query on the chapo column
* Filter the query on the postscriptum column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue'
* $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* @param string $postscriptum 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
public function filterByPostscriptum($postscriptum = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
if (is_array($postscriptum)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
} elseif (preg_match('/[\%\*]/', $postscriptum)) {
$postscriptum = str_replace('*', '%', $postscriptum);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderProductTableMap::CHAPO, $chapo, $comparison);
return $this->addUsingAlias(OrderProductTableMap::POSTSCRIPTUM, $postscriptum, $comparison);
}
/**
@@ -547,16 +637,45 @@ abstract class OrderProductQuery extends ModelCriteria
}
/**
* Filter the query on the tax column
* Filter the query on the promo_price column
*
* Example usage:
* <code>
* $query->filterByTax(1234); // WHERE tax = 1234
* $query->filterByTax(array(12, 34)); // WHERE tax IN (12, 34)
* $query->filterByTax(array('min' => 12)); // WHERE tax > 12
* $query->filterByPromoPrice('fooValue'); // WHERE promo_price = 'fooValue'
* $query->filterByPromoPrice('%fooValue%'); // WHERE promo_price LIKE '%fooValue%'
* </code>
*
* @param mixed $tax The value to use as filter.
* @param string $promoPrice 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByPromoPrice($promoPrice = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($promoPrice)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $promoPrice)) {
$promoPrice = str_replace('*', '%', $promoPrice);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderProductTableMap::PROMO_PRICE, $promoPrice, $comparison);
}
/**
* Filter the query on the was_new column
*
* Example usage:
* <code>
* $query->filterByWasNew(1234); // WHERE was_new = 1234
* $query->filterByWasNew(array(12, 34)); // WHERE was_new IN (12, 34)
* $query->filterByWasNew(array('min' => 12)); // WHERE was_new > 12
* </code>
*
* @param mixed $wasNew 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.
@@ -564,16 +683,16 @@ abstract class OrderProductQuery extends ModelCriteria
*
* @return ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByTax($tax = null, $comparison = null)
public function filterByWasNew($wasNew = null, $comparison = null)
{
if (is_array($tax)) {
if (is_array($wasNew)) {
$useMinMax = false;
if (isset($tax['min'])) {
$this->addUsingAlias(OrderProductTableMap::TAX, $tax['min'], Criteria::GREATER_EQUAL);
if (isset($wasNew['min'])) {
$this->addUsingAlias(OrderProductTableMap::WAS_NEW, $wasNew['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($tax['max'])) {
$this->addUsingAlias(OrderProductTableMap::TAX, $tax['max'], Criteria::LESS_EQUAL);
if (isset($wasNew['max'])) {
$this->addUsingAlias(OrderProductTableMap::WAS_NEW, $wasNew['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
@@ -584,7 +703,135 @@ abstract class OrderProductQuery extends ModelCriteria
}
}
return $this->addUsingAlias(OrderProductTableMap::TAX, $tax, $comparison);
return $this->addUsingAlias(OrderProductTableMap::WAS_NEW, $wasNew, $comparison);
}
/**
* Filter the query on the was_in_promo column
*
* Example usage:
* <code>
* $query->filterByWasInPromo(1234); // WHERE was_in_promo = 1234
* $query->filterByWasInPromo(array(12, 34)); // WHERE was_in_promo IN (12, 34)
* $query->filterByWasInPromo(array('min' => 12)); // WHERE was_in_promo > 12
* </code>
*
* @param mixed $wasInPromo 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByWasInPromo($wasInPromo = null, $comparison = null)
{
if (is_array($wasInPromo)) {
$useMinMax = false;
if (isset($wasInPromo['min'])) {
$this->addUsingAlias(OrderProductTableMap::WAS_IN_PROMO, $wasInPromo['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($wasInPromo['max'])) {
$this->addUsingAlias(OrderProductTableMap::WAS_IN_PROMO, $wasInPromo['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(OrderProductTableMap::WAS_IN_PROMO, $wasInPromo, $comparison);
}
/**
* Filter the query on the weight column
*
* Example usage:
* <code>
* $query->filterByWeight('fooValue'); // WHERE weight = 'fooValue'
* $query->filterByWeight('%fooValue%'); // WHERE weight LIKE '%fooValue%'
* </code>
*
* @param string $weight 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByWeight($weight = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($weight)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $weight)) {
$weight = str_replace('*', '%', $weight);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderProductTableMap::WEIGHT, $weight, $comparison);
}
/**
* Filter the query on the tax_rule_title column
*
* Example usage:
* <code>
* $query->filterByTaxRuleTitle('fooValue'); // WHERE tax_rule_title = 'fooValue'
* $query->filterByTaxRuleTitle('%fooValue%'); // WHERE tax_rule_title LIKE '%fooValue%'
* </code>
*
* @param string $taxRuleTitle 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByTaxRuleTitle($taxRuleTitle = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($taxRuleTitle)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $taxRuleTitle)) {
$taxRuleTitle = str_replace('*', '%', $taxRuleTitle);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderProductTableMap::TAX_RULE_TITLE, $taxRuleTitle, $comparison);
}
/**
* Filter the query on the tax_rule_description column
*
* Example usage:
* <code>
* $query->filterByTaxRuleDescription('fooValue'); // WHERE tax_rule_description = 'fooValue'
* $query->filterByTaxRuleDescription('%fooValue%'); // WHERE tax_rule_description LIKE '%fooValue%'
* </code>
*
* @param string $taxRuleDescription 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 ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByTaxRuleDescription($taxRuleDescription = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($taxRuleDescription)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $taxRuleDescription)) {
$taxRuleDescription = str_replace('*', '%', $taxRuleDescription);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderProductTableMap::TAX_RULE_DESCRIPTION, $taxRuleDescription, $comparison);
}
/**
@@ -790,40 +1037,40 @@ abstract class OrderProductQuery extends ModelCriteria
}
/**
* Filter the query by a related \Thelia\Model\OrderFeature object
* Filter the query by a related \Thelia\Model\OrderProductAttributeCombination object
*
* @param \Thelia\Model\OrderFeature|ObjectCollection $orderFeature the related object to use as filter
* @param \Thelia\Model\OrderProductAttributeCombination|ObjectCollection $orderProductAttributeCombination the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByOrderFeature($orderFeature, $comparison = null)
public function filterByOrderProductAttributeCombination($orderProductAttributeCombination, $comparison = null)
{
if ($orderFeature instanceof \Thelia\Model\OrderFeature) {
if ($orderProductAttributeCombination instanceof \Thelia\Model\OrderProductAttributeCombination) {
return $this
->addUsingAlias(OrderProductTableMap::ID, $orderFeature->getOrderProductId(), $comparison);
} elseif ($orderFeature instanceof ObjectCollection) {
->addUsingAlias(OrderProductTableMap::ID, $orderProductAttributeCombination->getOrderProductId(), $comparison);
} elseif ($orderProductAttributeCombination instanceof ObjectCollection) {
return $this
->useOrderFeatureQuery()
->filterByPrimaryKeys($orderFeature->getPrimaryKeys())
->useOrderProductAttributeCombinationQuery()
->filterByPrimaryKeys($orderProductAttributeCombination->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByOrderFeature() only accepts arguments of type \Thelia\Model\OrderFeature or Collection');
throw new PropelException('filterByOrderProductAttributeCombination() only accepts arguments of type \Thelia\Model\OrderProductAttributeCombination or Collection');
}
}
/**
* Adds a JOIN clause to the query using the OrderFeature relation
* Adds a JOIN clause to the query using the OrderProductAttributeCombination relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ChildOrderProductQuery The current query, for fluid interface
*/
public function joinOrderFeature($relationAlias = null, $joinType = Criteria::INNER_JOIN)
public function joinOrderProductAttributeCombination($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('OrderFeature');
$relationMap = $tableMap->getRelation('OrderProductAttributeCombination');
// create a ModelJoin object for this join
$join = new ModelJoin();
@@ -838,14 +1085,14 @@ abstract class OrderProductQuery extends ModelCriteria
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'OrderFeature');
$this->addJoinObject($join, 'OrderProductAttributeCombination');
}
return $this;
}
/**
* Use the OrderFeature relation OrderFeature object
* Use the OrderProductAttributeCombination relation OrderProductAttributeCombination object
*
* @see useQuery()
*
@@ -853,13 +1100,86 @@ abstract class OrderProductQuery extends ModelCriteria
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return \Thelia\Model\OrderFeatureQuery A secondary query class using the current class as primary query
* @return \Thelia\Model\OrderProductAttributeCombinationQuery A secondary query class using the current class as primary query
*/
public function useOrderFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
public function useOrderProductAttributeCombinationQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinOrderFeature($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'OrderFeature', '\Thelia\Model\OrderFeatureQuery');
->joinOrderProductAttributeCombination($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'OrderProductAttributeCombination', '\Thelia\Model\OrderProductAttributeCombinationQuery');
}
/**
* Filter the query by a related \Thelia\Model\OrderProductTax object
*
* @param \Thelia\Model\OrderProductTax|ObjectCollection $orderProductTax the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildOrderProductQuery The current query, for fluid interface
*/
public function filterByOrderProductTax($orderProductTax, $comparison = null)
{
if ($orderProductTax instanceof \Thelia\Model\OrderProductTax) {
return $this
->addUsingAlias(OrderProductTableMap::ID, $orderProductTax->getOrderProductId(), $comparison);
} elseif ($orderProductTax instanceof ObjectCollection) {
return $this
->useOrderProductTaxQuery()
->filterByPrimaryKeys($orderProductTax->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByOrderProductTax() only accepts arguments of type \Thelia\Model\OrderProductTax or Collection');
}
}
/**
* Adds a JOIN clause to the query using the OrderProductTax relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ChildOrderProductQuery The current query, for fluid interface
*/
public function joinOrderProductTax($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('OrderProductTax');
// 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, 'OrderProductTax');
}
return $this;
}
/**
* Use the OrderProductTax relation OrderProductTax 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 \Thelia\Model\OrderProductTaxQuery A secondary query class using the current class as primary query
*/
public function useOrderProductTaxQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinOrderProductTax($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'OrderProductTax', '\Thelia\Model\OrderProductTaxQuery');
}
/**