<?php

namespace ArtabanMarketplace\Model\Base;

use \Exception;
use \PDO;
use ArtabanMarketplace\Model\AmpSeller as ChildAmpSeller;
use ArtabanMarketplace\Model\AmpSellerI18nQuery as ChildAmpSellerI18nQuery;
use ArtabanMarketplace\Model\AmpSellerQuery as ChildAmpSellerQuery;
use ArtabanMarketplace\Model\Map\AmpSellerTableMap;
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\Country;

/**
 * Base class that represents a query for the 'amp_seller' table.
 *
 *
 *
 * @method     ChildAmpSellerQuery orderById($order = Criteria::ASC) Order by the id column
 * @method     ChildAmpSellerQuery orderByRef($order = Criteria::ASC) Order by the ref column
 * @method     ChildAmpSellerQuery orderByVisible($order = Criteria::ASC) Order by the visible column
 * @method     ChildAmpSellerQuery orderByAddress1($order = Criteria::ASC) Order by the address1 column
 * @method     ChildAmpSellerQuery orderByAddress2($order = Criteria::ASC) Order by the address2 column
 * @method     ChildAmpSellerQuery orderByAddress3($order = Criteria::ASC) Order by the address3 column
 * @method     ChildAmpSellerQuery orderByZipcode($order = Criteria::ASC) Order by the zipcode column
 * @method     ChildAmpSellerQuery orderByCity($order = Criteria::ASC) Order by the city column
 * @method     ChildAmpSellerQuery orderByCountryId($order = Criteria::ASC) Order by the country_id column
 * @method     ChildAmpSellerQuery orderByEmail($order = Criteria::ASC) Order by the email column
 * @method     ChildAmpSellerQuery orderByPhone($order = Criteria::ASC) Order by the phone column
 * @method     ChildAmpSellerQuery orderByFax($order = Criteria::ASC) Order by the fax column
 * @method     ChildAmpSellerQuery orderByUrl($order = Criteria::ASC) Order by the url column
 * @method     ChildAmpSellerQuery orderByFacebook($order = Criteria::ASC) Order by the facebook column
 * @method     ChildAmpSellerQuery orderByTwitter($order = Criteria::ASC) Order by the twitter column
 * @method     ChildAmpSellerQuery orderByPinterest($order = Criteria::ASC) Order by the pinterest column
 * @method     ChildAmpSellerQuery orderByGoogle($order = Criteria::ASC) Order by the google column
 * @method     ChildAmpSellerQuery orderByYoutube($order = Criteria::ASC) Order by the youtube column
 * @method     ChildAmpSellerQuery orderByInstagram($order = Criteria::ASC) Order by the instagram column
 * @method     ChildAmpSellerQuery orderByLatitude($order = Criteria::ASC) Order by the latitude column
 * @method     ChildAmpSellerQuery orderByLongitude($order = Criteria::ASC) Order by the longitude column
 * @method     ChildAmpSellerQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
 * @method     ChildAmpSellerQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
 * @method     ChildAmpSellerQuery orderByVersion($order = Criteria::ASC) Order by the version column
 * @method     ChildAmpSellerQuery orderByVersionCreatedAt($order = Criteria::ASC) Order by the version_created_at column
 * @method     ChildAmpSellerQuery orderByVersionCreatedBy($order = Criteria::ASC) Order by the version_created_by column
 *
 * @method     ChildAmpSellerQuery groupById() Group by the id column
 * @method     ChildAmpSellerQuery groupByRef() Group by the ref column
 * @method     ChildAmpSellerQuery groupByVisible() Group by the visible column
 * @method     ChildAmpSellerQuery groupByAddress1() Group by the address1 column
 * @method     ChildAmpSellerQuery groupByAddress2() Group by the address2 column
 * @method     ChildAmpSellerQuery groupByAddress3() Group by the address3 column
 * @method     ChildAmpSellerQuery groupByZipcode() Group by the zipcode column
 * @method     ChildAmpSellerQuery groupByCity() Group by the city column
 * @method     ChildAmpSellerQuery groupByCountryId() Group by the country_id column
 * @method     ChildAmpSellerQuery groupByEmail() Group by the email column
 * @method     ChildAmpSellerQuery groupByPhone() Group by the phone column
 * @method     ChildAmpSellerQuery groupByFax() Group by the fax column
 * @method     ChildAmpSellerQuery groupByUrl() Group by the url column
 * @method     ChildAmpSellerQuery groupByFacebook() Group by the facebook column
 * @method     ChildAmpSellerQuery groupByTwitter() Group by the twitter column
 * @method     ChildAmpSellerQuery groupByPinterest() Group by the pinterest column
 * @method     ChildAmpSellerQuery groupByGoogle() Group by the google column
 * @method     ChildAmpSellerQuery groupByYoutube() Group by the youtube column
 * @method     ChildAmpSellerQuery groupByInstagram() Group by the instagram column
 * @method     ChildAmpSellerQuery groupByLatitude() Group by the latitude column
 * @method     ChildAmpSellerQuery groupByLongitude() Group by the longitude column
 * @method     ChildAmpSellerQuery groupByCreatedAt() Group by the created_at column
 * @method     ChildAmpSellerQuery groupByUpdatedAt() Group by the updated_at column
 * @method     ChildAmpSellerQuery groupByVersion() Group by the version column
 * @method     ChildAmpSellerQuery groupByVersionCreatedAt() Group by the version_created_at column
 * @method     ChildAmpSellerQuery groupByVersionCreatedBy() Group by the version_created_by column
 *
 * @method     ChildAmpSellerQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 * @method     ChildAmpSellerQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 * @method     ChildAmpSellerQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 *
 * @method     ChildAmpSellerQuery leftJoinCountry($relationAlias = null) Adds a LEFT JOIN clause to the query using the Country relation
 * @method     ChildAmpSellerQuery rightJoinCountry($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Country relation
 * @method     ChildAmpSellerQuery innerJoinCountry($relationAlias = null) Adds a INNER JOIN clause to the query using the Country relation
 *
 * @method     ChildAmpSellerQuery leftJoinAmpSellerAdmin($relationAlias = null) Adds a LEFT JOIN clause to the query using the AmpSellerAdmin relation
 * @method     ChildAmpSellerQuery rightJoinAmpSellerAdmin($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AmpSellerAdmin relation
 * @method     ChildAmpSellerQuery innerJoinAmpSellerAdmin($relationAlias = null) Adds a INNER JOIN clause to the query using the AmpSellerAdmin relation
 *
 * @method     ChildAmpSellerQuery leftJoinAmpSellerProduct($relationAlias = null) Adds a LEFT JOIN clause to the query using the AmpSellerProduct relation
 * @method     ChildAmpSellerQuery rightJoinAmpSellerProduct($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AmpSellerProduct relation
 * @method     ChildAmpSellerQuery innerJoinAmpSellerProduct($relationAlias = null) Adds a INNER JOIN clause to the query using the AmpSellerProduct relation
 *
 * @method     ChildAmpSellerQuery leftJoinAmpSellerImage($relationAlias = null) Adds a LEFT JOIN clause to the query using the AmpSellerImage relation
 * @method     ChildAmpSellerQuery rightJoinAmpSellerImage($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AmpSellerImage relation
 * @method     ChildAmpSellerQuery innerJoinAmpSellerImage($relationAlias = null) Adds a INNER JOIN clause to the query using the AmpSellerImage relation
 *
 * @method     ChildAmpSellerQuery leftJoinAmpSellerOrder($relationAlias = null) Adds a LEFT JOIN clause to the query using the AmpSellerOrder relation
 * @method     ChildAmpSellerQuery rightJoinAmpSellerOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AmpSellerOrder relation
 * @method     ChildAmpSellerQuery innerJoinAmpSellerOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the AmpSellerOrder relation
 *
 * @method     ChildAmpSellerQuery leftJoinAmpSellerI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the AmpSellerI18n relation
 * @method     ChildAmpSellerQuery rightJoinAmpSellerI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AmpSellerI18n relation
 * @method     ChildAmpSellerQuery innerJoinAmpSellerI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the AmpSellerI18n relation
 *
 * @method     ChildAmpSellerQuery leftJoinAmpSellerVersion($relationAlias = null) Adds a LEFT JOIN clause to the query using the AmpSellerVersion relation
 * @method     ChildAmpSellerQuery rightJoinAmpSellerVersion($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AmpSellerVersion relation
 * @method     ChildAmpSellerQuery innerJoinAmpSellerVersion($relationAlias = null) Adds a INNER JOIN clause to the query using the AmpSellerVersion relation
 *
 * @method     ChildAmpSeller findOne(ConnectionInterface $con = null) Return the first ChildAmpSeller matching the query
 * @method     ChildAmpSeller findOneOrCreate(ConnectionInterface $con = null) Return the first ChildAmpSeller matching the query, or a new ChildAmpSeller object populated from the query conditions when no match is found
 *
 * @method     ChildAmpSeller findOneById(int $id) Return the first ChildAmpSeller filtered by the id column
 * @method     ChildAmpSeller findOneByRef(string $ref) Return the first ChildAmpSeller filtered by the ref column
 * @method     ChildAmpSeller findOneByVisible(int $visible) Return the first ChildAmpSeller filtered by the visible column
 * @method     ChildAmpSeller findOneByAddress1(string $address1) Return the first ChildAmpSeller filtered by the address1 column
 * @method     ChildAmpSeller findOneByAddress2(string $address2) Return the first ChildAmpSeller filtered by the address2 column
 * @method     ChildAmpSeller findOneByAddress3(string $address3) Return the first ChildAmpSeller filtered by the address3 column
 * @method     ChildAmpSeller findOneByZipcode(string $zipcode) Return the first ChildAmpSeller filtered by the zipcode column
 * @method     ChildAmpSeller findOneByCity(string $city) Return the first ChildAmpSeller filtered by the city column
 * @method     ChildAmpSeller findOneByCountryId(int $country_id) Return the first ChildAmpSeller filtered by the country_id column
 * @method     ChildAmpSeller findOneByEmail(string $email) Return the first ChildAmpSeller filtered by the email column
 * @method     ChildAmpSeller findOneByPhone(string $phone) Return the first ChildAmpSeller filtered by the phone column
 * @method     ChildAmpSeller findOneByFax(string $fax) Return the first ChildAmpSeller filtered by the fax column
 * @method     ChildAmpSeller findOneByUrl(string $url) Return the first ChildAmpSeller filtered by the url column
 * @method     ChildAmpSeller findOneByFacebook(string $facebook) Return the first ChildAmpSeller filtered by the facebook column
 * @method     ChildAmpSeller findOneByTwitter(string $twitter) Return the first ChildAmpSeller filtered by the twitter column
 * @method     ChildAmpSeller findOneByPinterest(string $pinterest) Return the first ChildAmpSeller filtered by the pinterest column
 * @method     ChildAmpSeller findOneByGoogle(string $google) Return the first ChildAmpSeller filtered by the google column
 * @method     ChildAmpSeller findOneByYoutube(string $youtube) Return the first ChildAmpSeller filtered by the youtube column
 * @method     ChildAmpSeller findOneByInstagram(string $instagram) Return the first ChildAmpSeller filtered by the instagram column
 * @method     ChildAmpSeller findOneByLatitude(string $latitude) Return the first ChildAmpSeller filtered by the latitude column
 * @method     ChildAmpSeller findOneByLongitude(string $longitude) Return the first ChildAmpSeller filtered by the longitude column
 * @method     ChildAmpSeller findOneByCreatedAt(string $created_at) Return the first ChildAmpSeller filtered by the created_at column
 * @method     ChildAmpSeller findOneByUpdatedAt(string $updated_at) Return the first ChildAmpSeller filtered by the updated_at column
 * @method     ChildAmpSeller findOneByVersion(int $version) Return the first ChildAmpSeller filtered by the version column
 * @method     ChildAmpSeller findOneByVersionCreatedAt(string $version_created_at) Return the first ChildAmpSeller filtered by the version_created_at column
 * @method     ChildAmpSeller findOneByVersionCreatedBy(string $version_created_by) Return the first ChildAmpSeller filtered by the version_created_by column
 *
 * @method     array findById(int $id) Return ChildAmpSeller objects filtered by the id column
 * @method     array findByRef(string $ref) Return ChildAmpSeller objects filtered by the ref column
 * @method     array findByVisible(int $visible) Return ChildAmpSeller objects filtered by the visible column
 * @method     array findByAddress1(string $address1) Return ChildAmpSeller objects filtered by the address1 column
 * @method     array findByAddress2(string $address2) Return ChildAmpSeller objects filtered by the address2 column
 * @method     array findByAddress3(string $address3) Return ChildAmpSeller objects filtered by the address3 column
 * @method     array findByZipcode(string $zipcode) Return ChildAmpSeller objects filtered by the zipcode column
 * @method     array findByCity(string $city) Return ChildAmpSeller objects filtered by the city column
 * @method     array findByCountryId(int $country_id) Return ChildAmpSeller objects filtered by the country_id column
 * @method     array findByEmail(string $email) Return ChildAmpSeller objects filtered by the email column
 * @method     array findByPhone(string $phone) Return ChildAmpSeller objects filtered by the phone column
 * @method     array findByFax(string $fax) Return ChildAmpSeller objects filtered by the fax column
 * @method     array findByUrl(string $url) Return ChildAmpSeller objects filtered by the url column
 * @method     array findByFacebook(string $facebook) Return ChildAmpSeller objects filtered by the facebook column
 * @method     array findByTwitter(string $twitter) Return ChildAmpSeller objects filtered by the twitter column
 * @method     array findByPinterest(string $pinterest) Return ChildAmpSeller objects filtered by the pinterest column
 * @method     array findByGoogle(string $google) Return ChildAmpSeller objects filtered by the google column
 * @method     array findByYoutube(string $youtube) Return ChildAmpSeller objects filtered by the youtube column
 * @method     array findByInstagram(string $instagram) Return ChildAmpSeller objects filtered by the instagram column
 * @method     array findByLatitude(string $latitude) Return ChildAmpSeller objects filtered by the latitude column
 * @method     array findByLongitude(string $longitude) Return ChildAmpSeller objects filtered by the longitude column
 * @method     array findByCreatedAt(string $created_at) Return ChildAmpSeller objects filtered by the created_at column
 * @method     array findByUpdatedAt(string $updated_at) Return ChildAmpSeller objects filtered by the updated_at column
 * @method     array findByVersion(int $version) Return ChildAmpSeller objects filtered by the version column
 * @method     array findByVersionCreatedAt(string $version_created_at) Return ChildAmpSeller objects filtered by the version_created_at column
 * @method     array findByVersionCreatedBy(string $version_created_by) Return ChildAmpSeller objects filtered by the version_created_by column
 *
 */
abstract class AmpSellerQuery extends ModelCriteria
{

    // versionable behavior

    /**
     * Whether the versioning is enabled
     */
    static $isVersioningEnabled = true;

    /**
     * Initializes internal state of \ArtabanMarketplace\Model\Base\AmpSellerQuery 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 = '\\ArtabanMarketplace\\Model\\AmpSeller', $modelAlias = null)
    {
        parent::__construct($dbName, $modelName, $modelAlias);
    }

    /**
     * Returns a new ChildAmpSellerQuery object.
     *
     * @param     string $modelAlias The alias of a model in the query
     * @param     Criteria $criteria Optional Criteria to build the query from
     *
     * @return ChildAmpSellerQuery
     */
    public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof \ArtabanMarketplace\Model\AmpSellerQuery) {
            return $criteria;
        }
        $query = new \ArtabanMarketplace\Model\AmpSellerQuery();
        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 ChildAmpSeller|array|mixed the result, formatted by the current formatter
     */
    public function findPk($key, $con = null)
    {
        if ($key === null) {
            return null;
        }
        if ((null !== ($obj = AmpSellerTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) {
            // the object is already in the instance pool
            return $obj;
        }
        if ($con === null) {
            $con = Propel::getServiceContainer()->getReadConnection(AmpSellerTableMap::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   ChildAmpSeller A model object, or null if the key is not found
     */
    protected function findPkSimple($key, $con)
    {
        $sql = 'SELECT ID, REF, VISIBLE, ADDRESS1, ADDRESS2, ADDRESS3, ZIPCODE, CITY, COUNTRY_ID, EMAIL, PHONE, FAX, URL, FACEBOOK, TWITTER, PINTEREST, GOOGLE, YOUTUBE, INSTAGRAM, LATITUDE, LONGITUDE, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY FROM amp_seller 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 ChildAmpSeller();
            $obj->hydrate($row);
            AmpSellerTableMap::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 ChildAmpSeller|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 ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByPrimaryKey($key)
    {

        return $this->addUsingAlias(AmpSellerTableMap::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 ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByPrimaryKeys($keys)
    {

        return $this->addUsingAlias(AmpSellerTableMap::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 ChildAmpSellerQuery 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(AmpSellerTableMap::ID, $id['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($id['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::ID, $id['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::ID, $id, $comparison);
    }

    /**
     * Filter the query on the ref column
     *
     * Example usage:
     * <code>
     * $query->filterByRef('fooValue');   // WHERE ref = 'fooValue'
     * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%'
     * </code>
     *
     * @param     string $ref The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByRef($ref = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($ref)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $ref)) {
                $ref = str_replace('*', '%', $ref);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::REF, $ref, $comparison);
    }

    /**
     * Filter the query on the visible column
     *
     * Example usage:
     * <code>
     * $query->filterByVisible(1234); // WHERE visible = 1234
     * $query->filterByVisible(array(12, 34)); // WHERE visible IN (12, 34)
     * $query->filterByVisible(array('min' => 12)); // WHERE visible > 12
     * </code>
     *
     * @param     mixed $visible 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 ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByVisible($visible = null, $comparison = null)
    {
        if (is_array($visible)) {
            $useMinMax = false;
            if (isset($visible['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::VISIBLE, $visible['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($visible['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::VISIBLE, $visible['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::VISIBLE, $visible, $comparison);
    }

    /**
     * Filter the query on the address1 column
     *
     * Example usage:
     * <code>
     * $query->filterByAddress1('fooValue');   // WHERE address1 = 'fooValue'
     * $query->filterByAddress1('%fooValue%'); // WHERE address1 LIKE '%fooValue%'
     * </code>
     *
     * @param     string $address1 The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAddress1($address1 = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($address1)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $address1)) {
                $address1 = str_replace('*', '%', $address1);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::ADDRESS1, $address1, $comparison);
    }

    /**
     * Filter the query on the address2 column
     *
     * Example usage:
     * <code>
     * $query->filterByAddress2('fooValue');   // WHERE address2 = 'fooValue'
     * $query->filterByAddress2('%fooValue%'); // WHERE address2 LIKE '%fooValue%'
     * </code>
     *
     * @param     string $address2 The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAddress2($address2 = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($address2)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $address2)) {
                $address2 = str_replace('*', '%', $address2);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::ADDRESS2, $address2, $comparison);
    }

    /**
     * Filter the query on the address3 column
     *
     * Example usage:
     * <code>
     * $query->filterByAddress3('fooValue');   // WHERE address3 = 'fooValue'
     * $query->filterByAddress3('%fooValue%'); // WHERE address3 LIKE '%fooValue%'
     * </code>
     *
     * @param     string $address3 The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAddress3($address3 = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($address3)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $address3)) {
                $address3 = str_replace('*', '%', $address3);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::ADDRESS3, $address3, $comparison);
    }

    /**
     * Filter the query on the zipcode column
     *
     * Example usage:
     * <code>
     * $query->filterByZipcode('fooValue');   // WHERE zipcode = 'fooValue'
     * $query->filterByZipcode('%fooValue%'); // WHERE zipcode LIKE '%fooValue%'
     * </code>
     *
     * @param     string $zipcode The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByZipcode($zipcode = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($zipcode)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $zipcode)) {
                $zipcode = str_replace('*', '%', $zipcode);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::ZIPCODE, $zipcode, $comparison);
    }

    /**
     * Filter the query on the city column
     *
     * Example usage:
     * <code>
     * $query->filterByCity('fooValue');   // WHERE city = 'fooValue'
     * $query->filterByCity('%fooValue%'); // WHERE city LIKE '%fooValue%'
     * </code>
     *
     * @param     string $city The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByCity($city = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($city)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $city)) {
                $city = str_replace('*', '%', $city);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::CITY, $city, $comparison);
    }

    /**
     * Filter the query on the country_id column
     *
     * Example usage:
     * <code>
     * $query->filterByCountryId(1234); // WHERE country_id = 1234
     * $query->filterByCountryId(array(12, 34)); // WHERE country_id IN (12, 34)
     * $query->filterByCountryId(array('min' => 12)); // WHERE country_id > 12
     * </code>
     *
     * @see       filterByCountry()
     *
     * @param     mixed $countryId 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 ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByCountryId($countryId = null, $comparison = null)
    {
        if (is_array($countryId)) {
            $useMinMax = false;
            if (isset($countryId['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::COUNTRY_ID, $countryId['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($countryId['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::COUNTRY_ID, $countryId['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::COUNTRY_ID, $countryId, $comparison);
    }

    /**
     * Filter the query on the email column
     *
     * Example usage:
     * <code>
     * $query->filterByEmail('fooValue');   // WHERE email = 'fooValue'
     * $query->filterByEmail('%fooValue%'); // WHERE email LIKE '%fooValue%'
     * </code>
     *
     * @param     string $email The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByEmail($email = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($email)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $email)) {
                $email = str_replace('*', '%', $email);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::EMAIL, $email, $comparison);
    }

    /**
     * Filter the query on the phone column
     *
     * Example usage:
     * <code>
     * $query->filterByPhone('fooValue');   // WHERE phone = 'fooValue'
     * $query->filterByPhone('%fooValue%'); // WHERE phone LIKE '%fooValue%'
     * </code>
     *
     * @param     string $phone The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByPhone($phone = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($phone)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $phone)) {
                $phone = str_replace('*', '%', $phone);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::PHONE, $phone, $comparison);
    }

    /**
     * Filter the query on the fax column
     *
     * Example usage:
     * <code>
     * $query->filterByFax('fooValue');   // WHERE fax = 'fooValue'
     * $query->filterByFax('%fooValue%'); // WHERE fax LIKE '%fooValue%'
     * </code>
     *
     * @param     string $fax The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByFax($fax = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($fax)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $fax)) {
                $fax = str_replace('*', '%', $fax);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::FAX, $fax, $comparison);
    }

    /**
     * Filter the query on the url column
     *
     * Example usage:
     * <code>
     * $query->filterByUrl('fooValue');   // WHERE url = 'fooValue'
     * $query->filterByUrl('%fooValue%'); // WHERE url LIKE '%fooValue%'
     * </code>
     *
     * @param     string $url The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByUrl($url = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($url)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $url)) {
                $url = str_replace('*', '%', $url);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::URL, $url, $comparison);
    }

    /**
     * Filter the query on the facebook column
     *
     * Example usage:
     * <code>
     * $query->filterByFacebook('fooValue');   // WHERE facebook = 'fooValue'
     * $query->filterByFacebook('%fooValue%'); // WHERE facebook LIKE '%fooValue%'
     * </code>
     *
     * @param     string $facebook The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByFacebook($facebook = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($facebook)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $facebook)) {
                $facebook = str_replace('*', '%', $facebook);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::FACEBOOK, $facebook, $comparison);
    }

    /**
     * Filter the query on the twitter column
     *
     * Example usage:
     * <code>
     * $query->filterByTwitter('fooValue');   // WHERE twitter = 'fooValue'
     * $query->filterByTwitter('%fooValue%'); // WHERE twitter LIKE '%fooValue%'
     * </code>
     *
     * @param     string $twitter The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByTwitter($twitter = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($twitter)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $twitter)) {
                $twitter = str_replace('*', '%', $twitter);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::TWITTER, $twitter, $comparison);
    }

    /**
     * Filter the query on the pinterest column
     *
     * Example usage:
     * <code>
     * $query->filterByPinterest('fooValue');   // WHERE pinterest = 'fooValue'
     * $query->filterByPinterest('%fooValue%'); // WHERE pinterest LIKE '%fooValue%'
     * </code>
     *
     * @param     string $pinterest The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByPinterest($pinterest = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($pinterest)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $pinterest)) {
                $pinterest = str_replace('*', '%', $pinterest);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::PINTEREST, $pinterest, $comparison);
    }

    /**
     * Filter the query on the google column
     *
     * Example usage:
     * <code>
     * $query->filterByGoogle('fooValue');   // WHERE google = 'fooValue'
     * $query->filterByGoogle('%fooValue%'); // WHERE google LIKE '%fooValue%'
     * </code>
     *
     * @param     string $google The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByGoogle($google = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($google)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $google)) {
                $google = str_replace('*', '%', $google);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::GOOGLE, $google, $comparison);
    }

    /**
     * Filter the query on the youtube column
     *
     * Example usage:
     * <code>
     * $query->filterByYoutube('fooValue');   // WHERE youtube = 'fooValue'
     * $query->filterByYoutube('%fooValue%'); // WHERE youtube LIKE '%fooValue%'
     * </code>
     *
     * @param     string $youtube The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByYoutube($youtube = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($youtube)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $youtube)) {
                $youtube = str_replace('*', '%', $youtube);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::YOUTUBE, $youtube, $comparison);
    }

    /**
     * Filter the query on the instagram column
     *
     * Example usage:
     * <code>
     * $query->filterByInstagram('fooValue');   // WHERE instagram = 'fooValue'
     * $query->filterByInstagram('%fooValue%'); // WHERE instagram LIKE '%fooValue%'
     * </code>
     *
     * @param     string $instagram The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByInstagram($instagram = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($instagram)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $instagram)) {
                $instagram = str_replace('*', '%', $instagram);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::INSTAGRAM, $instagram, $comparison);
    }

    /**
     * Filter the query on the latitude column
     *
     * Example usage:
     * <code>
     * $query->filterByLatitude(1234); // WHERE latitude = 1234
     * $query->filterByLatitude(array(12, 34)); // WHERE latitude IN (12, 34)
     * $query->filterByLatitude(array('min' => 12)); // WHERE latitude > 12
     * </code>
     *
     * @param     mixed $latitude 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 ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByLatitude($latitude = null, $comparison = null)
    {
        if (is_array($latitude)) {
            $useMinMax = false;
            if (isset($latitude['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::LATITUDE, $latitude['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($latitude['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::LATITUDE, $latitude['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::LATITUDE, $latitude, $comparison);
    }

    /**
     * Filter the query on the longitude column
     *
     * Example usage:
     * <code>
     * $query->filterByLongitude(1234); // WHERE longitude = 1234
     * $query->filterByLongitude(array(12, 34)); // WHERE longitude IN (12, 34)
     * $query->filterByLongitude(array('min' => 12)); // WHERE longitude > 12
     * </code>
     *
     * @param     mixed $longitude 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 ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByLongitude($longitude = null, $comparison = null)
    {
        if (is_array($longitude)) {
            $useMinMax = false;
            if (isset($longitude['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::LONGITUDE, $longitude['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($longitude['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::LONGITUDE, $longitude['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::LONGITUDE, $longitude, $comparison);
    }

    /**
     * Filter the query on the created_at column
     *
     * Example usage:
     * <code>
     * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14'
     * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14'
     * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
     * </code>
     *
     * @param     mixed $createdAt The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByCreatedAt($createdAt = null, $comparison = null)
    {
        if (is_array($createdAt)) {
            $useMinMax = false;
            if (isset($createdAt['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($createdAt['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::CREATED_AT, $createdAt, $comparison);
    }

    /**
     * Filter the query on the updated_at column
     *
     * Example usage:
     * <code>
     * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14'
     * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14'
     * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
     * </code>
     *
     * @param     mixed $updatedAt The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByUpdatedAt($updatedAt = null, $comparison = null)
    {
        if (is_array($updatedAt)) {
            $useMinMax = false;
            if (isset($updatedAt['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($updatedAt['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::UPDATED_AT, $updatedAt, $comparison);
    }

    /**
     * Filter the query on the version column
     *
     * Example usage:
     * <code>
     * $query->filterByVersion(1234); // WHERE version = 1234
     * $query->filterByVersion(array(12, 34)); // WHERE version IN (12, 34)
     * $query->filterByVersion(array('min' => 12)); // WHERE version > 12
     * </code>
     *
     * @param     mixed $version 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 ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByVersion($version = null, $comparison = null)
    {
        if (is_array($version)) {
            $useMinMax = false;
            if (isset($version['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::VERSION, $version['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($version['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::VERSION, $version['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::VERSION, $version, $comparison);
    }

    /**
     * Filter the query on the version_created_at column
     *
     * Example usage:
     * <code>
     * $query->filterByVersionCreatedAt('2011-03-14'); // WHERE version_created_at = '2011-03-14'
     * $query->filterByVersionCreatedAt('now'); // WHERE version_created_at = '2011-03-14'
     * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13'
     * </code>
     *
     * @param     mixed $versionCreatedAt The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByVersionCreatedAt($versionCreatedAt = null, $comparison = null)
    {
        if (is_array($versionCreatedAt)) {
            $useMinMax = false;
            if (isset($versionCreatedAt['min'])) {
                $this->addUsingAlias(AmpSellerTableMap::VERSION_CREATED_AT, $versionCreatedAt['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($versionCreatedAt['max'])) {
                $this->addUsingAlias(AmpSellerTableMap::VERSION_CREATED_AT, $versionCreatedAt['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::VERSION_CREATED_AT, $versionCreatedAt, $comparison);
    }

    /**
     * Filter the query on the version_created_by column
     *
     * Example usage:
     * <code>
     * $query->filterByVersionCreatedBy('fooValue');   // WHERE version_created_by = 'fooValue'
     * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%'
     * </code>
     *
     * @param     string $versionCreatedBy The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByVersionCreatedBy($versionCreatedBy = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($versionCreatedBy)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $versionCreatedBy)) {
                $versionCreatedBy = str_replace('*', '%', $versionCreatedBy);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(AmpSellerTableMap::VERSION_CREATED_BY, $versionCreatedBy, $comparison);
    }

    /**
     * Filter the query by a related \Thelia\Model\Country object
     *
     * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter
     * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByCountry($country, $comparison = null)
    {
        if ($country instanceof \Thelia\Model\Country) {
            return $this
                ->addUsingAlias(AmpSellerTableMap::COUNTRY_ID, $country->getId(), $comparison);
        } elseif ($country instanceof ObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(AmpSellerTableMap::COUNTRY_ID, $country->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByCountry() only accepts arguments of type \Thelia\Model\Country or Collection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the Country relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinCountry($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('Country');

        // 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, 'Country');
        }

        return $this;
    }

    /**
     * Use the Country relation Country 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\CountryQuery A secondary query class using the current class as primary query
     */
    public function useCountryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinCountry($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'Country', '\Thelia\Model\CountryQuery');
    }

    /**
     * Filter the query by a related \ArtabanMarketplace\Model\AmpSellerAdmin object
     *
     * @param \ArtabanMarketplace\Model\AmpSellerAdmin|ObjectCollection $ampSellerAdmin  the related object to use as filter
     * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAmpSellerAdmin($ampSellerAdmin, $comparison = null)
    {
        if ($ampSellerAdmin instanceof \ArtabanMarketplace\Model\AmpSellerAdmin) {
            return $this
                ->addUsingAlias(AmpSellerTableMap::ID, $ampSellerAdmin->getAmpSellerId(), $comparison);
        } elseif ($ampSellerAdmin instanceof ObjectCollection) {
            return $this
                ->useAmpSellerAdminQuery()
                ->filterByPrimaryKeys($ampSellerAdmin->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByAmpSellerAdmin() only accepts arguments of type \ArtabanMarketplace\Model\AmpSellerAdmin or Collection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the AmpSellerAdmin relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinAmpSellerAdmin($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('AmpSellerAdmin');

        // 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, 'AmpSellerAdmin');
        }

        return $this;
    }

    /**
     * Use the AmpSellerAdmin relation AmpSellerAdmin 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   \ArtabanMarketplace\Model\AmpSellerAdminQuery A secondary query class using the current class as primary query
     */
    public function useAmpSellerAdminQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinAmpSellerAdmin($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'AmpSellerAdmin', '\ArtabanMarketplace\Model\AmpSellerAdminQuery');
    }

    /**
     * Filter the query by a related \ArtabanMarketplace\Model\AmpSellerProduct object
     *
     * @param \ArtabanMarketplace\Model\AmpSellerProduct|ObjectCollection $ampSellerProduct  the related object to use as filter
     * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAmpSellerProduct($ampSellerProduct, $comparison = null)
    {
        if ($ampSellerProduct instanceof \ArtabanMarketplace\Model\AmpSellerProduct) {
            return $this
                ->addUsingAlias(AmpSellerTableMap::ID, $ampSellerProduct->getAmpSellerId(), $comparison);
        } elseif ($ampSellerProduct instanceof ObjectCollection) {
            return $this
                ->useAmpSellerProductQuery()
                ->filterByPrimaryKeys($ampSellerProduct->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByAmpSellerProduct() only accepts arguments of type \ArtabanMarketplace\Model\AmpSellerProduct or Collection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the AmpSellerProduct relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinAmpSellerProduct($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('AmpSellerProduct');

        // 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, 'AmpSellerProduct');
        }

        return $this;
    }

    /**
     * Use the AmpSellerProduct relation AmpSellerProduct 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   \ArtabanMarketplace\Model\AmpSellerProductQuery A secondary query class using the current class as primary query
     */
    public function useAmpSellerProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinAmpSellerProduct($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'AmpSellerProduct', '\ArtabanMarketplace\Model\AmpSellerProductQuery');
    }

    /**
     * Filter the query by a related \ArtabanMarketplace\Model\AmpSellerImage object
     *
     * @param \ArtabanMarketplace\Model\AmpSellerImage|ObjectCollection $ampSellerImage  the related object to use as filter
     * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAmpSellerImage($ampSellerImage, $comparison = null)
    {
        if ($ampSellerImage instanceof \ArtabanMarketplace\Model\AmpSellerImage) {
            return $this
                ->addUsingAlias(AmpSellerTableMap::ID, $ampSellerImage->getAmpSellerId(), $comparison);
        } elseif ($ampSellerImage instanceof ObjectCollection) {
            return $this
                ->useAmpSellerImageQuery()
                ->filterByPrimaryKeys($ampSellerImage->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByAmpSellerImage() only accepts arguments of type \ArtabanMarketplace\Model\AmpSellerImage or Collection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the AmpSellerImage relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinAmpSellerImage($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('AmpSellerImage');

        // 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, 'AmpSellerImage');
        }

        return $this;
    }

    /**
     * Use the AmpSellerImage relation AmpSellerImage 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   \ArtabanMarketplace\Model\AmpSellerImageQuery A secondary query class using the current class as primary query
     */
    public function useAmpSellerImageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinAmpSellerImage($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'AmpSellerImage', '\ArtabanMarketplace\Model\AmpSellerImageQuery');
    }

    /**
     * Filter the query by a related \ArtabanMarketplace\Model\AmpSellerOrder object
     *
     * @param \ArtabanMarketplace\Model\AmpSellerOrder|ObjectCollection $ampSellerOrder  the related object to use as filter
     * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAmpSellerOrder($ampSellerOrder, $comparison = null)
    {
        if ($ampSellerOrder instanceof \ArtabanMarketplace\Model\AmpSellerOrder) {
            return $this
                ->addUsingAlias(AmpSellerTableMap::ID, $ampSellerOrder->getAmpSellerId(), $comparison);
        } elseif ($ampSellerOrder instanceof ObjectCollection) {
            return $this
                ->useAmpSellerOrderQuery()
                ->filterByPrimaryKeys($ampSellerOrder->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByAmpSellerOrder() only accepts arguments of type \ArtabanMarketplace\Model\AmpSellerOrder or Collection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the AmpSellerOrder relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinAmpSellerOrder($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('AmpSellerOrder');

        // 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, 'AmpSellerOrder');
        }

        return $this;
    }

    /**
     * Use the AmpSellerOrder relation AmpSellerOrder 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   \ArtabanMarketplace\Model\AmpSellerOrderQuery A secondary query class using the current class as primary query
     */
    public function useAmpSellerOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinAmpSellerOrder($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'AmpSellerOrder', '\ArtabanMarketplace\Model\AmpSellerOrderQuery');
    }

    /**
     * Filter the query by a related \ArtabanMarketplace\Model\AmpSellerI18n object
     *
     * @param \ArtabanMarketplace\Model\AmpSellerI18n|ObjectCollection $ampSellerI18n  the related object to use as filter
     * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAmpSellerI18n($ampSellerI18n, $comparison = null)
    {
        if ($ampSellerI18n instanceof \ArtabanMarketplace\Model\AmpSellerI18n) {
            return $this
                ->addUsingAlias(AmpSellerTableMap::ID, $ampSellerI18n->getId(), $comparison);
        } elseif ($ampSellerI18n instanceof ObjectCollection) {
            return $this
                ->useAmpSellerI18nQuery()
                ->filterByPrimaryKeys($ampSellerI18n->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByAmpSellerI18n() only accepts arguments of type \ArtabanMarketplace\Model\AmpSellerI18n or Collection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the AmpSellerI18n relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinAmpSellerI18n($relationAlias = null, $joinType = 'LEFT JOIN')
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('AmpSellerI18n');

        // 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, 'AmpSellerI18n');
        }

        return $this;
    }

    /**
     * Use the AmpSellerI18n relation AmpSellerI18n 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   \ArtabanMarketplace\Model\AmpSellerI18nQuery A secondary query class using the current class as primary query
     */
    public function useAmpSellerI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN')
    {
        return $this
            ->joinAmpSellerI18n($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'AmpSellerI18n', '\ArtabanMarketplace\Model\AmpSellerI18nQuery');
    }

    /**
     * Filter the query by a related \ArtabanMarketplace\Model\AmpSellerVersion object
     *
     * @param \ArtabanMarketplace\Model\AmpSellerVersion|ObjectCollection $ampSellerVersion  the related object to use as filter
     * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function filterByAmpSellerVersion($ampSellerVersion, $comparison = null)
    {
        if ($ampSellerVersion instanceof \ArtabanMarketplace\Model\AmpSellerVersion) {
            return $this
                ->addUsingAlias(AmpSellerTableMap::ID, $ampSellerVersion->getId(), $comparison);
        } elseif ($ampSellerVersion instanceof ObjectCollection) {
            return $this
                ->useAmpSellerVersionQuery()
                ->filterByPrimaryKeys($ampSellerVersion->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByAmpSellerVersion() only accepts arguments of type \ArtabanMarketplace\Model\AmpSellerVersion or Collection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the AmpSellerVersion relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinAmpSellerVersion($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('AmpSellerVersion');

        // 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, 'AmpSellerVersion');
        }

        return $this;
    }

    /**
     * Use the AmpSellerVersion relation AmpSellerVersion 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   \ArtabanMarketplace\Model\AmpSellerVersionQuery A secondary query class using the current class as primary query
     */
    public function useAmpSellerVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinAmpSellerVersion($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'AmpSellerVersion', '\ArtabanMarketplace\Model\AmpSellerVersionQuery');
    }

    /**
     * Exclude object from result
     *
     * @param   ChildAmpSeller $ampSeller Object to remove from the list of results
     *
     * @return ChildAmpSellerQuery The current query, for fluid interface
     */
    public function prune($ampSeller = null)
    {
        if ($ampSeller) {
            $this->addUsingAlias(AmpSellerTableMap::ID, $ampSeller->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }

    /**
     * Deletes all rows from the amp_seller 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(AmpSellerTableMap::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).
            AmpSellerTableMap::clearInstancePool();
            AmpSellerTableMap::clearRelatedInstancePool();

            $con->commit();
        } catch (PropelException $e) {
            $con->rollBack();
            throw $e;
        }

        return $affectedRows;
    }

    /**
     * Performs a DELETE on the database, given a ChildAmpSeller or Criteria object OR a primary key value.
     *
     * @param mixed               $values Criteria or ChildAmpSeller 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(AmpSellerTableMap::DATABASE_NAME);
        }

        $criteria = $this;

        // Set the correct dbName
        $criteria->setDbName(AmpSellerTableMap::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();


        AmpSellerTableMap::removeInstanceFromPool($criteria);

            $affectedRows += ModelCriteria::delete($con);
            AmpSellerTableMap::clearRelatedInstancePool();
            $con->commit();

            return $affectedRows;
        } catch (PropelException $e) {
            $con->rollBack();
            throw $e;
        }
    }

    // timestampable behavior

    /**
     * Filter by the latest updated
     *
     * @param      int $nbDays Maximum age of the latest update in days
     *
     * @return     ChildAmpSellerQuery The current query, for fluid interface
     */
    public function recentlyUpdated($nbDays = 7)
    {
        return $this->addUsingAlias(AmpSellerTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
    }

    /**
     * Filter by the latest created
     *
     * @param      int $nbDays Maximum age of in days
     *
     * @return     ChildAmpSellerQuery The current query, for fluid interface
     */
    public function recentlyCreated($nbDays = 7)
    {
        return $this->addUsingAlias(AmpSellerTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
    }

    /**
     * Order by update date desc
     *
     * @return     ChildAmpSellerQuery The current query, for fluid interface
     */
    public function lastUpdatedFirst()
    {
        return $this->addDescendingOrderByColumn(AmpSellerTableMap::UPDATED_AT);
    }

    /**
     * Order by update date asc
     *
     * @return     ChildAmpSellerQuery The current query, for fluid interface
     */
    public function firstUpdatedFirst()
    {
        return $this->addAscendingOrderByColumn(AmpSellerTableMap::UPDATED_AT);
    }

    /**
     * Order by create date desc
     *
     * @return     ChildAmpSellerQuery The current query, for fluid interface
     */
    public function lastCreatedFirst()
    {
        return $this->addDescendingOrderByColumn(AmpSellerTableMap::CREATED_AT);
    }

    /**
     * Order by create date asc
     *
     * @return     ChildAmpSellerQuery The current query, for fluid interface
     */
    public function firstCreatedFirst()
    {
        return $this->addAscendingOrderByColumn(AmpSellerTableMap::CREATED_AT);
    }

    // i18n behavior

    /**
     * Adds a JOIN clause to the query using the i18n relation
     *
     * @param     string $locale Locale to use for the join condition, e.g. 'fr_FR'
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
     *
     * @return    ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
    {
        $relationName = $relationAlias ? $relationAlias : 'AmpSellerI18n';

        return $this
            ->joinAmpSellerI18n($relationAlias, $joinType)
            ->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale);
    }

    /**
     * Adds a JOIN clause to the query and hydrates the related I18n object.
     * Shortcut for $c->joinI18n($locale)->with()
     *
     * @param     string $locale Locale to use for the join condition, e.g. 'fr_FR'
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
     *
     * @return    ChildAmpSellerQuery The current query, for fluid interface
     */
    public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN)
    {
        $this
            ->joinI18n($locale, null, $joinType)
            ->with('AmpSellerI18n');
        $this->with['AmpSellerI18n']->setIsWithOneToMany(false);

        return $this;
    }

    /**
     * Use the I18n relation query object
     *
     * @see       useQuery()
     *
     * @param     string $locale Locale to use for the join condition, e.g. 'fr_FR'
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join.
     *
     * @return    ChildAmpSellerI18nQuery A secondary query class using the current class as primary query
     */
    public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN)
    {
        return $this
            ->joinI18n($locale, $relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'AmpSellerI18n', '\ArtabanMarketplace\Model\AmpSellerI18nQuery');
    }

    // versionable behavior

    /**
     * Checks whether versioning is enabled
     *
     * @return boolean
     */
    static public function isVersioningEnabled()
    {
        return self::$isVersioningEnabled;
    }

    /**
     * Enables versioning
     */
    static public function enableVersioning()
    {
        self::$isVersioningEnabled = true;
    }

    /**
     * Disables versioning
     */
    static public function disableVersioning()
    {
        self::$isVersioningEnabled = false;
    }

} // AmpSellerQuery
