Esempio n. 1
0
 /**
  * Filter the query by a related \Thelia\Model\TaxRuleCountry object
  *
  * @param \Thelia\Model\TaxRuleCountry|ObjectCollection $taxRuleCountry  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildTaxQuery The current query, for fluid interface
  */
 public function filterByTaxRuleCountry($taxRuleCountry, $comparison = null)
 {
     if ($taxRuleCountry instanceof \Thelia\Model\TaxRuleCountry) {
         return $this->addUsingAlias(TaxTableMap::ID, $taxRuleCountry->getTaxId(), $comparison);
     } elseif ($taxRuleCountry instanceof ObjectCollection) {
         return $this->useTaxRuleCountryQuery()->filterByPrimaryKeys($taxRuleCountry->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByTaxRuleCountry() only accepts arguments of type \\Thelia\\Model\\TaxRuleCountry or Collection');
     }
 }
Esempio n. 2
0
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database. In some cases you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by find*()
  * and findPk*() calls.
  *
  * @param \Thelia\Model\TaxRuleCountry $obj A \Thelia\Model\TaxRuleCountry object.
  * @param string $key             (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if (null === $key) {
             $key = serialize(array((string) $obj->getTaxRuleId(), (string) $obj->getCountryId(), (string) $obj->getTaxId()));
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
Esempio n. 3
0
 /**
  * Exclude object from result
  *
  * @param   ChildTaxRuleCountry $taxRuleCountry Object to remove from the list of results
  *
  * @return ChildTaxRuleCountryQuery The current query, for fluid interface
  */
 public function prune($taxRuleCountry = null)
 {
     if ($taxRuleCountry) {
         $this->addCond('pruneCond0', $this->getAliasedColName(TaxRuleCountryTableMap::TAX_RULE_ID), $taxRuleCountry->getTaxRuleId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(TaxRuleCountryTableMap::COUNTRY_ID), $taxRuleCountry->getCountryId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond2', $this->getAliasedColName(TaxRuleCountryTableMap::TAX_ID), $taxRuleCountry->getTaxId(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1', 'pruneCond2'), Criteria::LOGICAL_OR);
     }
     return $this;
 }