D'autres fichiers en conf

This commit is contained in:
2021-01-25 18:44:19 +01:00
parent af1552b390
commit 154fff5134
74 changed files with 9151 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,646 @@
<?php
namespace PaymentCondition\Model\Base;
use \Exception;
use \PDO;
use PaymentCondition\Model\PaymentAreaCondition as ChildPaymentAreaCondition;
use PaymentCondition\Model\PaymentAreaConditionQuery as ChildPaymentAreaConditionQuery;
use PaymentCondition\Model\Map\PaymentAreaConditionTableMap;
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\Area;
use Thelia\Model\Module;
/**
* Base class that represents a query for the 'payment_area_condition' table.
*
*
*
* @method ChildPaymentAreaConditionQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildPaymentAreaConditionQuery orderByPaymentModuleId($order = Criteria::ASC) Order by the payment_module_id column
* @method ChildPaymentAreaConditionQuery orderByAreaId($order = Criteria::ASC) Order by the area_id column
* @method ChildPaymentAreaConditionQuery orderByIsValid($order = Criteria::ASC) Order by the is_valid column
*
* @method ChildPaymentAreaConditionQuery groupById() Group by the id column
* @method ChildPaymentAreaConditionQuery groupByPaymentModuleId() Group by the payment_module_id column
* @method ChildPaymentAreaConditionQuery groupByAreaId() Group by the area_id column
* @method ChildPaymentAreaConditionQuery groupByIsValid() Group by the is_valid column
*
* @method ChildPaymentAreaConditionQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ChildPaymentAreaConditionQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ChildPaymentAreaConditionQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ChildPaymentAreaConditionQuery leftJoinModule($relationAlias = null) Adds a LEFT JOIN clause to the query using the Module relation
* @method ChildPaymentAreaConditionQuery rightJoinModule($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Module relation
* @method ChildPaymentAreaConditionQuery innerJoinModule($relationAlias = null) Adds a INNER JOIN clause to the query using the Module relation
*
* @method ChildPaymentAreaConditionQuery leftJoinArea($relationAlias = null) Adds a LEFT JOIN clause to the query using the Area relation
* @method ChildPaymentAreaConditionQuery rightJoinArea($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Area relation
* @method ChildPaymentAreaConditionQuery innerJoinArea($relationAlias = null) Adds a INNER JOIN clause to the query using the Area relation
*
* @method ChildPaymentAreaCondition findOne(ConnectionInterface $con = null) Return the first ChildPaymentAreaCondition matching the query
* @method ChildPaymentAreaCondition findOneOrCreate(ConnectionInterface $con = null) Return the first ChildPaymentAreaCondition matching the query, or a new ChildPaymentAreaCondition object populated from the query conditions when no match is found
*
* @method ChildPaymentAreaCondition findOneById(int $id) Return the first ChildPaymentAreaCondition filtered by the id column
* @method ChildPaymentAreaCondition findOneByPaymentModuleId(int $payment_module_id) Return the first ChildPaymentAreaCondition filtered by the payment_module_id column
* @method ChildPaymentAreaCondition findOneByAreaId(int $area_id) Return the first ChildPaymentAreaCondition filtered by the area_id column
* @method ChildPaymentAreaCondition findOneByIsValid(int $is_valid) Return the first ChildPaymentAreaCondition filtered by the is_valid column
*
* @method array findById(int $id) Return ChildPaymentAreaCondition objects filtered by the id column
* @method array findByPaymentModuleId(int $payment_module_id) Return ChildPaymentAreaCondition objects filtered by the payment_module_id column
* @method array findByAreaId(int $area_id) Return ChildPaymentAreaCondition objects filtered by the area_id column
* @method array findByIsValid(int $is_valid) Return ChildPaymentAreaCondition objects filtered by the is_valid column
*
*/
abstract class PaymentAreaConditionQuery extends ModelCriteria
{
/**
* Initializes internal state of \PaymentCondition\Model\Base\PaymentAreaConditionQuery 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 = '\\PaymentCondition\\Model\\PaymentAreaCondition', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ChildPaymentAreaConditionQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildPaymentAreaConditionQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof \PaymentCondition\Model\PaymentAreaConditionQuery) {
return $criteria;
}
$query = new \PaymentCondition\Model\PaymentAreaConditionQuery();
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 ChildPaymentAreaCondition|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = PaymentAreaConditionTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getServiceContainer()->getReadConnection(PaymentAreaConditionTableMap::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 ChildPaymentAreaCondition A model object, or null if the key is not found
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, PAYMENT_MODULE_ID, AREA_ID, IS_VALID FROM payment_area_condition 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 ChildPaymentAreaCondition();
$obj->hydrate($row);
PaymentAreaConditionTableMap::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 ChildPaymentAreaCondition|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 ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(PaymentAreaConditionTableMap::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 ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(PaymentAreaConditionTableMap::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 ChildPaymentAreaConditionQuery 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(PaymentAreaConditionTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(PaymentAreaConditionTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentAreaConditionTableMap::ID, $id, $comparison);
}
/**
* Filter the query on the payment_module_id column
*
* Example usage:
* <code>
* $query->filterByPaymentModuleId(1234); // WHERE payment_module_id = 1234
* $query->filterByPaymentModuleId(array(12, 34)); // WHERE payment_module_id IN (12, 34)
* $query->filterByPaymentModuleId(array('min' => 12)); // WHERE payment_module_id > 12
* </code>
*
* @see filterByModule()
*
* @param mixed $paymentModuleId 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 ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function filterByPaymentModuleId($paymentModuleId = null, $comparison = null)
{
if (is_array($paymentModuleId)) {
$useMinMax = false;
if (isset($paymentModuleId['min'])) {
$this->addUsingAlias(PaymentAreaConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($paymentModuleId['max'])) {
$this->addUsingAlias(PaymentAreaConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentAreaConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId, $comparison);
}
/**
* Filter the query on the area_id column
*
* Example usage:
* <code>
* $query->filterByAreaId(1234); // WHERE area_id = 1234
* $query->filterByAreaId(array(12, 34)); // WHERE area_id IN (12, 34)
* $query->filterByAreaId(array('min' => 12)); // WHERE area_id > 12
* </code>
*
* @see filterByArea()
*
* @param mixed $areaId 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 ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function filterByAreaId($areaId = null, $comparison = null)
{
if (is_array($areaId)) {
$useMinMax = false;
if (isset($areaId['min'])) {
$this->addUsingAlias(PaymentAreaConditionTableMap::AREA_ID, $areaId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($areaId['max'])) {
$this->addUsingAlias(PaymentAreaConditionTableMap::AREA_ID, $areaId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentAreaConditionTableMap::AREA_ID, $areaId, $comparison);
}
/**
* Filter the query on the is_valid column
*
* Example usage:
* <code>
* $query->filterByIsValid(1234); // WHERE is_valid = 1234
* $query->filterByIsValid(array(12, 34)); // WHERE is_valid IN (12, 34)
* $query->filterByIsValid(array('min' => 12)); // WHERE is_valid > 12
* </code>
*
* @param mixed $isValid 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 ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function filterByIsValid($isValid = null, $comparison = null)
{
if (is_array($isValid)) {
$useMinMax = false;
if (isset($isValid['min'])) {
$this->addUsingAlias(PaymentAreaConditionTableMap::IS_VALID, $isValid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($isValid['max'])) {
$this->addUsingAlias(PaymentAreaConditionTableMap::IS_VALID, $isValid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentAreaConditionTableMap::IS_VALID, $isValid, $comparison);
}
/**
* Filter the query by a related \Thelia\Model\Module object
*
* @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function filterByModule($module, $comparison = null)
{
if ($module instanceof \Thelia\Model\Module) {
return $this
->addUsingAlias(PaymentAreaConditionTableMap::PAYMENT_MODULE_ID, $module->getId(), $comparison);
} elseif ($module instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(PaymentAreaConditionTableMap::PAYMENT_MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByModule() only accepts arguments of type \Thelia\Model\Module or Collection');
}
}
/**
* Adds a JOIN clause to the query using the Module relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function joinModule($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Module');
// 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, 'Module');
}
return $this;
}
/**
* Use the Module relation Module 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\ModuleQuery A secondary query class using the current class as primary query
*/
public function useModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinModule($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Module', '\Thelia\Model\ModuleQuery');
}
/**
* Filter the query by a related \Thelia\Model\Area object
*
* @param \Thelia\Model\Area|ObjectCollection $area The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function filterByArea($area, $comparison = null)
{
if ($area instanceof \Thelia\Model\Area) {
return $this
->addUsingAlias(PaymentAreaConditionTableMap::AREA_ID, $area->getId(), $comparison);
} elseif ($area instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(PaymentAreaConditionTableMap::AREA_ID, $area->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByArea() only accepts arguments of type \Thelia\Model\Area or Collection');
}
}
/**
* Adds a JOIN clause to the query using the Area relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function joinArea($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Area');
// 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, 'Area');
}
return $this;
}
/**
* Use the Area relation Area 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\AreaQuery A secondary query class using the current class as primary query
*/
public function useAreaQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinArea($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Area', '\Thelia\Model\AreaQuery');
}
/**
* Exclude object from result
*
* @param ChildPaymentAreaCondition $paymentAreaCondition Object to remove from the list of results
*
* @return ChildPaymentAreaConditionQuery The current query, for fluid interface
*/
public function prune($paymentAreaCondition = null)
{
if ($paymentAreaCondition) {
$this->addUsingAlias(PaymentAreaConditionTableMap::ID, $paymentAreaCondition->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Deletes all rows from the payment_area_condition 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(PaymentAreaConditionTableMap::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).
PaymentAreaConditionTableMap::clearInstancePool();
PaymentAreaConditionTableMap::clearRelatedInstancePool();
$con->commit();
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
return $affectedRows;
}
/**
* Performs a DELETE on the database, given a ChildPaymentAreaCondition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or ChildPaymentAreaCondition 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(PaymentAreaConditionTableMap::DATABASE_NAME);
}
$criteria = $this;
// Set the correct dbName
$criteria->setDbName(PaymentAreaConditionTableMap::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();
PaymentAreaConditionTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);
PaymentAreaConditionTableMap::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
}
} // PaymentAreaConditionQuery

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,564 @@
<?php
namespace PaymentCondition\Model\Base;
use \Exception;
use \PDO;
use PaymentCondition\Model\PaymentCustomerFamilyCondition as ChildPaymentCustomerFamilyCondition;
use PaymentCondition\Model\PaymentCustomerFamilyConditionQuery as ChildPaymentCustomerFamilyConditionQuery;
use PaymentCondition\Model\Map\PaymentCustomerFamilyConditionTableMap;
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\Module;
/**
* Base class that represents a query for the 'payment_customer_family_condition' table.
*
*
*
* @method ChildPaymentCustomerFamilyConditionQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildPaymentCustomerFamilyConditionQuery orderByPaymentModuleId($order = Criteria::ASC) Order by the payment_module_id column
* @method ChildPaymentCustomerFamilyConditionQuery orderByCustomerFamilyId($order = Criteria::ASC) Order by the customer_family_id column
* @method ChildPaymentCustomerFamilyConditionQuery orderByIsValid($order = Criteria::ASC) Order by the is_valid column
*
* @method ChildPaymentCustomerFamilyConditionQuery groupById() Group by the id column
* @method ChildPaymentCustomerFamilyConditionQuery groupByPaymentModuleId() Group by the payment_module_id column
* @method ChildPaymentCustomerFamilyConditionQuery groupByCustomerFamilyId() Group by the customer_family_id column
* @method ChildPaymentCustomerFamilyConditionQuery groupByIsValid() Group by the is_valid column
*
* @method ChildPaymentCustomerFamilyConditionQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ChildPaymentCustomerFamilyConditionQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ChildPaymentCustomerFamilyConditionQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ChildPaymentCustomerFamilyConditionQuery leftJoinModule($relationAlias = null) Adds a LEFT JOIN clause to the query using the Module relation
* @method ChildPaymentCustomerFamilyConditionQuery rightJoinModule($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Module relation
* @method ChildPaymentCustomerFamilyConditionQuery innerJoinModule($relationAlias = null) Adds a INNER JOIN clause to the query using the Module relation
*
* @method ChildPaymentCustomerFamilyCondition findOne(ConnectionInterface $con = null) Return the first ChildPaymentCustomerFamilyCondition matching the query
* @method ChildPaymentCustomerFamilyCondition findOneOrCreate(ConnectionInterface $con = null) Return the first ChildPaymentCustomerFamilyCondition matching the query, or a new ChildPaymentCustomerFamilyCondition object populated from the query conditions when no match is found
*
* @method ChildPaymentCustomerFamilyCondition findOneById(int $id) Return the first ChildPaymentCustomerFamilyCondition filtered by the id column
* @method ChildPaymentCustomerFamilyCondition findOneByPaymentModuleId(int $payment_module_id) Return the first ChildPaymentCustomerFamilyCondition filtered by the payment_module_id column
* @method ChildPaymentCustomerFamilyCondition findOneByCustomerFamilyId(int $customer_family_id) Return the first ChildPaymentCustomerFamilyCondition filtered by the customer_family_id column
* @method ChildPaymentCustomerFamilyCondition findOneByIsValid(int $is_valid) Return the first ChildPaymentCustomerFamilyCondition filtered by the is_valid column
*
* @method array findById(int $id) Return ChildPaymentCustomerFamilyCondition objects filtered by the id column
* @method array findByPaymentModuleId(int $payment_module_id) Return ChildPaymentCustomerFamilyCondition objects filtered by the payment_module_id column
* @method array findByCustomerFamilyId(int $customer_family_id) Return ChildPaymentCustomerFamilyCondition objects filtered by the customer_family_id column
* @method array findByIsValid(int $is_valid) Return ChildPaymentCustomerFamilyCondition objects filtered by the is_valid column
*
*/
abstract class PaymentCustomerFamilyConditionQuery extends ModelCriteria
{
/**
* Initializes internal state of \PaymentCondition\Model\Base\PaymentCustomerFamilyConditionQuery 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 = '\\PaymentCondition\\Model\\PaymentCustomerFamilyCondition', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ChildPaymentCustomerFamilyConditionQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildPaymentCustomerFamilyConditionQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof \PaymentCondition\Model\PaymentCustomerFamilyConditionQuery) {
return $criteria;
}
$query = new \PaymentCondition\Model\PaymentCustomerFamilyConditionQuery();
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 ChildPaymentCustomerFamilyCondition|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = PaymentCustomerFamilyConditionTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getServiceContainer()->getReadConnection(PaymentCustomerFamilyConditionTableMap::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 ChildPaymentCustomerFamilyCondition A model object, or null if the key is not found
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, PAYMENT_MODULE_ID, CUSTOMER_FAMILY_ID, IS_VALID FROM payment_customer_family_condition 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 ChildPaymentCustomerFamilyCondition();
$obj->hydrate($row);
PaymentCustomerFamilyConditionTableMap::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 ChildPaymentCustomerFamilyCondition|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 ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::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 ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::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 ChildPaymentCustomerFamilyConditionQuery 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(PaymentCustomerFamilyConditionTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::ID, $id, $comparison);
}
/**
* Filter the query on the payment_module_id column
*
* Example usage:
* <code>
* $query->filterByPaymentModuleId(1234); // WHERE payment_module_id = 1234
* $query->filterByPaymentModuleId(array(12, 34)); // WHERE payment_module_id IN (12, 34)
* $query->filterByPaymentModuleId(array('min' => 12)); // WHERE payment_module_id > 12
* </code>
*
* @see filterByModule()
*
* @param mixed $paymentModuleId 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 ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function filterByPaymentModuleId($paymentModuleId = null, $comparison = null)
{
if (is_array($paymentModuleId)) {
$useMinMax = false;
if (isset($paymentModuleId['min'])) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($paymentModuleId['max'])) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId, $comparison);
}
/**
* Filter the query on the customer_family_id column
*
* Example usage:
* <code>
* $query->filterByCustomerFamilyId(1234); // WHERE customer_family_id = 1234
* $query->filterByCustomerFamilyId(array(12, 34)); // WHERE customer_family_id IN (12, 34)
* $query->filterByCustomerFamilyId(array('min' => 12)); // WHERE customer_family_id > 12
* </code>
*
* @param mixed $customerFamilyId 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 ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function filterByCustomerFamilyId($customerFamilyId = null, $comparison = null)
{
if (is_array($customerFamilyId)) {
$useMinMax = false;
if (isset($customerFamilyId['min'])) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::CUSTOMER_FAMILY_ID, $customerFamilyId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($customerFamilyId['max'])) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::CUSTOMER_FAMILY_ID, $customerFamilyId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::CUSTOMER_FAMILY_ID, $customerFamilyId, $comparison);
}
/**
* Filter the query on the is_valid column
*
* Example usage:
* <code>
* $query->filterByIsValid(1234); // WHERE is_valid = 1234
* $query->filterByIsValid(array(12, 34)); // WHERE is_valid IN (12, 34)
* $query->filterByIsValid(array('min' => 12)); // WHERE is_valid > 12
* </code>
*
* @param mixed $isValid 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 ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function filterByIsValid($isValid = null, $comparison = null)
{
if (is_array($isValid)) {
$useMinMax = false;
if (isset($isValid['min'])) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::IS_VALID, $isValid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($isValid['max'])) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::IS_VALID, $isValid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::IS_VALID, $isValid, $comparison);
}
/**
* Filter the query by a related \Thelia\Model\Module object
*
* @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function filterByModule($module, $comparison = null)
{
if ($module instanceof \Thelia\Model\Module) {
return $this
->addUsingAlias(PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID, $module->getId(), $comparison);
} elseif ($module instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByModule() only accepts arguments of type \Thelia\Model\Module or Collection');
}
}
/**
* Adds a JOIN clause to the query using the Module relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function joinModule($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Module');
// 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, 'Module');
}
return $this;
}
/**
* Use the Module relation Module 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\ModuleQuery A secondary query class using the current class as primary query
*/
public function useModuleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinModule($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Module', '\Thelia\Model\ModuleQuery');
}
/**
* Exclude object from result
*
* @param ChildPaymentCustomerFamilyCondition $paymentCustomerFamilyCondition Object to remove from the list of results
*
* @return ChildPaymentCustomerFamilyConditionQuery The current query, for fluid interface
*/
public function prune($paymentCustomerFamilyCondition = null)
{
if ($paymentCustomerFamilyCondition) {
$this->addUsingAlias(PaymentCustomerFamilyConditionTableMap::ID, $paymentCustomerFamilyCondition->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Deletes all rows from the payment_customer_family_condition 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(PaymentCustomerFamilyConditionTableMap::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).
PaymentCustomerFamilyConditionTableMap::clearInstancePool();
PaymentCustomerFamilyConditionTableMap::clearRelatedInstancePool();
$con->commit();
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
return $affectedRows;
}
/**
* Performs a DELETE on the database, given a ChildPaymentCustomerFamilyCondition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or ChildPaymentCustomerFamilyCondition 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(PaymentCustomerFamilyConditionTableMap::DATABASE_NAME);
}
$criteria = $this;
// Set the correct dbName
$criteria->setDbName(PaymentCustomerFamilyConditionTableMap::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();
PaymentCustomerFamilyConditionTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);
PaymentCustomerFamilyConditionTableMap::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
}
} // PaymentCustomerFamilyConditionQuery

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,645 @@
<?php
namespace PaymentCondition\Model\Base;
use \Exception;
use \PDO;
use PaymentCondition\Model\PaymentDeliveryCondition as ChildPaymentDeliveryCondition;
use PaymentCondition\Model\PaymentDeliveryConditionQuery as ChildPaymentDeliveryConditionQuery;
use PaymentCondition\Model\Map\PaymentDeliveryConditionTableMap;
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\Module;
/**
* Base class that represents a query for the 'payment_delivery_condition' table.
*
*
*
* @method ChildPaymentDeliveryConditionQuery orderById($order = Criteria::ASC) Order by the id column
* @method ChildPaymentDeliveryConditionQuery orderByPaymentModuleId($order = Criteria::ASC) Order by the payment_module_id column
* @method ChildPaymentDeliveryConditionQuery orderByDeliveryModuleId($order = Criteria::ASC) Order by the delivery_module_id column
* @method ChildPaymentDeliveryConditionQuery orderByIsValid($order = Criteria::ASC) Order by the is_valid column
*
* @method ChildPaymentDeliveryConditionQuery groupById() Group by the id column
* @method ChildPaymentDeliveryConditionQuery groupByPaymentModuleId() Group by the payment_module_id column
* @method ChildPaymentDeliveryConditionQuery groupByDeliveryModuleId() Group by the delivery_module_id column
* @method ChildPaymentDeliveryConditionQuery groupByIsValid() Group by the is_valid column
*
* @method ChildPaymentDeliveryConditionQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ChildPaymentDeliveryConditionQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ChildPaymentDeliveryConditionQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ChildPaymentDeliveryConditionQuery leftJoinModuleRelatedByPaymentModuleId($relationAlias = null) Adds a LEFT JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
* @method ChildPaymentDeliveryConditionQuery rightJoinModuleRelatedByPaymentModuleId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
* @method ChildPaymentDeliveryConditionQuery innerJoinModuleRelatedByPaymentModuleId($relationAlias = null) Adds a INNER JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
*
* @method ChildPaymentDeliveryConditionQuery leftJoinModuleRelatedByDeliveryModuleId($relationAlias = null) Adds a LEFT JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
* @method ChildPaymentDeliveryConditionQuery rightJoinModuleRelatedByDeliveryModuleId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
* @method ChildPaymentDeliveryConditionQuery innerJoinModuleRelatedByDeliveryModuleId($relationAlias = null) Adds a INNER JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
*
* @method ChildPaymentDeliveryCondition findOne(ConnectionInterface $con = null) Return the first ChildPaymentDeliveryCondition matching the query
* @method ChildPaymentDeliveryCondition findOneOrCreate(ConnectionInterface $con = null) Return the first ChildPaymentDeliveryCondition matching the query, or a new ChildPaymentDeliveryCondition object populated from the query conditions when no match is found
*
* @method ChildPaymentDeliveryCondition findOneById(int $id) Return the first ChildPaymentDeliveryCondition filtered by the id column
* @method ChildPaymentDeliveryCondition findOneByPaymentModuleId(int $payment_module_id) Return the first ChildPaymentDeliveryCondition filtered by the payment_module_id column
* @method ChildPaymentDeliveryCondition findOneByDeliveryModuleId(int $delivery_module_id) Return the first ChildPaymentDeliveryCondition filtered by the delivery_module_id column
* @method ChildPaymentDeliveryCondition findOneByIsValid(int $is_valid) Return the first ChildPaymentDeliveryCondition filtered by the is_valid column
*
* @method array findById(int $id) Return ChildPaymentDeliveryCondition objects filtered by the id column
* @method array findByPaymentModuleId(int $payment_module_id) Return ChildPaymentDeliveryCondition objects filtered by the payment_module_id column
* @method array findByDeliveryModuleId(int $delivery_module_id) Return ChildPaymentDeliveryCondition objects filtered by the delivery_module_id column
* @method array findByIsValid(int $is_valid) Return ChildPaymentDeliveryCondition objects filtered by the is_valid column
*
*/
abstract class PaymentDeliveryConditionQuery extends ModelCriteria
{
/**
* Initializes internal state of \PaymentCondition\Model\Base\PaymentDeliveryConditionQuery 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 = '\\PaymentCondition\\Model\\PaymentDeliveryCondition', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ChildPaymentDeliveryConditionQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
* @return ChildPaymentDeliveryConditionQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof \PaymentCondition\Model\PaymentDeliveryConditionQuery) {
return $criteria;
}
$query = new \PaymentCondition\Model\PaymentDeliveryConditionQuery();
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 ChildPaymentDeliveryCondition|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = PaymentDeliveryConditionTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is already in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getServiceContainer()->getReadConnection(PaymentDeliveryConditionTableMap::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 ChildPaymentDeliveryCondition A model object, or null if the key is not found
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT ID, PAYMENT_MODULE_ID, DELIVERY_MODULE_ID, IS_VALID FROM payment_delivery_condition 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 ChildPaymentDeliveryCondition();
$obj->hydrate($row);
PaymentDeliveryConditionTableMap::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 ChildPaymentDeliveryCondition|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 ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(PaymentDeliveryConditionTableMap::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 ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(PaymentDeliveryConditionTableMap::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 ChildPaymentDeliveryConditionQuery 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(PaymentDeliveryConditionTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($id['max'])) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentDeliveryConditionTableMap::ID, $id, $comparison);
}
/**
* Filter the query on the payment_module_id column
*
* Example usage:
* <code>
* $query->filterByPaymentModuleId(1234); // WHERE payment_module_id = 1234
* $query->filterByPaymentModuleId(array(12, 34)); // WHERE payment_module_id IN (12, 34)
* $query->filterByPaymentModuleId(array('min' => 12)); // WHERE payment_module_id > 12
* </code>
*
* @see filterByModuleRelatedByPaymentModuleId()
*
* @param mixed $paymentModuleId 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 ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function filterByPaymentModuleId($paymentModuleId = null, $comparison = null)
{
if (is_array($paymentModuleId)) {
$useMinMax = false;
if (isset($paymentModuleId['min'])) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($paymentModuleId['max'])) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID, $paymentModuleId, $comparison);
}
/**
* Filter the query on the delivery_module_id column
*
* Example usage:
* <code>
* $query->filterByDeliveryModuleId(1234); // WHERE delivery_module_id = 1234
* $query->filterByDeliveryModuleId(array(12, 34)); // WHERE delivery_module_id IN (12, 34)
* $query->filterByDeliveryModuleId(array('min' => 12)); // WHERE delivery_module_id > 12
* </code>
*
* @see filterByModuleRelatedByDeliveryModuleId()
*
* @param mixed $deliveryModuleId 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 ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function filterByDeliveryModuleId($deliveryModuleId = null, $comparison = null)
{
if (is_array($deliveryModuleId)) {
$useMinMax = false;
if (isset($deliveryModuleId['min'])) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID, $deliveryModuleId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($deliveryModuleId['max'])) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID, $deliveryModuleId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID, $deliveryModuleId, $comparison);
}
/**
* Filter the query on the is_valid column
*
* Example usage:
* <code>
* $query->filterByIsValid(1234); // WHERE is_valid = 1234
* $query->filterByIsValid(array(12, 34)); // WHERE is_valid IN (12, 34)
* $query->filterByIsValid(array('min' => 12)); // WHERE is_valid > 12
* </code>
*
* @param mixed $isValid 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 ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function filterByIsValid($isValid = null, $comparison = null)
{
if (is_array($isValid)) {
$useMinMax = false;
if (isset($isValid['min'])) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::IS_VALID, $isValid['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($isValid['max'])) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::IS_VALID, $isValid['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(PaymentDeliveryConditionTableMap::IS_VALID, $isValid, $comparison);
}
/**
* Filter the query by a related \Thelia\Model\Module object
*
* @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function filterByModuleRelatedByPaymentModuleId($module, $comparison = null)
{
if ($module instanceof \Thelia\Model\Module) {
return $this
->addUsingAlias(PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID, $module->getId(), $comparison);
} elseif ($module instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByModuleRelatedByPaymentModuleId() only accepts arguments of type \Thelia\Model\Module or Collection');
}
}
/**
* Adds a JOIN clause to the query using the ModuleRelatedByPaymentModuleId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function joinModuleRelatedByPaymentModuleId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('ModuleRelatedByPaymentModuleId');
// 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, 'ModuleRelatedByPaymentModuleId');
}
return $this;
}
/**
* Use the ModuleRelatedByPaymentModuleId relation Module 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\ModuleQuery A secondary query class using the current class as primary query
*/
public function useModuleRelatedByPaymentModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinModuleRelatedByPaymentModuleId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'ModuleRelatedByPaymentModuleId', '\Thelia\Model\ModuleQuery');
}
/**
* Filter the query by a related \Thelia\Model\Module object
*
* @param \Thelia\Model\Module|ObjectCollection $module The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function filterByModuleRelatedByDeliveryModuleId($module, $comparison = null)
{
if ($module instanceof \Thelia\Model\Module) {
return $this
->addUsingAlias(PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID, $module->getId(), $comparison);
} elseif ($module instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByModuleRelatedByDeliveryModuleId() only accepts arguments of type \Thelia\Model\Module or Collection');
}
}
/**
* Adds a JOIN clause to the query using the ModuleRelatedByDeliveryModuleId relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function joinModuleRelatedByDeliveryModuleId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('ModuleRelatedByDeliveryModuleId');
// 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, 'ModuleRelatedByDeliveryModuleId');
}
return $this;
}
/**
* Use the ModuleRelatedByDeliveryModuleId relation Module 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\ModuleQuery A secondary query class using the current class as primary query
*/
public function useModuleRelatedByDeliveryModuleIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinModuleRelatedByDeliveryModuleId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'ModuleRelatedByDeliveryModuleId', '\Thelia\Model\ModuleQuery');
}
/**
* Exclude object from result
*
* @param ChildPaymentDeliveryCondition $paymentDeliveryCondition Object to remove from the list of results
*
* @return ChildPaymentDeliveryConditionQuery The current query, for fluid interface
*/
public function prune($paymentDeliveryCondition = null)
{
if ($paymentDeliveryCondition) {
$this->addUsingAlias(PaymentDeliveryConditionTableMap::ID, $paymentDeliveryCondition->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
/**
* Deletes all rows from the payment_delivery_condition 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(PaymentDeliveryConditionTableMap::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).
PaymentDeliveryConditionTableMap::clearInstancePool();
PaymentDeliveryConditionTableMap::clearRelatedInstancePool();
$con->commit();
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
return $affectedRows;
}
/**
* Performs a DELETE on the database, given a ChildPaymentDeliveryCondition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or ChildPaymentDeliveryCondition 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(PaymentDeliveryConditionTableMap::DATABASE_NAME);
}
$criteria = $this;
// Set the correct dbName
$criteria->setDbName(PaymentDeliveryConditionTableMap::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();
PaymentDeliveryConditionTableMap::removeInstanceFromPool($criteria);
$affectedRows += ModelCriteria::delete($con);
PaymentDeliveryConditionTableMap::clearRelatedInstancePool();
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
}
} // PaymentDeliveryConditionQuery

View File

@@ -0,0 +1,428 @@
<?php
namespace PaymentCondition\Model\Map;
use PaymentCondition\Model\PaymentAreaCondition;
use PaymentCondition\Model\PaymentAreaConditionQuery;
use Propel\Runtime\Propel;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\DataFetcher\DataFetcherInterface;
use Propel\Runtime\Exception\PropelException;
use Propel\Runtime\Map\RelationMap;
use Propel\Runtime\Map\TableMap;
use Propel\Runtime\Map\TableMapTrait;
/**
* This class defines the structure of the 'payment_area_condition' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
*/
class PaymentAreaConditionTableMap extends TableMap
{
use InstancePoolTrait;
use TableMapTrait;
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'PaymentCondition.Model.Map.PaymentAreaConditionTableMap';
/**
* The default database name for this class
*/
const DATABASE_NAME = 'thelia';
/**
* The table name for this class
*/
const TABLE_NAME = 'payment_area_condition';
/**
* The related Propel class for this table
*/
const OM_CLASS = '\\PaymentCondition\\Model\\PaymentAreaCondition';
/**
* A class that can be returned by this tableMap
*/
const CLASS_DEFAULT = 'PaymentCondition.Model.PaymentAreaCondition';
/**
* The total number of columns
*/
const NUM_COLUMNS = 4;
/**
* The number of lazy-loaded columns
*/
const NUM_LAZY_LOAD_COLUMNS = 0;
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
const NUM_HYDRATE_COLUMNS = 4;
/**
* the column name for the ID field
*/
const ID = 'payment_area_condition.ID';
/**
* the column name for the PAYMENT_MODULE_ID field
*/
const PAYMENT_MODULE_ID = 'payment_area_condition.PAYMENT_MODULE_ID';
/**
* the column name for the AREA_ID field
*/
const AREA_ID = 'payment_area_condition.AREA_ID';
/**
* the column name for the IS_VALID field
*/
const IS_VALID = 'payment_area_condition.IS_VALID';
/**
* The default string format for model objects of the related table
*/
const DEFAULT_STRING_FORMAT = 'YAML';
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
self::TYPE_PHPNAME => array('Id', 'PaymentModuleId', 'AreaId', 'IsValid', ),
self::TYPE_STUDLYPHPNAME => array('id', 'paymentModuleId', 'areaId', 'isValid', ),
self::TYPE_COLNAME => array(PaymentAreaConditionTableMap::ID, PaymentAreaConditionTableMap::PAYMENT_MODULE_ID, PaymentAreaConditionTableMap::AREA_ID, PaymentAreaConditionTableMap::IS_VALID, ),
self::TYPE_RAW_COLNAME => array('ID', 'PAYMENT_MODULE_ID', 'AREA_ID', 'IS_VALID', ),
self::TYPE_FIELDNAME => array('id', 'payment_module_id', 'area_id', 'is_valid', ),
self::TYPE_NUM => array(0, 1, 2, 3, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
self::TYPE_PHPNAME => array('Id' => 0, 'PaymentModuleId' => 1, 'AreaId' => 2, 'IsValid' => 3, ),
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'paymentModuleId' => 1, 'areaId' => 2, 'isValid' => 3, ),
self::TYPE_COLNAME => array(PaymentAreaConditionTableMap::ID => 0, PaymentAreaConditionTableMap::PAYMENT_MODULE_ID => 1, PaymentAreaConditionTableMap::AREA_ID => 2, PaymentAreaConditionTableMap::IS_VALID => 3, ),
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PAYMENT_MODULE_ID' => 1, 'AREA_ID' => 2, 'IS_VALID' => 3, ),
self::TYPE_FIELDNAME => array('id' => 0, 'payment_module_id' => 1, 'area_id' => 2, 'is_valid' => 3, ),
self::TYPE_NUM => array(0, 1, 2, 3, )
);
/**
* Initialize the table attributes and columns
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('payment_area_condition');
$this->setPhpName('PaymentAreaCondition');
$this->setClassName('\\PaymentCondition\\Model\\PaymentAreaCondition');
$this->setPackage('PaymentCondition.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PAYMENT_MODULE_ID', 'PaymentModuleId', 'INTEGER', 'module', 'ID', true, null, null);
$this->addForeignKey('AREA_ID', 'AreaId', 'INTEGER', 'area', 'ID', true, null, null);
$this->addColumn('IS_VALID', 'IsValid', 'TINYINT', false, null, null);
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Module', '\\Thelia\\Model\\Module', RelationMap::MANY_TO_ONE, array('payment_module_id' => 'id', ), 'CASCADE', 'RESTRICT');
$this->addRelation('Area', '\\Thelia\\Model\\Area', RelationMap::MANY_TO_ONE, array('area_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
*
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param array $row resultset row.
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
*/
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
// If the PK cannot be derived from the row, return NULL.
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null;
}
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
}
/**
* Retrieves the primary key from the DB resultset row
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, an array of the primary key columns will be returned.
*
* @param array $row resultset row.
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
*
* @return mixed The primary key of the row
*/
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
return (int) $row[
$indexType == TableMap::TYPE_NUM
? 0 + $offset
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
];
}
/**
* The class that the tableMap will make instances of.
*
* If $withPrefix is true, the returned path
* uses a dot-path notation which is translated into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @param boolean $withPrefix Whether or not to return the path with the class name
* @return string path.to.ClassName
*/
public static function getOMClass($withPrefix = true)
{
return $withPrefix ? PaymentAreaConditionTableMap::CLASS_DEFAULT : PaymentAreaConditionTableMap::OM_CLASS;
}
/**
* Populates an object of the default type or an object that inherit from the default.
*
* @param array $row row returned by DataFetcher->fetch().
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return array (PaymentAreaCondition object, last column rank)
*/
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
$key = PaymentAreaConditionTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
if (null !== ($obj = PaymentAreaConditionTableMap::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $offset, true); // rehydrate
$col = $offset + PaymentAreaConditionTableMap::NUM_HYDRATE_COLUMNS;
} else {
$cls = PaymentAreaConditionTableMap::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $offset, false, $indexType);
PaymentAreaConditionTableMap::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @param DataFetcherInterface $dataFetcher
* @return array
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(DataFetcherInterface $dataFetcher)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = static::getOMClass(false);
// populate the object(s)
while ($row = $dataFetcher->fetch()) {
$key = PaymentAreaConditionTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
if (null !== ($obj = PaymentAreaConditionTableMap::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
$results[] = $obj;
} else {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
PaymentAreaConditionTableMap::addInstanceToPool($obj, $key);
} // if key exists
}
return $results;
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param Criteria $criteria object containing the columns to add.
* @param string $alias optional table alias
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
$criteria->addSelectColumn(PaymentAreaConditionTableMap::ID);
$criteria->addSelectColumn(PaymentAreaConditionTableMap::PAYMENT_MODULE_ID);
$criteria->addSelectColumn(PaymentAreaConditionTableMap::AREA_ID);
$criteria->addSelectColumn(PaymentAreaConditionTableMap::IS_VALID);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.PAYMENT_MODULE_ID');
$criteria->addSelectColumn($alias . '.AREA_ID');
$criteria->addSelectColumn($alias . '.IS_VALID');
}
}
/**
* Returns the TableMap related to this object.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getServiceContainer()->getDatabaseMap(PaymentAreaConditionTableMap::DATABASE_NAME)->getTable(PaymentAreaConditionTableMap::TABLE_NAME);
}
/**
* Add a TableMap instance to the database for this tableMap class.
*/
public static function buildTableMap()
{
$dbMap = Propel::getServiceContainer()->getDatabaseMap(PaymentAreaConditionTableMap::DATABASE_NAME);
if (!$dbMap->hasTable(PaymentAreaConditionTableMap::TABLE_NAME)) {
$dbMap->addTableObject(new PaymentAreaConditionTableMap());
}
}
/**
* Performs a DELETE on the database, given a PaymentAreaCondition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or PaymentAreaCondition 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 static function doDelete($values, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(PaymentAreaConditionTableMap::DATABASE_NAME);
}
if ($values instanceof Criteria) {
// rename for clarity
$criteria = $values;
} elseif ($values instanceof \PaymentCondition\Model\PaymentAreaCondition) { // it's a model object
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(PaymentAreaConditionTableMap::DATABASE_NAME);
$criteria->add(PaymentAreaConditionTableMap::ID, (array) $values, Criteria::IN);
}
$query = PaymentAreaConditionQuery::create()->mergeWith($criteria);
if ($values instanceof Criteria) { PaymentAreaConditionTableMap::clearInstancePool();
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
foreach ((array) $values as $singleval) { PaymentAreaConditionTableMap::removeInstanceFromPool($singleval);
}
}
return $query->delete($con);
}
/**
* Deletes all rows from the payment_area_condition table.
*
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll(ConnectionInterface $con = null)
{
return PaymentAreaConditionQuery::create()->doDeleteAll($con);
}
/**
* Performs an INSERT on the database, given a PaymentAreaCondition or Criteria object.
*
* @param mixed $criteria Criteria or PaymentAreaCondition object containing data that is used to create the INSERT statement.
* @param ConnectionInterface $con the ConnectionInterface connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($criteria, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(PaymentAreaConditionTableMap::DATABASE_NAME);
}
if ($criteria instanceof Criteria) {
$criteria = clone $criteria; // rename for clarity
} else {
$criteria = $criteria->buildCriteria(); // build Criteria from PaymentAreaCondition object
}
if ($criteria->containsKey(PaymentAreaConditionTableMap::ID) && $criteria->keyContainsValue(PaymentAreaConditionTableMap::ID) ) {
throw new PropelException('Cannot insert a value for auto-increment primary key ('.PaymentAreaConditionTableMap::ID.')');
}
// Set the correct dbName
$query = PaymentAreaConditionQuery::create()->mergeWith($criteria);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->beginTransaction();
$pk = $query->doInsert($con);
$con->commit();
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
return $pk;
}
} // PaymentAreaConditionTableMap
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
PaymentAreaConditionTableMap::buildTableMap();

View File

@@ -0,0 +1,427 @@
<?php
namespace PaymentCondition\Model\Map;
use PaymentCondition\Model\PaymentCustomerFamilyCondition;
use PaymentCondition\Model\PaymentCustomerFamilyConditionQuery;
use Propel\Runtime\Propel;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\DataFetcher\DataFetcherInterface;
use Propel\Runtime\Exception\PropelException;
use Propel\Runtime\Map\RelationMap;
use Propel\Runtime\Map\TableMap;
use Propel\Runtime\Map\TableMapTrait;
/**
* This class defines the structure of the 'payment_customer_family_condition' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
*/
class PaymentCustomerFamilyConditionTableMap extends TableMap
{
use InstancePoolTrait;
use TableMapTrait;
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'PaymentCondition.Model.Map.PaymentCustomerFamilyConditionTableMap';
/**
* The default database name for this class
*/
const DATABASE_NAME = 'thelia';
/**
* The table name for this class
*/
const TABLE_NAME = 'payment_customer_family_condition';
/**
* The related Propel class for this table
*/
const OM_CLASS = '\\PaymentCondition\\Model\\PaymentCustomerFamilyCondition';
/**
* A class that can be returned by this tableMap
*/
const CLASS_DEFAULT = 'PaymentCondition.Model.PaymentCustomerFamilyCondition';
/**
* The total number of columns
*/
const NUM_COLUMNS = 4;
/**
* The number of lazy-loaded columns
*/
const NUM_LAZY_LOAD_COLUMNS = 0;
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
const NUM_HYDRATE_COLUMNS = 4;
/**
* the column name for the ID field
*/
const ID = 'payment_customer_family_condition.ID';
/**
* the column name for the PAYMENT_MODULE_ID field
*/
const PAYMENT_MODULE_ID = 'payment_customer_family_condition.PAYMENT_MODULE_ID';
/**
* the column name for the CUSTOMER_FAMILY_ID field
*/
const CUSTOMER_FAMILY_ID = 'payment_customer_family_condition.CUSTOMER_FAMILY_ID';
/**
* the column name for the IS_VALID field
*/
const IS_VALID = 'payment_customer_family_condition.IS_VALID';
/**
* The default string format for model objects of the related table
*/
const DEFAULT_STRING_FORMAT = 'YAML';
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
self::TYPE_PHPNAME => array('Id', 'PaymentModuleId', 'CustomerFamilyId', 'IsValid', ),
self::TYPE_STUDLYPHPNAME => array('id', 'paymentModuleId', 'customerFamilyId', 'isValid', ),
self::TYPE_COLNAME => array(PaymentCustomerFamilyConditionTableMap::ID, PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID, PaymentCustomerFamilyConditionTableMap::CUSTOMER_FAMILY_ID, PaymentCustomerFamilyConditionTableMap::IS_VALID, ),
self::TYPE_RAW_COLNAME => array('ID', 'PAYMENT_MODULE_ID', 'CUSTOMER_FAMILY_ID', 'IS_VALID', ),
self::TYPE_FIELDNAME => array('id', 'payment_module_id', 'customer_family_id', 'is_valid', ),
self::TYPE_NUM => array(0, 1, 2, 3, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
self::TYPE_PHPNAME => array('Id' => 0, 'PaymentModuleId' => 1, 'CustomerFamilyId' => 2, 'IsValid' => 3, ),
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'paymentModuleId' => 1, 'customerFamilyId' => 2, 'isValid' => 3, ),
self::TYPE_COLNAME => array(PaymentCustomerFamilyConditionTableMap::ID => 0, PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID => 1, PaymentCustomerFamilyConditionTableMap::CUSTOMER_FAMILY_ID => 2, PaymentCustomerFamilyConditionTableMap::IS_VALID => 3, ),
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PAYMENT_MODULE_ID' => 1, 'CUSTOMER_FAMILY_ID' => 2, 'IS_VALID' => 3, ),
self::TYPE_FIELDNAME => array('id' => 0, 'payment_module_id' => 1, 'customer_family_id' => 2, 'is_valid' => 3, ),
self::TYPE_NUM => array(0, 1, 2, 3, )
);
/**
* Initialize the table attributes and columns
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('payment_customer_family_condition');
$this->setPhpName('PaymentCustomerFamilyCondition');
$this->setClassName('\\PaymentCondition\\Model\\PaymentCustomerFamilyCondition');
$this->setPackage('PaymentCondition.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PAYMENT_MODULE_ID', 'PaymentModuleId', 'INTEGER', 'module', 'ID', true, null, null);
$this->addColumn('CUSTOMER_FAMILY_ID', 'CustomerFamilyId', 'INTEGER', true, null, null);
$this->addColumn('IS_VALID', 'IsValid', 'TINYINT', false, null, null);
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Module', '\\Thelia\\Model\\Module', RelationMap::MANY_TO_ONE, array('payment_module_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
*
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param array $row resultset row.
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
*/
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
// If the PK cannot be derived from the row, return NULL.
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null;
}
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
}
/**
* Retrieves the primary key from the DB resultset row
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, an array of the primary key columns will be returned.
*
* @param array $row resultset row.
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
*
* @return mixed The primary key of the row
*/
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
return (int) $row[
$indexType == TableMap::TYPE_NUM
? 0 + $offset
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
];
}
/**
* The class that the tableMap will make instances of.
*
* If $withPrefix is true, the returned path
* uses a dot-path notation which is translated into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @param boolean $withPrefix Whether or not to return the path with the class name
* @return string path.to.ClassName
*/
public static function getOMClass($withPrefix = true)
{
return $withPrefix ? PaymentCustomerFamilyConditionTableMap::CLASS_DEFAULT : PaymentCustomerFamilyConditionTableMap::OM_CLASS;
}
/**
* Populates an object of the default type or an object that inherit from the default.
*
* @param array $row row returned by DataFetcher->fetch().
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return array (PaymentCustomerFamilyCondition object, last column rank)
*/
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
$key = PaymentCustomerFamilyConditionTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
if (null !== ($obj = PaymentCustomerFamilyConditionTableMap::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $offset, true); // rehydrate
$col = $offset + PaymentCustomerFamilyConditionTableMap::NUM_HYDRATE_COLUMNS;
} else {
$cls = PaymentCustomerFamilyConditionTableMap::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $offset, false, $indexType);
PaymentCustomerFamilyConditionTableMap::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @param DataFetcherInterface $dataFetcher
* @return array
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(DataFetcherInterface $dataFetcher)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = static::getOMClass(false);
// populate the object(s)
while ($row = $dataFetcher->fetch()) {
$key = PaymentCustomerFamilyConditionTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
if (null !== ($obj = PaymentCustomerFamilyConditionTableMap::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
$results[] = $obj;
} else {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
PaymentCustomerFamilyConditionTableMap::addInstanceToPool($obj, $key);
} // if key exists
}
return $results;
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param Criteria $criteria object containing the columns to add.
* @param string $alias optional table alias
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
$criteria->addSelectColumn(PaymentCustomerFamilyConditionTableMap::ID);
$criteria->addSelectColumn(PaymentCustomerFamilyConditionTableMap::PAYMENT_MODULE_ID);
$criteria->addSelectColumn(PaymentCustomerFamilyConditionTableMap::CUSTOMER_FAMILY_ID);
$criteria->addSelectColumn(PaymentCustomerFamilyConditionTableMap::IS_VALID);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.PAYMENT_MODULE_ID');
$criteria->addSelectColumn($alias . '.CUSTOMER_FAMILY_ID');
$criteria->addSelectColumn($alias . '.IS_VALID');
}
}
/**
* Returns the TableMap related to this object.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getServiceContainer()->getDatabaseMap(PaymentCustomerFamilyConditionTableMap::DATABASE_NAME)->getTable(PaymentCustomerFamilyConditionTableMap::TABLE_NAME);
}
/**
* Add a TableMap instance to the database for this tableMap class.
*/
public static function buildTableMap()
{
$dbMap = Propel::getServiceContainer()->getDatabaseMap(PaymentCustomerFamilyConditionTableMap::DATABASE_NAME);
if (!$dbMap->hasTable(PaymentCustomerFamilyConditionTableMap::TABLE_NAME)) {
$dbMap->addTableObject(new PaymentCustomerFamilyConditionTableMap());
}
}
/**
* Performs a DELETE on the database, given a PaymentCustomerFamilyCondition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or PaymentCustomerFamilyCondition 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 static function doDelete($values, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(PaymentCustomerFamilyConditionTableMap::DATABASE_NAME);
}
if ($values instanceof Criteria) {
// rename for clarity
$criteria = $values;
} elseif ($values instanceof \PaymentCondition\Model\PaymentCustomerFamilyCondition) { // it's a model object
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(PaymentCustomerFamilyConditionTableMap::DATABASE_NAME);
$criteria->add(PaymentCustomerFamilyConditionTableMap::ID, (array) $values, Criteria::IN);
}
$query = PaymentCustomerFamilyConditionQuery::create()->mergeWith($criteria);
if ($values instanceof Criteria) { PaymentCustomerFamilyConditionTableMap::clearInstancePool();
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
foreach ((array) $values as $singleval) { PaymentCustomerFamilyConditionTableMap::removeInstanceFromPool($singleval);
}
}
return $query->delete($con);
}
/**
* Deletes all rows from the payment_customer_family_condition table.
*
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll(ConnectionInterface $con = null)
{
return PaymentCustomerFamilyConditionQuery::create()->doDeleteAll($con);
}
/**
* Performs an INSERT on the database, given a PaymentCustomerFamilyCondition or Criteria object.
*
* @param mixed $criteria Criteria or PaymentCustomerFamilyCondition object containing data that is used to create the INSERT statement.
* @param ConnectionInterface $con the ConnectionInterface connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($criteria, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(PaymentCustomerFamilyConditionTableMap::DATABASE_NAME);
}
if ($criteria instanceof Criteria) {
$criteria = clone $criteria; // rename for clarity
} else {
$criteria = $criteria->buildCriteria(); // build Criteria from PaymentCustomerFamilyCondition object
}
if ($criteria->containsKey(PaymentCustomerFamilyConditionTableMap::ID) && $criteria->keyContainsValue(PaymentCustomerFamilyConditionTableMap::ID) ) {
throw new PropelException('Cannot insert a value for auto-increment primary key ('.PaymentCustomerFamilyConditionTableMap::ID.')');
}
// Set the correct dbName
$query = PaymentCustomerFamilyConditionQuery::create()->mergeWith($criteria);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->beginTransaction();
$pk = $query->doInsert($con);
$con->commit();
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
return $pk;
}
} // PaymentCustomerFamilyConditionTableMap
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
PaymentCustomerFamilyConditionTableMap::buildTableMap();

View File

@@ -0,0 +1,428 @@
<?php
namespace PaymentCondition\Model\Map;
use PaymentCondition\Model\PaymentDeliveryCondition;
use PaymentCondition\Model\PaymentDeliveryConditionQuery;
use Propel\Runtime\Propel;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\InstancePoolTrait;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\DataFetcher\DataFetcherInterface;
use Propel\Runtime\Exception\PropelException;
use Propel\Runtime\Map\RelationMap;
use Propel\Runtime\Map\TableMap;
use Propel\Runtime\Map\TableMapTrait;
/**
* This class defines the structure of the 'payment_delivery_condition' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
*/
class PaymentDeliveryConditionTableMap extends TableMap
{
use InstancePoolTrait;
use TableMapTrait;
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'PaymentCondition.Model.Map.PaymentDeliveryConditionTableMap';
/**
* The default database name for this class
*/
const DATABASE_NAME = 'thelia';
/**
* The table name for this class
*/
const TABLE_NAME = 'payment_delivery_condition';
/**
* The related Propel class for this table
*/
const OM_CLASS = '\\PaymentCondition\\Model\\PaymentDeliveryCondition';
/**
* A class that can be returned by this tableMap
*/
const CLASS_DEFAULT = 'PaymentCondition.Model.PaymentDeliveryCondition';
/**
* The total number of columns
*/
const NUM_COLUMNS = 4;
/**
* The number of lazy-loaded columns
*/
const NUM_LAZY_LOAD_COLUMNS = 0;
/**
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
*/
const NUM_HYDRATE_COLUMNS = 4;
/**
* the column name for the ID field
*/
const ID = 'payment_delivery_condition.ID';
/**
* the column name for the PAYMENT_MODULE_ID field
*/
const PAYMENT_MODULE_ID = 'payment_delivery_condition.PAYMENT_MODULE_ID';
/**
* the column name for the DELIVERY_MODULE_ID field
*/
const DELIVERY_MODULE_ID = 'payment_delivery_condition.DELIVERY_MODULE_ID';
/**
* the column name for the IS_VALID field
*/
const IS_VALID = 'payment_delivery_condition.IS_VALID';
/**
* The default string format for model objects of the related table
*/
const DEFAULT_STRING_FORMAT = 'YAML';
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
self::TYPE_PHPNAME => array('Id', 'PaymentModuleId', 'DeliveryModuleId', 'IsValid', ),
self::TYPE_STUDLYPHPNAME => array('id', 'paymentModuleId', 'deliveryModuleId', 'isValid', ),
self::TYPE_COLNAME => array(PaymentDeliveryConditionTableMap::ID, PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID, PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID, PaymentDeliveryConditionTableMap::IS_VALID, ),
self::TYPE_RAW_COLNAME => array('ID', 'PAYMENT_MODULE_ID', 'DELIVERY_MODULE_ID', 'IS_VALID', ),
self::TYPE_FIELDNAME => array('id', 'payment_module_id', 'delivery_module_id', 'is_valid', ),
self::TYPE_NUM => array(0, 1, 2, 3, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
self::TYPE_PHPNAME => array('Id' => 0, 'PaymentModuleId' => 1, 'DeliveryModuleId' => 2, 'IsValid' => 3, ),
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'paymentModuleId' => 1, 'deliveryModuleId' => 2, 'isValid' => 3, ),
self::TYPE_COLNAME => array(PaymentDeliveryConditionTableMap::ID => 0, PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID => 1, PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID => 2, PaymentDeliveryConditionTableMap::IS_VALID => 3, ),
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PAYMENT_MODULE_ID' => 1, 'DELIVERY_MODULE_ID' => 2, 'IS_VALID' => 3, ),
self::TYPE_FIELDNAME => array('id' => 0, 'payment_module_id' => 1, 'delivery_module_id' => 2, 'is_valid' => 3, ),
self::TYPE_NUM => array(0, 1, 2, 3, )
);
/**
* Initialize the table attributes and columns
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('payment_delivery_condition');
$this->setPhpName('PaymentDeliveryCondition');
$this->setClassName('\\PaymentCondition\\Model\\PaymentDeliveryCondition');
$this->setPackage('PaymentCondition.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PAYMENT_MODULE_ID', 'PaymentModuleId', 'INTEGER', 'module', 'ID', true, null, null);
$this->addForeignKey('DELIVERY_MODULE_ID', 'DeliveryModuleId', 'INTEGER', 'module', 'ID', true, null, null);
$this->addColumn('IS_VALID', 'IsValid', 'TINYINT', false, null, null);
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('ModuleRelatedByPaymentModuleId', '\\Thelia\\Model\\Module', RelationMap::MANY_TO_ONE, array('payment_module_id' => 'id', ), 'CASCADE', 'RESTRICT');
$this->addRelation('ModuleRelatedByDeliveryModuleId', '\\Thelia\\Model\\Module', RelationMap::MANY_TO_ONE, array('delivery_module_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
* Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
*
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
* @param array $row resultset row.
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
*/
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
// If the PK cannot be derived from the row, return NULL.
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null;
}
return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
}
/**
* Retrieves the primary key from the DB resultset row
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, an array of the primary key columns will be returned.
*
* @param array $row resultset row.
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM
*
* @return mixed The primary key of the row
*/
public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
return (int) $row[
$indexType == TableMap::TYPE_NUM
? 0 + $offset
: self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)
];
}
/**
* The class that the tableMap will make instances of.
*
* If $withPrefix is true, the returned path
* uses a dot-path notation which is translated into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @param boolean $withPrefix Whether or not to return the path with the class name
* @return string path.to.ClassName
*/
public static function getOMClass($withPrefix = true)
{
return $withPrefix ? PaymentDeliveryConditionTableMap::CLASS_DEFAULT : PaymentDeliveryConditionTableMap::OM_CLASS;
}
/**
* Populates an object of the default type or an object that inherit from the default.
*
* @param array $row row returned by DataFetcher->fetch().
* @param int $offset The 0-based offset for reading from the resultset row.
* @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType().
One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME
* TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return array (PaymentDeliveryCondition object, last column rank)
*/
public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
{
$key = PaymentDeliveryConditionTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType);
if (null !== ($obj = PaymentDeliveryConditionTableMap::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, $offset, true); // rehydrate
$col = $offset + PaymentDeliveryConditionTableMap::NUM_HYDRATE_COLUMNS;
} else {
$cls = PaymentDeliveryConditionTableMap::OM_CLASS;
$obj = new $cls();
$col = $obj->hydrate($row, $offset, false, $indexType);
PaymentDeliveryConditionTableMap::addInstanceToPool($obj, $key);
}
return array($obj, $col);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @param DataFetcherInterface $dataFetcher
* @return array
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(DataFetcherInterface $dataFetcher)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = static::getOMClass(false);
// populate the object(s)
while ($row = $dataFetcher->fetch()) {
$key = PaymentDeliveryConditionTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
if (null !== ($obj = PaymentDeliveryConditionTableMap::getInstanceFromPool($key))) {
// We no longer rehydrate the object, since this can cause data loss.
// See http://www.propelorm.org/ticket/509
// $obj->hydrate($row, 0, true); // rehydrate
$results[] = $obj;
} else {
$obj = new $cls();
$obj->hydrate($row);
$results[] = $obj;
PaymentDeliveryConditionTableMap::addInstanceToPool($obj, $key);
} // if key exists
}
return $results;
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param Criteria $criteria object containing the columns to add.
* @param string $alias optional table alias
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
$criteria->addSelectColumn(PaymentDeliveryConditionTableMap::ID);
$criteria->addSelectColumn(PaymentDeliveryConditionTableMap::PAYMENT_MODULE_ID);
$criteria->addSelectColumn(PaymentDeliveryConditionTableMap::DELIVERY_MODULE_ID);
$criteria->addSelectColumn(PaymentDeliveryConditionTableMap::IS_VALID);
} else {
$criteria->addSelectColumn($alias . '.ID');
$criteria->addSelectColumn($alias . '.PAYMENT_MODULE_ID');
$criteria->addSelectColumn($alias . '.DELIVERY_MODULE_ID');
$criteria->addSelectColumn($alias . '.IS_VALID');
}
}
/**
* Returns the TableMap related to this object.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getServiceContainer()->getDatabaseMap(PaymentDeliveryConditionTableMap::DATABASE_NAME)->getTable(PaymentDeliveryConditionTableMap::TABLE_NAME);
}
/**
* Add a TableMap instance to the database for this tableMap class.
*/
public static function buildTableMap()
{
$dbMap = Propel::getServiceContainer()->getDatabaseMap(PaymentDeliveryConditionTableMap::DATABASE_NAME);
if (!$dbMap->hasTable(PaymentDeliveryConditionTableMap::TABLE_NAME)) {
$dbMap->addTableObject(new PaymentDeliveryConditionTableMap());
}
}
/**
* Performs a DELETE on the database, given a PaymentDeliveryCondition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or PaymentDeliveryCondition 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 static function doDelete($values, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(PaymentDeliveryConditionTableMap::DATABASE_NAME);
}
if ($values instanceof Criteria) {
// rename for clarity
$criteria = $values;
} elseif ($values instanceof \PaymentCondition\Model\PaymentDeliveryCondition) { // it's a model object
// create criteria based on pk values
$criteria = $values->buildPkeyCriteria();
} else { // it's a primary key, or an array of pks
$criteria = new Criteria(PaymentDeliveryConditionTableMap::DATABASE_NAME);
$criteria->add(PaymentDeliveryConditionTableMap::ID, (array) $values, Criteria::IN);
}
$query = PaymentDeliveryConditionQuery::create()->mergeWith($criteria);
if ($values instanceof Criteria) { PaymentDeliveryConditionTableMap::clearInstancePool();
} elseif (!is_object($values)) { // it's a primary key, or an array of pks
foreach ((array) $values as $singleval) { PaymentDeliveryConditionTableMap::removeInstanceFromPool($singleval);
}
}
return $query->delete($con);
}
/**
* Deletes all rows from the payment_delivery_condition table.
*
* @param ConnectionInterface $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll(ConnectionInterface $con = null)
{
return PaymentDeliveryConditionQuery::create()->doDeleteAll($con);
}
/**
* Performs an INSERT on the database, given a PaymentDeliveryCondition or Criteria object.
*
* @param mixed $criteria Criteria or PaymentDeliveryCondition object containing data that is used to create the INSERT statement.
* @param ConnectionInterface $con the ConnectionInterface connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($criteria, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(PaymentDeliveryConditionTableMap::DATABASE_NAME);
}
if ($criteria instanceof Criteria) {
$criteria = clone $criteria; // rename for clarity
} else {
$criteria = $criteria->buildCriteria(); // build Criteria from PaymentDeliveryCondition object
}
if ($criteria->containsKey(PaymentDeliveryConditionTableMap::ID) && $criteria->keyContainsValue(PaymentDeliveryConditionTableMap::ID) ) {
throw new PropelException('Cannot insert a value for auto-increment primary key ('.PaymentDeliveryConditionTableMap::ID.')');
}
// Set the correct dbName
$query = PaymentDeliveryConditionQuery::create()->mergeWith($criteria);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->beginTransaction();
$pk = $query->doInsert($con);
$con->commit();
} catch (PropelException $e) {
$con->rollBack();
throw $e;
}
return $pk;
}
} // PaymentDeliveryConditionTableMap
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
PaymentDeliveryConditionTableMap::buildTableMap();

View File

@@ -0,0 +1,10 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentAreaCondition as BasePaymentAreaCondition;
class PaymentAreaCondition extends BasePaymentAreaCondition
{
}

View File

@@ -0,0 +1,21 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentAreaConditionQuery as BasePaymentAreaConditionQuery;
/**
* Skeleton subclass for performing query and update operations on the 'payment_area_condition' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class PaymentAreaConditionQuery extends BasePaymentAreaConditionQuery
{
} // PaymentAreaConditionQuery

View File

@@ -0,0 +1,20 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentCustomerCondition as BasePaymentCustomerCondition;
/**
* Skeleton subclass for representing a row from the 'payment_customer_condition' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class PaymentCustomerCondition extends BasePaymentCustomerCondition
{
}

View File

@@ -0,0 +1,20 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentCustomerConditionQuery as BasePaymentCustomerConditionQuery;
/**
* Skeleton subclass for performing query and update operations on the 'payment_customer_condition' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class PaymentCustomerConditionQuery extends BasePaymentCustomerConditionQuery
{
}

View File

@@ -0,0 +1,10 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentCustomerFamilyCondition as BasePaymentCustomerFamilyCondition;
class PaymentCustomerFamilyCondition extends BasePaymentCustomerFamilyCondition
{
}

View File

@@ -0,0 +1,21 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentCustomerFamilyConditionQuery as BasePaymentCustomerFamilyConditionQuery;
/**
* Skeleton subclass for performing query and update operations on the 'payment_customer_family_condition' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class PaymentCustomerFamilyConditionQuery extends BasePaymentCustomerFamilyConditionQuery
{
} // PaymentCustomerFamilyConditionQuery

View File

@@ -0,0 +1,20 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentCustomerModuleCondition as BasePaymentCustomerModuleCondition;
/**
* Skeleton subclass for representing a row from the 'payment_customer_module_condition' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class PaymentCustomerModuleCondition extends BasePaymentCustomerModuleCondition
{
}

View File

@@ -0,0 +1,20 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentCustomerModuleConditionQuery as BasePaymentCustomerModuleConditionQuery;
/**
* Skeleton subclass for performing query and update operations on the 'payment_customer_module_condition' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class PaymentCustomerModuleConditionQuery extends BasePaymentCustomerModuleConditionQuery
{
}

View File

@@ -0,0 +1,10 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentDeliveryCondition as BasePaymentDeliveryCondition;
class PaymentDeliveryCondition extends BasePaymentDeliveryCondition
{
}

View File

@@ -0,0 +1,21 @@
<?php
namespace PaymentCondition\Model;
use PaymentCondition\Model\Base\PaymentDeliveryConditionQuery as BasePaymentDeliveryConditionQuery;
/**
* Skeleton subclass for performing query and update operations on the 'payment_delivery_condition' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class PaymentDeliveryConditionQuery extends BasePaymentDeliveryConditionQuery
{
} // PaymentDeliveryConditionQuery