Split import export management in two
modifié: core/lib/Thelia/Config/Resources/config.xml modifié: core/lib/Thelia/Config/Resources/loop.xml modifié: core/lib/Thelia/Config/Resources/routing/admin.xml nouveau fichier: core/lib/Thelia/Controller/Admin/ImportExportController.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/Export.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/ExportCategory.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/Import.php nouveau fichier: core/lib/Thelia/Core/Template/Loop/ImportCategory.php modifié: core/lib/Thelia/Core/Template/Loop/ImportExportCategory.php modifié: core/lib/Thelia/Core/Template/Loop/ImportExportType.php nouveau fichier: core/lib/Thelia/Model/Base/Export.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategory.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategoryI18n.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategoryI18nQuery.php nouveau fichier: core/lib/Thelia/Model/Base/ExportCategoryQuery.php nouveau fichier: core/lib/Thelia/Model/Base/ExportI18n.php nouveau fichier: core/lib/Thelia/Model/Base/ExportI18nQuery.php nouveau fichier: core/lib/Thelia/Model/Base/ExportQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportType.php -> core/lib/Thelia/Model/Base/Import.php renommé: core/lib/Thelia/Model/Base/ImportExportCategory.php -> core/lib/Thelia/Model/Base/ImportCategory.php renommé: core/lib/Thelia/Model/Base/ImportExportCategoryI18n.php -> core/lib/Thelia/Model/Base/ImportCategoryI18n.php renommé: core/lib/Thelia/Model/Base/ImportExportCategoryI18nQuery.php -> core/lib/Thelia/Model/Base/ImportCategoryI18nQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportCategoryQuery.php -> core/lib/Thelia/Model/Base/ImportCategoryQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportTypeI18n.php -> core/lib/Thelia/Model/Base/ImportI18n.php renommé: core/lib/Thelia/Model/Base/ImportExportTypeI18nQuery.php -> core/lib/Thelia/Model/Base/ImportI18nQuery.php renommé: core/lib/Thelia/Model/Base/ImportExportTypeQuery.php -> core/lib/Thelia/Model/Base/ImportQuery.php nouveau fichier: core/lib/Thelia/Model/Export.php nouveau fichier: core/lib/Thelia/Model/ExportCategory.php nouveau fichier: core/lib/Thelia/Model/ExportCategoryI18n.php renommé: core/lib/Thelia/Model/ImportExportCategoryQuery.php -> core/lib/Thelia/Model/ExportCategoryI18nQuery.php renommé: core/lib/Thelia/Model/ImportExportTypeQuery.php -> core/lib/Thelia/Model/ExportCategoryQuery.php nouveau fichier: core/lib/Thelia/Model/ExportI18n.php renommé: core/lib/Thelia/Model/ImportExportTypeI18nQuery.php -> core/lib/Thelia/Model/ExportI18nQuery.php renommé: core/lib/Thelia/Model/ImportExportCategoryI18nQuery.php -> core/lib/Thelia/Model/ExportQuery.php nouveau fichier: core/lib/Thelia/Model/Import.php nouveau fichier: core/lib/Thelia/Model/ImportCategory.php nouveau fichier: core/lib/Thelia/Model/ImportCategoryI18n.php nouveau fichier: core/lib/Thelia/Model/ImportCategoryI18nQuery.php nouveau fichier: core/lib/Thelia/Model/ImportCategoryQuery.php supprimé: core/lib/Thelia/Model/ImportExportCategory.php supprimé: core/lib/Thelia/Model/ImportExportCategoryI18n.php supprimé: core/lib/Thelia/Model/ImportExportType.php supprimé: core/lib/Thelia/Model/ImportExportTypeI18n.php nouveau fichier: core/lib/Thelia/Model/ImportI18n.php nouveau fichier: core/lib/Thelia/Model/ImportI18nQuery.php nouveau fichier: core/lib/Thelia/Model/ImportQuery.php nouveau fichier: core/lib/Thelia/Model/Map/ExportCategoryI18nTableMap.php nouveau fichier: core/lib/Thelia/Model/Map/ExportCategoryTableMap.php nouveau fichier: core/lib/Thelia/Model/Map/ExportI18nTableMap.php nouveau fichier: core/lib/Thelia/Model/Map/ExportTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportCategoryI18nTableMap.php -> core/lib/Thelia/Model/Map/ImportCategoryI18nTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportCategoryTableMap.php -> core/lib/Thelia/Model/Map/ImportCategoryTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportTypeI18nTableMap.php -> core/lib/Thelia/Model/Map/ImportI18nTableMap.php renommé: core/lib/Thelia/Model/Map/ImportExportTypeTableMap.php -> core/lib/Thelia/Model/Map/ImportTableMap.php modifié: local/config/schema.xml modifié: setup/thelia.sql modifié: templates/backOffice/default/export.html
This commit is contained in:
1884
core/lib/Thelia/Model/Base/Export.php
Normal file
1884
core/lib/Thelia/Model/Base/Export.php
Normal file
File diff suppressed because it is too large
Load Diff
1989
core/lib/Thelia/Model/Base/ExportCategory.php
Normal file
1989
core/lib/Thelia/Model/Base/ExportCategory.php
Normal file
File diff suppressed because it is too large
Load Diff
1268
core/lib/Thelia/Model/Base/ExportCategoryI18n.php
Normal file
1268
core/lib/Thelia/Model/Base/ExportCategoryI18n.php
Normal file
File diff suppressed because it is too large
Load Diff
508
core/lib/Thelia/Model/Base/ExportCategoryI18nQuery.php
Normal file
508
core/lib/Thelia/Model/Base/ExportCategoryI18nQuery.php
Normal file
@@ -0,0 +1,508 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||
use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\ExportCategoryI18n as ChildExportCategoryI18n;
|
||||
use Thelia\Model\ExportCategoryI18nQuery as ChildExportCategoryI18nQuery;
|
||||
use Thelia\Model\Map\ExportCategoryI18nTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'export_category_i18n' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildExportCategoryI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildExportCategoryI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildExportCategoryI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
*
|
||||
* @method ChildExportCategoryI18nQuery groupById() Group by the id column
|
||||
* @method ChildExportCategoryI18nQuery groupByLocale() Group by the locale column
|
||||
* @method ChildExportCategoryI18nQuery groupByTitle() Group by the title column
|
||||
*
|
||||
* @method ChildExportCategoryI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildExportCategoryI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildExportCategoryI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildExportCategoryI18nQuery leftJoinExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportCategory relation
|
||||
* @method ChildExportCategoryI18nQuery rightJoinExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportCategory relation
|
||||
* @method ChildExportCategoryI18nQuery innerJoinExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportCategory relation
|
||||
*
|
||||
* @method ChildExportCategoryI18n findOne(ConnectionInterface $con = null) Return the first ChildExportCategoryI18n matching the query
|
||||
* @method ChildExportCategoryI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExportCategoryI18n matching the query, or a new ChildExportCategoryI18n object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildExportCategoryI18n findOneById(int $id) Return the first ChildExportCategoryI18n filtered by the id column
|
||||
* @method ChildExportCategoryI18n findOneByLocale(string $locale) Return the first ChildExportCategoryI18n filtered by the locale column
|
||||
* @method ChildExportCategoryI18n findOneByTitle(string $title) Return the first ChildExportCategoryI18n filtered by the title column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildExportCategoryI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildExportCategoryI18n objects filtered by the locale column
|
||||
* @method array findByTitle(string $title) Return ChildExportCategoryI18n objects filtered by the title column
|
||||
*
|
||||
*/
|
||||
abstract class ExportCategoryI18nQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ExportCategoryI18nQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ExportCategoryI18n', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildExportCategoryI18nQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ExportCategoryI18nQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ExportCategoryI18nQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(array(12, 34), $con);
|
||||
* </code>
|
||||
*
|
||||
* @param array[$id, $locale] $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ExportCategoryI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExportCategoryI18n A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE` FROM `export_category_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
$stmt->bindValue(':p1', $key[1], PDO::PARAM_STR);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildExportCategoryI18n();
|
||||
$obj->hydrate($row);
|
||||
ExportCategoryI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
$this->addUsingAlias(ExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
if (empty($keys)) {
|
||||
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
$cton0 = $this->getNewCriterion(ExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$cton1 = $this->getNewCriterion(ExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$cton0->addAnd($cton1);
|
||||
$this->addOr($cton0);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterById(1234); // WHERE id = 1234
|
||||
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByExportCategory()
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ExportCategoryI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ExportCategoryI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryI18nTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the locale column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue'
|
||||
* $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $locale 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 ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLocale($locale = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($locale)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $locale)) {
|
||||
$locale = str_replace('*', '%', $locale);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryI18nTableMap::LOCALE, $locale, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
|
||||
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $title The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTitle($title = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($title)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $title)) {
|
||||
$title = str_replace('*', '%', $title);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryI18nTableMap::TITLE, $title, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ExportCategory object
|
||||
*
|
||||
* @param \Thelia\Model\ExportCategory|ObjectCollection $exportCategory The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByExportCategory($exportCategory, $comparison = null)
|
||||
{
|
||||
if ($exportCategory instanceof \Thelia\Model\ExportCategory) {
|
||||
return $this
|
||||
->addUsingAlias(ExportCategoryI18nTableMap::ID, $exportCategory->getId(), $comparison);
|
||||
} elseif ($exportCategory instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ExportCategoryI18nTableMap::ID, $exportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByExportCategory() only accepts arguments of type \Thelia\Model\ExportCategory or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ExportCategory relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinExportCategory($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ExportCategory');
|
||||
|
||||
// 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, 'ExportCategory');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ExportCategory relation ExportCategory 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\ExportCategoryQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useExportCategoryQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinExportCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportCategory', '\Thelia\Model\ExportCategoryQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildExportCategoryI18n $exportCategoryI18n Object to remove from the list of results
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($exportCategoryI18n = null)
|
||||
{
|
||||
if ($exportCategoryI18n) {
|
||||
$this->addCond('pruneCond0', $this->getAliasedColName(ExportCategoryI18nTableMap::ID), $exportCategoryI18n->getId(), Criteria::NOT_EQUAL);
|
||||
$this->addCond('pruneCond1', $this->getAliasedColName(ExportCategoryI18nTableMap::LOCALE), $exportCategoryI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the export_category_i18n table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
$affectedRows += parent::doDeleteAll($con);
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ExportCategoryI18nTableMap::clearInstancePool();
|
||||
ExportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildExportCategoryI18n or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildExportCategoryI18n object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ExportCategoryI18nTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ExportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
} // ExportCategoryI18nQuery
|
||||
764
core/lib/Thelia/Model/Base/ExportCategoryQuery.php
Normal file
764
core/lib/Thelia/Model/Base/ExportCategoryQuery.php
Normal file
@@ -0,0 +1,764 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||
use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\ExportCategory as ChildExportCategory;
|
||||
use Thelia\Model\ExportCategoryI18nQuery as ChildExportCategoryI18nQuery;
|
||||
use Thelia\Model\ExportCategoryQuery as ChildExportCategoryQuery;
|
||||
use Thelia\Model\Map\ExportCategoryTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'export_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildExportCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildExportCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildExportCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildExportCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildExportCategoryQuery groupById() Group by the id column
|
||||
* @method ChildExportCategoryQuery groupByPosition() Group by the position column
|
||||
* @method ChildExportCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildExportCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
* @method ChildExportCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildExportCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildExportCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildExportCategoryQuery leftJoinExport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Export relation
|
||||
* @method ChildExportCategoryQuery rightJoinExport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Export relation
|
||||
* @method ChildExportCategoryQuery innerJoinExport($relationAlias = null) Adds a INNER JOIN clause to the query using the Export relation
|
||||
*
|
||||
* @method ChildExportCategoryQuery leftJoinExportCategoryI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportCategoryI18n relation
|
||||
* @method ChildExportCategoryQuery rightJoinExportCategoryI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportCategoryI18n relation
|
||||
* @method ChildExportCategoryQuery innerJoinExportCategoryI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportCategoryI18n relation
|
||||
*
|
||||
* @method ChildExportCategory findOne(ConnectionInterface $con = null) Return the first ChildExportCategory matching the query
|
||||
* @method ChildExportCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExportCategory matching the query, or a new ChildExportCategory object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildExportCategory findOneById(int $id) Return the first ChildExportCategory filtered by the id column
|
||||
* @method ChildExportCategory findOneByPosition(int $position) Return the first ChildExportCategory filtered by the position column
|
||||
* @method ChildExportCategory findOneByCreatedAt(string $created_at) Return the first ChildExportCategory filtered by the created_at column
|
||||
* @method ChildExportCategory findOneByUpdatedAt(string $updated_at) Return the first ChildExportCategory filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildExportCategory objects filtered by the id column
|
||||
* @method array findByPosition(int $position) Return ChildExportCategory objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildExportCategory objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildExportCategory objects filtered by the updated_at column
|
||||
*
|
||||
*/
|
||||
abstract class ExportCategoryQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ExportCategoryQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ExportCategory', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildExportCategoryQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildExportCategoryQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ExportCategoryQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ExportCategoryQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildExportCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ExportCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExportCategory A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `export_category` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildExportCategory();
|
||||
$obj->hydrate($row);
|
||||
ExportCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExportCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterById(1234); // WHERE id = 1234
|
||||
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPosition(1234); // WHERE position = 1234
|
||||
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
|
||||
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $position 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 ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $createdAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($createdAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($createdAt['min'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($createdAt['max'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the updated_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $updatedAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($updatedAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($updatedAt['min'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($updatedAt['max'])) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Export object
|
||||
*
|
||||
* @param \Thelia\Model\Export|ObjectCollection $export the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByExport($export, $comparison = null)
|
||||
{
|
||||
if ($export instanceof \Thelia\Model\Export) {
|
||||
return $this
|
||||
->addUsingAlias(ExportCategoryTableMap::ID, $export->getExportCategoryId(), $comparison);
|
||||
} elseif ($export instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useExportQuery()
|
||||
->filterByPrimaryKeys($export->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByExport() only accepts arguments of type \Thelia\Model\Export or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Export relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinExport($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Export');
|
||||
|
||||
// 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, 'Export');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Export relation Export 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\ExportQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useExportQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinExport($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Export', '\Thelia\Model\ExportQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ExportCategoryI18n object
|
||||
*
|
||||
* @param \Thelia\Model\ExportCategoryI18n|ObjectCollection $exportCategoryI18n the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByExportCategoryI18n($exportCategoryI18n, $comparison = null)
|
||||
{
|
||||
if ($exportCategoryI18n instanceof \Thelia\Model\ExportCategoryI18n) {
|
||||
return $this
|
||||
->addUsingAlias(ExportCategoryTableMap::ID, $exportCategoryI18n->getId(), $comparison);
|
||||
} elseif ($exportCategoryI18n instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useExportCategoryI18nQuery()
|
||||
->filterByPrimaryKeys($exportCategoryI18n->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByExportCategoryI18n() only accepts arguments of type \Thelia\Model\ExportCategoryI18n or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ExportCategoryI18n relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinExportCategoryI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ExportCategoryI18n');
|
||||
|
||||
// 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, 'ExportCategoryI18n');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ExportCategoryI18n relation ExportCategoryI18n 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\ExportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useExportCategoryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinExportCategoryI18n($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportCategoryI18n', '\Thelia\Model\ExportCategoryI18nQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildExportCategory $exportCategory Object to remove from the list of results
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($exportCategory = null)
|
||||
{
|
||||
if ($exportCategory) {
|
||||
$this->addUsingAlias(ExportCategoryTableMap::ID, $exportCategory->getId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the export_category table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
$affectedRows += parent::doDeleteAll($con);
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ExportCategoryTableMap::clearInstancePool();
|
||||
ExportCategoryTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildExportCategory or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildExportCategory object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ExportCategoryTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ExportCategoryTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ExportCategoryTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ExportCategoryI18n';
|
||||
|
||||
return $this
|
||||
->joinExportCategoryI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ExportCategoryI18n');
|
||||
$this->with['ExportCategoryI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportCategoryI18n', '\Thelia\Model\ExportCategoryI18nQuery');
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Filter by the latest updated
|
||||
*
|
||||
* @param int $nbDays Maximum age of the latest update in days
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyUpdated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter by the latest created
|
||||
*
|
||||
* @param int $nbDays Maximum age of in days
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyCreated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ExportCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date desc
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastUpdatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ExportCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date asc
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstUpdatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ExportCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date desc
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastCreatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ExportCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date asc
|
||||
*
|
||||
* @return ChildExportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstCreatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ExportCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
} // ExportCategoryQuery
|
||||
1326
core/lib/Thelia/Model/Base/ExportI18n.php
Normal file
1326
core/lib/Thelia/Model/Base/ExportI18n.php
Normal file
File diff suppressed because it is too large
Load Diff
541
core/lib/Thelia/Model/Base/ExportI18nQuery.php
Normal file
541
core/lib/Thelia/Model/Base/ExportI18nQuery.php
Normal file
@@ -0,0 +1,541 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||
use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\ExportI18n as ChildExportI18n;
|
||||
use Thelia\Model\ExportI18nQuery as ChildExportI18nQuery;
|
||||
use Thelia\Model\Map\ExportI18nTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'export_i18n' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildExportI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildExportI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildExportI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ChildExportI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
*
|
||||
* @method ChildExportI18nQuery groupById() Group by the id column
|
||||
* @method ChildExportI18nQuery groupByLocale() Group by the locale column
|
||||
* @method ChildExportI18nQuery groupByTitle() Group by the title column
|
||||
* @method ChildExportI18nQuery groupByDescription() Group by the description column
|
||||
*
|
||||
* @method ChildExportI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildExportI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildExportI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildExportI18nQuery leftJoinExport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Export relation
|
||||
* @method ChildExportI18nQuery rightJoinExport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Export relation
|
||||
* @method ChildExportI18nQuery innerJoinExport($relationAlias = null) Adds a INNER JOIN clause to the query using the Export relation
|
||||
*
|
||||
* @method ChildExportI18n findOne(ConnectionInterface $con = null) Return the first ChildExportI18n matching the query
|
||||
* @method ChildExportI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExportI18n matching the query, or a new ChildExportI18n object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildExportI18n findOneById(int $id) Return the first ChildExportI18n filtered by the id column
|
||||
* @method ChildExportI18n findOneByLocale(string $locale) Return the first ChildExportI18n filtered by the locale column
|
||||
* @method ChildExportI18n findOneByTitle(string $title) Return the first ChildExportI18n filtered by the title column
|
||||
* @method ChildExportI18n findOneByDescription(string $description) Return the first ChildExportI18n filtered by the description column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildExportI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildExportI18n objects filtered by the locale column
|
||||
* @method array findByTitle(string $title) Return ChildExportI18n objects filtered by the title column
|
||||
* @method array findByDescription(string $description) Return ChildExportI18n objects filtered by the description column
|
||||
*
|
||||
*/
|
||||
abstract class ExportI18nQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ExportI18nQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ExportI18n', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildExportI18nQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildExportI18nQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ExportI18nQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ExportI18nQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(array(12, 34), $con);
|
||||
* </code>
|
||||
*
|
||||
* @param array[$id, $locale] $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildExportI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ExportI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExportI18n A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE`, `DESCRIPTION` FROM `export_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
$stmt->bindValue(':p1', $key[1], PDO::PARAM_STR);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildExportI18n();
|
||||
$obj->hydrate($row);
|
||||
ExportI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExportI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
$this->addUsingAlias(ExportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ExportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
if (empty($keys)) {
|
||||
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
$cton0 = $this->getNewCriterion(ExportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$cton1 = $this->getNewCriterion(ExportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$cton0->addAnd($cton1);
|
||||
$this->addOr($cton0);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterById(1234); // WHERE id = 1234
|
||||
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByExport()
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ExportI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ExportI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportI18nTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the locale column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue'
|
||||
* $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $locale 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 ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLocale($locale = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($locale)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $locale)) {
|
||||
$locale = str_replace('*', '%', $locale);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportI18nTableMap::LOCALE, $locale, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
|
||||
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $title The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTitle($title = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($title)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $title)) {
|
||||
$title = str_replace('*', '%', $title);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportI18nTableMap::TITLE, $title, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
|
||||
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $description 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 ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDescription($description = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($description)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $description)) {
|
||||
$description = str_replace('*', '%', $description);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportI18nTableMap::DESCRIPTION, $description, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Export object
|
||||
*
|
||||
* @param \Thelia\Model\Export|ObjectCollection $export The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByExport($export, $comparison = null)
|
||||
{
|
||||
if ($export instanceof \Thelia\Model\Export) {
|
||||
return $this
|
||||
->addUsingAlias(ExportI18nTableMap::ID, $export->getId(), $comparison);
|
||||
} elseif ($export instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ExportI18nTableMap::ID, $export->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByExport() only accepts arguments of type \Thelia\Model\Export or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Export relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinExport($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Export');
|
||||
|
||||
// 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, 'Export');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Export relation Export 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\ExportQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useExportQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinExport($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Export', '\Thelia\Model\ExportQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildExportI18n $exportI18n Object to remove from the list of results
|
||||
*
|
||||
* @return ChildExportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($exportI18n = null)
|
||||
{
|
||||
if ($exportI18n) {
|
||||
$this->addCond('pruneCond0', $this->getAliasedColName(ExportI18nTableMap::ID), $exportI18n->getId(), Criteria::NOT_EQUAL);
|
||||
$this->addCond('pruneCond1', $this->getAliasedColName(ExportI18nTableMap::LOCALE), $exportI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the export_i18n table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
$affectedRows += parent::doDeleteAll($con);
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ExportI18nTableMap::clearInstancePool();
|
||||
ExportI18nTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildExportI18n or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildExportI18n object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ExportI18nTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ExportI18nTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ExportI18nTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
} // ExportI18nQuery
|
||||
813
core/lib/Thelia/Model/Base/ExportQuery.php
Normal file
813
core/lib/Thelia/Model/Base/ExportQuery.php
Normal file
@@ -0,0 +1,813 @@
|
||||
<?php
|
||||
|
||||
namespace Thelia\Model\Base;
|
||||
|
||||
use \Exception;
|
||||
use \PDO;
|
||||
use Propel\Runtime\Propel;
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveQuery\ModelJoin;
|
||||
use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\Export as ChildExport;
|
||||
use Thelia\Model\ExportI18nQuery as ChildExportI18nQuery;
|
||||
use Thelia\Model\ExportQuery as ChildExportQuery;
|
||||
use Thelia\Model\Map\ExportTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'export' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildExportQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildExportQuery orderByExportCategoryId($order = Criteria::ASC) Order by the export_category_id column
|
||||
* @method ChildExportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildExportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildExportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildExportQuery groupById() Group by the id column
|
||||
* @method ChildExportQuery groupByExportCategoryId() Group by the export_category_id column
|
||||
* @method ChildExportQuery groupByPosition() Group by the position column
|
||||
* @method ChildExportQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildExportQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
* @method ChildExportQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildExportQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildExportQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildExportQuery leftJoinExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportCategory relation
|
||||
* @method ChildExportQuery rightJoinExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportCategory relation
|
||||
* @method ChildExportQuery innerJoinExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportCategory relation
|
||||
*
|
||||
* @method ChildExportQuery leftJoinExportI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ExportI18n relation
|
||||
* @method ChildExportQuery rightJoinExportI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ExportI18n relation
|
||||
* @method ChildExportQuery innerJoinExportI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ExportI18n relation
|
||||
*
|
||||
* @method ChildExport findOne(ConnectionInterface $con = null) Return the first ChildExport matching the query
|
||||
* @method ChildExport findOneOrCreate(ConnectionInterface $con = null) Return the first ChildExport matching the query, or a new ChildExport object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildExport findOneById(int $id) Return the first ChildExport filtered by the id column
|
||||
* @method ChildExport findOneByExportCategoryId(int $export_category_id) Return the first ChildExport filtered by the export_category_id column
|
||||
* @method ChildExport findOneByPosition(int $position) Return the first ChildExport filtered by the position column
|
||||
* @method ChildExport findOneByCreatedAt(string $created_at) Return the first ChildExport filtered by the created_at column
|
||||
* @method ChildExport findOneByUpdatedAt(string $updated_at) Return the first ChildExport filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildExport objects filtered by the id column
|
||||
* @method array findByExportCategoryId(int $export_category_id) Return ChildExport objects filtered by the export_category_id column
|
||||
* @method array findByPosition(int $position) Return ChildExport objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildExport objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildExport objects filtered by the updated_at column
|
||||
*
|
||||
*/
|
||||
abstract class ExportQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ExportQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Export', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildExportQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildExportQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ExportQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ExportQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
if ($criteria instanceof Criteria) {
|
||||
$query->mergeWith($criteria);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
* Propel uses the instance pool to skip the database if the object exists.
|
||||
* Go fast if the query is untouched.
|
||||
*
|
||||
* <code>
|
||||
* $obj = $c->findPk(12, $con);
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildExport|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ExportTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ExportTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
|| $this->selectColumns || $this->asColumns || $this->selectModifiers
|
||||
|| $this->map || $this->having || $this->joins) {
|
||||
return $this->findPkComplex($key, $con);
|
||||
} else {
|
||||
return $this->findPkSimple($key, $con);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key using raw SQL to go fast.
|
||||
* Bypass doSelect() and the object formatter by using generated code.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExport A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `EXPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `export` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
$stmt->execute();
|
||||
} catch (Exception $e) {
|
||||
Propel::log($e->getMessage(), Propel::LOG_ERR);
|
||||
throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildExport();
|
||||
$obj->hydrate($row);
|
||||
ExportTableMap::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find object by primary key.
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildExport|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
// As the query uses a PK condition, no limit(1) is necessary.
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKey($key)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find objects by primary key
|
||||
* <code>
|
||||
* $objs = $c->findPks(array(12, 56, 832), $con);
|
||||
* </code>
|
||||
* @param array $keys Primary keys to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ObjectCollection|array|mixed the list of results, formatted by the current formatter
|
||||
*/
|
||||
public function findPks($keys, $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection($this->getDbName());
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
$criteria = $this->isKeepQuery() ? clone $this : $this;
|
||||
$dataFetcher = $criteria
|
||||
->filterByPrimaryKeys($keys)
|
||||
->doSelect($con);
|
||||
|
||||
return $criteria->getFormatter()->init($criteria)->format($dataFetcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by primary key
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a list of primary keys
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterById(1234); // WHERE id = 1234
|
||||
* $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ExportTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ExportTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the export_category_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByExportCategoryId(1234); // WHERE export_category_id = 1234
|
||||
* $query->filterByExportCategoryId(array(12, 34)); // WHERE export_category_id IN (12, 34)
|
||||
* $query->filterByExportCategoryId(array('min' => 12)); // WHERE export_category_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByExportCategory()
|
||||
*
|
||||
* @param mixed $exportCategoryId 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 ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByExportCategoryId($exportCategoryId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($exportCategoryId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($exportCategoryId['min'])) {
|
||||
$this->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategoryId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($exportCategoryId['max'])) {
|
||||
$this->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategoryId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategoryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the position column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByPosition(1234); // WHERE position = 1234
|
||||
* $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34)
|
||||
* $query->filterByPosition(array('min' => 12)); // WHERE position > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $position 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 ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ExportTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ExportTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the created_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
|
||||
* $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $createdAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($createdAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($createdAt['min'])) {
|
||||
$this->addUsingAlias(ExportTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($createdAt['max'])) {
|
||||
$this->addUsingAlias(ExportTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the updated_at column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
|
||||
* $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $updatedAt The value to use as filter.
|
||||
* Values can be integers (unix timestamps), DateTime objects, or strings.
|
||||
* Empty strings are treated as NULL.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($updatedAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($updatedAt['min'])) {
|
||||
$this->addUsingAlias(ExportTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($updatedAt['max'])) {
|
||||
$this->addUsingAlias(ExportTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ExportTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ExportCategory object
|
||||
*
|
||||
* @param \Thelia\Model\ExportCategory|ObjectCollection $exportCategory The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByExportCategory($exportCategory, $comparison = null)
|
||||
{
|
||||
if ($exportCategory instanceof \Thelia\Model\ExportCategory) {
|
||||
return $this
|
||||
->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategory->getId(), $comparison);
|
||||
} elseif ($exportCategory instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ExportTableMap::EXPORT_CATEGORY_ID, $exportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByExportCategory() only accepts arguments of type \Thelia\Model\ExportCategory or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ExportCategory relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinExportCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ExportCategory');
|
||||
|
||||
// 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, 'ExportCategory');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ExportCategory relation ExportCategory 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\ExportCategoryQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useExportCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinExportCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportCategory', '\Thelia\Model\ExportCategoryQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ExportI18n object
|
||||
*
|
||||
* @param \Thelia\Model\ExportI18n|ObjectCollection $exportI18n the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByExportI18n($exportI18n, $comparison = null)
|
||||
{
|
||||
if ($exportI18n instanceof \Thelia\Model\ExportI18n) {
|
||||
return $this
|
||||
->addUsingAlias(ExportTableMap::ID, $exportI18n->getId(), $comparison);
|
||||
} elseif ($exportI18n instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useExportI18nQuery()
|
||||
->filterByPrimaryKeys($exportI18n->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByExportI18n() only accepts arguments of type \Thelia\Model\ExportI18n or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ExportI18n relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinExportI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ExportI18n');
|
||||
|
||||
// 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, 'ExportI18n');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ExportI18n relation ExportI18n 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\ExportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useExportI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinExportI18n($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportI18n', '\Thelia\Model\ExportI18nQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildExport $export Object to remove from the list of results
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($export = null)
|
||||
{
|
||||
if ($export) {
|
||||
$this->addUsingAlias(ExportTableMap::ID, $export->getId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the export table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
*/
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
$affectedRows += parent::doDeleteAll($con);
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ExportTableMap::clearInstancePool();
|
||||
ExportTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return $affectedRows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildExport or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildExport object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
* if supported by native driver or if emulated using Propel.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ExportTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ExportTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
try {
|
||||
// use transaction because $criteria could contain info
|
||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ExportTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ExportTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollBack();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
// i18n behavior
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the i18n relation
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ExportI18n';
|
||||
|
||||
return $this
|
||||
->joinExportI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query and hydrates the related I18n object.
|
||||
* Shortcut for $c->joinI18n($locale)->with()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ExportI18n');
|
||||
$this->with['ExportI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the I18n relation query object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildExportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ExportI18n', '\Thelia\Model\ExportI18nQuery');
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
|
||||
/**
|
||||
* Filter by the latest updated
|
||||
*
|
||||
* @param int $nbDays Maximum age of the latest update in days
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyUpdated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ExportTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter by the latest created
|
||||
*
|
||||
* @param int $nbDays Maximum age of in days
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyCreated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ExportTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date desc
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastUpdatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ExportTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date asc
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstUpdatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ExportTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date desc
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastCreatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ExportTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date asc
|
||||
*
|
||||
* @return ChildExportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstCreatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ExportTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
} // ExportQuery
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -14,17 +14,17 @@ use Propel\Runtime\Exception\BadMethodCallException;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Parser\AbstractParser;
|
||||
use Thelia\Model\ImportExportCategory as ChildImportExportCategory;
|
||||
use Thelia\Model\ImportExportCategoryI18nQuery as ChildImportExportCategoryI18nQuery;
|
||||
use Thelia\Model\ImportExportCategoryQuery as ChildImportExportCategoryQuery;
|
||||
use Thelia\Model\Map\ImportExportCategoryI18nTableMap;
|
||||
use Thelia\Model\ImportCategory as ChildImportCategory;
|
||||
use Thelia\Model\ImportCategoryI18nQuery as ChildImportCategoryI18nQuery;
|
||||
use Thelia\Model\ImportCategoryQuery as ChildImportCategoryQuery;
|
||||
use Thelia\Model\Map\ImportCategoryI18nTableMap;
|
||||
|
||||
abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
abstract class ImportCategoryI18n implements ActiveRecordInterface
|
||||
{
|
||||
/**
|
||||
* TableMap class name
|
||||
*/
|
||||
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportExportCategoryI18nTableMap';
|
||||
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportCategoryI18nTableMap';
|
||||
|
||||
|
||||
/**
|
||||
@@ -73,9 +73,9 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* @var ImportExportCategory
|
||||
* @var ImportCategory
|
||||
*/
|
||||
protected $aImportExportCategory;
|
||||
protected $aImportCategory;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -97,7 +97,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes internal state of Thelia\Model\Base\ImportExportCategoryI18n object.
|
||||
* Initializes internal state of Thelia\Model\Base\ImportCategoryI18n object.
|
||||
* @see applyDefaults()
|
||||
*/
|
||||
public function __construct()
|
||||
@@ -194,9 +194,9 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this with another <code>ImportExportCategoryI18n</code> instance. If
|
||||
* <code>obj</code> is an instance of <code>ImportExportCategoryI18n</code>, delegates to
|
||||
* <code>equals(ImportExportCategoryI18n)</code>. Otherwise, returns <code>false</code>.
|
||||
* Compares this with another <code>ImportCategoryI18n</code> instance. If
|
||||
* <code>obj</code> is an instance of <code>ImportCategoryI18n</code>, delegates to
|
||||
* <code>equals(ImportCategoryI18n)</code>. Otherwise, returns <code>false</code>.
|
||||
*
|
||||
* @param mixed $obj The object to compare to.
|
||||
* @return boolean Whether equal to the object specified.
|
||||
@@ -279,7 +279,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* @param string $name The virtual column name
|
||||
* @param mixed $value The value to give to the virtual column
|
||||
*
|
||||
* @return ImportExportCategoryI18n The current object, for fluid interface
|
||||
* @return ImportCategoryI18n The current object, for fluid interface
|
||||
*/
|
||||
public function setVirtualColumn($name, $value)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* or a format name ('XML', 'YAML', 'JSON', 'CSV')
|
||||
* @param string $data The source data to import from
|
||||
*
|
||||
* @return ImportExportCategoryI18n The current object, for fluid interface
|
||||
* @return ImportCategoryI18n The current object, for fluid interface
|
||||
*/
|
||||
public function importFrom($parser, $data)
|
||||
{
|
||||
@@ -393,7 +393,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
||||
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setId($v)
|
||||
{
|
||||
@@ -403,11 +403,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->id !== $v) {
|
||||
$this->id = $v;
|
||||
$this->modifiedColumns[ImportExportCategoryI18nTableMap::ID] = true;
|
||||
$this->modifiedColumns[ImportCategoryI18nTableMap::ID] = true;
|
||||
}
|
||||
|
||||
if ($this->aImportExportCategory !== null && $this->aImportExportCategory->getId() !== $v) {
|
||||
$this->aImportExportCategory = null;
|
||||
if ($this->aImportCategory !== null && $this->aImportCategory->getId() !== $v) {
|
||||
$this->aImportCategory = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* Set the value of [locale] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
||||
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setLocale($v)
|
||||
{
|
||||
@@ -428,7 +428,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->locale !== $v) {
|
||||
$this->locale = $v;
|
||||
$this->modifiedColumns[ImportExportCategoryI18nTableMap::LOCALE] = true;
|
||||
$this->modifiedColumns[ImportCategoryI18nTableMap::LOCALE] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -439,7 +439,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* Set the value of [title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
||||
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setTitle($v)
|
||||
{
|
||||
@@ -449,7 +449,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->title !== $v) {
|
||||
$this->title = $v;
|
||||
$this->modifiedColumns[ImportExportCategoryI18nTableMap::TITLE] = true;
|
||||
$this->modifiedColumns[ImportCategoryI18nTableMap::TITLE] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -497,13 +497,13 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
try {
|
||||
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportExportCategoryI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportCategoryI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportExportCategoryI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportCategoryI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->locale = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportExportCategoryI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportCategoryI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->title = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -513,10 +513,10 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 3; // 3 = ImportExportCategoryI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 3; // 3 = ImportCategoryI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\ImportExportCategoryI18n object", 0, $e);
|
||||
throw new PropelException("Error populating \Thelia\Model\ImportCategoryI18n object", 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -535,8 +535,8 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function ensureConsistency()
|
||||
{
|
||||
if ($this->aImportExportCategory !== null && $this->id !== $this->aImportExportCategory->getId()) {
|
||||
$this->aImportExportCategory = null;
|
||||
if ($this->aImportCategory !== null && $this->id !== $this->aImportCategory->getId()) {
|
||||
$this->aImportCategory = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
||||
@@ -561,13 +561,13 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
// We don't need to alter the object instance pool; we're just modifying this instance
|
||||
// already in the pool.
|
||||
|
||||
$dataFetcher = ChildImportExportCategoryI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
||||
$dataFetcher = ChildImportCategoryI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
||||
$row = $dataFetcher->fetch();
|
||||
$dataFetcher->close();
|
||||
if (!$row) {
|
||||
@@ -577,7 +577,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aImportExportCategory = null;
|
||||
$this->aImportCategory = null;
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
@@ -587,8 +587,8 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* @param ConnectionInterface $con
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
* @see ImportExportCategoryI18n::setDeleted()
|
||||
* @see ImportExportCategoryI18n::isDeleted()
|
||||
* @see ImportCategoryI18n::setDeleted()
|
||||
* @see ImportCategoryI18n::isDeleted()
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
@@ -597,12 +597,12 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$con->beginTransaction();
|
||||
try {
|
||||
$deleteQuery = ChildImportExportCategoryI18nQuery::create()
|
||||
$deleteQuery = ChildImportCategoryI18nQuery::create()
|
||||
->filterByPrimaryKey($this->getPrimaryKey());
|
||||
$ret = $this->preDelete($con);
|
||||
if ($ret) {
|
||||
@@ -639,7 +639,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$con->beginTransaction();
|
||||
@@ -659,7 +659,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
$this->postUpdate($con);
|
||||
}
|
||||
$this->postSave($con);
|
||||
ImportExportCategoryI18nTableMap::addInstanceToPool($this);
|
||||
ImportCategoryI18nTableMap::addInstanceToPool($this);
|
||||
} else {
|
||||
$affectedRows = 0;
|
||||
}
|
||||
@@ -694,11 +694,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
// method. This object relates to these object(s) by a
|
||||
// foreign key reference.
|
||||
|
||||
if ($this->aImportExportCategory !== null) {
|
||||
if ($this->aImportExportCategory->isModified() || $this->aImportExportCategory->isNew()) {
|
||||
$affectedRows += $this->aImportExportCategory->save($con);
|
||||
if ($this->aImportCategory !== null) {
|
||||
if ($this->aImportCategory->isModified() || $this->aImportCategory->isNew()) {
|
||||
$affectedRows += $this->aImportCategory->save($con);
|
||||
}
|
||||
$this->setImportExportCategory($this->aImportExportCategory);
|
||||
$this->setImportCategory($this->aImportCategory);
|
||||
}
|
||||
|
||||
if ($this->isNew() || $this->isModified()) {
|
||||
@@ -734,18 +734,18 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
|
||||
|
||||
// check the columns in natural order for more readable SQL queries
|
||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::ID)) {
|
||||
if ($this->isColumnModified(ImportCategoryI18nTableMap::ID)) {
|
||||
$modifiedColumns[':p' . $index++] = '`ID`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::LOCALE)) {
|
||||
if ($this->isColumnModified(ImportCategoryI18nTableMap::LOCALE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`LOCALE`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::TITLE)) {
|
||||
if ($this->isColumnModified(ImportCategoryI18nTableMap::TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`TITLE`';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO `import_export_category_i18n` (%s) VALUES (%s)',
|
||||
'INSERT INTO `import_category_i18n` (%s) VALUES (%s)',
|
||||
implode(', ', $modifiedColumns),
|
||||
implode(', ', array_keys($modifiedColumns))
|
||||
);
|
||||
@@ -802,7 +802,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function getByName($name, $type = TableMap::TYPE_PHPNAME)
|
||||
{
|
||||
$pos = ImportExportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
$pos = ImportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
$field = $this->getByPosition($pos);
|
||||
|
||||
return $field;
|
||||
@@ -850,11 +850,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
|
||||
{
|
||||
if (isset($alreadyDumpedObjects['ImportExportCategoryI18n'][serialize($this->getPrimaryKey())])) {
|
||||
if (isset($alreadyDumpedObjects['ImportCategoryI18n'][serialize($this->getPrimaryKey())])) {
|
||||
return '*RECURSION*';
|
||||
}
|
||||
$alreadyDumpedObjects['ImportExportCategoryI18n'][serialize($this->getPrimaryKey())] = true;
|
||||
$keys = ImportExportCategoryI18nTableMap::getFieldNames($keyType);
|
||||
$alreadyDumpedObjects['ImportCategoryI18n'][serialize($this->getPrimaryKey())] = true;
|
||||
$keys = ImportCategoryI18nTableMap::getFieldNames($keyType);
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getLocale(),
|
||||
@@ -866,8 +866,8 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aImportExportCategory) {
|
||||
$result['ImportExportCategory'] = $this->aImportExportCategory->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
if (null !== $this->aImportCategory) {
|
||||
$result['ImportCategory'] = $this->aImportCategory->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
|
||||
{
|
||||
$pos = ImportExportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
$pos = ImportCategoryI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
|
||||
return $this->setByPosition($pos, $value);
|
||||
}
|
||||
@@ -934,7 +934,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
|
||||
{
|
||||
$keys = ImportExportCategoryI18nTableMap::getFieldNames($keyType);
|
||||
$keys = ImportCategoryI18nTableMap::getFieldNames($keyType);
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]);
|
||||
@@ -948,11 +948,11 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function buildCriteria()
|
||||
{
|
||||
$criteria = new Criteria(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$criteria = new Criteria(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
|
||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::ID)) $criteria->add(ImportExportCategoryI18nTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::LOCALE)) $criteria->add(ImportExportCategoryI18nTableMap::LOCALE, $this->locale);
|
||||
if ($this->isColumnModified(ImportExportCategoryI18nTableMap::TITLE)) $criteria->add(ImportExportCategoryI18nTableMap::TITLE, $this->title);
|
||||
if ($this->isColumnModified(ImportCategoryI18nTableMap::ID)) $criteria->add(ImportCategoryI18nTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(ImportCategoryI18nTableMap::LOCALE)) $criteria->add(ImportCategoryI18nTableMap::LOCALE, $this->locale);
|
||||
if ($this->isColumnModified(ImportCategoryI18nTableMap::TITLE)) $criteria->add(ImportCategoryI18nTableMap::TITLE, $this->title);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -967,9 +967,9 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function buildPkeyCriteria()
|
||||
{
|
||||
$criteria = new Criteria(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$criteria->add(ImportExportCategoryI18nTableMap::ID, $this->id);
|
||||
$criteria->add(ImportExportCategoryI18nTableMap::LOCALE, $this->locale);
|
||||
$criteria = new Criteria(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$criteria->add(ImportCategoryI18nTableMap::ID, $this->id);
|
||||
$criteria->add(ImportCategoryI18nTableMap::LOCALE, $this->locale);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1016,7 +1016,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* If desired, this method can also make copies of all associated (fkey referrers)
|
||||
* objects.
|
||||
*
|
||||
* @param object $copyObj An object of \Thelia\Model\ImportExportCategoryI18n (or compatible) type.
|
||||
* @param object $copyObj An object of \Thelia\Model\ImportCategoryI18n (or compatible) type.
|
||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||
* @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
|
||||
* @throws PropelException
|
||||
@@ -1040,7 +1040,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
* objects.
|
||||
*
|
||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||
* @return \Thelia\Model\ImportExportCategoryI18n Clone of current object.
|
||||
* @return \Thelia\Model\ImportCategoryI18n Clone of current object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function copy($deepCopy = false)
|
||||
@@ -1054,13 +1054,13 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a ChildImportExportCategory object.
|
||||
* Declares an association between this object and a ChildImportCategory object.
|
||||
*
|
||||
* @param ChildImportExportCategory $v
|
||||
* @return \Thelia\Model\ImportExportCategoryI18n The current object (for fluent API support)
|
||||
* @param ChildImportCategory $v
|
||||
* @return \Thelia\Model\ImportCategoryI18n The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setImportExportCategory(ChildImportExportCategory $v = null)
|
||||
public function setImportCategory(ChildImportCategory $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setId(NULL);
|
||||
@@ -1068,12 +1068,12 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
$this->setId($v->getId());
|
||||
}
|
||||
|
||||
$this->aImportExportCategory = $v;
|
||||
$this->aImportCategory = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the ChildImportExportCategory object, it will not be re-added.
|
||||
// If this object has already been added to the ChildImportCategory object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addImportExportCategoryI18n($this);
|
||||
$v->addImportCategoryI18n($this);
|
||||
}
|
||||
|
||||
|
||||
@@ -1082,26 +1082,26 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
|
||||
|
||||
/**
|
||||
* Get the associated ChildImportExportCategory object
|
||||
* Get the associated ChildImportCategory object
|
||||
*
|
||||
* @param ConnectionInterface $con Optional Connection object.
|
||||
* @return ChildImportExportCategory The associated ChildImportExportCategory object.
|
||||
* @return ChildImportCategory The associated ChildImportCategory object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getImportExportCategory(ConnectionInterface $con = null)
|
||||
public function getImportCategory(ConnectionInterface $con = null)
|
||||
{
|
||||
if ($this->aImportExportCategory === null && ($this->id !== null)) {
|
||||
$this->aImportExportCategory = ChildImportExportCategoryQuery::create()->findPk($this->id, $con);
|
||||
if ($this->aImportCategory === null && ($this->id !== null)) {
|
||||
$this->aImportCategory = ChildImportCategoryQuery::create()->findPk($this->id, $con);
|
||||
/* The following can be used additionally to
|
||||
guarantee the related object contains a reference
|
||||
to this object. This level of coupling may, however, be
|
||||
undesirable since it could result in an only partially populated collection
|
||||
in the referenced object.
|
||||
$this->aImportExportCategory->addImportExportCategoryI18ns($this);
|
||||
$this->aImportCategory->addImportCategoryI18ns($this);
|
||||
*/
|
||||
}
|
||||
|
||||
return $this->aImportExportCategory;
|
||||
return $this->aImportCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1134,7 +1134,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
if ($deep) {
|
||||
} // if ($deep)
|
||||
|
||||
$this->aImportExportCategory = null;
|
||||
$this->aImportCategory = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1144,7 +1144,7 @@ abstract class ImportExportCategoryI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return (string) $this->exportTo(ImportExportCategoryI18nTableMap::DEFAULT_STRING_FORMAT);
|
||||
return (string) $this->exportTo(ImportCategoryI18nTableMap::DEFAULT_STRING_FORMAT);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12,72 +12,72 @@ use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\ImportExportCategoryI18n as ChildImportExportCategoryI18n;
|
||||
use Thelia\Model\ImportExportCategoryI18nQuery as ChildImportExportCategoryI18nQuery;
|
||||
use Thelia\Model\Map\ImportExportCategoryI18nTableMap;
|
||||
use Thelia\Model\ImportCategoryI18n as ChildImportCategoryI18n;
|
||||
use Thelia\Model\ImportCategoryI18nQuery as ChildImportCategoryI18nQuery;
|
||||
use Thelia\Model\Map\ImportCategoryI18nTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'import_export_category_i18n' table.
|
||||
* Base class that represents a query for the 'import_category_i18n' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildImportExportCategoryI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportExportCategoryI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildImportExportCategoryI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ChildImportCategoryI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportCategoryI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildImportCategoryI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
*
|
||||
* @method ChildImportExportCategoryI18nQuery groupById() Group by the id column
|
||||
* @method ChildImportExportCategoryI18nQuery groupByLocale() Group by the locale column
|
||||
* @method ChildImportExportCategoryI18nQuery groupByTitle() Group by the title column
|
||||
* @method ChildImportCategoryI18nQuery groupById() Group by the id column
|
||||
* @method ChildImportCategoryI18nQuery groupByLocale() Group by the locale column
|
||||
* @method ChildImportCategoryI18nQuery groupByTitle() Group by the title column
|
||||
*
|
||||
* @method ChildImportExportCategoryI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportExportCategoryI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportExportCategoryI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
* @method ChildImportCategoryI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportCategoryI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportCategoryI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildImportExportCategoryI18nQuery leftJoinImportExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportCategory relation
|
||||
* @method ChildImportExportCategoryI18nQuery rightJoinImportExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportCategory relation
|
||||
* @method ChildImportExportCategoryI18nQuery innerJoinImportExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportCategory relation
|
||||
* @method ChildImportCategoryI18nQuery leftJoinImportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportCategory relation
|
||||
* @method ChildImportCategoryI18nQuery rightJoinImportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportCategory relation
|
||||
* @method ChildImportCategoryI18nQuery innerJoinImportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportCategory relation
|
||||
*
|
||||
* @method ChildImportExportCategoryI18n findOne(ConnectionInterface $con = null) Return the first ChildImportExportCategoryI18n matching the query
|
||||
* @method ChildImportExportCategoryI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportCategoryI18n matching the query, or a new ChildImportExportCategoryI18n object populated from the query conditions when no match is found
|
||||
* @method ChildImportCategoryI18n findOne(ConnectionInterface $con = null) Return the first ChildImportCategoryI18n matching the query
|
||||
* @method ChildImportCategoryI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportCategoryI18n matching the query, or a new ChildImportCategoryI18n object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildImportExportCategoryI18n findOneById(int $id) Return the first ChildImportExportCategoryI18n filtered by the id column
|
||||
* @method ChildImportExportCategoryI18n findOneByLocale(string $locale) Return the first ChildImportExportCategoryI18n filtered by the locale column
|
||||
* @method ChildImportExportCategoryI18n findOneByTitle(string $title) Return the first ChildImportExportCategoryI18n filtered by the title column
|
||||
* @method ChildImportCategoryI18n findOneById(int $id) Return the first ChildImportCategoryI18n filtered by the id column
|
||||
* @method ChildImportCategoryI18n findOneByLocale(string $locale) Return the first ChildImportCategoryI18n filtered by the locale column
|
||||
* @method ChildImportCategoryI18n findOneByTitle(string $title) Return the first ChildImportCategoryI18n filtered by the title column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildImportExportCategoryI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildImportExportCategoryI18n objects filtered by the locale column
|
||||
* @method array findByTitle(string $title) Return ChildImportExportCategoryI18n objects filtered by the title column
|
||||
* @method array findById(int $id) Return ChildImportCategoryI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildImportCategoryI18n objects filtered by the locale column
|
||||
* @method array findByTitle(string $title) Return ChildImportCategoryI18n objects filtered by the title column
|
||||
*
|
||||
*/
|
||||
abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
abstract class ImportCategoryI18nQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportExportCategoryI18nQuery object.
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportCategoryI18nQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportCategoryI18n', $modelAlias = null)
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportCategoryI18n', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildImportExportCategoryI18nQuery object.
|
||||
* Returns a new ChildImportCategoryI18nQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery
|
||||
* @return ChildImportCategoryI18nQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ImportExportCategoryI18nQuery) {
|
||||
if ($criteria instanceof \Thelia\Model\ImportCategoryI18nQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ImportExportCategoryI18nQuery();
|
||||
$query = new \Thelia\Model\ImportCategoryI18nQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
@@ -100,19 +100,19 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
* @param array[$id, $locale] $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildImportExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ImportExportCategoryI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||
if ((null !== ($obj = ImportCategoryI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
@@ -131,11 +131,11 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportCategoryI18n A model object, or null if the key is not found
|
||||
* @return ChildImportCategoryI18n A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE` FROM `import_export_category_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE` FROM `import_category_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -147,9 +147,9 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildImportExportCategoryI18n();
|
||||
$obj = new ChildImportCategoryI18n();
|
||||
$obj->hydrate($row);
|
||||
ImportExportCategoryI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||
ImportCategoryI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
@@ -162,7 +162,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImportCategoryI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
@@ -204,12 +204,12 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
@@ -227,8 +227,8 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
$cton0 = $this->getNewCriterion(ImportExportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$cton1 = $this->getNewCriterion(ImportExportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$cton0 = $this->getNewCriterion(ImportCategoryI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$cton1 = $this->getNewCriterion(ImportCategoryI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$cton0->addAnd($cton1);
|
||||
$this->addOr($cton0);
|
||||
}
|
||||
@@ -246,7 +246,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByImportExportCategory()
|
||||
* @see filterByImportCategory()
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
@@ -254,18 +254,18 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -276,7 +276,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $id, $comparison);
|
||||
return $this->addUsingAlias(ImportCategoryI18nTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,7 +292,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLocale($locale = null, $comparison = null)
|
||||
{
|
||||
@@ -305,7 +305,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryI18nTableMap::LOCALE, $locale, $comparison);
|
||||
return $this->addUsingAlias(ImportCategoryI18nTableMap::LOCALE, $locale, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -321,7 +321,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTitle($title = null, $comparison = null)
|
||||
{
|
||||
@@ -334,46 +334,46 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryI18nTableMap::TITLE, $title, $comparison);
|
||||
return $this->addUsingAlias(ImportCategoryI18nTableMap::TITLE, $title, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ImportExportCategory object
|
||||
* Filter the query by a related \Thelia\Model\ImportCategory object
|
||||
*
|
||||
* @param \Thelia\Model\ImportExportCategory|ObjectCollection $importExportCategory The related object(s) to use as filter
|
||||
* @param \Thelia\Model\ImportCategory|ObjectCollection $importCategory The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByImportExportCategory($importExportCategory, $comparison = null)
|
||||
public function filterByImportCategory($importCategory, $comparison = null)
|
||||
{
|
||||
if ($importExportCategory instanceof \Thelia\Model\ImportExportCategory) {
|
||||
if ($importCategory instanceof \Thelia\Model\ImportCategory) {
|
||||
return $this
|
||||
->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $importExportCategory->getId(), $comparison);
|
||||
} elseif ($importExportCategory instanceof ObjectCollection) {
|
||||
->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->getId(), $comparison);
|
||||
} elseif ($importCategory instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ImportExportCategoryI18nTableMap::ID, $importExportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByImportExportCategory() only accepts arguments of type \Thelia\Model\ImportExportCategory or Collection');
|
||||
throw new PropelException('filterByImportCategory() only accepts arguments of type \Thelia\Model\ImportCategory or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportExportCategory relation
|
||||
* Adds a JOIN clause to the query using the ImportCategory relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportExportCategory($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function joinImportCategory($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportExportCategory');
|
||||
$relationMap = $tableMap->getRelation('ImportCategory');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -388,14 +388,14 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportExportCategory');
|
||||
$this->addJoinObject($join, 'ImportCategory');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportExportCategory relation ImportExportCategory object
|
||||
* Use the ImportCategory relation ImportCategory object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
@@ -403,27 +403,27 @@ abstract class ImportExportCategoryI18nQuery 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\ImportExportCategoryQuery A secondary query class using the current class as primary query
|
||||
* @return \Thelia\Model\ImportCategoryQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportExportCategoryQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function useImportCategoryQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinImportExportCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategory', '\Thelia\Model\ImportExportCategoryQuery');
|
||||
->joinImportCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportCategory', '\Thelia\Model\ImportCategoryQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildImportExportCategoryI18n $importExportCategoryI18n Object to remove from the list of results
|
||||
* @param ChildImportCategoryI18n $importCategoryI18n Object to remove from the list of results
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($importExportCategoryI18n = null)
|
||||
public function prune($importCategoryI18n = null)
|
||||
{
|
||||
if ($importExportCategoryI18n) {
|
||||
$this->addCond('pruneCond0', $this->getAliasedColName(ImportExportCategoryI18nTableMap::ID), $importExportCategoryI18n->getId(), Criteria::NOT_EQUAL);
|
||||
$this->addCond('pruneCond1', $this->getAliasedColName(ImportExportCategoryI18nTableMap::LOCALE), $importExportCategoryI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||
if ($importCategoryI18n) {
|
||||
$this->addCond('pruneCond0', $this->getAliasedColName(ImportCategoryI18nTableMap::ID), $importCategoryI18n->getId(), Criteria::NOT_EQUAL);
|
||||
$this->addCond('pruneCond1', $this->getAliasedColName(ImportCategoryI18nTableMap::LOCALE), $importCategoryI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the import_export_category_i18n table.
|
||||
* Deletes all rows from the import_category_i18n table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
@@ -439,7 +439,7 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
@@ -450,8 +450,8 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ImportExportCategoryI18nTableMap::clearInstancePool();
|
||||
ImportExportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||
ImportCategoryI18nTableMap::clearInstancePool();
|
||||
ImportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
@@ -463,9 +463,9 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildImportExportCategoryI18n or Criteria object OR a primary key value.
|
||||
* Performs a DELETE on the database, given a ChildImportCategoryI18n or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildImportExportCategoryI18n object or primary key or array of primary keys
|
||||
* @param mixed $values Criteria or ChildImportCategoryI18n object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
@@ -476,13 +476,13 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportExportCategoryI18nTableMap::DATABASE_NAME);
|
||||
$criteria->setDbName(ImportCategoryI18nTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
@@ -492,10 +492,10 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ImportExportCategoryI18nTableMap::removeInstanceFromPool($criteria);
|
||||
ImportCategoryI18nTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ImportExportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||
ImportCategoryI18nTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
@@ -505,4 +505,4 @@ abstract class ImportExportCategoryI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
} // ImportExportCategoryI18nQuery
|
||||
} // ImportCategoryI18nQuery
|
||||
@@ -12,81 +12,81 @@ use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\ImportExportCategory as ChildImportExportCategory;
|
||||
use Thelia\Model\ImportExportCategoryI18nQuery as ChildImportExportCategoryI18nQuery;
|
||||
use Thelia\Model\ImportExportCategoryQuery as ChildImportExportCategoryQuery;
|
||||
use Thelia\Model\Map\ImportExportCategoryTableMap;
|
||||
use Thelia\Model\ImportCategory as ChildImportCategory;
|
||||
use Thelia\Model\ImportCategoryI18nQuery as ChildImportCategoryI18nQuery;
|
||||
use Thelia\Model\ImportCategoryQuery as ChildImportCategoryQuery;
|
||||
use Thelia\Model\Map\ImportCategoryTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'import_export_category' table.
|
||||
* Base class that represents a query for the 'import_category' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildImportExportCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportExportCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildImportExportCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildImportExportCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
* @method ChildImportCategoryQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportCategoryQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildImportCategoryQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildImportCategoryQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildImportExportCategoryQuery groupById() Group by the id column
|
||||
* @method ChildImportExportCategoryQuery groupByPosition() Group by the position column
|
||||
* @method ChildImportExportCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildImportExportCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
||||
* @method ChildImportCategoryQuery groupById() Group by the id column
|
||||
* @method ChildImportCategoryQuery groupByPosition() Group by the position column
|
||||
* @method ChildImportCategoryQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildImportCategoryQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
* @method ChildImportExportCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportExportCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportExportCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
* @method ChildImportCategoryQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportCategoryQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportCategoryQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildImportExportCategoryQuery leftJoinImportExportType($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportType relation
|
||||
* @method ChildImportExportCategoryQuery rightJoinImportExportType($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportType relation
|
||||
* @method ChildImportExportCategoryQuery innerJoinImportExportType($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportType relation
|
||||
* @method ChildImportCategoryQuery leftJoinImport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Import relation
|
||||
* @method ChildImportCategoryQuery rightJoinImport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Import relation
|
||||
* @method ChildImportCategoryQuery innerJoinImport($relationAlias = null) Adds a INNER JOIN clause to the query using the Import relation
|
||||
*
|
||||
* @method ChildImportExportCategoryQuery leftJoinImportExportCategoryI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportCategoryI18n relation
|
||||
* @method ChildImportExportCategoryQuery rightJoinImportExportCategoryI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportCategoryI18n relation
|
||||
* @method ChildImportExportCategoryQuery innerJoinImportExportCategoryI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportCategoryI18n relation
|
||||
* @method ChildImportCategoryQuery leftJoinImportCategoryI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportCategoryI18n relation
|
||||
* @method ChildImportCategoryQuery rightJoinImportCategoryI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportCategoryI18n relation
|
||||
* @method ChildImportCategoryQuery innerJoinImportCategoryI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportCategoryI18n relation
|
||||
*
|
||||
* @method ChildImportExportCategory findOne(ConnectionInterface $con = null) Return the first ChildImportExportCategory matching the query
|
||||
* @method ChildImportExportCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportCategory matching the query, or a new ChildImportExportCategory object populated from the query conditions when no match is found
|
||||
* @method ChildImportCategory findOne(ConnectionInterface $con = null) Return the first ChildImportCategory matching the query
|
||||
* @method ChildImportCategory findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportCategory matching the query, or a new ChildImportCategory object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildImportExportCategory findOneById(int $id) Return the first ChildImportExportCategory filtered by the id column
|
||||
* @method ChildImportExportCategory findOneByPosition(int $position) Return the first ChildImportExportCategory filtered by the position column
|
||||
* @method ChildImportExportCategory findOneByCreatedAt(string $created_at) Return the first ChildImportExportCategory filtered by the created_at column
|
||||
* @method ChildImportExportCategory findOneByUpdatedAt(string $updated_at) Return the first ChildImportExportCategory filtered by the updated_at column
|
||||
* @method ChildImportCategory findOneById(int $id) Return the first ChildImportCategory filtered by the id column
|
||||
* @method ChildImportCategory findOneByPosition(int $position) Return the first ChildImportCategory filtered by the position column
|
||||
* @method ChildImportCategory findOneByCreatedAt(string $created_at) Return the first ChildImportCategory filtered by the created_at column
|
||||
* @method ChildImportCategory findOneByUpdatedAt(string $updated_at) Return the first ChildImportCategory filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildImportExportCategory objects filtered by the id column
|
||||
* @method array findByPosition(int $position) Return ChildImportExportCategory objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildImportExportCategory objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildImportExportCategory objects filtered by the updated_at column
|
||||
* @method array findById(int $id) Return ChildImportCategory objects filtered by the id column
|
||||
* @method array findByPosition(int $position) Return ChildImportCategory objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildImportCategory objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildImportCategory objects filtered by the updated_at column
|
||||
*
|
||||
*/
|
||||
abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
abstract class ImportCategoryQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportExportCategoryQuery object.
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportCategoryQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportCategory', $modelAlias = null)
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportCategory', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildImportExportCategoryQuery object.
|
||||
* Returns a new ChildImportCategoryQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery
|
||||
* @return ChildImportCategoryQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ImportExportCategoryQuery) {
|
||||
if ($criteria instanceof \Thelia\Model\ImportCategoryQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ImportExportCategoryQuery();
|
||||
$query = new \Thelia\Model\ImportCategoryQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
@@ -109,19 +109,19 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildImportExportCategory|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImportCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ImportExportCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
if ((null !== ($obj = ImportCategoryTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
@@ -140,11 +140,11 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportCategory A model object, or null if the key is not found
|
||||
* @return ChildImportCategory A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import_export_category` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import_category` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -155,9 +155,9 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildImportExportCategory();
|
||||
$obj = new ChildImportCategory();
|
||||
$obj->hydrate($row);
|
||||
ImportExportCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
||||
ImportCategoryTableMap::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
@@ -170,7 +170,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportCategory|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImportCategory|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
@@ -212,12 +212,12 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::ID, $key, Criteria::EQUAL);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -225,12 +225,12 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::ID, $keys, Criteria::IN);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,18 +249,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -271,7 +271,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::ID, $id, $comparison);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,18 +290,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -312,7 +312,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::POSITION, $position, $comparison);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -333,18 +333,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($createdAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($createdAt['min'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($createdAt['max'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -355,7 +355,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -376,18 +376,18 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($updatedAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($updatedAt['min'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($updatedAt['max'])) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -398,44 +398,44 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ImportExportType object
|
||||
* Filter the query by a related \Thelia\Model\Import object
|
||||
*
|
||||
* @param \Thelia\Model\ImportExportType|ObjectCollection $importExportType the related object to use as filter
|
||||
* @param \Thelia\Model\Import|ObjectCollection $import the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByImportExportType($importExportType, $comparison = null)
|
||||
public function filterByImport($import, $comparison = null)
|
||||
{
|
||||
if ($importExportType instanceof \Thelia\Model\ImportExportType) {
|
||||
if ($import instanceof \Thelia\Model\Import) {
|
||||
return $this
|
||||
->addUsingAlias(ImportExportCategoryTableMap::ID, $importExportType->getImportExportCategoryId(), $comparison);
|
||||
} elseif ($importExportType instanceof ObjectCollection) {
|
||||
->addUsingAlias(ImportCategoryTableMap::ID, $import->getImportCategoryId(), $comparison);
|
||||
} elseif ($import instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useImportExportTypeQuery()
|
||||
->filterByPrimaryKeys($importExportType->getPrimaryKeys())
|
||||
->useImportQuery()
|
||||
->filterByPrimaryKeys($import->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByImportExportType() only accepts arguments of type \Thelia\Model\ImportExportType or Collection');
|
||||
throw new PropelException('filterByImport() only accepts arguments of type \Thelia\Model\Import or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportExportType relation
|
||||
* Adds a JOIN clause to the query using the Import relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportExportType($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
public function joinImport($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportExportType');
|
||||
$relationMap = $tableMap->getRelation('Import');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -450,14 +450,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportExportType');
|
||||
$this->addJoinObject($join, 'Import');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportExportType relation ImportExportType object
|
||||
* Use the Import relation Import object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
@@ -465,50 +465,50 @@ abstract class ImportExportCategoryQuery 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\ImportExportTypeQuery A secondary query class using the current class as primary query
|
||||
* @return \Thelia\Model\ImportQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportExportTypeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
public function useImportQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinImportExportType($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportType', '\Thelia\Model\ImportExportTypeQuery');
|
||||
->joinImport($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Import', '\Thelia\Model\ImportQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ImportExportCategoryI18n object
|
||||
* Filter the query by a related \Thelia\Model\ImportCategoryI18n object
|
||||
*
|
||||
* @param \Thelia\Model\ImportExportCategoryI18n|ObjectCollection $importExportCategoryI18n the related object to use as filter
|
||||
* @param \Thelia\Model\ImportCategoryI18n|ObjectCollection $importCategoryI18n the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByImportExportCategoryI18n($importExportCategoryI18n, $comparison = null)
|
||||
public function filterByImportCategoryI18n($importCategoryI18n, $comparison = null)
|
||||
{
|
||||
if ($importExportCategoryI18n instanceof \Thelia\Model\ImportExportCategoryI18n) {
|
||||
if ($importCategoryI18n instanceof \Thelia\Model\ImportCategoryI18n) {
|
||||
return $this
|
||||
->addUsingAlias(ImportExportCategoryTableMap::ID, $importExportCategoryI18n->getId(), $comparison);
|
||||
} elseif ($importExportCategoryI18n instanceof ObjectCollection) {
|
||||
->addUsingAlias(ImportCategoryTableMap::ID, $importCategoryI18n->getId(), $comparison);
|
||||
} elseif ($importCategoryI18n instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useImportExportCategoryI18nQuery()
|
||||
->filterByPrimaryKeys($importExportCategoryI18n->getPrimaryKeys())
|
||||
->useImportCategoryI18nQuery()
|
||||
->filterByPrimaryKeys($importCategoryI18n->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByImportExportCategoryI18n() only accepts arguments of type \Thelia\Model\ImportExportCategoryI18n or Collection');
|
||||
throw new PropelException('filterByImportCategoryI18n() only accepts arguments of type \Thelia\Model\ImportCategoryI18n or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportExportCategoryI18n relation
|
||||
* Adds a JOIN clause to the query using the ImportCategoryI18n relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportExportCategoryI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function joinImportCategoryI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportExportCategoryI18n');
|
||||
$relationMap = $tableMap->getRelation('ImportCategoryI18n');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -523,14 +523,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportExportCategoryI18n');
|
||||
$this->addJoinObject($join, 'ImportCategoryI18n');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportExportCategoryI18n relation ImportExportCategoryI18n object
|
||||
* Use the ImportCategoryI18n relation ImportCategoryI18n object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
@@ -538,33 +538,33 @@ abstract class ImportExportCategoryQuery 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\ImportExportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
* @return \Thelia\Model\ImportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportExportCategoryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function useImportCategoryI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinImportExportCategoryI18n($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategoryI18n', '\Thelia\Model\ImportExportCategoryI18nQuery');
|
||||
->joinImportCategoryI18n($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportCategoryI18n', '\Thelia\Model\ImportCategoryI18nQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildImportExportCategory $importExportCategory Object to remove from the list of results
|
||||
* @param ChildImportCategory $importCategory Object to remove from the list of results
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($importExportCategory = null)
|
||||
public function prune($importCategory = null)
|
||||
{
|
||||
if ($importExportCategory) {
|
||||
$this->addUsingAlias(ImportExportCategoryTableMap::ID, $importExportCategory->getId(), Criteria::NOT_EQUAL);
|
||||
if ($importCategory) {
|
||||
$this->addUsingAlias(ImportCategoryTableMap::ID, $importCategory->getId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the import_export_category table.
|
||||
* Deletes all rows from the import_category table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
@@ -572,7 +572,7 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
@@ -583,8 +583,8 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ImportExportCategoryTableMap::clearInstancePool();
|
||||
ImportExportCategoryTableMap::clearRelatedInstancePool();
|
||||
ImportCategoryTableMap::clearInstancePool();
|
||||
ImportCategoryTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
@@ -596,9 +596,9 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildImportExportCategory or Criteria object OR a primary key value.
|
||||
* Performs a DELETE on the database, given a ChildImportCategory or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildImportExportCategory object or primary key or array of primary keys
|
||||
* @param mixed $values Criteria or ChildImportCategory object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
@@ -609,13 +609,13 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportCategoryTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportCategoryTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportExportCategoryTableMap::DATABASE_NAME);
|
||||
$criteria->setDbName(ImportCategoryTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
@@ -625,10 +625,10 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ImportExportCategoryTableMap::removeInstanceFromPool($criteria);
|
||||
ImportCategoryTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ImportExportCategoryTableMap::clearRelatedInstancePool();
|
||||
ImportCategoryTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
@@ -647,14 +647,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportExportCategoryI18n';
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportCategoryI18n';
|
||||
|
||||
return $this
|
||||
->joinImportExportCategoryI18n($relationAlias, $joinType)
|
||||
->joinImportCategoryI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
@@ -665,14 +665,14 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ImportExportCategoryI18n');
|
||||
$this->with['ImportExportCategoryI18n']->setIsWithOneToMany(false);
|
||||
->with('ImportCategoryI18n');
|
||||
$this->with['ImportCategoryI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -686,13 +686,13 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportExportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
* @return ChildImportCategoryI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategoryI18n', '\Thelia\Model\ImportExportCategoryI18nQuery');
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportCategoryI18n', '\Thelia\Model\ImportCategoryI18nQuery');
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
@@ -702,11 +702,11 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
*
|
||||
* @param int $nbDays Maximum age of the latest update in days
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyUpdated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -714,51 +714,51 @@ abstract class ImportExportCategoryQuery extends ModelCriteria
|
||||
*
|
||||
* @param int $nbDays Maximum age of in days
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyCreated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ImportExportCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
return $this->addUsingAlias(ImportCategoryTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date desc
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastUpdatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ImportExportCategoryTableMap::UPDATED_AT);
|
||||
return $this->addDescendingOrderByColumn(ImportCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date asc
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstUpdatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ImportExportCategoryTableMap::UPDATED_AT);
|
||||
return $this->addAscendingOrderByColumn(ImportCategoryTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date desc
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastCreatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ImportExportCategoryTableMap::CREATED_AT);
|
||||
return $this->addDescendingOrderByColumn(ImportCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date asc
|
||||
*
|
||||
* @return ChildImportExportCategoryQuery The current query, for fluid interface
|
||||
* @return ChildImportCategoryQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstCreatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ImportExportCategoryTableMap::CREATED_AT);
|
||||
return $this->addAscendingOrderByColumn(ImportCategoryTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
} // ImportExportCategoryQuery
|
||||
} // ImportCategoryQuery
|
||||
@@ -14,17 +14,17 @@ use Propel\Runtime\Exception\BadMethodCallException;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Parser\AbstractParser;
|
||||
use Thelia\Model\ImportExportType as ChildImportExportType;
|
||||
use Thelia\Model\ImportExportTypeI18nQuery as ChildImportExportTypeI18nQuery;
|
||||
use Thelia\Model\ImportExportTypeQuery as ChildImportExportTypeQuery;
|
||||
use Thelia\Model\Map\ImportExportTypeI18nTableMap;
|
||||
use Thelia\Model\Import as ChildImport;
|
||||
use Thelia\Model\ImportI18nQuery as ChildImportI18nQuery;
|
||||
use Thelia\Model\ImportQuery as ChildImportQuery;
|
||||
use Thelia\Model\Map\ImportI18nTableMap;
|
||||
|
||||
abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
abstract class ImportI18n implements ActiveRecordInterface
|
||||
{
|
||||
/**
|
||||
* TableMap class name
|
||||
*/
|
||||
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportExportTypeI18nTableMap';
|
||||
const TABLE_MAP = '\\Thelia\\Model\\Map\\ImportI18nTableMap';
|
||||
|
||||
|
||||
/**
|
||||
@@ -79,9 +79,9 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* @var ImportExportType
|
||||
* @var Import
|
||||
*/
|
||||
protected $aImportExportType;
|
||||
protected $aImport;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -103,7 +103,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes internal state of Thelia\Model\Base\ImportExportTypeI18n object.
|
||||
* Initializes internal state of Thelia\Model\Base\ImportI18n object.
|
||||
* @see applyDefaults()
|
||||
*/
|
||||
public function __construct()
|
||||
@@ -200,9 +200,9 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this with another <code>ImportExportTypeI18n</code> instance. If
|
||||
* <code>obj</code> is an instance of <code>ImportExportTypeI18n</code>, delegates to
|
||||
* <code>equals(ImportExportTypeI18n)</code>. Otherwise, returns <code>false</code>.
|
||||
* Compares this with another <code>ImportI18n</code> instance. If
|
||||
* <code>obj</code> is an instance of <code>ImportI18n</code>, delegates to
|
||||
* <code>equals(ImportI18n)</code>. Otherwise, returns <code>false</code>.
|
||||
*
|
||||
* @param mixed $obj The object to compare to.
|
||||
* @return boolean Whether equal to the object specified.
|
||||
@@ -285,7 +285,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* @param string $name The virtual column name
|
||||
* @param mixed $value The value to give to the virtual column
|
||||
*
|
||||
* @return ImportExportTypeI18n The current object, for fluid interface
|
||||
* @return ImportI18n The current object, for fluid interface
|
||||
*/
|
||||
public function setVirtualColumn($name, $value)
|
||||
{
|
||||
@@ -317,7 +317,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* or a format name ('XML', 'YAML', 'JSON', 'CSV')
|
||||
* @param string $data The source data to import from
|
||||
*
|
||||
* @return ImportExportTypeI18n The current object, for fluid interface
|
||||
* @return ImportI18n The current object, for fluid interface
|
||||
*/
|
||||
public function importFrom($parser, $data)
|
||||
{
|
||||
@@ -410,7 +410,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
||||
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setId($v)
|
||||
{
|
||||
@@ -420,11 +420,11 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->id !== $v) {
|
||||
$this->id = $v;
|
||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::ID] = true;
|
||||
$this->modifiedColumns[ImportI18nTableMap::ID] = true;
|
||||
}
|
||||
|
||||
if ($this->aImportExportType !== null && $this->aImportExportType->getId() !== $v) {
|
||||
$this->aImportExportType = null;
|
||||
if ($this->aImport !== null && $this->aImport->getId() !== $v) {
|
||||
$this->aImport = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* Set the value of [locale] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
||||
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setLocale($v)
|
||||
{
|
||||
@@ -445,7 +445,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->locale !== $v) {
|
||||
$this->locale = $v;
|
||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::LOCALE] = true;
|
||||
$this->modifiedColumns[ImportI18nTableMap::LOCALE] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* Set the value of [title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
||||
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setTitle($v)
|
||||
{
|
||||
@@ -466,7 +466,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->title !== $v) {
|
||||
$this->title = $v;
|
||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::TITLE] = true;
|
||||
$this->modifiedColumns[ImportI18nTableMap::TITLE] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -477,7 +477,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* Set the value of [description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
||||
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setDescription($v)
|
||||
{
|
||||
@@ -487,7 +487,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->description !== $v) {
|
||||
$this->description = $v;
|
||||
$this->modifiedColumns[ImportExportTypeI18nTableMap::DESCRIPTION] = true;
|
||||
$this->modifiedColumns[ImportI18nTableMap::DESCRIPTION] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -535,16 +535,16 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
try {
|
||||
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ImportI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ImportI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->locale = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ImportI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportExportTypeI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ImportI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->description = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -554,10 +554,10 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 4; // 4 = ImportExportTypeI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 4; // 4 = ImportI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\ImportExportTypeI18n object", 0, $e);
|
||||
throw new PropelException("Error populating \Thelia\Model\ImportI18n object", 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,8 +576,8 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function ensureConsistency()
|
||||
{
|
||||
if ($this->aImportExportType !== null && $this->id !== $this->aImportExportType->getId()) {
|
||||
$this->aImportExportType = null;
|
||||
if ($this->aImport !== null && $this->id !== $this->aImport->getId()) {
|
||||
$this->aImport = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
||||
@@ -602,13 +602,13 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
// We don't need to alter the object instance pool; we're just modifying this instance
|
||||
// already in the pool.
|
||||
|
||||
$dataFetcher = ChildImportExportTypeI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
||||
$dataFetcher = ChildImportI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con);
|
||||
$row = $dataFetcher->fetch();
|
||||
$dataFetcher->close();
|
||||
if (!$row) {
|
||||
@@ -618,7 +618,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aImportExportType = null;
|
||||
$this->aImport = null;
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
@@ -628,8 +628,8 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* @param ConnectionInterface $con
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
* @see ImportExportTypeI18n::setDeleted()
|
||||
* @see ImportExportTypeI18n::isDeleted()
|
||||
* @see ImportI18n::setDeleted()
|
||||
* @see ImportI18n::isDeleted()
|
||||
*/
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
@@ -638,12 +638,12 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$con->beginTransaction();
|
||||
try {
|
||||
$deleteQuery = ChildImportExportTypeI18nQuery::create()
|
||||
$deleteQuery = ChildImportI18nQuery::create()
|
||||
->filterByPrimaryKey($this->getPrimaryKey());
|
||||
$ret = $this->preDelete($con);
|
||||
if ($ret) {
|
||||
@@ -680,7 +680,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$con->beginTransaction();
|
||||
@@ -700,7 +700,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
$this->postUpdate($con);
|
||||
}
|
||||
$this->postSave($con);
|
||||
ImportExportTypeI18nTableMap::addInstanceToPool($this);
|
||||
ImportI18nTableMap::addInstanceToPool($this);
|
||||
} else {
|
||||
$affectedRows = 0;
|
||||
}
|
||||
@@ -735,11 +735,11 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
// method. This object relates to these object(s) by a
|
||||
// foreign key reference.
|
||||
|
||||
if ($this->aImportExportType !== null) {
|
||||
if ($this->aImportExportType->isModified() || $this->aImportExportType->isNew()) {
|
||||
$affectedRows += $this->aImportExportType->save($con);
|
||||
if ($this->aImport !== null) {
|
||||
if ($this->aImport->isModified() || $this->aImport->isNew()) {
|
||||
$affectedRows += $this->aImport->save($con);
|
||||
}
|
||||
$this->setImportExportType($this->aImportExportType);
|
||||
$this->setImport($this->aImport);
|
||||
}
|
||||
|
||||
if ($this->isNew() || $this->isModified()) {
|
||||
@@ -775,21 +775,21 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
|
||||
|
||||
// check the columns in natural order for more readable SQL queries
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::ID)) {
|
||||
if ($this->isColumnModified(ImportI18nTableMap::ID)) {
|
||||
$modifiedColumns[':p' . $index++] = '`ID`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::LOCALE)) {
|
||||
if ($this->isColumnModified(ImportI18nTableMap::LOCALE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`LOCALE`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::TITLE)) {
|
||||
if ($this->isColumnModified(ImportI18nTableMap::TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`TITLE`';
|
||||
}
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::DESCRIPTION)) {
|
||||
if ($this->isColumnModified(ImportI18nTableMap::DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = '`DESCRIPTION`';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO `import_export_type_i18n` (%s) VALUES (%s)',
|
||||
'INSERT INTO `import_i18n` (%s) VALUES (%s)',
|
||||
implode(', ', $modifiedColumns),
|
||||
implode(', ', array_keys($modifiedColumns))
|
||||
);
|
||||
@@ -849,7 +849,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function getByName($name, $type = TableMap::TYPE_PHPNAME)
|
||||
{
|
||||
$pos = ImportExportTypeI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
$pos = ImportI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
$field = $this->getByPosition($pos);
|
||||
|
||||
return $field;
|
||||
@@ -900,11 +900,11 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
|
||||
{
|
||||
if (isset($alreadyDumpedObjects['ImportExportTypeI18n'][serialize($this->getPrimaryKey())])) {
|
||||
if (isset($alreadyDumpedObjects['ImportI18n'][serialize($this->getPrimaryKey())])) {
|
||||
return '*RECURSION*';
|
||||
}
|
||||
$alreadyDumpedObjects['ImportExportTypeI18n'][serialize($this->getPrimaryKey())] = true;
|
||||
$keys = ImportExportTypeI18nTableMap::getFieldNames($keyType);
|
||||
$alreadyDumpedObjects['ImportI18n'][serialize($this->getPrimaryKey())] = true;
|
||||
$keys = ImportI18nTableMap::getFieldNames($keyType);
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getLocale(),
|
||||
@@ -917,8 +917,8 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aImportExportType) {
|
||||
$result['ImportExportType'] = $this->aImportExportType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
if (null !== $this->aImport) {
|
||||
$result['Import'] = $this->aImport->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -938,7 +938,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME)
|
||||
{
|
||||
$pos = ImportExportTypeI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
$pos = ImportI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM);
|
||||
|
||||
return $this->setByPosition($pos, $value);
|
||||
}
|
||||
@@ -988,7 +988,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
|
||||
{
|
||||
$keys = ImportExportTypeI18nTableMap::getFieldNames($keyType);
|
||||
$keys = ImportI18nTableMap::getFieldNames($keyType);
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]);
|
||||
@@ -1003,12 +1003,12 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function buildCriteria()
|
||||
{
|
||||
$criteria = new Criteria(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$criteria = new Criteria(ImportI18nTableMap::DATABASE_NAME);
|
||||
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::ID)) $criteria->add(ImportExportTypeI18nTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::LOCALE)) $criteria->add(ImportExportTypeI18nTableMap::LOCALE, $this->locale);
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::TITLE)) $criteria->add(ImportExportTypeI18nTableMap::TITLE, $this->title);
|
||||
if ($this->isColumnModified(ImportExportTypeI18nTableMap::DESCRIPTION)) $criteria->add(ImportExportTypeI18nTableMap::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(ImportI18nTableMap::ID)) $criteria->add(ImportI18nTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(ImportI18nTableMap::LOCALE)) $criteria->add(ImportI18nTableMap::LOCALE, $this->locale);
|
||||
if ($this->isColumnModified(ImportI18nTableMap::TITLE)) $criteria->add(ImportI18nTableMap::TITLE, $this->title);
|
||||
if ($this->isColumnModified(ImportI18nTableMap::DESCRIPTION)) $criteria->add(ImportI18nTableMap::DESCRIPTION, $this->description);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1023,9 +1023,9 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function buildPkeyCriteria()
|
||||
{
|
||||
$criteria = new Criteria(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$criteria->add(ImportExportTypeI18nTableMap::ID, $this->id);
|
||||
$criteria->add(ImportExportTypeI18nTableMap::LOCALE, $this->locale);
|
||||
$criteria = new Criteria(ImportI18nTableMap::DATABASE_NAME);
|
||||
$criteria->add(ImportI18nTableMap::ID, $this->id);
|
||||
$criteria->add(ImportI18nTableMap::LOCALE, $this->locale);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1072,7 +1072,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* If desired, this method can also make copies of all associated (fkey referrers)
|
||||
* objects.
|
||||
*
|
||||
* @param object $copyObj An object of \Thelia\Model\ImportExportTypeI18n (or compatible) type.
|
||||
* @param object $copyObj An object of \Thelia\Model\ImportI18n (or compatible) type.
|
||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||
* @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
|
||||
* @throws PropelException
|
||||
@@ -1097,7 +1097,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
* objects.
|
||||
*
|
||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||
* @return \Thelia\Model\ImportExportTypeI18n Clone of current object.
|
||||
* @return \Thelia\Model\ImportI18n Clone of current object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function copy($deepCopy = false)
|
||||
@@ -1111,13 +1111,13 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a ChildImportExportType object.
|
||||
* Declares an association between this object and a ChildImport object.
|
||||
*
|
||||
* @param ChildImportExportType $v
|
||||
* @return \Thelia\Model\ImportExportTypeI18n The current object (for fluent API support)
|
||||
* @param ChildImport $v
|
||||
* @return \Thelia\Model\ImportI18n The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setImportExportType(ChildImportExportType $v = null)
|
||||
public function setImport(ChildImport $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setId(NULL);
|
||||
@@ -1125,12 +1125,12 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
$this->setId($v->getId());
|
||||
}
|
||||
|
||||
$this->aImportExportType = $v;
|
||||
$this->aImport = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the ChildImportExportType object, it will not be re-added.
|
||||
// If this object has already been added to the ChildImport object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addImportExportTypeI18n($this);
|
||||
$v->addImportI18n($this);
|
||||
}
|
||||
|
||||
|
||||
@@ -1139,26 +1139,26 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
|
||||
|
||||
/**
|
||||
* Get the associated ChildImportExportType object
|
||||
* Get the associated ChildImport object
|
||||
*
|
||||
* @param ConnectionInterface $con Optional Connection object.
|
||||
* @return ChildImportExportType The associated ChildImportExportType object.
|
||||
* @return ChildImport The associated ChildImport object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getImportExportType(ConnectionInterface $con = null)
|
||||
public function getImport(ConnectionInterface $con = null)
|
||||
{
|
||||
if ($this->aImportExportType === null && ($this->id !== null)) {
|
||||
$this->aImportExportType = ChildImportExportTypeQuery::create()->findPk($this->id, $con);
|
||||
if ($this->aImport === null && ($this->id !== null)) {
|
||||
$this->aImport = ChildImportQuery::create()->findPk($this->id, $con);
|
||||
/* The following can be used additionally to
|
||||
guarantee the related object contains a reference
|
||||
to this object. This level of coupling may, however, be
|
||||
undesirable since it could result in an only partially populated collection
|
||||
in the referenced object.
|
||||
$this->aImportExportType->addImportExportTypeI18ns($this);
|
||||
$this->aImport->addImportI18ns($this);
|
||||
*/
|
||||
}
|
||||
|
||||
return $this->aImportExportType;
|
||||
return $this->aImport;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1192,7 +1192,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
if ($deep) {
|
||||
} // if ($deep)
|
||||
|
||||
$this->aImportExportType = null;
|
||||
$this->aImport = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1202,7 +1202,7 @@ abstract class ImportExportTypeI18n implements ActiveRecordInterface
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return (string) $this->exportTo(ImportExportTypeI18nTableMap::DEFAULT_STRING_FORMAT);
|
||||
return (string) $this->exportTo(ImportI18nTableMap::DEFAULT_STRING_FORMAT);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -12,76 +12,76 @@ use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\ImportExportTypeI18n as ChildImportExportTypeI18n;
|
||||
use Thelia\Model\ImportExportTypeI18nQuery as ChildImportExportTypeI18nQuery;
|
||||
use Thelia\Model\Map\ImportExportTypeI18nTableMap;
|
||||
use Thelia\Model\ImportI18n as ChildImportI18n;
|
||||
use Thelia\Model\ImportI18nQuery as ChildImportI18nQuery;
|
||||
use Thelia\Model\Map\ImportI18nTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'import_export_type_i18n' table.
|
||||
* Base class that represents a query for the 'import_i18n' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildImportExportTypeI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportExportTypeI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildImportExportTypeI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ChildImportExportTypeI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method ChildImportI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildImportI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ChildImportI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
*
|
||||
* @method ChildImportExportTypeI18nQuery groupById() Group by the id column
|
||||
* @method ChildImportExportTypeI18nQuery groupByLocale() Group by the locale column
|
||||
* @method ChildImportExportTypeI18nQuery groupByTitle() Group by the title column
|
||||
* @method ChildImportExportTypeI18nQuery groupByDescription() Group by the description column
|
||||
* @method ChildImportI18nQuery groupById() Group by the id column
|
||||
* @method ChildImportI18nQuery groupByLocale() Group by the locale column
|
||||
* @method ChildImportI18nQuery groupByTitle() Group by the title column
|
||||
* @method ChildImportI18nQuery groupByDescription() Group by the description column
|
||||
*
|
||||
* @method ChildImportExportTypeI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportExportTypeI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportExportTypeI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
* @method ChildImportI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportI18nQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildImportExportTypeI18nQuery leftJoinImportExportType($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportType relation
|
||||
* @method ChildImportExportTypeI18nQuery rightJoinImportExportType($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportType relation
|
||||
* @method ChildImportExportTypeI18nQuery innerJoinImportExportType($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportType relation
|
||||
* @method ChildImportI18nQuery leftJoinImport($relationAlias = null) Adds a LEFT JOIN clause to the query using the Import relation
|
||||
* @method ChildImportI18nQuery rightJoinImport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Import relation
|
||||
* @method ChildImportI18nQuery innerJoinImport($relationAlias = null) Adds a INNER JOIN clause to the query using the Import relation
|
||||
*
|
||||
* @method ChildImportExportTypeI18n findOne(ConnectionInterface $con = null) Return the first ChildImportExportTypeI18n matching the query
|
||||
* @method ChildImportExportTypeI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportTypeI18n matching the query, or a new ChildImportExportTypeI18n object populated from the query conditions when no match is found
|
||||
* @method ChildImportI18n findOne(ConnectionInterface $con = null) Return the first ChildImportI18n matching the query
|
||||
* @method ChildImportI18n findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportI18n matching the query, or a new ChildImportI18n object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildImportExportTypeI18n findOneById(int $id) Return the first ChildImportExportTypeI18n filtered by the id column
|
||||
* @method ChildImportExportTypeI18n findOneByLocale(string $locale) Return the first ChildImportExportTypeI18n filtered by the locale column
|
||||
* @method ChildImportExportTypeI18n findOneByTitle(string $title) Return the first ChildImportExportTypeI18n filtered by the title column
|
||||
* @method ChildImportExportTypeI18n findOneByDescription(string $description) Return the first ChildImportExportTypeI18n filtered by the description column
|
||||
* @method ChildImportI18n findOneById(int $id) Return the first ChildImportI18n filtered by the id column
|
||||
* @method ChildImportI18n findOneByLocale(string $locale) Return the first ChildImportI18n filtered by the locale column
|
||||
* @method ChildImportI18n findOneByTitle(string $title) Return the first ChildImportI18n filtered by the title column
|
||||
* @method ChildImportI18n findOneByDescription(string $description) Return the first ChildImportI18n filtered by the description column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildImportExportTypeI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildImportExportTypeI18n objects filtered by the locale column
|
||||
* @method array findByTitle(string $title) Return ChildImportExportTypeI18n objects filtered by the title column
|
||||
* @method array findByDescription(string $description) Return ChildImportExportTypeI18n objects filtered by the description column
|
||||
* @method array findById(int $id) Return ChildImportI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildImportI18n objects filtered by the locale column
|
||||
* @method array findByTitle(string $title) Return ChildImportI18n objects filtered by the title column
|
||||
* @method array findByDescription(string $description) Return ChildImportI18n objects filtered by the description column
|
||||
*
|
||||
*/
|
||||
abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
abstract class ImportI18nQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportExportTypeI18nQuery object.
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportI18nQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportTypeI18n', $modelAlias = null)
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportI18n', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildImportExportTypeI18nQuery object.
|
||||
* Returns a new ChildImportI18nQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery
|
||||
* @return ChildImportI18nQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ImportExportTypeI18nQuery) {
|
||||
if ($criteria instanceof \Thelia\Model\ImportI18nQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ImportExportTypeI18nQuery();
|
||||
$query = new \Thelia\Model\ImportI18nQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
@@ -104,19 +104,19 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* @param array[$id, $locale] $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildImportExportTypeI18n|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImportI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ImportExportTypeI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||
if ((null !== ($obj = ImportI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
@@ -135,11 +135,11 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportTypeI18n A model object, or null if the key is not found
|
||||
* @return ChildImportI18n A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE`, `DESCRIPTION` FROM `import_export_type_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||
$sql = 'SELECT `ID`, `LOCALE`, `TITLE`, `DESCRIPTION` FROM `import_i18n` WHERE `ID` = :p0 AND `LOCALE` = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -151,9 +151,9 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildImportExportTypeI18n();
|
||||
$obj = new ChildImportI18n();
|
||||
$obj->hydrate($row);
|
||||
ImportExportTypeI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||
ImportI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1])));
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
@@ -166,7 +166,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportTypeI18n|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImportI18n|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
@@ -208,12 +208,12 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ImportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$this->addUsingAlias(ImportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
@@ -231,8 +231,8 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
return $this->add(null, '1<>1', Criteria::CUSTOM);
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
$cton0 = $this->getNewCriterion(ImportExportTypeI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$cton1 = $this->getNewCriterion(ImportExportTypeI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$cton0 = $this->getNewCriterion(ImportI18nTableMap::ID, $key[0], Criteria::EQUAL);
|
||||
$cton1 = $this->getNewCriterion(ImportI18nTableMap::LOCALE, $key[1], Criteria::EQUAL);
|
||||
$cton0->addAnd($cton1);
|
||||
$this->addOr($cton0);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* $query->filterById(array('min' => 12)); // WHERE id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByImportExportType()
|
||||
* @see filterByImport()
|
||||
*
|
||||
* @param mixed $id The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
@@ -258,18 +258,18 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -280,7 +280,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::ID, $id, $comparison);
|
||||
return $this->addUsingAlias(ImportI18nTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,7 +296,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLocale($locale = null, $comparison = null)
|
||||
{
|
||||
@@ -309,7 +309,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::LOCALE, $locale, $comparison);
|
||||
return $this->addUsingAlias(ImportI18nTableMap::LOCALE, $locale, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -325,7 +325,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTitle($title = null, $comparison = null)
|
||||
{
|
||||
@@ -338,7 +338,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::TITLE, $title, $comparison);
|
||||
return $this->addUsingAlias(ImportI18nTableMap::TITLE, $title, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -354,7 +354,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDescription($description = null, $comparison = null)
|
||||
{
|
||||
@@ -367,46 +367,46 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeI18nTableMap::DESCRIPTION, $description, $comparison);
|
||||
return $this->addUsingAlias(ImportI18nTableMap::DESCRIPTION, $description, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ImportExportType object
|
||||
* Filter the query by a related \Thelia\Model\Import object
|
||||
*
|
||||
* @param \Thelia\Model\ImportExportType|ObjectCollection $importExportType The related object(s) to use as filter
|
||||
* @param \Thelia\Model\Import|ObjectCollection $import The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByImportExportType($importExportType, $comparison = null)
|
||||
public function filterByImport($import, $comparison = null)
|
||||
{
|
||||
if ($importExportType instanceof \Thelia\Model\ImportExportType) {
|
||||
if ($import instanceof \Thelia\Model\Import) {
|
||||
return $this
|
||||
->addUsingAlias(ImportExportTypeI18nTableMap::ID, $importExportType->getId(), $comparison);
|
||||
} elseif ($importExportType instanceof ObjectCollection) {
|
||||
->addUsingAlias(ImportI18nTableMap::ID, $import->getId(), $comparison);
|
||||
} elseif ($import instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ImportExportTypeI18nTableMap::ID, $importExportType->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
->addUsingAlias(ImportI18nTableMap::ID, $import->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByImportExportType() only accepts arguments of type \Thelia\Model\ImportExportType or Collection');
|
||||
throw new PropelException('filterByImport() only accepts arguments of type \Thelia\Model\Import or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportExportType relation
|
||||
* Adds a JOIN clause to the query using the Import relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportExportType($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function joinImport($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportExportType');
|
||||
$relationMap = $tableMap->getRelation('Import');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -421,14 +421,14 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportExportType');
|
||||
$this->addJoinObject($join, 'Import');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportExportType relation ImportExportType object
|
||||
* Use the Import relation Import object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
@@ -436,27 +436,27 @@ abstract class ImportExportTypeI18nQuery 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\ImportExportTypeQuery A secondary query class using the current class as primary query
|
||||
* @return \Thelia\Model\ImportQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportExportTypeQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function useImportQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinImportExportType($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportType', '\Thelia\Model\ImportExportTypeQuery');
|
||||
->joinImport($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Import', '\Thelia\Model\ImportQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildImportExportTypeI18n $importExportTypeI18n Object to remove from the list of results
|
||||
* @param ChildImportI18n $importI18n Object to remove from the list of results
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery The current query, for fluid interface
|
||||
* @return ChildImportI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($importExportTypeI18n = null)
|
||||
public function prune($importI18n = null)
|
||||
{
|
||||
if ($importExportTypeI18n) {
|
||||
$this->addCond('pruneCond0', $this->getAliasedColName(ImportExportTypeI18nTableMap::ID), $importExportTypeI18n->getId(), Criteria::NOT_EQUAL);
|
||||
$this->addCond('pruneCond1', $this->getAliasedColName(ImportExportTypeI18nTableMap::LOCALE), $importExportTypeI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||
if ($importI18n) {
|
||||
$this->addCond('pruneCond0', $this->getAliasedColName(ImportI18nTableMap::ID), $importI18n->getId(), Criteria::NOT_EQUAL);
|
||||
$this->addCond('pruneCond1', $this->getAliasedColName(ImportI18nTableMap::LOCALE), $importI18n->getLocale(), Criteria::NOT_EQUAL);
|
||||
$this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the import_export_type_i18n table.
|
||||
* Deletes all rows from the import_i18n table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
@@ -472,7 +472,7 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
@@ -483,8 +483,8 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ImportExportTypeI18nTableMap::clearInstancePool();
|
||||
ImportExportTypeI18nTableMap::clearRelatedInstancePool();
|
||||
ImportI18nTableMap::clearInstancePool();
|
||||
ImportI18nTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
@@ -496,9 +496,9 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildImportExportTypeI18n or Criteria object OR a primary key value.
|
||||
* Performs a DELETE on the database, given a ChildImportI18n or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildImportExportTypeI18n object or primary key or array of primary keys
|
||||
* @param mixed $values Criteria or ChildImportI18n object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
@@ -509,13 +509,13 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportI18nTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportExportTypeI18nTableMap::DATABASE_NAME);
|
||||
$criteria->setDbName(ImportI18nTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
@@ -525,10 +525,10 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ImportExportTypeI18nTableMap::removeInstanceFromPool($criteria);
|
||||
ImportI18nTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ImportExportTypeI18nTableMap::clearRelatedInstancePool();
|
||||
ImportI18nTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
@@ -538,4 +538,4 @@ abstract class ImportExportTypeI18nQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
} // ImportExportTypeI18nQuery
|
||||
} // ImportI18nQuery
|
||||
@@ -12,89 +12,85 @@ use Propel\Runtime\Collection\Collection;
|
||||
use Propel\Runtime\Collection\ObjectCollection;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
use Propel\Runtime\Exception\PropelException;
|
||||
use Thelia\Model\ImportExportType as ChildImportExportType;
|
||||
use Thelia\Model\ImportExportTypeI18nQuery as ChildImportExportTypeI18nQuery;
|
||||
use Thelia\Model\ImportExportTypeQuery as ChildImportExportTypeQuery;
|
||||
use Thelia\Model\Map\ImportExportTypeTableMap;
|
||||
use Thelia\Model\Import as ChildImport;
|
||||
use Thelia\Model\ImportI18nQuery as ChildImportI18nQuery;
|
||||
use Thelia\Model\ImportQuery as ChildImportQuery;
|
||||
use Thelia\Model\Map\ImportTableMap;
|
||||
|
||||
/**
|
||||
* Base class that represents a query for the 'import_export_type' table.
|
||||
* Base class that represents a query for the 'import' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @method ChildImportExportTypeQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportExportTypeQuery orderByUrlAction($order = Criteria::ASC) Order by the url_action column
|
||||
* @method ChildImportExportTypeQuery orderByImportExportCategoryId($order = Criteria::ASC) Order by the import_export_category_id column
|
||||
* @method ChildImportExportTypeQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildImportExportTypeQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildImportExportTypeQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
* @method ChildImportQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildImportQuery orderByImportCategoryId($order = Criteria::ASC) Order by the import_category_id column
|
||||
* @method ChildImportQuery orderByPosition($order = Criteria::ASC) Order by the position column
|
||||
* @method ChildImportQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildImportQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildImportExportTypeQuery groupById() Group by the id column
|
||||
* @method ChildImportExportTypeQuery groupByUrlAction() Group by the url_action column
|
||||
* @method ChildImportExportTypeQuery groupByImportExportCategoryId() Group by the import_export_category_id column
|
||||
* @method ChildImportExportTypeQuery groupByPosition() Group by the position column
|
||||
* @method ChildImportExportTypeQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildImportExportTypeQuery groupByUpdatedAt() Group by the updated_at column
|
||||
* @method ChildImportQuery groupById() Group by the id column
|
||||
* @method ChildImportQuery groupByImportCategoryId() Group by the import_category_id column
|
||||
* @method ChildImportQuery groupByPosition() Group by the position column
|
||||
* @method ChildImportQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildImportQuery groupByUpdatedAt() Group by the updated_at column
|
||||
*
|
||||
* @method ChildImportExportTypeQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportExportTypeQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportExportTypeQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
* @method ChildImportQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildImportQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildImportQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildImportExportTypeQuery leftJoinImportExportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportCategory relation
|
||||
* @method ChildImportExportTypeQuery rightJoinImportExportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportCategory relation
|
||||
* @method ChildImportExportTypeQuery innerJoinImportExportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportCategory relation
|
||||
* @method ChildImportQuery leftJoinImportCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportCategory relation
|
||||
* @method ChildImportQuery rightJoinImportCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportCategory relation
|
||||
* @method ChildImportQuery innerJoinImportCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportCategory relation
|
||||
*
|
||||
* @method ChildImportExportTypeQuery leftJoinImportExportTypeI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportExportTypeI18n relation
|
||||
* @method ChildImportExportTypeQuery rightJoinImportExportTypeI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportExportTypeI18n relation
|
||||
* @method ChildImportExportTypeQuery innerJoinImportExportTypeI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportExportTypeI18n relation
|
||||
* @method ChildImportQuery leftJoinImportI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the ImportI18n relation
|
||||
* @method ChildImportQuery rightJoinImportI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ImportI18n relation
|
||||
* @method ChildImportQuery innerJoinImportI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the ImportI18n relation
|
||||
*
|
||||
* @method ChildImportExportType findOne(ConnectionInterface $con = null) Return the first ChildImportExportType matching the query
|
||||
* @method ChildImportExportType findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImportExportType matching the query, or a new ChildImportExportType object populated from the query conditions when no match is found
|
||||
* @method ChildImport findOne(ConnectionInterface $con = null) Return the first ChildImport matching the query
|
||||
* @method ChildImport findOneOrCreate(ConnectionInterface $con = null) Return the first ChildImport matching the query, or a new ChildImport object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildImportExportType findOneById(int $id) Return the first ChildImportExportType filtered by the id column
|
||||
* @method ChildImportExportType findOneByUrlAction(string $url_action) Return the first ChildImportExportType filtered by the url_action column
|
||||
* @method ChildImportExportType findOneByImportExportCategoryId(int $import_export_category_id) Return the first ChildImportExportType filtered by the import_export_category_id column
|
||||
* @method ChildImportExportType findOneByPosition(int $position) Return the first ChildImportExportType filtered by the position column
|
||||
* @method ChildImportExportType findOneByCreatedAt(string $created_at) Return the first ChildImportExportType filtered by the created_at column
|
||||
* @method ChildImportExportType findOneByUpdatedAt(string $updated_at) Return the first ChildImportExportType filtered by the updated_at column
|
||||
* @method ChildImport findOneById(int $id) Return the first ChildImport filtered by the id column
|
||||
* @method ChildImport findOneByImportCategoryId(int $import_category_id) Return the first ChildImport filtered by the import_category_id column
|
||||
* @method ChildImport findOneByPosition(int $position) Return the first ChildImport filtered by the position column
|
||||
* @method ChildImport findOneByCreatedAt(string $created_at) Return the first ChildImport filtered by the created_at column
|
||||
* @method ChildImport findOneByUpdatedAt(string $updated_at) Return the first ChildImport filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildImportExportType objects filtered by the id column
|
||||
* @method array findByUrlAction(string $url_action) Return ChildImportExportType objects filtered by the url_action column
|
||||
* @method array findByImportExportCategoryId(int $import_export_category_id) Return ChildImportExportType objects filtered by the import_export_category_id column
|
||||
* @method array findByPosition(int $position) Return ChildImportExportType objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildImportExportType objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildImportExportType objects filtered by the updated_at column
|
||||
* @method array findById(int $id) Return ChildImport objects filtered by the id column
|
||||
* @method array findByImportCategoryId(int $import_category_id) Return ChildImport objects filtered by the import_category_id column
|
||||
* @method array findByPosition(int $position) Return ChildImport objects filtered by the position column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildImport objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildImport objects filtered by the updated_at column
|
||||
*
|
||||
*/
|
||||
abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
abstract class ImportQuery extends ModelCriteria
|
||||
{
|
||||
|
||||
/**
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportExportTypeQuery object.
|
||||
* Initializes internal state of \Thelia\Model\Base\ImportQuery object.
|
||||
*
|
||||
* @param string $dbName The database name
|
||||
* @param string $modelName The phpName of a model, e.g. 'Book'
|
||||
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
|
||||
*/
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\ImportExportType', $modelAlias = null)
|
||||
public function __construct($dbName = 'thelia', $modelName = '\\Thelia\\Model\\Import', $modelAlias = null)
|
||||
{
|
||||
parent::__construct($dbName, $modelName, $modelAlias);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new ChildImportExportTypeQuery object.
|
||||
* Returns a new ChildImportQuery object.
|
||||
*
|
||||
* @param string $modelAlias The alias of a model in the query
|
||||
* @param Criteria $criteria Optional Criteria to build the query from
|
||||
*
|
||||
* @return ChildImportExportTypeQuery
|
||||
* @return ChildImportQuery
|
||||
*/
|
||||
public static function create($modelAlias = null, $criteria = null)
|
||||
{
|
||||
if ($criteria instanceof \Thelia\Model\ImportExportTypeQuery) {
|
||||
if ($criteria instanceof \Thelia\Model\ImportQuery) {
|
||||
return $criteria;
|
||||
}
|
||||
$query = new \Thelia\Model\ImportExportTypeQuery();
|
||||
$query = new \Thelia\Model\ImportQuery();
|
||||
if (null !== $modelAlias) {
|
||||
$query->setModelAlias($modelAlias);
|
||||
}
|
||||
@@ -117,19 +113,19 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con an optional connection object
|
||||
*
|
||||
* @return ChildImportExportType|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImport|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
public function findPk($key, $con = null)
|
||||
{
|
||||
if ($key === null) {
|
||||
return null;
|
||||
}
|
||||
if ((null !== ($obj = ImportExportTypeTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
if ((null !== ($obj = ImportTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
|
||||
// the object is already in the instance pool
|
||||
return $obj;
|
||||
}
|
||||
if ($con === null) {
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getReadConnection(ImportTableMap::DATABASE_NAME);
|
||||
}
|
||||
$this->basePreSelect($con);
|
||||
if ($this->formatter || $this->modelAlias || $this->with || $this->select
|
||||
@@ -148,11 +144,11 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportType A model object, or null if the key is not found
|
||||
* @return ChildImport A model object, or null if the key is not found
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `URL_ACTION`, `IMPORT_EXPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import_export_type` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `IMPORT_CATEGORY_ID`, `POSITION`, `CREATED_AT`, `UPDATED_AT` FROM `import` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -163,9 +159,9 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
}
|
||||
$obj = null;
|
||||
if ($row = $stmt->fetch(\PDO::FETCH_NUM)) {
|
||||
$obj = new ChildImportExportType();
|
||||
$obj = new ChildImport();
|
||||
$obj->hydrate($row);
|
||||
ImportExportTypeTableMap::addInstanceToPool($obj, (string) $key);
|
||||
ImportTableMap::addInstanceToPool($obj, (string) $key);
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
|
||||
@@ -178,7 +174,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* @param mixed $key Primary key to use for the query
|
||||
* @param ConnectionInterface $con A connection object
|
||||
*
|
||||
* @return ChildImportExportType|array|mixed the result, formatted by the current formatter
|
||||
* @return ChildImport|array|mixed the result, formatted by the current formatter
|
||||
*/
|
||||
protected function findPkComplex($key, $con)
|
||||
{
|
||||
@@ -220,12 +216,12 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
*
|
||||
* @param mixed $key Primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKey($key)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::ID, $key, Criteria::EQUAL);
|
||||
return $this->addUsingAlias(ImportTableMap::ID, $key, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,12 +229,12 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
*
|
||||
* @param array $keys The list of primary key to use for the query
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPrimaryKeys($keys)
|
||||
{
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::ID, $keys, Criteria::IN);
|
||||
return $this->addUsingAlias(ImportTableMap::ID, $keys, Criteria::IN);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,18 +253,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterById($id = null, $comparison = null)
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$useMinMax = false;
|
||||
if (isset($id['min'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($id['max'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -279,68 +275,39 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::ID, $id, $comparison);
|
||||
return $this->addUsingAlias(ImportTableMap::ID, $id, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the url_action column
|
||||
* Filter the query on the import_category_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByUrlAction('fooValue'); // WHERE url_action = 'fooValue'
|
||||
* $query->filterByUrlAction('%fooValue%'); // WHERE url_action LIKE '%fooValue%'
|
||||
* $query->filterByImportCategoryId(1234); // WHERE import_category_id = 1234
|
||||
* $query->filterByImportCategoryId(array(12, 34)); // WHERE import_category_id IN (12, 34)
|
||||
* $query->filterByImportCategoryId(array('min' => 12)); // WHERE import_category_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @param string $urlAction 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
|
||||
* @see filterByImportCategory()
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUrlAction($urlAction = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($urlAction)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $urlAction)) {
|
||||
$urlAction = str_replace('*', '%', $urlAction);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::URL_ACTION, $urlAction, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the import_export_category_id column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByImportExportCategoryId(1234); // WHERE import_export_category_id = 1234
|
||||
* $query->filterByImportExportCategoryId(array(12, 34)); // WHERE import_export_category_id IN (12, 34)
|
||||
* $query->filterByImportExportCategoryId(array('min' => 12)); // WHERE import_export_category_id > 12
|
||||
* </code>
|
||||
*
|
||||
* @see filterByImportExportCategory()
|
||||
*
|
||||
* @param mixed $importExportCategoryId The value to use as filter.
|
||||
* @param mixed $importCategoryId 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 ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByImportExportCategoryId($importExportCategoryId = null, $comparison = null)
|
||||
public function filterByImportCategoryId($importCategoryId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($importExportCategoryId)) {
|
||||
if (is_array($importCategoryId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($importExportCategoryId['min'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategoryId['min'], Criteria::GREATER_EQUAL);
|
||||
if (isset($importCategoryId['min'])) {
|
||||
$this->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategoryId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($importExportCategoryId['max'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategoryId['max'], Criteria::LESS_EQUAL);
|
||||
if (isset($importCategoryId['max'])) {
|
||||
$this->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategoryId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -351,7 +318,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategoryId, $comparison);
|
||||
return $this->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategoryId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -370,18 +337,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByPosition($position = null, $comparison = null)
|
||||
{
|
||||
if (is_array($position)) {
|
||||
$useMinMax = false;
|
||||
if (isset($position['min'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($position['max'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -392,7 +359,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::POSITION, $position, $comparison);
|
||||
return $this->addUsingAlias(ImportTableMap::POSITION, $position, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -413,18 +380,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCreatedAt($createdAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($createdAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($createdAt['min'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($createdAt['max'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -435,7 +402,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
return $this->addUsingAlias(ImportTableMap::CREATED_AT, $createdAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -456,18 +423,18 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByUpdatedAt($updatedAt = null, $comparison = null)
|
||||
{
|
||||
if (is_array($updatedAt)) {
|
||||
$useMinMax = false;
|
||||
if (isset($updatedAt['min'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($updatedAt['max'])) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$this->addUsingAlias(ImportTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
@@ -478,46 +445,46 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
return $this->addUsingAlias(ImportTableMap::UPDATED_AT, $updatedAt, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ImportExportCategory object
|
||||
* Filter the query by a related \Thelia\Model\ImportCategory object
|
||||
*
|
||||
* @param \Thelia\Model\ImportExportCategory|ObjectCollection $importExportCategory The related object(s) to use as filter
|
||||
* @param \Thelia\Model\ImportCategory|ObjectCollection $importCategory The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByImportExportCategory($importExportCategory, $comparison = null)
|
||||
public function filterByImportCategory($importCategory, $comparison = null)
|
||||
{
|
||||
if ($importExportCategory instanceof \Thelia\Model\ImportExportCategory) {
|
||||
if ($importCategory instanceof \Thelia\Model\ImportCategory) {
|
||||
return $this
|
||||
->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategory->getId(), $comparison);
|
||||
} elseif ($importExportCategory instanceof ObjectCollection) {
|
||||
->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategory->getId(), $comparison);
|
||||
} elseif ($importCategory instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(ImportExportTypeTableMap::IMPORT_EXPORT_CATEGORY_ID, $importExportCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
->addUsingAlias(ImportTableMap::IMPORT_CATEGORY_ID, $importCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByImportExportCategory() only accepts arguments of type \Thelia\Model\ImportExportCategory or Collection');
|
||||
throw new PropelException('filterByImportCategory() only accepts arguments of type \Thelia\Model\ImportCategory or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportExportCategory relation
|
||||
* Adds a JOIN clause to the query using the ImportCategory relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportExportCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
public function joinImportCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportExportCategory');
|
||||
$relationMap = $tableMap->getRelation('ImportCategory');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -532,14 +499,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportExportCategory');
|
||||
$this->addJoinObject($join, 'ImportCategory');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportExportCategory relation ImportExportCategory object
|
||||
* Use the ImportCategory relation ImportCategory object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
@@ -547,50 +514,50 @@ abstract class ImportExportTypeQuery 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\ImportExportCategoryQuery A secondary query class using the current class as primary query
|
||||
* @return \Thelia\Model\ImportCategoryQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportExportCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
public function useImportCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinImportExportCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportCategory', '\Thelia\Model\ImportExportCategoryQuery');
|
||||
->joinImportCategory($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportCategory', '\Thelia\Model\ImportCategoryQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\ImportExportTypeI18n object
|
||||
* Filter the query by a related \Thelia\Model\ImportI18n object
|
||||
*
|
||||
* @param \Thelia\Model\ImportExportTypeI18n|ObjectCollection $importExportTypeI18n the related object to use as filter
|
||||
* @param \Thelia\Model\ImportI18n|ObjectCollection $importI18n the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByImportExportTypeI18n($importExportTypeI18n, $comparison = null)
|
||||
public function filterByImportI18n($importI18n, $comparison = null)
|
||||
{
|
||||
if ($importExportTypeI18n instanceof \Thelia\Model\ImportExportTypeI18n) {
|
||||
if ($importI18n instanceof \Thelia\Model\ImportI18n) {
|
||||
return $this
|
||||
->addUsingAlias(ImportExportTypeTableMap::ID, $importExportTypeI18n->getId(), $comparison);
|
||||
} elseif ($importExportTypeI18n instanceof ObjectCollection) {
|
||||
->addUsingAlias(ImportTableMap::ID, $importI18n->getId(), $comparison);
|
||||
} elseif ($importI18n instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useImportExportTypeI18nQuery()
|
||||
->filterByPrimaryKeys($importExportTypeI18n->getPrimaryKeys())
|
||||
->useImportI18nQuery()
|
||||
->filterByPrimaryKeys($importI18n->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByImportExportTypeI18n() only accepts arguments of type \Thelia\Model\ImportExportTypeI18n or Collection');
|
||||
throw new PropelException('filterByImportI18n() only accepts arguments of type \Thelia\Model\ImportI18n or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the ImportExportTypeI18n relation
|
||||
* Adds a JOIN clause to the query using the ImportI18n relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinImportExportTypeI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function joinImportI18n($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('ImportExportTypeI18n');
|
||||
$relationMap = $tableMap->getRelation('ImportI18n');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
@@ -605,14 +572,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'ImportExportTypeI18n');
|
||||
$this->addJoinObject($join, 'ImportI18n');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the ImportExportTypeI18n relation ImportExportTypeI18n object
|
||||
* Use the ImportI18n relation ImportI18n object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
@@ -620,33 +587,33 @@ abstract class ImportExportTypeQuery 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\ImportExportTypeI18nQuery A secondary query class using the current class as primary query
|
||||
* @return \Thelia\Model\ImportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useImportExportTypeI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
public function useImportI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
|
||||
{
|
||||
return $this
|
||||
->joinImportExportTypeI18n($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportTypeI18n', '\Thelia\Model\ImportExportTypeI18nQuery');
|
||||
->joinImportI18n($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportI18n', '\Thelia\Model\ImportI18nQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
* @param ChildImportExportType $importExportType Object to remove from the list of results
|
||||
* @param ChildImport $import Object to remove from the list of results
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function prune($importExportType = null)
|
||||
public function prune($import = null)
|
||||
{
|
||||
if ($importExportType) {
|
||||
$this->addUsingAlias(ImportExportTypeTableMap::ID, $importExportType->getId(), Criteria::NOT_EQUAL);
|
||||
if ($import) {
|
||||
$this->addUsingAlias(ImportTableMap::ID, $import->getId(), Criteria::NOT_EQUAL);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes all rows from the import_export_type table.
|
||||
* Deletes all rows from the import table.
|
||||
*
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver).
|
||||
@@ -654,7 +621,7 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
public function doDeleteAll(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportTableMap::DATABASE_NAME);
|
||||
}
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
try {
|
||||
@@ -665,8 +632,8 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
// Because this db requires some delete cascade/set null emulation, we have to
|
||||
// clear the cached instance *after* the emulation has happened (since
|
||||
// instances get re-added by the select statement contained therein).
|
||||
ImportExportTypeTableMap::clearInstancePool();
|
||||
ImportExportTypeTableMap::clearRelatedInstancePool();
|
||||
ImportTableMap::clearInstancePool();
|
||||
ImportTableMap::clearRelatedInstancePool();
|
||||
|
||||
$con->commit();
|
||||
} catch (PropelException $e) {
|
||||
@@ -678,9 +645,9 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a DELETE on the database, given a ChildImportExportType or Criteria object OR a primary key value.
|
||||
* Performs a DELETE on the database, given a ChildImport or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ChildImportExportType object or primary key or array of primary keys
|
||||
* @param mixed $values Criteria or ChildImport object or primary key or array of primary keys
|
||||
* which is used to create the DELETE statement
|
||||
* @param ConnectionInterface $con the connection to use
|
||||
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||
@@ -691,13 +658,13 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
public function delete(ConnectionInterface $con = null)
|
||||
{
|
||||
if (null === $con) {
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportExportTypeTableMap::DATABASE_NAME);
|
||||
$con = Propel::getServiceContainer()->getWriteConnection(ImportTableMap::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = $this;
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(ImportExportTypeTableMap::DATABASE_NAME);
|
||||
$criteria->setDbName(ImportTableMap::DATABASE_NAME);
|
||||
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
|
||||
@@ -707,10 +674,10 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
$con->beginTransaction();
|
||||
|
||||
|
||||
ImportExportTypeTableMap::removeInstanceFromPool($criteria);
|
||||
ImportTableMap::removeInstanceFromPool($criteria);
|
||||
|
||||
$affectedRows += ModelCriteria::delete($con);
|
||||
ImportExportTypeTableMap::clearRelatedInstancePool();
|
||||
ImportTableMap::clearRelatedInstancePool();
|
||||
$con->commit();
|
||||
|
||||
return $affectedRows;
|
||||
@@ -729,14 +696,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportExportTypeI18n';
|
||||
$relationName = $relationAlias ? $relationAlias : 'ImportI18n';
|
||||
|
||||
return $this
|
||||
->joinImportExportTypeI18n($relationAlias, $joinType)
|
||||
->joinImportI18n($relationAlias, $joinType)
|
||||
->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
|
||||
}
|
||||
|
||||
@@ -747,14 +714,14 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* @param string $locale Locale to use for the join condition, e.g. 'fr_FR'
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$this
|
||||
->joinI18n($locale, null, $joinType)
|
||||
->with('ImportExportTypeI18n');
|
||||
$this->with['ImportExportTypeI18n']->setIsWithOneToMany(false);
|
||||
->with('ImportI18n');
|
||||
$this->with['ImportI18n']->setIsWithOneToMany(false);
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -768,13 +735,13 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
|
||||
*
|
||||
* @return ChildImportExportTypeI18nQuery A secondary query class using the current class as primary query
|
||||
* @return ChildImportI18nQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinI18n($locale, $relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportExportTypeI18n', '\Thelia\Model\ImportExportTypeI18nQuery');
|
||||
->useQuery($relationAlias ? $relationAlias : 'ImportI18n', '\Thelia\Model\ImportI18nQuery');
|
||||
}
|
||||
|
||||
// timestampable behavior
|
||||
@@ -784,11 +751,11 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
*
|
||||
* @param int $nbDays Maximum age of the latest update in days
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyUpdated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
return $this->addUsingAlias(ImportTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -796,51 +763,51 @@ abstract class ImportExportTypeQuery extends ModelCriteria
|
||||
*
|
||||
* @param int $nbDays Maximum age of in days
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function recentlyCreated($nbDays = 7)
|
||||
{
|
||||
return $this->addUsingAlias(ImportExportTypeTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
return $this->addUsingAlias(ImportTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date desc
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastUpdatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ImportExportTypeTableMap::UPDATED_AT);
|
||||
return $this->addDescendingOrderByColumn(ImportTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by update date asc
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstUpdatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ImportExportTypeTableMap::UPDATED_AT);
|
||||
return $this->addAscendingOrderByColumn(ImportTableMap::UPDATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date desc
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function lastCreatedFirst()
|
||||
{
|
||||
return $this->addDescendingOrderByColumn(ImportExportTypeTableMap::CREATED_AT);
|
||||
return $this->addDescendingOrderByColumn(ImportTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Order by create date asc
|
||||
*
|
||||
* @return ChildImportExportTypeQuery The current query, for fluid interface
|
||||
* @return ChildImportQuery The current query, for fluid interface
|
||||
*/
|
||||
public function firstCreatedFirst()
|
||||
{
|
||||
return $this->addAscendingOrderByColumn(ImportExportTypeTableMap::CREATED_AT);
|
||||
return $this->addAscendingOrderByColumn(ImportTableMap::CREATED_AT);
|
||||
}
|
||||
|
||||
} // ImportExportTypeQuery
|
||||
} // ImportQuery
|
||||
Reference in New Issue
Block a user