update propel schema fixing some typos

This commit is contained in:
Manuel Raynaud
2013-03-27 15:48:18 +01:00
parent 8433c5d555
commit 2154bbc1ed
88 changed files with 113 additions and 62711 deletions

View File

@@ -152,17 +152,10 @@ class Parser implements ParserInterface
$tpex->init($this->container->get("request"), $this->container->get("dispatcher"), $content, THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
$tpex->configure(
array(
"foo" => "Test\Loop\Foo",
"doobitch" => "Test\Loop\Doobitch"
),
array(),
array(
"secure" => "Thelia\Core\Template\BaseParam\Secure"
),
array(
"equal" => "Test\TestLoop\Equal"
)
$this->container->get("loop"),
$this->container->get("filter"),
$this->container->get("baseParam"),
$this->container->get("testLoop")
);
$this->setContent($tpex->execute());
}

View File

@@ -94,7 +94,53 @@ class Thelia extends Kernel
*/
public function loadConfiguration()
{
/**
* TODO :
* - Retrieve all actives plugins
* - load config (create a cache and use this cache
*/
$container = $this->getContainer();
/**
* Set all listener here.
* Use $dispatcher->addSubscriber or addListener ?
*/
$dispatcher = $container->get("dispatcher");
/**
* manage Tpex configuration here
*/
$config =\Symfony\Component\Config\Util\XmlUtils::loadFile(THELIA_PLUGIN_DIR . "/Test/Config/config.xml");
var_dump(\Symfony\Component\Config\Util\XmlUtils::convertDomElementToArray($config->documentElement));
$this->getLoopConfig();
$container->set("loop", array(
"foo" => "Test\Loop\Foo",
"doobitch" => "Test\Loop\Doobitch"
));
$container->set("filter", array());
$container->set("baseParam", array());
$container->set("testLoop", array(
"equal" => "Test\TestLoop\Equal"
));
}
protected function getLoopConfig()
{
$modules = \Thelia\Model\ModuleQuery::getActivated();
var_dump($modules);
}
/**

View File

@@ -18,4 +18,10 @@ use Thelia\Model\om\BaseModuleQuery;
*/
class ModuleQuery extends BaseModuleQuery
{
public static function getActivated()
{
return self::create()
->findByActivate(1)
->find();
}
}

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'attribute_av_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class AttributeAvDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.AttributeAvDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('attribute_av_desc');
$this->setPhpName('AttributeAvDesc');
$this->setClassname('Thelia\\Model\\AttributeAvDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('ATTRIBUTE_AV_ID', 'AttributeAvId', 'INTEGER', 'attribute_av', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('AttributeAv', 'Thelia\\Model\\AttributeAv', RelationMap::MANY_TO_ONE, array('attribute_av_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // AttributeAvDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'attribute_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class AttributeDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.AttributeDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('attribute_desc');
$this->setPhpName('AttributeDesc');
$this->setClassname('Thelia\\Model\\AttributeDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addForeignKey('ATTRIBUTE_ID', 'AttributeId', 'INTEGER', 'attribute', 'ID', true, null, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Attribute', 'Thelia\\Model\\Attribute', RelationMap::MANY_TO_ONE, array('attribute_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // AttributeDescTableMap

View File

@@ -1,78 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'category_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class CategoryDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.CategoryDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('category_desc');
$this->setPhpName('CategoryDesc');
$this->setClassname('Thelia\\Model\\CategoryDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Category', 'Thelia\\Model\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // CategoryDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'config_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class ConfigDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.ConfigDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('config_desc');
$this->setPhpName('ConfigDesc');
$this->setClassname('Thelia\\Model\\ConfigDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('CONFIG_ID', 'ConfigId', 'INTEGER', 'config', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Config', 'Thelia\\Model\\Config', RelationMap::MANY_TO_ONE, array('config_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // ConfigDescTableMap

View File

@@ -1,78 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'content_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class ContentDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.ContentDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('content_desc');
$this->setPhpName('ContentDesc');
$this->setClassname('Thelia\\Model\\ContentDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('CONTENT_ID', 'ContentId', 'INTEGER', 'content', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Content', 'Thelia\\Model\\Content', RelationMap::MANY_TO_ONE, array('content_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // ContentDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'country_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class CountryDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.CountryDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('country_desc');
$this->setPhpName('CountryDesc');
$this->setClassname('Thelia\\Model\\CountryDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('COUNTRY_ID', 'CountryId', 'INTEGER', 'country', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Country', 'Thelia\\Model\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // CountryDescTableMap

View File

@@ -1,76 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'customer_title_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class CustomerTitleDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.CustomerTitleDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('customer_title_desc');
$this->setPhpName('CustomerTitleDesc');
$this->setClassname('Thelia\\Model\\CustomerTitleDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('CUSTOMER_TITLE_ID', 'CustomerTitleId', 'INTEGER', 'customer_title', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('SHORT', 'Short', 'VARCHAR', false, 10, null);
$this->addColumn('LONG', 'Long', 'VARCHAR', false, 45, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('CustomerTitle', 'Thelia\\Model\\CustomerTitle', RelationMap::MANY_TO_ONE, array('customer_title_id' => 'id', ), 'CASCADE', null);
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // CustomerTitleDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'document_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class DocumentDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.DocumentDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('document_desc');
$this->setPhpName('DocumentDesc');
$this->setClassname('Thelia\\Model\\DocumentDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('DOCUMENT_ID', 'DocumentId', 'INTEGER', 'document', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Document', 'Thelia\\Model\\Document', RelationMap::MANY_TO_ONE, array('document_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // DocumentDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'feature_av_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class FeatureAvDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.FeatureAvDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('feature_av_desc');
$this->setPhpName('FeatureAvDesc');
$this->setClassname('Thelia\\Model\\FeatureAvDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('FEATURE_AV_ID', 'FeatureAvId', 'INTEGER', 'feature_av', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', true, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', true, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('FeatureAv', 'Thelia\\Model\\FeatureAv', RelationMap::MANY_TO_ONE, array('feature_av_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // FeatureAvDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'feature_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class FeatureDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.FeatureDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('feature_desc');
$this->setPhpName('FeatureDesc');
$this->setClassname('Thelia\\Model\\FeatureDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('FEATURE_ID', 'FeatureId', 'INTEGER', 'feature', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'VARCHAR', false, 45, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Feature', 'Thelia\\Model\\Feature', RelationMap::MANY_TO_ONE, array('feature_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // FeatureDescTableMap

View File

@@ -1,78 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'folder_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class FolderDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.FolderDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('folder_desc');
$this->setPhpName('FolderDesc');
$this->setClassname('Thelia\\Model\\FolderDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('FOLDER_ID', 'FolderId', 'INTEGER', 'folder', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Folder', 'Thelia\\Model\\Folder', RelationMap::MANY_TO_ONE, array('folder_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // FolderDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'group_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class GroupDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.GroupDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('group_desc');
$this->setPhpName('GroupDesc');
$this->setClassname('Thelia\\Model\\GroupDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(false);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('GROUP_ID', 'GroupId', 'INTEGER', 'group', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Group', 'Thelia\\Model\\Group', RelationMap::MANY_TO_ONE, array('group_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // GroupDescTableMap

View File

@@ -1,76 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'image_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class ImageDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.ImageDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('image_desc');
$this->setPhpName('ImageDesc');
$this->setClassname('Thelia\\Model\\ImageDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('IMAGE_ID', 'ImageId', 'INTEGER', 'image', 'ID', false, null, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Image', 'Thelia\\Model\\Image', RelationMap::MANY_TO_ONE, array('image_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // ImageDescTableMap

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'message_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class MessageDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.MessageDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('message_desc');
$this->setPhpName('MessageDesc');
$this->setClassname('Thelia\\Model\\MessageDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('MESSAGE_ID', 'MessageId', 'INTEGER', 'message', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 45, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('DESCRIPTION_HTML', 'DescriptionHtml', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Message', 'Thelia\\Model\\Message', RelationMap::MANY_TO_ONE, array('message_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // MessageDescTableMap

View File

@@ -1,78 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'module_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class ModuleDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.ModuleDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('module_desc');
$this->setPhpName('ModuleDesc');
$this->setClassname('Thelia\\Model\\ModuleDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('MODULE_ID', 'ModuleId', 'INTEGER', 'module', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CURRENCY_ID', 'CurrencyId', 'INTEGER', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Module', 'Thelia\\Model\\Module', RelationMap::MANY_TO_ONE, array('module_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // ModuleDescTableMap

View File

@@ -44,7 +44,7 @@ class ModuleTableMap extends TableMap
// columns
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('code', 'Code', 'VARCHAR', true, 55, null);
$this->addColumn(' type', ' type', 'TINYINT', true, null, null);
$this->addColumn('type', 'Type', 'TINYINT', true, null, null);
$this->addColumn('activate', 'Activate', 'TINYINT', false, null, null);
$this->addColumn('position', 'Position', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);

View File

@@ -1,77 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'order_status_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class OrderStatusDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.OrderStatusDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('order_status_desc');
$this->setPhpName('OrderStatusDesc');
$this->setClassname('Thelia\\Model\\OrderStatusDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('STATUS_ID', 'StatusId', 'INTEGER', 'order_status', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('OrderStatus', 'Thelia\\Model\\OrderStatus', RelationMap::MANY_TO_ONE, array('status_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // OrderStatusDescTableMap

View File

@@ -1,78 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'product_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class ProductDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.ProductDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('product_desc');
$this->setPhpName('ProductDesc');
$this->setClassname('Thelia\\Model\\ProductDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null);
$this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null);
$this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Product', 'Thelia\\Model\\Product', RelationMap::MANY_TO_ONE, array('product_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // ProductDescTableMap

View File

@@ -1,75 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'resource_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class ResourceDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.ResourceDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('resource_desc');
$this->setPhpName('ResourceDesc');
$this->setClassname('Thelia\\Model\\ResourceDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('RESOURCE_ID', 'ResourceId', 'INTEGER', 'resource', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Resource', 'Thelia\\Model\\Resource', RelationMap::MANY_TO_ONE, array('resource_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // ResourceDescTableMap

View File

@@ -1,76 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'tax_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class TaxDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.TaxDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('tax_desc');
$this->setPhpName('TaxDesc');
$this->setClassname('Thelia\\Model\\TaxDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('TAX_ID', 'TaxId', 'INTEGER', 'tax', 'ID', true, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', true, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('Tax', 'Thelia\\Model\\Tax', RelationMap::MANY_TO_ONE, array('tax_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // TaxDescTableMap

View File

@@ -1,76 +0,0 @@
<?php
namespace Thelia\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'tax_rule_desc' 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).
*
* @package propel.generator.Thelia.Model.map
*/
class TaxRuleDescTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'Thelia.Model.map.TaxRuleDescTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('tax_rule_desc');
$this->setPhpName('TaxRuleDesc');
$this->setClassname('Thelia\\Model\\TaxRuleDesc');
$this->setPackage('Thelia.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
$this->addForeignKey('TAX_RULE_ID', 'TaxRuleId', 'INTEGER', 'tax_rule', 'ID', false, null, null);
$this->addColumn('LANG', 'Lang', 'VARCHAR', false, 10, null);
$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null);
$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('TaxRule', 'Thelia\\Model\\TaxRule', RelationMap::MANY_TO_ONE, array('tax_rule_id' => 'id', ), 'CASCADE', 'RESTRICT');
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', 'disable_updated_at' => 'false', ),
);
} // getBehaviors()
} // TaxRuleDescTableMap

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\AttributeAv;
use Thelia\Model\AttributeAvDesc;
use Thelia\Model\AttributeAvDescPeer;
use Thelia\Model\AttributeAvDescQuery;
/**
* Base class that represents a query for the 'attribute_av_desc' table.
*
*
*
* @method AttributeAvDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method AttributeAvDescQuery orderByAttributeAvId($order = Criteria::ASC) Order by the attribute_av_id column
* @method AttributeAvDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method AttributeAvDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method AttributeAvDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method AttributeAvDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method AttributeAvDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method AttributeAvDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method AttributeAvDescQuery groupById() Group by the id column
* @method AttributeAvDescQuery groupByAttributeAvId() Group by the attribute_av_id column
* @method AttributeAvDescQuery groupByLang() Group by the lang column
* @method AttributeAvDescQuery groupByTitle() Group by the title column
* @method AttributeAvDescQuery groupByDescription() Group by the description column
* @method AttributeAvDescQuery groupByChapo() Group by the chapo column
* @method AttributeAvDescQuery groupByCreatedAt() Group by the created_at column
* @method AttributeAvDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method AttributeAvDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method AttributeAvDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method AttributeAvDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method AttributeAvDescQuery leftJoinAttributeAv($relationAlias = null) Adds a LEFT JOIN clause to the query using the AttributeAv relation
* @method AttributeAvDescQuery rightJoinAttributeAv($relationAlias = null) Adds a RIGHT JOIN clause to the query using the AttributeAv relation
* @method AttributeAvDescQuery innerJoinAttributeAv($relationAlias = null) Adds a INNER JOIN clause to the query using the AttributeAv relation
*
* @method AttributeAvDesc findOne(PropelPDO $con = null) Return the first AttributeAvDesc matching the query
* @method AttributeAvDesc findOneOrCreate(PropelPDO $con = null) Return the first AttributeAvDesc matching the query, or a new AttributeAvDesc object populated from the query conditions when no match is found
*
* @method AttributeAvDesc findOneById(int $id) Return the first AttributeAvDesc filtered by the id column
* @method AttributeAvDesc findOneByAttributeAvId(int $attribute_av_id) Return the first AttributeAvDesc filtered by the attribute_av_id column
* @method AttributeAvDesc findOneByLang(string $lang) Return the first AttributeAvDesc filtered by the lang column
* @method AttributeAvDesc findOneByTitle(string $title) Return the first AttributeAvDesc filtered by the title column
* @method AttributeAvDesc findOneByDescription(string $description) Return the first AttributeAvDesc filtered by the description column
* @method AttributeAvDesc findOneByChapo(string $chapo) Return the first AttributeAvDesc filtered by the chapo column
* @method AttributeAvDesc findOneByCreatedAt(string $created_at) Return the first AttributeAvDesc filtered by the created_at column
* @method AttributeAvDesc findOneByUpdatedAt(string $updated_at) Return the first AttributeAvDesc filtered by the updated_at column
*
* @method array findById(int $id) Return AttributeAvDesc objects filtered by the id column
* @method array findByAttributeAvId(int $attribute_av_id) Return AttributeAvDesc objects filtered by the attribute_av_id column
* @method array findByLang(string $lang) Return AttributeAvDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return AttributeAvDesc objects filtered by the title column
* @method array findByDescription(string $description) Return AttributeAvDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return AttributeAvDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return AttributeAvDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return AttributeAvDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseAttributeAvDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseAttributeAvDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\AttributeAvDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new AttributeAvDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AttributeAvDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AttributeAvDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof AttributeAvDescQuery) {
return $criteria;
}
$query = new AttributeAvDescQuery();
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 PropelPDO $con an optional connection object
*
* @return AttributeAvDesc|AttributeAvDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = AttributeAvDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(AttributeAvDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return AttributeAvDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `ATTRIBUTE_AV_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `attribute_av_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new AttributeAvDesc();
$obj->hydrate($row);
AttributeAvDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return AttributeAvDesc|AttributeAvDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|AttributeAvDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AttributeAvDescPeer::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 AttributeAvDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AttributeAvDescPeer::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 AttributeAvDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(AttributeAvDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the attribute_av_id column
*
* Example usage:
* <code>
* $query->filterByAttributeAvId(1234); // WHERE attribute_av_id = 1234
* $query->filterByAttributeAvId(array(12, 34)); // WHERE attribute_av_id IN (12, 34)
* $query->filterByAttributeAvId(array('min' => 12)); // WHERE attribute_av_id > 12
* </code>
*
* @see filterByAttributeAv()
*
* @param mixed $attributeAvId 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 AttributeAvDescQuery The current query, for fluid interface
*/
public function filterByAttributeAvId($attributeAvId = null, $comparison = null)
{
if (is_array($attributeAvId)) {
$useMinMax = false;
if (isset($attributeAvId['min'])) {
$this->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAvId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($attributeAvId['max'])) {
$this->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAvId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAvId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 AttributeAvDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeAvDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeAvDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeAvDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeAvDescPeer::CHAPO, $chapo, $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 AttributeAvDescQuery 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(AttributeAvDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(AttributeAvDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AttributeAvDescPeer::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 AttributeAvDescQuery 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(AttributeAvDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(AttributeAvDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AttributeAvDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related AttributeAv object
*
* @param AttributeAv|PropelObjectCollection $attributeAv The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeAvDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByAttributeAv($attributeAv, $comparison = null)
{
if ($attributeAv instanceof AttributeAv) {
return $this
->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAv->getId(), $comparison);
} elseif ($attributeAv instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(AttributeAvDescPeer::ATTRIBUTE_AV_ID, $attributeAv->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByAttributeAv() only accepts arguments of type AttributeAv or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the AttributeAv relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function joinAttributeAv($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('AttributeAv');
// 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, 'AttributeAv');
}
return $this;
}
/**
* Use the AttributeAv relation AttributeAv 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\AttributeAvQuery A secondary query class using the current class as primary query
*/
public function useAttributeAvQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinAttributeAv($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'AttributeAv', '\Thelia\Model\AttributeAvQuery');
}
/**
* Exclude object from result
*
* @param AttributeAvDesc $attributeAvDesc Object to remove from the list of results
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function prune($attributeAvDesc = null)
{
if ($attributeAvDesc) {
$this->addUsingAlias(AttributeAvDescPeer::ID, $attributeAvDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(AttributeAvDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(AttributeAvDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(AttributeAvDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(AttributeAvDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(AttributeAvDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return AttributeAvDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(AttributeAvDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Attribute;
use Thelia\Model\AttributeDesc;
use Thelia\Model\AttributeDescPeer;
use Thelia\Model\AttributeDescQuery;
/**
* Base class that represents a query for the 'attribute_desc' table.
*
*
*
* @method AttributeDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method AttributeDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method AttributeDescQuery orderByAttributeId($order = Criteria::ASC) Order by the attribute_id column
* @method AttributeDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method AttributeDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method AttributeDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method AttributeDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method AttributeDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method AttributeDescQuery groupById() Group by the id column
* @method AttributeDescQuery groupByLang() Group by the lang column
* @method AttributeDescQuery groupByAttributeId() Group by the attribute_id column
* @method AttributeDescQuery groupByTitle() Group by the title column
* @method AttributeDescQuery groupByDescription() Group by the description column
* @method AttributeDescQuery groupByChapo() Group by the chapo column
* @method AttributeDescQuery groupByCreatedAt() Group by the created_at column
* @method AttributeDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method AttributeDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method AttributeDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method AttributeDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method AttributeDescQuery leftJoinAttribute($relationAlias = null) Adds a LEFT JOIN clause to the query using the Attribute relation
* @method AttributeDescQuery rightJoinAttribute($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Attribute relation
* @method AttributeDescQuery innerJoinAttribute($relationAlias = null) Adds a INNER JOIN clause to the query using the Attribute relation
*
* @method AttributeDesc findOne(PropelPDO $con = null) Return the first AttributeDesc matching the query
* @method AttributeDesc findOneOrCreate(PropelPDO $con = null) Return the first AttributeDesc matching the query, or a new AttributeDesc object populated from the query conditions when no match is found
*
* @method AttributeDesc findOneById(int $id) Return the first AttributeDesc filtered by the id column
* @method AttributeDesc findOneByLang(string $lang) Return the first AttributeDesc filtered by the lang column
* @method AttributeDesc findOneByAttributeId(int $attribute_id) Return the first AttributeDesc filtered by the attribute_id column
* @method AttributeDesc findOneByTitle(string $title) Return the first AttributeDesc filtered by the title column
* @method AttributeDesc findOneByDescription(string $description) Return the first AttributeDesc filtered by the description column
* @method AttributeDesc findOneByChapo(string $chapo) Return the first AttributeDesc filtered by the chapo column
* @method AttributeDesc findOneByCreatedAt(string $created_at) Return the first AttributeDesc filtered by the created_at column
* @method AttributeDesc findOneByUpdatedAt(string $updated_at) Return the first AttributeDesc filtered by the updated_at column
*
* @method array findById(int $id) Return AttributeDesc objects filtered by the id column
* @method array findByLang(string $lang) Return AttributeDesc objects filtered by the lang column
* @method array findByAttributeId(int $attribute_id) Return AttributeDesc objects filtered by the attribute_id column
* @method array findByTitle(string $title) Return AttributeDesc objects filtered by the title column
* @method array findByDescription(string $description) Return AttributeDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return AttributeDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return AttributeDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return AttributeDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseAttributeDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseAttributeDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\AttributeDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new AttributeDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param AttributeDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return AttributeDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof AttributeDescQuery) {
return $criteria;
}
$query = new AttributeDescQuery();
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 PropelPDO $con an optional connection object
*
* @return AttributeDesc|AttributeDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = AttributeDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(AttributeDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return AttributeDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `LANG`, `ATTRIBUTE_ID`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `attribute_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new AttributeDesc();
$obj->hydrate($row);
AttributeDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return AttributeDesc|AttributeDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|AttributeDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(AttributeDescPeer::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 AttributeDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(AttributeDescPeer::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 AttributeDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(AttributeDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 AttributeDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the attribute_id column
*
* Example usage:
* <code>
* $query->filterByAttributeId(1234); // WHERE attribute_id = 1234
* $query->filterByAttributeId(array(12, 34)); // WHERE attribute_id IN (12, 34)
* $query->filterByAttributeId(array('min' => 12)); // WHERE attribute_id > 12
* </code>
*
* @see filterByAttribute()
*
* @param mixed $attributeId 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 AttributeDescQuery The current query, for fluid interface
*/
public function filterByAttributeId($attributeId = null, $comparison = null)
{
if (is_array($attributeId)) {
$useMinMax = false;
if (isset($attributeId['min'])) {
$this->addUsingAlias(AttributeDescPeer::ATTRIBUTE_ID, $attributeId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($attributeId['max'])) {
$this->addUsingAlias(AttributeDescPeer::ATTRIBUTE_ID, $attributeId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AttributeDescPeer::ATTRIBUTE_ID, $attributeId, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(AttributeDescPeer::CHAPO, $chapo, $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 AttributeDescQuery 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(AttributeDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(AttributeDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AttributeDescPeer::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 AttributeDescQuery 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(AttributeDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(AttributeDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(AttributeDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Attribute object
*
* @param Attribute|PropelObjectCollection $attribute The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return AttributeDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByAttribute($attribute, $comparison = null)
{
if ($attribute instanceof Attribute) {
return $this
->addUsingAlias(AttributeDescPeer::ATTRIBUTE_ID, $attribute->getId(), $comparison);
} elseif ($attribute instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(AttributeDescPeer::ATTRIBUTE_ID, $attribute->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByAttribute() only accepts arguments of type Attribute or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Attribute relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function joinAttribute($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Attribute');
// 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, 'Attribute');
}
return $this;
}
/**
* Use the Attribute relation Attribute 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\AttributeQuery A secondary query class using the current class as primary query
*/
public function useAttributeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinAttribute($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Attribute', '\Thelia\Model\AttributeQuery');
}
/**
* Exclude object from result
*
* @param AttributeDesc $attributeDesc Object to remove from the list of results
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function prune($attributeDesc = null)
{
if ($attributeDesc) {
$this->addUsingAlias(AttributeDescPeer::ID, $attributeDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(AttributeDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(AttributeDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(AttributeDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(AttributeDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(AttributeDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return AttributeDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(AttributeDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,711 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Category;
use Thelia\Model\CategoryDesc;
use Thelia\Model\CategoryDescPeer;
use Thelia\Model\CategoryDescQuery;
/**
* Base class that represents a query for the 'category_desc' table.
*
*
*
* @method CategoryDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method CategoryDescQuery orderByCategoryId($order = Criteria::ASC) Order by the category_id column
* @method CategoryDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method CategoryDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method CategoryDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method CategoryDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method CategoryDescQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
* @method CategoryDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method CategoryDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method CategoryDescQuery groupById() Group by the id column
* @method CategoryDescQuery groupByCategoryId() Group by the category_id column
* @method CategoryDescQuery groupByLang() Group by the lang column
* @method CategoryDescQuery groupByTitle() Group by the title column
* @method CategoryDescQuery groupByDescription() Group by the description column
* @method CategoryDescQuery groupByChapo() Group by the chapo column
* @method CategoryDescQuery groupByPostscriptum() Group by the postscriptum column
* @method CategoryDescQuery groupByCreatedAt() Group by the created_at column
* @method CategoryDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method CategoryDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CategoryDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CategoryDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CategoryDescQuery leftJoinCategory($relationAlias = null) Adds a LEFT JOIN clause to the query using the Category relation
* @method CategoryDescQuery rightJoinCategory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Category relation
* @method CategoryDescQuery innerJoinCategory($relationAlias = null) Adds a INNER JOIN clause to the query using the Category relation
*
* @method CategoryDesc findOne(PropelPDO $con = null) Return the first CategoryDesc matching the query
* @method CategoryDesc findOneOrCreate(PropelPDO $con = null) Return the first CategoryDesc matching the query, or a new CategoryDesc object populated from the query conditions when no match is found
*
* @method CategoryDesc findOneById(int $id) Return the first CategoryDesc filtered by the id column
* @method CategoryDesc findOneByCategoryId(int $category_id) Return the first CategoryDesc filtered by the category_id column
* @method CategoryDesc findOneByLang(string $lang) Return the first CategoryDesc filtered by the lang column
* @method CategoryDesc findOneByTitle(string $title) Return the first CategoryDesc filtered by the title column
* @method CategoryDesc findOneByDescription(string $description) Return the first CategoryDesc filtered by the description column
* @method CategoryDesc findOneByChapo(string $chapo) Return the first CategoryDesc filtered by the chapo column
* @method CategoryDesc findOneByPostscriptum(string $postscriptum) Return the first CategoryDesc filtered by the postscriptum column
* @method CategoryDesc findOneByCreatedAt(string $created_at) Return the first CategoryDesc filtered by the created_at column
* @method CategoryDesc findOneByUpdatedAt(string $updated_at) Return the first CategoryDesc filtered by the updated_at column
*
* @method array findById(int $id) Return CategoryDesc objects filtered by the id column
* @method array findByCategoryId(int $category_id) Return CategoryDesc objects filtered by the category_id column
* @method array findByLang(string $lang) Return CategoryDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return CategoryDesc objects filtered by the title column
* @method array findByDescription(string $description) Return CategoryDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return CategoryDesc objects filtered by the chapo column
* @method array findByPostscriptum(string $postscriptum) Return CategoryDesc objects filtered by the postscriptum column
* @method array findByCreatedAt(string $created_at) Return CategoryDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return CategoryDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseCategoryDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCategoryDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\CategoryDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CategoryDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CategoryDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CategoryDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CategoryDescQuery) {
return $criteria;
}
$query = new CategoryDescQuery();
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 PropelPDO $con an optional connection object
*
* @return CategoryDesc|CategoryDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CategoryDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CategoryDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return CategoryDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `CATEGORY_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `POSTSCRIPTUM`, `CREATED_AT`, `UPDATED_AT` FROM `category_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CategoryDesc();
$obj->hydrate($row);
CategoryDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CategoryDesc|CategoryDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CategoryDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CategoryDescPeer::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 CategoryDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CategoryDescPeer::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 CategoryDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(CategoryDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the category_id column
*
* Example usage:
* <code>
* $query->filterByCategoryId(1234); // WHERE category_id = 1234
* $query->filterByCategoryId(array(12, 34)); // WHERE category_id IN (12, 34)
* $query->filterByCategoryId(array('min' => 12)); // WHERE category_id > 12
* </code>
*
* @see filterByCategory()
*
* @param mixed $categoryId 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 CategoryDescQuery The current query, for fluid interface
*/
public function filterByCategoryId($categoryId = null, $comparison = null)
{
if (is_array($categoryId)) {
$useMinMax = false;
if (isset($categoryId['min'])) {
$this->addUsingAlias(CategoryDescPeer::CATEGORY_ID, $categoryId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($categoryId['max'])) {
$this->addUsingAlias(CategoryDescPeer::CATEGORY_ID, $categoryId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CategoryDescPeer::CATEGORY_ID, $categoryId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 CategoryDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CategoryDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CategoryDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CategoryDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CategoryDescPeer::CHAPO, $chapo, $comparison);
}
/**
* Filter the query on the postscriptum column
*
* Example usage:
* <code>
* $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue'
* $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%'
* </code>
*
* @param string $postscriptum The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function filterByPostscriptum($postscriptum = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($postscriptum)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $postscriptum)) {
$postscriptum = str_replace('*', '%', $postscriptum);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CategoryDescPeer::POSTSCRIPTUM, $postscriptum, $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 CategoryDescQuery 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(CategoryDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(CategoryDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CategoryDescPeer::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 CategoryDescQuery 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(CategoryDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(CategoryDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CategoryDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Category object
*
* @param Category|PropelObjectCollection $category The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CategoryDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCategory($category, $comparison = null)
{
if ($category instanceof Category) {
return $this
->addUsingAlias(CategoryDescPeer::CATEGORY_ID, $category->getId(), $comparison);
} elseif ($category instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CategoryDescPeer::CATEGORY_ID, $category->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByCategory() only accepts arguments of type Category or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Category relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function joinCategory($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Category');
// 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, 'Category');
}
return $this;
}
/**
* Use the Category relation Category 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\CategoryQuery A secondary query class using the current class as primary query
*/
public function useCategoryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCategory($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Category', '\Thelia\Model\CategoryQuery');
}
/**
* Exclude object from result
*
* @param CategoryDesc $categoryDesc Object to remove from the list of results
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function prune($categoryDesc = null)
{
if ($categoryDesc) {
$this->addUsingAlias(CategoryDescPeer::ID, $categoryDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(CategoryDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(CategoryDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(CategoryDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(CategoryDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(CategoryDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return CategoryDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(CategoryDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Config;
use Thelia\Model\ConfigDesc;
use Thelia\Model\ConfigDescPeer;
use Thelia\Model\ConfigDescQuery;
/**
* Base class that represents a query for the 'config_desc' table.
*
*
*
* @method ConfigDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method ConfigDescQuery orderByConfigId($order = Criteria::ASC) Order by the config_id column
* @method ConfigDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method ConfigDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method ConfigDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ConfigDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method ConfigDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ConfigDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ConfigDescQuery groupById() Group by the id column
* @method ConfigDescQuery groupByConfigId() Group by the config_id column
* @method ConfigDescQuery groupByLang() Group by the lang column
* @method ConfigDescQuery groupByTitle() Group by the title column
* @method ConfigDescQuery groupByDescription() Group by the description column
* @method ConfigDescQuery groupByChapo() Group by the chapo column
* @method ConfigDescQuery groupByCreatedAt() Group by the created_at column
* @method ConfigDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method ConfigDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ConfigDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ConfigDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ConfigDescQuery leftJoinConfig($relationAlias = null) Adds a LEFT JOIN clause to the query using the Config relation
* @method ConfigDescQuery rightJoinConfig($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Config relation
* @method ConfigDescQuery innerJoinConfig($relationAlias = null) Adds a INNER JOIN clause to the query using the Config relation
*
* @method ConfigDesc findOne(PropelPDO $con = null) Return the first ConfigDesc matching the query
* @method ConfigDesc findOneOrCreate(PropelPDO $con = null) Return the first ConfigDesc matching the query, or a new ConfigDesc object populated from the query conditions when no match is found
*
* @method ConfigDesc findOneById(int $id) Return the first ConfigDesc filtered by the id column
* @method ConfigDesc findOneByConfigId(int $config_id) Return the first ConfigDesc filtered by the config_id column
* @method ConfigDesc findOneByLang(string $lang) Return the first ConfigDesc filtered by the lang column
* @method ConfigDesc findOneByTitle(string $title) Return the first ConfigDesc filtered by the title column
* @method ConfigDesc findOneByDescription(string $description) Return the first ConfigDesc filtered by the description column
* @method ConfigDesc findOneByChapo(string $chapo) Return the first ConfigDesc filtered by the chapo column
* @method ConfigDesc findOneByCreatedAt(string $created_at) Return the first ConfigDesc filtered by the created_at column
* @method ConfigDesc findOneByUpdatedAt(string $updated_at) Return the first ConfigDesc filtered by the updated_at column
*
* @method array findById(int $id) Return ConfigDesc objects filtered by the id column
* @method array findByConfigId(int $config_id) Return ConfigDesc objects filtered by the config_id column
* @method array findByLang(string $lang) Return ConfigDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return ConfigDesc objects filtered by the title column
* @method array findByDescription(string $description) Return ConfigDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return ConfigDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return ConfigDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ConfigDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseConfigDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseConfigDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ConfigDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ConfigDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param ConfigDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return ConfigDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof ConfigDescQuery) {
return $criteria;
}
$query = new ConfigDescQuery();
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 PropelPDO $con an optional connection object
*
* @return ConfigDesc|ConfigDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = ConfigDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(ConfigDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return ConfigDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `CONFIG_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `config_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new ConfigDesc();
$obj->hydrate($row);
ConfigDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return ConfigDesc|ConfigDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|ConfigDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(ConfigDescPeer::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 ConfigDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(ConfigDescPeer::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 ConfigDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(ConfigDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the config_id column
*
* Example usage:
* <code>
* $query->filterByConfigId(1234); // WHERE config_id = 1234
* $query->filterByConfigId(array(12, 34)); // WHERE config_id IN (12, 34)
* $query->filterByConfigId(array('min' => 12)); // WHERE config_id > 12
* </code>
*
* @see filterByConfig()
*
* @param mixed $configId 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 ConfigDescQuery The current query, for fluid interface
*/
public function filterByConfigId($configId = null, $comparison = null)
{
if (is_array($configId)) {
$useMinMax = false;
if (isset($configId['min'])) {
$this->addUsingAlias(ConfigDescPeer::CONFIG_ID, $configId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($configId['max'])) {
$this->addUsingAlias(ConfigDescPeer::CONFIG_ID, $configId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ConfigDescPeer::CONFIG_ID, $configId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 ConfigDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ConfigDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ConfigDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ConfigDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ConfigDescPeer::CHAPO, $chapo, $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 ConfigDescQuery 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(ConfigDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(ConfigDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ConfigDescPeer::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 ConfigDescQuery 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(ConfigDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(ConfigDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ConfigDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Config object
*
* @param Config|PropelObjectCollection $config The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ConfigDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByConfig($config, $comparison = null)
{
if ($config instanceof Config) {
return $this
->addUsingAlias(ConfigDescPeer::CONFIG_ID, $config->getId(), $comparison);
} elseif ($config instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(ConfigDescPeer::CONFIG_ID, $config->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByConfig() only accepts arguments of type Config or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Config relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function joinConfig($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Config');
// 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, 'Config');
}
return $this;
}
/**
* Use the Config relation Config 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\ConfigQuery A secondary query class using the current class as primary query
*/
public function useConfigQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinConfig($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Config', '\Thelia\Model\ConfigQuery');
}
/**
* Exclude object from result
*
* @param ConfigDesc $configDesc Object to remove from the list of results
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function prune($configDesc = null)
{
if ($configDesc) {
$this->addUsingAlias(ConfigDescPeer::ID, $configDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(ConfigDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(ConfigDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(ConfigDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(ConfigDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(ConfigDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return ConfigDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(ConfigDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,711 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Content;
use Thelia\Model\ContentDesc;
use Thelia\Model\ContentDescPeer;
use Thelia\Model\ContentDescQuery;
/**
* Base class that represents a query for the 'content_desc' table.
*
*
*
* @method ContentDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method ContentDescQuery orderByContentId($order = Criteria::ASC) Order by the content_id column
* @method ContentDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method ContentDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method ContentDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ContentDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method ContentDescQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
* @method ContentDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ContentDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ContentDescQuery groupById() Group by the id column
* @method ContentDescQuery groupByContentId() Group by the content_id column
* @method ContentDescQuery groupByLang() Group by the lang column
* @method ContentDescQuery groupByTitle() Group by the title column
* @method ContentDescQuery groupByDescription() Group by the description column
* @method ContentDescQuery groupByChapo() Group by the chapo column
* @method ContentDescQuery groupByPostscriptum() Group by the postscriptum column
* @method ContentDescQuery groupByCreatedAt() Group by the created_at column
* @method ContentDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method ContentDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ContentDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ContentDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ContentDescQuery leftJoinContent($relationAlias = null) Adds a LEFT JOIN clause to the query using the Content relation
* @method ContentDescQuery rightJoinContent($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Content relation
* @method ContentDescQuery innerJoinContent($relationAlias = null) Adds a INNER JOIN clause to the query using the Content relation
*
* @method ContentDesc findOne(PropelPDO $con = null) Return the first ContentDesc matching the query
* @method ContentDesc findOneOrCreate(PropelPDO $con = null) Return the first ContentDesc matching the query, or a new ContentDesc object populated from the query conditions when no match is found
*
* @method ContentDesc findOneById(int $id) Return the first ContentDesc filtered by the id column
* @method ContentDesc findOneByContentId(int $content_id) Return the first ContentDesc filtered by the content_id column
* @method ContentDesc findOneByLang(string $lang) Return the first ContentDesc filtered by the lang column
* @method ContentDesc findOneByTitle(string $title) Return the first ContentDesc filtered by the title column
* @method ContentDesc findOneByDescription(string $description) Return the first ContentDesc filtered by the description column
* @method ContentDesc findOneByChapo(string $chapo) Return the first ContentDesc filtered by the chapo column
* @method ContentDesc findOneByPostscriptum(string $postscriptum) Return the first ContentDesc filtered by the postscriptum column
* @method ContentDesc findOneByCreatedAt(string $created_at) Return the first ContentDesc filtered by the created_at column
* @method ContentDesc findOneByUpdatedAt(string $updated_at) Return the first ContentDesc filtered by the updated_at column
*
* @method array findById(int $id) Return ContentDesc objects filtered by the id column
* @method array findByContentId(int $content_id) Return ContentDesc objects filtered by the content_id column
* @method array findByLang(string $lang) Return ContentDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return ContentDesc objects filtered by the title column
* @method array findByDescription(string $description) Return ContentDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return ContentDesc objects filtered by the chapo column
* @method array findByPostscriptum(string $postscriptum) Return ContentDesc objects filtered by the postscriptum column
* @method array findByCreatedAt(string $created_at) Return ContentDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ContentDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseContentDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseContentDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ContentDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ContentDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param ContentDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return ContentDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof ContentDescQuery) {
return $criteria;
}
$query = new ContentDescQuery();
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 PropelPDO $con an optional connection object
*
* @return ContentDesc|ContentDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = ContentDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(ContentDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return ContentDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `CONTENT_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `POSTSCRIPTUM`, `CREATED_AT`, `UPDATED_AT` FROM `content_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new ContentDesc();
$obj->hydrate($row);
ContentDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return ContentDesc|ContentDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|ContentDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(ContentDescPeer::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 ContentDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(ContentDescPeer::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 ContentDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(ContentDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the content_id column
*
* Example usage:
* <code>
* $query->filterByContentId(1234); // WHERE content_id = 1234
* $query->filterByContentId(array(12, 34)); // WHERE content_id IN (12, 34)
* $query->filterByContentId(array('min' => 12)); // WHERE content_id > 12
* </code>
*
* @see filterByContent()
*
* @param mixed $contentId 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 ContentDescQuery The current query, for fluid interface
*/
public function filterByContentId($contentId = null, $comparison = null)
{
if (is_array($contentId)) {
$useMinMax = false;
if (isset($contentId['min'])) {
$this->addUsingAlias(ContentDescPeer::CONTENT_ID, $contentId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($contentId['max'])) {
$this->addUsingAlias(ContentDescPeer::CONTENT_ID, $contentId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ContentDescPeer::CONTENT_ID, $contentId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 ContentDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ContentDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ContentDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ContentDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ContentDescPeer::CHAPO, $chapo, $comparison);
}
/**
* Filter the query on the postscriptum column
*
* Example usage:
* <code>
* $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue'
* $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%'
* </code>
*
* @param string $postscriptum The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function filterByPostscriptum($postscriptum = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($postscriptum)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $postscriptum)) {
$postscriptum = str_replace('*', '%', $postscriptum);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ContentDescPeer::POSTSCRIPTUM, $postscriptum, $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 ContentDescQuery 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(ContentDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(ContentDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ContentDescPeer::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 ContentDescQuery 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(ContentDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(ContentDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ContentDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Content object
*
* @param Content|PropelObjectCollection $content The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ContentDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByContent($content, $comparison = null)
{
if ($content instanceof Content) {
return $this
->addUsingAlias(ContentDescPeer::CONTENT_ID, $content->getId(), $comparison);
} elseif ($content instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(ContentDescPeer::CONTENT_ID, $content->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByContent() only accepts arguments of type Content or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Content relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function joinContent($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Content');
// 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, 'Content');
}
return $this;
}
/**
* Use the Content relation Content 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\ContentQuery A secondary query class using the current class as primary query
*/
public function useContentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinContent($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Content', '\Thelia\Model\ContentQuery');
}
/**
* Exclude object from result
*
* @param ContentDesc $contentDesc Object to remove from the list of results
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function prune($contentDesc = null)
{
if ($contentDesc) {
$this->addUsingAlias(ContentDescPeer::ID, $contentDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(ContentDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(ContentDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(ContentDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(ContentDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(ContentDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return ContentDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(ContentDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Country;
use Thelia\Model\CountryDesc;
use Thelia\Model\CountryDescPeer;
use Thelia\Model\CountryDescQuery;
/**
* Base class that represents a query for the 'country_desc' table.
*
*
*
* @method CountryDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method CountryDescQuery orderByCountryId($order = Criteria::ASC) Order by the country_id column
* @method CountryDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method CountryDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method CountryDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method CountryDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method CountryDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method CountryDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method CountryDescQuery groupById() Group by the id column
* @method CountryDescQuery groupByCountryId() Group by the country_id column
* @method CountryDescQuery groupByLang() Group by the lang column
* @method CountryDescQuery groupByTitle() Group by the title column
* @method CountryDescQuery groupByDescription() Group by the description column
* @method CountryDescQuery groupByChapo() Group by the chapo column
* @method CountryDescQuery groupByCreatedAt() Group by the created_at column
* @method CountryDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method CountryDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CountryDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CountryDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CountryDescQuery leftJoinCountry($relationAlias = null) Adds a LEFT JOIN clause to the query using the Country relation
* @method CountryDescQuery rightJoinCountry($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Country relation
* @method CountryDescQuery innerJoinCountry($relationAlias = null) Adds a INNER JOIN clause to the query using the Country relation
*
* @method CountryDesc findOne(PropelPDO $con = null) Return the first CountryDesc matching the query
* @method CountryDesc findOneOrCreate(PropelPDO $con = null) Return the first CountryDesc matching the query, or a new CountryDesc object populated from the query conditions when no match is found
*
* @method CountryDesc findOneById(int $id) Return the first CountryDesc filtered by the id column
* @method CountryDesc findOneByCountryId(int $country_id) Return the first CountryDesc filtered by the country_id column
* @method CountryDesc findOneByLang(string $lang) Return the first CountryDesc filtered by the lang column
* @method CountryDesc findOneByTitle(string $title) Return the first CountryDesc filtered by the title column
* @method CountryDesc findOneByDescription(string $description) Return the first CountryDesc filtered by the description column
* @method CountryDesc findOneByChapo(string $chapo) Return the first CountryDesc filtered by the chapo column
* @method CountryDesc findOneByCreatedAt(string $created_at) Return the first CountryDesc filtered by the created_at column
* @method CountryDesc findOneByUpdatedAt(string $updated_at) Return the first CountryDesc filtered by the updated_at column
*
* @method array findById(int $id) Return CountryDesc objects filtered by the id column
* @method array findByCountryId(int $country_id) Return CountryDesc objects filtered by the country_id column
* @method array findByLang(string $lang) Return CountryDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return CountryDesc objects filtered by the title column
* @method array findByDescription(string $description) Return CountryDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return CountryDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return CountryDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return CountryDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseCountryDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCountryDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\CountryDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CountryDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CountryDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CountryDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CountryDescQuery) {
return $criteria;
}
$query = new CountryDescQuery();
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 PropelPDO $con an optional connection object
*
* @return CountryDesc|CountryDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CountryDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CountryDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return CountryDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `COUNTRY_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `country_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CountryDesc();
$obj->hydrate($row);
CountryDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CountryDesc|CountryDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CountryDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CountryDescPeer::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 CountryDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CountryDescPeer::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 CountryDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(CountryDescPeer::ID, $id, $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 CountryDescQuery 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(CountryDescPeer::COUNTRY_ID, $countryId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($countryId['max'])) {
$this->addUsingAlias(CountryDescPeer::COUNTRY_ID, $countryId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CountryDescPeer::COUNTRY_ID, $countryId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 CountryDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CountryDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CountryDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CountryDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CountryDescPeer::CHAPO, $chapo, $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 CountryDescQuery 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(CountryDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(CountryDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CountryDescPeer::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 CountryDescQuery 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(CountryDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(CountryDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CountryDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Country object
*
* @param Country|PropelObjectCollection $country The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CountryDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCountry($country, $comparison = null)
{
if ($country instanceof Country) {
return $this
->addUsingAlias(CountryDescPeer::COUNTRY_ID, $country->getId(), $comparison);
} elseif ($country instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CountryDescPeer::COUNTRY_ID, $country->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByCountry() only accepts arguments of type Country or PropelCollection');
}
}
/**
* 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 CountryDescQuery 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');
}
/**
* Exclude object from result
*
* @param CountryDesc $countryDesc Object to remove from the list of results
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function prune($countryDesc = null)
{
if ($countryDesc) {
$this->addUsingAlias(CountryDescPeer::ID, $countryDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(CountryDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(CountryDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(CountryDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(CountryDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(CountryDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return CountryDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(CountryDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,645 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\CustomerTitle;
use Thelia\Model\CustomerTitleDesc;
use Thelia\Model\CustomerTitleDescPeer;
use Thelia\Model\CustomerTitleDescQuery;
/**
* Base class that represents a query for the 'customer_title_desc' table.
*
*
*
* @method CustomerTitleDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method CustomerTitleDescQuery orderByCustomerTitleId($order = Criteria::ASC) Order by the customer_title_id column
* @method CustomerTitleDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method CustomerTitleDescQuery orderByShort($order = Criteria::ASC) Order by the short column
* @method CustomerTitleDescQuery orderByLong($order = Criteria::ASC) Order by the long column
* @method CustomerTitleDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method CustomerTitleDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method CustomerTitleDescQuery groupById() Group by the id column
* @method CustomerTitleDescQuery groupByCustomerTitleId() Group by the customer_title_id column
* @method CustomerTitleDescQuery groupByLang() Group by the lang column
* @method CustomerTitleDescQuery groupByShort() Group by the short column
* @method CustomerTitleDescQuery groupByLong() Group by the long column
* @method CustomerTitleDescQuery groupByCreatedAt() Group by the created_at column
* @method CustomerTitleDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method CustomerTitleDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CustomerTitleDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CustomerTitleDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method CustomerTitleDescQuery leftJoinCustomerTitle($relationAlias = null) Adds a LEFT JOIN clause to the query using the CustomerTitle relation
* @method CustomerTitleDescQuery rightJoinCustomerTitle($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CustomerTitle relation
* @method CustomerTitleDescQuery innerJoinCustomerTitle($relationAlias = null) Adds a INNER JOIN clause to the query using the CustomerTitle relation
*
* @method CustomerTitleDesc findOne(PropelPDO $con = null) Return the first CustomerTitleDesc matching the query
* @method CustomerTitleDesc findOneOrCreate(PropelPDO $con = null) Return the first CustomerTitleDesc matching the query, or a new CustomerTitleDesc object populated from the query conditions when no match is found
*
* @method CustomerTitleDesc findOneById(int $id) Return the first CustomerTitleDesc filtered by the id column
* @method CustomerTitleDesc findOneByCustomerTitleId(int $customer_title_id) Return the first CustomerTitleDesc filtered by the customer_title_id column
* @method CustomerTitleDesc findOneByLang(string $lang) Return the first CustomerTitleDesc filtered by the lang column
* @method CustomerTitleDesc findOneByShort(string $short) Return the first CustomerTitleDesc filtered by the short column
* @method CustomerTitleDesc findOneByLong(string $long) Return the first CustomerTitleDesc filtered by the long column
* @method CustomerTitleDesc findOneByCreatedAt(string $created_at) Return the first CustomerTitleDesc filtered by the created_at column
* @method CustomerTitleDesc findOneByUpdatedAt(string $updated_at) Return the first CustomerTitleDesc filtered by the updated_at column
*
* @method array findById(int $id) Return CustomerTitleDesc objects filtered by the id column
* @method array findByCustomerTitleId(int $customer_title_id) Return CustomerTitleDesc objects filtered by the customer_title_id column
* @method array findByLang(string $lang) Return CustomerTitleDesc objects filtered by the lang column
* @method array findByShort(string $short) Return CustomerTitleDesc objects filtered by the short column
* @method array findByLong(string $long) Return CustomerTitleDesc objects filtered by the long column
* @method array findByCreatedAt(string $created_at) Return CustomerTitleDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return CustomerTitleDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseCustomerTitleDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseCustomerTitleDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\CustomerTitleDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new CustomerTitleDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param CustomerTitleDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return CustomerTitleDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof CustomerTitleDescQuery) {
return $criteria;
}
$query = new CustomerTitleDescQuery();
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 PropelPDO $con an optional connection object
*
* @return CustomerTitleDesc|CustomerTitleDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = CustomerTitleDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(CustomerTitleDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return CustomerTitleDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `CUSTOMER_TITLE_ID`, `LANG`, `SHORT`, `LONG`, `CREATED_AT`, `UPDATED_AT` FROM `customer_title_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new CustomerTitleDesc();
$obj->hydrate($row);
CustomerTitleDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return CustomerTitleDesc|CustomerTitleDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|CustomerTitleDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(CustomerTitleDescPeer::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 CustomerTitleDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(CustomerTitleDescPeer::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 CustomerTitleDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(CustomerTitleDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the customer_title_id column
*
* Example usage:
* <code>
* $query->filterByCustomerTitleId(1234); // WHERE customer_title_id = 1234
* $query->filterByCustomerTitleId(array(12, 34)); // WHERE customer_title_id IN (12, 34)
* $query->filterByCustomerTitleId(array('min' => 12)); // WHERE customer_title_id > 12
* </code>
*
* @see filterByCustomerTitle()
*
* @param mixed $customerTitleId 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 CustomerTitleDescQuery The current query, for fluid interface
*/
public function filterByCustomerTitleId($customerTitleId = null, $comparison = null)
{
if (is_array($customerTitleId)) {
$useMinMax = false;
if (isset($customerTitleId['min'])) {
$this->addUsingAlias(CustomerTitleDescPeer::CUSTOMER_TITLE_ID, $customerTitleId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($customerTitleId['max'])) {
$this->addUsingAlias(CustomerTitleDescPeer::CUSTOMER_TITLE_ID, $customerTitleId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CustomerTitleDescPeer::CUSTOMER_TITLE_ID, $customerTitleId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 CustomerTitleDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CustomerTitleDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the short column
*
* Example usage:
* <code>
* $query->filterByShort('fooValue'); // WHERE short = 'fooValue'
* $query->filterByShort('%fooValue%'); // WHERE short LIKE '%fooValue%'
* </code>
*
* @param string $short 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 CustomerTitleDescQuery The current query, for fluid interface
*/
public function filterByShort($short = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($short)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $short)) {
$short = str_replace('*', '%', $short);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CustomerTitleDescPeer::SHORT, $short, $comparison);
}
/**
* Filter the query on the long column
*
* Example usage:
* <code>
* $query->filterByLong('fooValue'); // WHERE long = 'fooValue'
* $query->filterByLong('%fooValue%'); // WHERE long LIKE '%fooValue%'
* </code>
*
* @param string $long 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 CustomerTitleDescQuery The current query, for fluid interface
*/
public function filterByLong($long = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($long)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $long)) {
$long = str_replace('*', '%', $long);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CustomerTitleDescPeer::LONG, $long, $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 CustomerTitleDescQuery 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(CustomerTitleDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(CustomerTitleDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CustomerTitleDescPeer::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 CustomerTitleDescQuery 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(CustomerTitleDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(CustomerTitleDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CustomerTitleDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related CustomerTitle object
*
* @param CustomerTitle|PropelObjectCollection $customerTitle The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CustomerTitleDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByCustomerTitle($customerTitle, $comparison = null)
{
if ($customerTitle instanceof CustomerTitle) {
return $this
->addUsingAlias(CustomerTitleDescPeer::CUSTOMER_TITLE_ID, $customerTitle->getId(), $comparison);
} elseif ($customerTitle instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(CustomerTitleDescPeer::CUSTOMER_TITLE_ID, $customerTitle->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByCustomerTitle() only accepts arguments of type CustomerTitle or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the CustomerTitle relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function joinCustomerTitle($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('CustomerTitle');
// 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, 'CustomerTitle');
}
return $this;
}
/**
* Use the CustomerTitle relation CustomerTitle 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\CustomerTitleQuery A secondary query class using the current class as primary query
*/
public function useCustomerTitleQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinCustomerTitle($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'CustomerTitle', '\Thelia\Model\CustomerTitleQuery');
}
/**
* Exclude object from result
*
* @param CustomerTitleDesc $customerTitleDesc Object to remove from the list of results
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function prune($customerTitleDesc = null)
{
if ($customerTitleDesc) {
$this->addUsingAlias(CustomerTitleDescPeer::ID, $customerTitleDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(CustomerTitleDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(CustomerTitleDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(CustomerTitleDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(CustomerTitleDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(CustomerTitleDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return CustomerTitleDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(CustomerTitleDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Document;
use Thelia\Model\DocumentDesc;
use Thelia\Model\DocumentDescPeer;
use Thelia\Model\DocumentDescQuery;
/**
* Base class that represents a query for the 'document_desc' table.
*
*
*
* @method DocumentDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method DocumentDescQuery orderByDocumentId($order = Criteria::ASC) Order by the document_id column
* @method DocumentDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method DocumentDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method DocumentDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method DocumentDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method DocumentDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method DocumentDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method DocumentDescQuery groupById() Group by the id column
* @method DocumentDescQuery groupByDocumentId() Group by the document_id column
* @method DocumentDescQuery groupByLang() Group by the lang column
* @method DocumentDescQuery groupByTitle() Group by the title column
* @method DocumentDescQuery groupByDescription() Group by the description column
* @method DocumentDescQuery groupByChapo() Group by the chapo column
* @method DocumentDescQuery groupByCreatedAt() Group by the created_at column
* @method DocumentDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method DocumentDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method DocumentDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method DocumentDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method DocumentDescQuery leftJoinDocument($relationAlias = null) Adds a LEFT JOIN clause to the query using the Document relation
* @method DocumentDescQuery rightJoinDocument($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Document relation
* @method DocumentDescQuery innerJoinDocument($relationAlias = null) Adds a INNER JOIN clause to the query using the Document relation
*
* @method DocumentDesc findOne(PropelPDO $con = null) Return the first DocumentDesc matching the query
* @method DocumentDesc findOneOrCreate(PropelPDO $con = null) Return the first DocumentDesc matching the query, or a new DocumentDesc object populated from the query conditions when no match is found
*
* @method DocumentDesc findOneById(int $id) Return the first DocumentDesc filtered by the id column
* @method DocumentDesc findOneByDocumentId(int $document_id) Return the first DocumentDesc filtered by the document_id column
* @method DocumentDesc findOneByLang(string $lang) Return the first DocumentDesc filtered by the lang column
* @method DocumentDesc findOneByTitle(string $title) Return the first DocumentDesc filtered by the title column
* @method DocumentDesc findOneByDescription(string $description) Return the first DocumentDesc filtered by the description column
* @method DocumentDesc findOneByChapo(string $chapo) Return the first DocumentDesc filtered by the chapo column
* @method DocumentDesc findOneByCreatedAt(string $created_at) Return the first DocumentDesc filtered by the created_at column
* @method DocumentDesc findOneByUpdatedAt(string $updated_at) Return the first DocumentDesc filtered by the updated_at column
*
* @method array findById(int $id) Return DocumentDesc objects filtered by the id column
* @method array findByDocumentId(int $document_id) Return DocumentDesc objects filtered by the document_id column
* @method array findByLang(string $lang) Return DocumentDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return DocumentDesc objects filtered by the title column
* @method array findByDescription(string $description) Return DocumentDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return DocumentDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return DocumentDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return DocumentDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseDocumentDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseDocumentDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\DocumentDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new DocumentDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param DocumentDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return DocumentDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof DocumentDescQuery) {
return $criteria;
}
$query = new DocumentDescQuery();
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 PropelPDO $con an optional connection object
*
* @return DocumentDesc|DocumentDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = DocumentDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(DocumentDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return DocumentDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `DOCUMENT_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `document_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new DocumentDesc();
$obj->hydrate($row);
DocumentDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return DocumentDesc|DocumentDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|DocumentDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(DocumentDescPeer::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 DocumentDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(DocumentDescPeer::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 DocumentDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(DocumentDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the document_id column
*
* Example usage:
* <code>
* $query->filterByDocumentId(1234); // WHERE document_id = 1234
* $query->filterByDocumentId(array(12, 34)); // WHERE document_id IN (12, 34)
* $query->filterByDocumentId(array('min' => 12)); // WHERE document_id > 12
* </code>
*
* @see filterByDocument()
*
* @param mixed $documentId 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 DocumentDescQuery The current query, for fluid interface
*/
public function filterByDocumentId($documentId = null, $comparison = null)
{
if (is_array($documentId)) {
$useMinMax = false;
if (isset($documentId['min'])) {
$this->addUsingAlias(DocumentDescPeer::DOCUMENT_ID, $documentId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($documentId['max'])) {
$this->addUsingAlias(DocumentDescPeer::DOCUMENT_ID, $documentId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(DocumentDescPeer::DOCUMENT_ID, $documentId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 DocumentDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(DocumentDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(DocumentDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(DocumentDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(DocumentDescPeer::CHAPO, $chapo, $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 DocumentDescQuery 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(DocumentDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(DocumentDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(DocumentDescPeer::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 DocumentDescQuery 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(DocumentDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(DocumentDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(DocumentDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Document object
*
* @param Document|PropelObjectCollection $document The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return DocumentDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByDocument($document, $comparison = null)
{
if ($document instanceof Document) {
return $this
->addUsingAlias(DocumentDescPeer::DOCUMENT_ID, $document->getId(), $comparison);
} elseif ($document instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(DocumentDescPeer::DOCUMENT_ID, $document->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByDocument() only accepts arguments of type Document or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Document relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function joinDocument($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Document');
// 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, 'Document');
}
return $this;
}
/**
* Use the Document relation Document 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\DocumentQuery A secondary query class using the current class as primary query
*/
public function useDocumentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinDocument($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Document', '\Thelia\Model\DocumentQuery');
}
/**
* Exclude object from result
*
* @param DocumentDesc $documentDesc Object to remove from the list of results
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function prune($documentDesc = null)
{
if ($documentDesc) {
$this->addUsingAlias(DocumentDescPeer::ID, $documentDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(DocumentDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(DocumentDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(DocumentDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(DocumentDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(DocumentDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return DocumentDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(DocumentDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\FeatureAv;
use Thelia\Model\FeatureAvDesc;
use Thelia\Model\FeatureAvDescPeer;
use Thelia\Model\FeatureAvDescQuery;
/**
* Base class that represents a query for the 'feature_av_desc' table.
*
*
*
* @method FeatureAvDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method FeatureAvDescQuery orderByFeatureAvId($order = Criteria::ASC) Order by the feature_av_id column
* @method FeatureAvDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method FeatureAvDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method FeatureAvDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method FeatureAvDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method FeatureAvDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method FeatureAvDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method FeatureAvDescQuery groupById() Group by the id column
* @method FeatureAvDescQuery groupByFeatureAvId() Group by the feature_av_id column
* @method FeatureAvDescQuery groupByLang() Group by the lang column
* @method FeatureAvDescQuery groupByTitle() Group by the title column
* @method FeatureAvDescQuery groupByDescription() Group by the description column
* @method FeatureAvDescQuery groupByChapo() Group by the chapo column
* @method FeatureAvDescQuery groupByCreatedAt() Group by the created_at column
* @method FeatureAvDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method FeatureAvDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method FeatureAvDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method FeatureAvDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method FeatureAvDescQuery leftJoinFeatureAv($relationAlias = null) Adds a LEFT JOIN clause to the query using the FeatureAv relation
* @method FeatureAvDescQuery rightJoinFeatureAv($relationAlias = null) Adds a RIGHT JOIN clause to the query using the FeatureAv relation
* @method FeatureAvDescQuery innerJoinFeatureAv($relationAlias = null) Adds a INNER JOIN clause to the query using the FeatureAv relation
*
* @method FeatureAvDesc findOne(PropelPDO $con = null) Return the first FeatureAvDesc matching the query
* @method FeatureAvDesc findOneOrCreate(PropelPDO $con = null) Return the first FeatureAvDesc matching the query, or a new FeatureAvDesc object populated from the query conditions when no match is found
*
* @method FeatureAvDesc findOneById(int $id) Return the first FeatureAvDesc filtered by the id column
* @method FeatureAvDesc findOneByFeatureAvId(int $feature_av_id) Return the first FeatureAvDesc filtered by the feature_av_id column
* @method FeatureAvDesc findOneByLang(string $lang) Return the first FeatureAvDesc filtered by the lang column
* @method FeatureAvDesc findOneByTitle(string $title) Return the first FeatureAvDesc filtered by the title column
* @method FeatureAvDesc findOneByDescription(string $description) Return the first FeatureAvDesc filtered by the description column
* @method FeatureAvDesc findOneByChapo(string $chapo) Return the first FeatureAvDesc filtered by the chapo column
* @method FeatureAvDesc findOneByCreatedAt(string $created_at) Return the first FeatureAvDesc filtered by the created_at column
* @method FeatureAvDesc findOneByUpdatedAt(string $updated_at) Return the first FeatureAvDesc filtered by the updated_at column
*
* @method array findById(int $id) Return FeatureAvDesc objects filtered by the id column
* @method array findByFeatureAvId(int $feature_av_id) Return FeatureAvDesc objects filtered by the feature_av_id column
* @method array findByLang(string $lang) Return FeatureAvDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return FeatureAvDesc objects filtered by the title column
* @method array findByDescription(string $description) Return FeatureAvDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return FeatureAvDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return FeatureAvDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return FeatureAvDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseFeatureAvDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseFeatureAvDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\FeatureAvDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new FeatureAvDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param FeatureAvDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return FeatureAvDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof FeatureAvDescQuery) {
return $criteria;
}
$query = new FeatureAvDescQuery();
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 PropelPDO $con an optional connection object
*
* @return FeatureAvDesc|FeatureAvDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = FeatureAvDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(FeatureAvDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return FeatureAvDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `FEATURE_AV_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `feature_av_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new FeatureAvDesc();
$obj->hydrate($row);
FeatureAvDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return FeatureAvDesc|FeatureAvDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|FeatureAvDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(FeatureAvDescPeer::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 FeatureAvDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(FeatureAvDescPeer::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 FeatureAvDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(FeatureAvDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the feature_av_id column
*
* Example usage:
* <code>
* $query->filterByFeatureAvId(1234); // WHERE feature_av_id = 1234
* $query->filterByFeatureAvId(array(12, 34)); // WHERE feature_av_id IN (12, 34)
* $query->filterByFeatureAvId(array('min' => 12)); // WHERE feature_av_id > 12
* </code>
*
* @see filterByFeatureAv()
*
* @param mixed $featureAvId 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 FeatureAvDescQuery The current query, for fluid interface
*/
public function filterByFeatureAvId($featureAvId = null, $comparison = null)
{
if (is_array($featureAvId)) {
$useMinMax = false;
if (isset($featureAvId['min'])) {
$this->addUsingAlias(FeatureAvDescPeer::FEATURE_AV_ID, $featureAvId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($featureAvId['max'])) {
$this->addUsingAlias(FeatureAvDescPeer::FEATURE_AV_ID, $featureAvId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FeatureAvDescPeer::FEATURE_AV_ID, $featureAvId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 FeatureAvDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureAvDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureAvDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureAvDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureAvDescPeer::CHAPO, $chapo, $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 FeatureAvDescQuery 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(FeatureAvDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(FeatureAvDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FeatureAvDescPeer::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 FeatureAvDescQuery 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(FeatureAvDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(FeatureAvDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FeatureAvDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related FeatureAv object
*
* @param FeatureAv|PropelObjectCollection $featureAv The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureAvDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByFeatureAv($featureAv, $comparison = null)
{
if ($featureAv instanceof FeatureAv) {
return $this
->addUsingAlias(FeatureAvDescPeer::FEATURE_AV_ID, $featureAv->getId(), $comparison);
} elseif ($featureAv instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(FeatureAvDescPeer::FEATURE_AV_ID, $featureAv->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByFeatureAv() only accepts arguments of type FeatureAv or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the FeatureAv relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function joinFeatureAv($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('FeatureAv');
// 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, 'FeatureAv');
}
return $this;
}
/**
* Use the FeatureAv relation FeatureAv 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\FeatureAvQuery A secondary query class using the current class as primary query
*/
public function useFeatureAvQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinFeatureAv($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeatureAv', '\Thelia\Model\FeatureAvQuery');
}
/**
* Exclude object from result
*
* @param FeatureAvDesc $featureAvDesc Object to remove from the list of results
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function prune($featureAvDesc = null)
{
if ($featureAvDesc) {
$this->addUsingAlias(FeatureAvDescPeer::ID, $featureAvDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(FeatureAvDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(FeatureAvDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(FeatureAvDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(FeatureAvDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(FeatureAvDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return FeatureAvDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(FeatureAvDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Feature;
use Thelia\Model\FeatureDesc;
use Thelia\Model\FeatureDescPeer;
use Thelia\Model\FeatureDescQuery;
/**
* Base class that represents a query for the 'feature_desc' table.
*
*
*
* @method FeatureDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method FeatureDescQuery orderByFeatureId($order = Criteria::ASC) Order by the feature_id column
* @method FeatureDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method FeatureDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method FeatureDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method FeatureDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method FeatureDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method FeatureDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method FeatureDescQuery groupById() Group by the id column
* @method FeatureDescQuery groupByFeatureId() Group by the feature_id column
* @method FeatureDescQuery groupByLang() Group by the lang column
* @method FeatureDescQuery groupByTitle() Group by the title column
* @method FeatureDescQuery groupByDescription() Group by the description column
* @method FeatureDescQuery groupByChapo() Group by the chapo column
* @method FeatureDescQuery groupByCreatedAt() Group by the created_at column
* @method FeatureDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method FeatureDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method FeatureDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method FeatureDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method FeatureDescQuery leftJoinFeature($relationAlias = null) Adds a LEFT JOIN clause to the query using the Feature relation
* @method FeatureDescQuery rightJoinFeature($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Feature relation
* @method FeatureDescQuery innerJoinFeature($relationAlias = null) Adds a INNER JOIN clause to the query using the Feature relation
*
* @method FeatureDesc findOne(PropelPDO $con = null) Return the first FeatureDesc matching the query
* @method FeatureDesc findOneOrCreate(PropelPDO $con = null) Return the first FeatureDesc matching the query, or a new FeatureDesc object populated from the query conditions when no match is found
*
* @method FeatureDesc findOneById(int $id) Return the first FeatureDesc filtered by the id column
* @method FeatureDesc findOneByFeatureId(int $feature_id) Return the first FeatureDesc filtered by the feature_id column
* @method FeatureDesc findOneByLang(string $lang) Return the first FeatureDesc filtered by the lang column
* @method FeatureDesc findOneByTitle(string $title) Return the first FeatureDesc filtered by the title column
* @method FeatureDesc findOneByDescription(string $description) Return the first FeatureDesc filtered by the description column
* @method FeatureDesc findOneByChapo(string $chapo) Return the first FeatureDesc filtered by the chapo column
* @method FeatureDesc findOneByCreatedAt(string $created_at) Return the first FeatureDesc filtered by the created_at column
* @method FeatureDesc findOneByUpdatedAt(string $updated_at) Return the first FeatureDesc filtered by the updated_at column
*
* @method array findById(int $id) Return FeatureDesc objects filtered by the id column
* @method array findByFeatureId(int $feature_id) Return FeatureDesc objects filtered by the feature_id column
* @method array findByLang(string $lang) Return FeatureDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return FeatureDesc objects filtered by the title column
* @method array findByDescription(string $description) Return FeatureDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return FeatureDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return FeatureDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return FeatureDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseFeatureDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseFeatureDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\FeatureDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new FeatureDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param FeatureDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return FeatureDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof FeatureDescQuery) {
return $criteria;
}
$query = new FeatureDescQuery();
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 PropelPDO $con an optional connection object
*
* @return FeatureDesc|FeatureDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = FeatureDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(FeatureDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return FeatureDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `FEATURE_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `feature_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new FeatureDesc();
$obj->hydrate($row);
FeatureDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return FeatureDesc|FeatureDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|FeatureDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(FeatureDescPeer::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 FeatureDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(FeatureDescPeer::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 FeatureDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(FeatureDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the feature_id column
*
* Example usage:
* <code>
* $query->filterByFeatureId(1234); // WHERE feature_id = 1234
* $query->filterByFeatureId(array(12, 34)); // WHERE feature_id IN (12, 34)
* $query->filterByFeatureId(array('min' => 12)); // WHERE feature_id > 12
* </code>
*
* @see filterByFeature()
*
* @param mixed $featureId 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 FeatureDescQuery The current query, for fluid interface
*/
public function filterByFeatureId($featureId = null, $comparison = null)
{
if (is_array($featureId)) {
$useMinMax = false;
if (isset($featureId['min'])) {
$this->addUsingAlias(FeatureDescPeer::FEATURE_ID, $featureId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($featureId['max'])) {
$this->addUsingAlias(FeatureDescPeer::FEATURE_ID, $featureId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FeatureDescPeer::FEATURE_ID, $featureId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 FeatureDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FeatureDescPeer::CHAPO, $chapo, $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 FeatureDescQuery 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(FeatureDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(FeatureDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FeatureDescPeer::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 FeatureDescQuery 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(FeatureDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(FeatureDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FeatureDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Feature object
*
* @param Feature|PropelObjectCollection $feature The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FeatureDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByFeature($feature, $comparison = null)
{
if ($feature instanceof Feature) {
return $this
->addUsingAlias(FeatureDescPeer::FEATURE_ID, $feature->getId(), $comparison);
} elseif ($feature instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(FeatureDescPeer::FEATURE_ID, $feature->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByFeature() only accepts arguments of type Feature or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Feature relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function joinFeature($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Feature');
// 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, 'Feature');
}
return $this;
}
/**
* Use the Feature relation Feature 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\FeatureQuery A secondary query class using the current class as primary query
*/
public function useFeatureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinFeature($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Feature', '\Thelia\Model\FeatureQuery');
}
/**
* Exclude object from result
*
* @param FeatureDesc $featureDesc Object to remove from the list of results
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function prune($featureDesc = null)
{
if ($featureDesc) {
$this->addUsingAlias(FeatureDescPeer::ID, $featureDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(FeatureDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(FeatureDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(FeatureDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(FeatureDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(FeatureDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return FeatureDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(FeatureDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,711 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Folder;
use Thelia\Model\FolderDesc;
use Thelia\Model\FolderDescPeer;
use Thelia\Model\FolderDescQuery;
/**
* Base class that represents a query for the 'folder_desc' table.
*
*
*
* @method FolderDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method FolderDescQuery orderByFolderId($order = Criteria::ASC) Order by the folder_id column
* @method FolderDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method FolderDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method FolderDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method FolderDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method FolderDescQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
* @method FolderDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method FolderDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method FolderDescQuery groupById() Group by the id column
* @method FolderDescQuery groupByFolderId() Group by the folder_id column
* @method FolderDescQuery groupByLang() Group by the lang column
* @method FolderDescQuery groupByTitle() Group by the title column
* @method FolderDescQuery groupByDescription() Group by the description column
* @method FolderDescQuery groupByChapo() Group by the chapo column
* @method FolderDescQuery groupByPostscriptum() Group by the postscriptum column
* @method FolderDescQuery groupByCreatedAt() Group by the created_at column
* @method FolderDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method FolderDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method FolderDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method FolderDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method FolderDescQuery leftJoinFolder($relationAlias = null) Adds a LEFT JOIN clause to the query using the Folder relation
* @method FolderDescQuery rightJoinFolder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Folder relation
* @method FolderDescQuery innerJoinFolder($relationAlias = null) Adds a INNER JOIN clause to the query using the Folder relation
*
* @method FolderDesc findOne(PropelPDO $con = null) Return the first FolderDesc matching the query
* @method FolderDesc findOneOrCreate(PropelPDO $con = null) Return the first FolderDesc matching the query, or a new FolderDesc object populated from the query conditions when no match is found
*
* @method FolderDesc findOneById(int $id) Return the first FolderDesc filtered by the id column
* @method FolderDesc findOneByFolderId(int $folder_id) Return the first FolderDesc filtered by the folder_id column
* @method FolderDesc findOneByLang(string $lang) Return the first FolderDesc filtered by the lang column
* @method FolderDesc findOneByTitle(string $title) Return the first FolderDesc filtered by the title column
* @method FolderDesc findOneByDescription(string $description) Return the first FolderDesc filtered by the description column
* @method FolderDesc findOneByChapo(string $chapo) Return the first FolderDesc filtered by the chapo column
* @method FolderDesc findOneByPostscriptum(string $postscriptum) Return the first FolderDesc filtered by the postscriptum column
* @method FolderDesc findOneByCreatedAt(string $created_at) Return the first FolderDesc filtered by the created_at column
* @method FolderDesc findOneByUpdatedAt(string $updated_at) Return the first FolderDesc filtered by the updated_at column
*
* @method array findById(int $id) Return FolderDesc objects filtered by the id column
* @method array findByFolderId(int $folder_id) Return FolderDesc objects filtered by the folder_id column
* @method array findByLang(string $lang) Return FolderDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return FolderDesc objects filtered by the title column
* @method array findByDescription(string $description) Return FolderDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return FolderDesc objects filtered by the chapo column
* @method array findByPostscriptum(string $postscriptum) Return FolderDesc objects filtered by the postscriptum column
* @method array findByCreatedAt(string $created_at) Return FolderDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return FolderDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseFolderDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseFolderDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\FolderDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new FolderDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param FolderDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return FolderDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof FolderDescQuery) {
return $criteria;
}
$query = new FolderDescQuery();
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 PropelPDO $con an optional connection object
*
* @return FolderDesc|FolderDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = FolderDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(FolderDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return FolderDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `FOLDER_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `POSTSCRIPTUM`, `CREATED_AT`, `UPDATED_AT` FROM `folder_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new FolderDesc();
$obj->hydrate($row);
FolderDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return FolderDesc|FolderDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|FolderDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(FolderDescPeer::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 FolderDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(FolderDescPeer::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 FolderDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(FolderDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the folder_id column
*
* Example usage:
* <code>
* $query->filterByFolderId(1234); // WHERE folder_id = 1234
* $query->filterByFolderId(array(12, 34)); // WHERE folder_id IN (12, 34)
* $query->filterByFolderId(array('min' => 12)); // WHERE folder_id > 12
* </code>
*
* @see filterByFolder()
*
* @param mixed $folderId 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 FolderDescQuery The current query, for fluid interface
*/
public function filterByFolderId($folderId = null, $comparison = null)
{
if (is_array($folderId)) {
$useMinMax = false;
if (isset($folderId['min'])) {
$this->addUsingAlias(FolderDescPeer::FOLDER_ID, $folderId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($folderId['max'])) {
$this->addUsingAlias(FolderDescPeer::FOLDER_ID, $folderId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FolderDescPeer::FOLDER_ID, $folderId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 FolderDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FolderDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FolderDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FolderDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FolderDescPeer::CHAPO, $chapo, $comparison);
}
/**
* Filter the query on the postscriptum column
*
* Example usage:
* <code>
* $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue'
* $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%'
* </code>
*
* @param string $postscriptum The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function filterByPostscriptum($postscriptum = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($postscriptum)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $postscriptum)) {
$postscriptum = str_replace('*', '%', $postscriptum);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(FolderDescPeer::POSTSCRIPTUM, $postscriptum, $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 FolderDescQuery 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(FolderDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(FolderDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FolderDescPeer::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 FolderDescQuery 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(FolderDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(FolderDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(FolderDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Folder object
*
* @param Folder|PropelObjectCollection $folder The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return FolderDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByFolder($folder, $comparison = null)
{
if ($folder instanceof Folder) {
return $this
->addUsingAlias(FolderDescPeer::FOLDER_ID, $folder->getId(), $comparison);
} elseif ($folder instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(FolderDescPeer::FOLDER_ID, $folder->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByFolder() only accepts arguments of type Folder or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Folder relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function joinFolder($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Folder');
// 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, 'Folder');
}
return $this;
}
/**
* Use the Folder relation Folder 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\FolderQuery A secondary query class using the current class as primary query
*/
public function useFolderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinFolder($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Folder', '\Thelia\Model\FolderQuery');
}
/**
* Exclude object from result
*
* @param FolderDesc $folderDesc Object to remove from the list of results
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function prune($folderDesc = null)
{
if ($folderDesc) {
$this->addUsingAlias(FolderDescPeer::ID, $folderDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(FolderDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(FolderDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(FolderDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(FolderDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(FolderDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return FolderDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(FolderDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Group;
use Thelia\Model\GroupDesc;
use Thelia\Model\GroupDescPeer;
use Thelia\Model\GroupDescQuery;
/**
* Base class that represents a query for the 'group_desc' table.
*
*
*
* @method GroupDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method GroupDescQuery orderByGroupId($order = Criteria::ASC) Order by the group_id column
* @method GroupDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method GroupDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method GroupDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method GroupDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method GroupDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method GroupDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method GroupDescQuery groupById() Group by the id column
* @method GroupDescQuery groupByGroupId() Group by the group_id column
* @method GroupDescQuery groupByLang() Group by the lang column
* @method GroupDescQuery groupByTitle() Group by the title column
* @method GroupDescQuery groupByDescription() Group by the description column
* @method GroupDescQuery groupByChapo() Group by the chapo column
* @method GroupDescQuery groupByCreatedAt() Group by the created_at column
* @method GroupDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method GroupDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method GroupDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method GroupDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method GroupDescQuery leftJoinGroup($relationAlias = null) Adds a LEFT JOIN clause to the query using the Group relation
* @method GroupDescQuery rightJoinGroup($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Group relation
* @method GroupDescQuery innerJoinGroup($relationAlias = null) Adds a INNER JOIN clause to the query using the Group relation
*
* @method GroupDesc findOne(PropelPDO $con = null) Return the first GroupDesc matching the query
* @method GroupDesc findOneOrCreate(PropelPDO $con = null) Return the first GroupDesc matching the query, or a new GroupDesc object populated from the query conditions when no match is found
*
* @method GroupDesc findOneById(int $id) Return the first GroupDesc filtered by the id column
* @method GroupDesc findOneByGroupId(int $group_id) Return the first GroupDesc filtered by the group_id column
* @method GroupDesc findOneByLang(string $lang) Return the first GroupDesc filtered by the lang column
* @method GroupDesc findOneByTitle(string $title) Return the first GroupDesc filtered by the title column
* @method GroupDesc findOneByDescription(string $description) Return the first GroupDesc filtered by the description column
* @method GroupDesc findOneByChapo(string $chapo) Return the first GroupDesc filtered by the chapo column
* @method GroupDesc findOneByCreatedAt(string $created_at) Return the first GroupDesc filtered by the created_at column
* @method GroupDesc findOneByUpdatedAt(string $updated_at) Return the first GroupDesc filtered by the updated_at column
*
* @method array findById(int $id) Return GroupDesc objects filtered by the id column
* @method array findByGroupId(int $group_id) Return GroupDesc objects filtered by the group_id column
* @method array findByLang(string $lang) Return GroupDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return GroupDesc objects filtered by the title column
* @method array findByDescription(string $description) Return GroupDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return GroupDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return GroupDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return GroupDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseGroupDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseGroupDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\GroupDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new GroupDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param GroupDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return GroupDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof GroupDescQuery) {
return $criteria;
}
$query = new GroupDescQuery();
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 PropelPDO $con an optional connection object
*
* @return GroupDesc|GroupDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = GroupDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(GroupDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return GroupDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `GROUP_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `group_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new GroupDesc();
$obj->hydrate($row);
GroupDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return GroupDesc|GroupDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|GroupDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(GroupDescPeer::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 GroupDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(GroupDescPeer::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 GroupDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(GroupDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the group_id column
*
* Example usage:
* <code>
* $query->filterByGroupId(1234); // WHERE group_id = 1234
* $query->filterByGroupId(array(12, 34)); // WHERE group_id IN (12, 34)
* $query->filterByGroupId(array('min' => 12)); // WHERE group_id > 12
* </code>
*
* @see filterByGroup()
*
* @param mixed $groupId 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 GroupDescQuery The current query, for fluid interface
*/
public function filterByGroupId($groupId = null, $comparison = null)
{
if (is_array($groupId)) {
$useMinMax = false;
if (isset($groupId['min'])) {
$this->addUsingAlias(GroupDescPeer::GROUP_ID, $groupId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($groupId['max'])) {
$this->addUsingAlias(GroupDescPeer::GROUP_ID, $groupId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GroupDescPeer::GROUP_ID, $groupId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 GroupDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(GroupDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(GroupDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(GroupDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(GroupDescPeer::CHAPO, $chapo, $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 GroupDescQuery 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(GroupDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(GroupDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GroupDescPeer::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 GroupDescQuery 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(GroupDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(GroupDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(GroupDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Group object
*
* @param Group|PropelObjectCollection $group The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return GroupDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByGroup($group, $comparison = null)
{
if ($group instanceof Group) {
return $this
->addUsingAlias(GroupDescPeer::GROUP_ID, $group->getId(), $comparison);
} elseif ($group instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(GroupDescPeer::GROUP_ID, $group->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByGroup() only accepts arguments of type Group or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Group relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function joinGroup($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Group');
// 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, 'Group');
}
return $this;
}
/**
* Use the Group relation Group 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\GroupQuery A secondary query class using the current class as primary query
*/
public function useGroupQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinGroup($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Group', '\Thelia\Model\GroupQuery');
}
/**
* Exclude object from result
*
* @param GroupDesc $groupDesc Object to remove from the list of results
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function prune($groupDesc = null)
{
if ($groupDesc) {
$this->addUsingAlias(GroupDescPeer::ID, $groupDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(GroupDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(GroupDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(GroupDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(GroupDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(GroupDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return GroupDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(GroupDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,645 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Image;
use Thelia\Model\ImageDesc;
use Thelia\Model\ImageDescPeer;
use Thelia\Model\ImageDescQuery;
/**
* Base class that represents a query for the 'image_desc' table.
*
*
*
* @method ImageDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method ImageDescQuery orderByImageId($order = Criteria::ASC) Order by the image_id column
* @method ImageDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method ImageDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ImageDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method ImageDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ImageDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ImageDescQuery groupById() Group by the id column
* @method ImageDescQuery groupByImageId() Group by the image_id column
* @method ImageDescQuery groupByTitle() Group by the title column
* @method ImageDescQuery groupByDescription() Group by the description column
* @method ImageDescQuery groupByChapo() Group by the chapo column
* @method ImageDescQuery groupByCreatedAt() Group by the created_at column
* @method ImageDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method ImageDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ImageDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ImageDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ImageDescQuery leftJoinImage($relationAlias = null) Adds a LEFT JOIN clause to the query using the Image relation
* @method ImageDescQuery rightJoinImage($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Image relation
* @method ImageDescQuery innerJoinImage($relationAlias = null) Adds a INNER JOIN clause to the query using the Image relation
*
* @method ImageDesc findOne(PropelPDO $con = null) Return the first ImageDesc matching the query
* @method ImageDesc findOneOrCreate(PropelPDO $con = null) Return the first ImageDesc matching the query, or a new ImageDesc object populated from the query conditions when no match is found
*
* @method ImageDesc findOneById(int $id) Return the first ImageDesc filtered by the id column
* @method ImageDesc findOneByImageId(int $image_id) Return the first ImageDesc filtered by the image_id column
* @method ImageDesc findOneByTitle(string $title) Return the first ImageDesc filtered by the title column
* @method ImageDesc findOneByDescription(string $description) Return the first ImageDesc filtered by the description column
* @method ImageDesc findOneByChapo(string $chapo) Return the first ImageDesc filtered by the chapo column
* @method ImageDesc findOneByCreatedAt(string $created_at) Return the first ImageDesc filtered by the created_at column
* @method ImageDesc findOneByUpdatedAt(string $updated_at) Return the first ImageDesc filtered by the updated_at column
*
* @method array findById(int $id) Return ImageDesc objects filtered by the id column
* @method array findByImageId(int $image_id) Return ImageDesc objects filtered by the image_id column
* @method array findByTitle(string $title) Return ImageDesc objects filtered by the title column
* @method array findByDescription(string $description) Return ImageDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return ImageDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return ImageDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ImageDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseImageDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseImageDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ImageDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ImageDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param ImageDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return ImageDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof ImageDescQuery) {
return $criteria;
}
$query = new ImageDescQuery();
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 PropelPDO $con an optional connection object
*
* @return ImageDesc|ImageDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = ImageDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(ImageDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return ImageDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `IMAGE_ID`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `image_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new ImageDesc();
$obj->hydrate($row);
ImageDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return ImageDesc|ImageDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|ImageDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(ImageDescPeer::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 ImageDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(ImageDescPeer::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 ImageDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(ImageDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the image_id column
*
* Example usage:
* <code>
* $query->filterByImageId(1234); // WHERE image_id = 1234
* $query->filterByImageId(array(12, 34)); // WHERE image_id IN (12, 34)
* $query->filterByImageId(array('min' => 12)); // WHERE image_id > 12
* </code>
*
* @see filterByImage()
*
* @param mixed $imageId 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 ImageDescQuery The current query, for fluid interface
*/
public function filterByImageId($imageId = null, $comparison = null)
{
if (is_array($imageId)) {
$useMinMax = false;
if (isset($imageId['min'])) {
$this->addUsingAlias(ImageDescPeer::IMAGE_ID, $imageId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($imageId['max'])) {
$this->addUsingAlias(ImageDescPeer::IMAGE_ID, $imageId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ImageDescPeer::IMAGE_ID, $imageId, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ImageDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ImageDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ImageDescPeer::CHAPO, $chapo, $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 ImageDescQuery 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(ImageDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(ImageDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ImageDescPeer::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 ImageDescQuery 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(ImageDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(ImageDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ImageDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Image object
*
* @param Image|PropelObjectCollection $image The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ImageDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByImage($image, $comparison = null)
{
if ($image instanceof Image) {
return $this
->addUsingAlias(ImageDescPeer::IMAGE_ID, $image->getId(), $comparison);
} elseif ($image instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(ImageDescPeer::IMAGE_ID, $image->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByImage() only accepts arguments of type Image or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Image relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function joinImage($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Image');
// 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, 'Image');
}
return $this;
}
/**
* Use the Image relation Image 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\ImageQuery A secondary query class using the current class as primary query
*/
public function useImageQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinImage($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Image', '\Thelia\Model\ImageQuery');
}
/**
* Exclude object from result
*
* @param ImageDesc $imageDesc Object to remove from the list of results
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function prune($imageDesc = null)
{
if ($imageDesc) {
$this->addUsingAlias(ImageDescPeer::ID, $imageDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(ImageDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(ImageDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(ImageDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(ImageDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(ImageDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return ImageDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(ImageDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Message;
use Thelia\Model\MessageDesc;
use Thelia\Model\MessageDescPeer;
use Thelia\Model\MessageDescQuery;
/**
* Base class that represents a query for the 'message_desc' table.
*
*
*
* @method MessageDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method MessageDescQuery orderByMessageId($order = Criteria::ASC) Order by the message_id column
* @method MessageDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method MessageDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method MessageDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method MessageDescQuery orderByDescriptionHtml($order = Criteria::ASC) Order by the description_html column
* @method MessageDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method MessageDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method MessageDescQuery groupById() Group by the id column
* @method MessageDescQuery groupByMessageId() Group by the message_id column
* @method MessageDescQuery groupByLang() Group by the lang column
* @method MessageDescQuery groupByTitle() Group by the title column
* @method MessageDescQuery groupByDescription() Group by the description column
* @method MessageDescQuery groupByDescriptionHtml() Group by the description_html column
* @method MessageDescQuery groupByCreatedAt() Group by the created_at column
* @method MessageDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method MessageDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method MessageDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method MessageDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method MessageDescQuery leftJoinMessage($relationAlias = null) Adds a LEFT JOIN clause to the query using the Message relation
* @method MessageDescQuery rightJoinMessage($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Message relation
* @method MessageDescQuery innerJoinMessage($relationAlias = null) Adds a INNER JOIN clause to the query using the Message relation
*
* @method MessageDesc findOne(PropelPDO $con = null) Return the first MessageDesc matching the query
* @method MessageDesc findOneOrCreate(PropelPDO $con = null) Return the first MessageDesc matching the query, or a new MessageDesc object populated from the query conditions when no match is found
*
* @method MessageDesc findOneById(int $id) Return the first MessageDesc filtered by the id column
* @method MessageDesc findOneByMessageId(int $message_id) Return the first MessageDesc filtered by the message_id column
* @method MessageDesc findOneByLang(string $lang) Return the first MessageDesc filtered by the lang column
* @method MessageDesc findOneByTitle(string $title) Return the first MessageDesc filtered by the title column
* @method MessageDesc findOneByDescription(string $description) Return the first MessageDesc filtered by the description column
* @method MessageDesc findOneByDescriptionHtml(string $description_html) Return the first MessageDesc filtered by the description_html column
* @method MessageDesc findOneByCreatedAt(string $created_at) Return the first MessageDesc filtered by the created_at column
* @method MessageDesc findOneByUpdatedAt(string $updated_at) Return the first MessageDesc filtered by the updated_at column
*
* @method array findById(int $id) Return MessageDesc objects filtered by the id column
* @method array findByMessageId(int $message_id) Return MessageDesc objects filtered by the message_id column
* @method array findByLang(string $lang) Return MessageDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return MessageDesc objects filtered by the title column
* @method array findByDescription(string $description) Return MessageDesc objects filtered by the description column
* @method array findByDescriptionHtml(string $description_html) Return MessageDesc objects filtered by the description_html column
* @method array findByCreatedAt(string $created_at) Return MessageDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return MessageDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseMessageDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseMessageDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\MessageDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new MessageDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param MessageDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return MessageDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof MessageDescQuery) {
return $criteria;
}
$query = new MessageDescQuery();
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 PropelPDO $con an optional connection object
*
* @return MessageDesc|MessageDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = MessageDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(MessageDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return MessageDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `MESSAGE_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `DESCRIPTION_HTML`, `CREATED_AT`, `UPDATED_AT` FROM `message_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new MessageDesc();
$obj->hydrate($row);
MessageDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return MessageDesc|MessageDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|MessageDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(MessageDescPeer::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 MessageDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(MessageDescPeer::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 MessageDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(MessageDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the message_id column
*
* Example usage:
* <code>
* $query->filterByMessageId(1234); // WHERE message_id = 1234
* $query->filterByMessageId(array(12, 34)); // WHERE message_id IN (12, 34)
* $query->filterByMessageId(array('min' => 12)); // WHERE message_id > 12
* </code>
*
* @see filterByMessage()
*
* @param mixed $messageId 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 MessageDescQuery The current query, for fluid interface
*/
public function filterByMessageId($messageId = null, $comparison = null)
{
if (is_array($messageId)) {
$useMinMax = false;
if (isset($messageId['min'])) {
$this->addUsingAlias(MessageDescPeer::MESSAGE_ID, $messageId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($messageId['max'])) {
$this->addUsingAlias(MessageDescPeer::MESSAGE_ID, $messageId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MessageDescPeer::MESSAGE_ID, $messageId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 MessageDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the description_html column
*
* Example usage:
* <code>
* $query->filterByDescriptionHtml('fooValue'); // WHERE description_html = 'fooValue'
* $query->filterByDescriptionHtml('%fooValue%'); // WHERE description_html LIKE '%fooValue%'
* </code>
*
* @param string $descriptionHtml 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 MessageDescQuery The current query, for fluid interface
*/
public function filterByDescriptionHtml($descriptionHtml = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($descriptionHtml)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $descriptionHtml)) {
$descriptionHtml = str_replace('*', '%', $descriptionHtml);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(MessageDescPeer::DESCRIPTION_HTML, $descriptionHtml, $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 MessageDescQuery 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(MessageDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(MessageDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MessageDescPeer::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 MessageDescQuery 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(MessageDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(MessageDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(MessageDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Message object
*
* @param Message|PropelObjectCollection $message The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return MessageDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByMessage($message, $comparison = null)
{
if ($message instanceof Message) {
return $this
->addUsingAlias(MessageDescPeer::MESSAGE_ID, $message->getId(), $comparison);
} elseif ($message instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(MessageDescPeer::MESSAGE_ID, $message->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByMessage() only accepts arguments of type Message or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Message relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function joinMessage($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Message');
// 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, 'Message');
}
return $this;
}
/**
* Use the Message relation Message 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\MessageQuery A secondary query class using the current class as primary query
*/
public function useMessageQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinMessage($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Message', '\Thelia\Model\MessageQuery');
}
/**
* Exclude object from result
*
* @param MessageDesc $messageDesc Object to remove from the list of results
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function prune($messageDesc = null)
{
if ($messageDesc) {
$this->addUsingAlias(MessageDescPeer::ID, $messageDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(MessageDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(MessageDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(MessageDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(MessageDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(MessageDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return MessageDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(MessageDescPeer::CREATED_AT);
}
}

View File

@@ -64,10 +64,10 @@ abstract class BaseModule extends BaseObject implements Persistent
protected $code;
/**
* The value for the type field.
* The value for the type field.
* @var int
*/
protected $ type;
protected $type;
/**
* The value for the activate field.
@@ -172,13 +172,13 @@ abstract class BaseModule extends BaseObject implements Persistent
}
/**
* Get the [ type] column value.
* Get the [type] column value.
*
* @return int
*/
public function get type()
public function getType()
{
return $this-> type;
return $this->type;
}
/**
@@ -324,25 +324,25 @@ abstract class BaseModule extends BaseObject implements Persistent
} // setCode()
/**
* Set the value of [ type] column.
* Set the value of [type] column.
*
* @param int $v new value
* @return Module The current object (for fluent API support)
*/
public function set type($v)
public function setType($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this-> type !== $v) {
$this-> type = $v;
$this->modifiedColumns[] = ModulePeer:: TYPE;
if ($this->type !== $v) {
$this->type = $v;
$this->modifiedColumns[] = ModulePeer::TYPE;
}
return $this;
} // set type()
} // setType()
/**
* Set the value of [activate] column.
@@ -466,7 +466,7 @@ abstract class BaseModule extends BaseObject implements Persistent
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->code = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this-> type = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
$this->type = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
$this->activate = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
$this->position = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
$this->created_at = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
@@ -743,8 +743,8 @@ abstract class BaseModule extends BaseObject implements Persistent
if ($this->isColumnModified(ModulePeer::CODE)) {
$modifiedColumns[':p' . $index++] = '`code`';
}
if ($this->isColumnModified(ModulePeer:: TYPE)) {
$modifiedColumns[':p' . $index++] = '` type`';
if ($this->isColumnModified(ModulePeer::TYPE)) {
$modifiedColumns[':p' . $index++] = '`type`';
}
if ($this->isColumnModified(ModulePeer::ACTIVATE)) {
$modifiedColumns[':p' . $index++] = '`activate`';
@@ -775,8 +775,8 @@ abstract class BaseModule extends BaseObject implements Persistent
case '`code`':
$stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
break;
case '` type`':
$stmt->bindValue($identifier, $this-> type, PDO::PARAM_INT);
case '`type`':
$stmt->bindValue($identifier, $this->type, PDO::PARAM_INT);
break;
case '`activate`':
$stmt->bindValue($identifier, $this->activate, PDO::PARAM_INT);
@@ -940,7 +940,7 @@ abstract class BaseModule extends BaseObject implements Persistent
return $this->getCode();
break;
case 2:
return $this->get type();
return $this->getType();
break;
case 3:
return $this->getActivate();
@@ -985,7 +985,7 @@ abstract class BaseModule extends BaseObject implements Persistent
$result = array(
$keys[0] => $this->getId(),
$keys[1] => $this->getCode(),
$keys[2] => $this->get type(),
$keys[2] => $this->getType(),
$keys[3] => $this->getActivate(),
$keys[4] => $this->getPosition(),
$keys[5] => $this->getCreatedAt(),
@@ -1039,7 +1039,7 @@ abstract class BaseModule extends BaseObject implements Persistent
$this->setCode($value);
break;
case 2:
$this->set type($value);
$this->setType($value);
break;
case 3:
$this->setActivate($value);
@@ -1079,7 +1079,7 @@ abstract class BaseModule extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->set type($arr[$keys[2]]);
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setActivate($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setPosition($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]);
@@ -1097,7 +1097,7 @@ abstract class BaseModule extends BaseObject implements Persistent
if ($this->isColumnModified(ModulePeer::ID)) $criteria->add(ModulePeer::ID, $this->id);
if ($this->isColumnModified(ModulePeer::CODE)) $criteria->add(ModulePeer::CODE, $this->code);
if ($this->isColumnModified(ModulePeer:: TYPE)) $criteria->add(ModulePeer:: TYPE, $this-> type);
if ($this->isColumnModified(ModulePeer::TYPE)) $criteria->add(ModulePeer::TYPE, $this->type);
if ($this->isColumnModified(ModulePeer::ACTIVATE)) $criteria->add(ModulePeer::ACTIVATE, $this->activate);
if ($this->isColumnModified(ModulePeer::POSITION)) $criteria->add(ModulePeer::POSITION, $this->position);
if ($this->isColumnModified(ModulePeer::CREATED_AT)) $criteria->add(ModulePeer::CREATED_AT, $this->created_at);
@@ -1166,7 +1166,7 @@ abstract class BaseModule extends BaseObject implements Persistent
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setCode($this->getCode());
$copyObj->set type($this->get type());
$copyObj->setType($this->getType());
$copyObj->setActivate($this->getActivate());
$copyObj->setPosition($this->getPosition());
$copyObj->setCreatedAt($this->getCreatedAt());
@@ -1732,7 +1732,7 @@ abstract class BaseModule extends BaseObject implements Persistent
{
$this->id = null;
$this->code = null;
$this-> type = null;
$this->type = null;
$this->activate = null;
$this->position = null;
$this->created_at = null;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,723 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Module;
use Thelia\Model\ModuleDesc;
use Thelia\Model\ModuleDescPeer;
use Thelia\Model\ModuleDescQuery;
/**
* Base class that represents a query for the 'module_desc' table.
*
*
*
* @method ModuleDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method ModuleDescQuery orderByModuleId($order = Criteria::ASC) Order by the module_id column
* @method ModuleDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method ModuleDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method ModuleDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ModuleDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method ModuleDescQuery orderByCurrencyId($order = Criteria::ASC) Order by the currency_id column
* @method ModuleDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ModuleDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ModuleDescQuery groupById() Group by the id column
* @method ModuleDescQuery groupByModuleId() Group by the module_id column
* @method ModuleDescQuery groupByLang() Group by the lang column
* @method ModuleDescQuery groupByTitle() Group by the title column
* @method ModuleDescQuery groupByDescription() Group by the description column
* @method ModuleDescQuery groupByChapo() Group by the chapo column
* @method ModuleDescQuery groupByCurrencyId() Group by the currency_id column
* @method ModuleDescQuery groupByCreatedAt() Group by the created_at column
* @method ModuleDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method ModuleDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ModuleDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ModuleDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ModuleDescQuery leftJoinModule($relationAlias = null) Adds a LEFT JOIN clause to the query using the Module relation
* @method ModuleDescQuery rightJoinModule($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Module relation
* @method ModuleDescQuery innerJoinModule($relationAlias = null) Adds a INNER JOIN clause to the query using the Module relation
*
* @method ModuleDesc findOne(PropelPDO $con = null) Return the first ModuleDesc matching the query
* @method ModuleDesc findOneOrCreate(PropelPDO $con = null) Return the first ModuleDesc matching the query, or a new ModuleDesc object populated from the query conditions when no match is found
*
* @method ModuleDesc findOneById(int $id) Return the first ModuleDesc filtered by the id column
* @method ModuleDesc findOneByModuleId(int $module_id) Return the first ModuleDesc filtered by the module_id column
* @method ModuleDesc findOneByLang(string $lang) Return the first ModuleDesc filtered by the lang column
* @method ModuleDesc findOneByTitle(string $title) Return the first ModuleDesc filtered by the title column
* @method ModuleDesc findOneByDescription(string $description) Return the first ModuleDesc filtered by the description column
* @method ModuleDesc findOneByChapo(string $chapo) Return the first ModuleDesc filtered by the chapo column
* @method ModuleDesc findOneByCurrencyId(int $currency_id) Return the first ModuleDesc filtered by the currency_id column
* @method ModuleDesc findOneByCreatedAt(string $created_at) Return the first ModuleDesc filtered by the created_at column
* @method ModuleDesc findOneByUpdatedAt(string $updated_at) Return the first ModuleDesc filtered by the updated_at column
*
* @method array findById(int $id) Return ModuleDesc objects filtered by the id column
* @method array findByModuleId(int $module_id) Return ModuleDesc objects filtered by the module_id column
* @method array findByLang(string $lang) Return ModuleDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return ModuleDesc objects filtered by the title column
* @method array findByDescription(string $description) Return ModuleDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return ModuleDesc objects filtered by the chapo column
* @method array findByCurrencyId(int $currency_id) Return ModuleDesc objects filtered by the currency_id column
* @method array findByCreatedAt(string $created_at) Return ModuleDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ModuleDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseModuleDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseModuleDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ModuleDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ModuleDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param ModuleDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return ModuleDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof ModuleDescQuery) {
return $criteria;
}
$query = new ModuleDescQuery();
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 PropelPDO $con an optional connection object
*
* @return ModuleDesc|ModuleDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = ModuleDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(ModuleDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return ModuleDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `MODULE_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CURRENCY_ID`, `CREATED_AT`, `UPDATED_AT` FROM `module_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new ModuleDesc();
$obj->hydrate($row);
ModuleDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return ModuleDesc|ModuleDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|ModuleDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(ModuleDescPeer::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 ModuleDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(ModuleDescPeer::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 ModuleDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(ModuleDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the module_id column
*
* Example usage:
* <code>
* $query->filterByModuleId(1234); // WHERE module_id = 1234
* $query->filterByModuleId(array(12, 34)); // WHERE module_id IN (12, 34)
* $query->filterByModuleId(array('min' => 12)); // WHERE module_id > 12
* </code>
*
* @see filterByModule()
*
* @param mixed $moduleId 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 ModuleDescQuery The current query, for fluid interface
*/
public function filterByModuleId($moduleId = null, $comparison = null)
{
if (is_array($moduleId)) {
$useMinMax = false;
if (isset($moduleId['min'])) {
$this->addUsingAlias(ModuleDescPeer::MODULE_ID, $moduleId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($moduleId['max'])) {
$this->addUsingAlias(ModuleDescPeer::MODULE_ID, $moduleId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ModuleDescPeer::MODULE_ID, $moduleId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 ModuleDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ModuleDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ModuleDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ModuleDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ModuleDescPeer::CHAPO, $chapo, $comparison);
}
/**
* Filter the query on the currency_id column
*
* Example usage:
* <code>
* $query->filterByCurrencyId(1234); // WHERE currency_id = 1234
* $query->filterByCurrencyId(array(12, 34)); // WHERE currency_id IN (12, 34)
* $query->filterByCurrencyId(array('min' => 12)); // WHERE currency_id > 12
* </code>
*
* @param mixed $currencyId 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 ModuleDescQuery The current query, for fluid interface
*/
public function filterByCurrencyId($currencyId = null, $comparison = null)
{
if (is_array($currencyId)) {
$useMinMax = false;
if (isset($currencyId['min'])) {
$this->addUsingAlias(ModuleDescPeer::CURRENCY_ID, $currencyId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($currencyId['max'])) {
$this->addUsingAlias(ModuleDescPeer::CURRENCY_ID, $currencyId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ModuleDescPeer::CURRENCY_ID, $currencyId, $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 ModuleDescQuery 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(ModuleDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(ModuleDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ModuleDescPeer::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 ModuleDescQuery 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(ModuleDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(ModuleDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ModuleDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Module object
*
* @param Module|PropelObjectCollection $module The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ModuleDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByModule($module, $comparison = null)
{
if ($module instanceof Module) {
return $this
->addUsingAlias(ModuleDescPeer::MODULE_ID, $module->getId(), $comparison);
} elseif ($module instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(ModuleDescPeer::MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByModule() only accepts arguments of type Module or PropelCollection');
}
}
/**
* 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 ModuleDescQuery 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 ModuleDesc $moduleDesc Object to remove from the list of results
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function prune($moduleDesc = null)
{
if ($moduleDesc) {
$this->addUsingAlias(ModuleDescPeer::ID, $moduleDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(ModuleDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(ModuleDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(ModuleDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(ModuleDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(ModuleDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return ModuleDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(ModuleDescPeer::CREATED_AT);
}
}

View File

@@ -52,8 +52,8 @@ abstract class BaseModulePeer
/** the column name for the code field */
const CODE = 'module.code';
/** the column name for the type field */
const TYPE = 'module. type';
/** the column name for the type field */
const TYPE = 'module.type';
/** the column name for the activate field */
const ACTIVATE = 'module.activate';
@@ -93,11 +93,11 @@ abstract class BaseModulePeer
* e.g. ModulePeer::$fieldNames[ModulePeer::TYPE_PHPNAME][0] = 'Id'
*/
protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('Id', 'Code', ' type', 'Activate', 'Position', 'CreatedAt', 'UpdatedAt', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'code', ' type', 'activate', 'position', 'createdAt', 'updatedAt', ),
BasePeer::TYPE_COLNAME => array (ModulePeer::ID, ModulePeer::CODE, ModulePeer:: TYPE, ModulePeer::ACTIVATE, ModulePeer::POSITION, ModulePeer::CREATED_AT, ModulePeer::UPDATED_AT, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'CODE', ' TYPE', 'ACTIVATE', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'code', ' type', 'activate', 'position', 'created_at', 'updated_at', ),
BasePeer::TYPE_PHPNAME => array ('Id', 'Code', 'Type', 'Activate', 'Position', 'CreatedAt', 'UpdatedAt', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'code', 'type', 'activate', 'position', 'createdAt', 'updatedAt', ),
BasePeer::TYPE_COLNAME => array (ModulePeer::ID, ModulePeer::CODE, ModulePeer::TYPE, ModulePeer::ACTIVATE, ModulePeer::POSITION, ModulePeer::CREATED_AT, ModulePeer::UPDATED_AT, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'CODE', 'TYPE', 'ACTIVATE', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'code', 'type', 'activate', 'position', 'created_at', 'updated_at', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
@@ -108,11 +108,11 @@ abstract class BaseModulePeer
* e.g. ModulePeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Code' => 1, ' type' => 2, 'Activate' => 3, 'Position' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'code' => 1, ' type' => 2, 'activate' => 3, 'position' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
BasePeer::TYPE_COLNAME => array (ModulePeer::ID => 0, ModulePeer::CODE => 1, ModulePeer:: TYPE => 2, ModulePeer::ACTIVATE => 3, ModulePeer::POSITION => 4, ModulePeer::CREATED_AT => 5, ModulePeer::UPDATED_AT => 6, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'CODE' => 1, ' TYPE' => 2, 'ACTIVATE' => 3, 'POSITION' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'code' => 1, ' type' => 2, 'activate' => 3, 'position' => 4, 'created_at' => 5, 'updated_at' => 6, ),
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Code' => 1, 'Type' => 2, 'Activate' => 3, 'Position' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'code' => 1, 'type' => 2, 'activate' => 3, 'position' => 4, 'createdAt' => 5, 'updatedAt' => 6, ),
BasePeer::TYPE_COLNAME => array (ModulePeer::ID => 0, ModulePeer::CODE => 1, ModulePeer::TYPE => 2, ModulePeer::ACTIVATE => 3, ModulePeer::POSITION => 4, ModulePeer::CREATED_AT => 5, ModulePeer::UPDATED_AT => 6, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'ACTIVATE' => 3, 'POSITION' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'code' => 1, 'type' => 2, 'activate' => 3, 'position' => 4, 'created_at' => 5, 'updated_at' => 6, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
@@ -189,7 +189,7 @@ abstract class BaseModulePeer
if (null === $alias) {
$criteria->addSelectColumn(ModulePeer::ID);
$criteria->addSelectColumn(ModulePeer::CODE);
$criteria->addSelectColumn(ModulePeer:: TYPE);
$criteria->addSelectColumn(ModulePeer::TYPE);
$criteria->addSelectColumn(ModulePeer::ACTIVATE);
$criteria->addSelectColumn(ModulePeer::POSITION);
$criteria->addSelectColumn(ModulePeer::CREATED_AT);
@@ -197,7 +197,7 @@ abstract class BaseModulePeer
} else {
$criteria->addSelectColumn($alias . '.id');
$criteria->addSelectColumn($alias . '.code');
$criteria->addSelectColumn($alias . '. type');
$criteria->addSelectColumn($alias . '.type');
$criteria->addSelectColumn($alias . '.activate');
$criteria->addSelectColumn($alias . '.position');
$criteria->addSelectColumn($alias . '.created_at');

View File

@@ -25,7 +25,7 @@ use Thelia\Model\ModuleQuery;
*
* @method ModuleQuery orderById($order = Criteria::ASC) Order by the id column
* @method ModuleQuery orderByCode($order = Criteria::ASC) Order by the code column
* @method ModuleQuery orderBy type($order = Criteria::ASC) Order by the type column
* @method ModuleQuery orderByType($order = Criteria::ASC) Order by the type column
* @method ModuleQuery orderByActivate($order = Criteria::ASC) Order by the activate column
* @method ModuleQuery orderByPosition($order = Criteria::ASC) Order by the position column
* @method ModuleQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
@@ -33,7 +33,7 @@ use Thelia\Model\ModuleQuery;
*
* @method ModuleQuery groupById() Group by the id column
* @method ModuleQuery groupByCode() Group by the code column
* @method ModuleQuery groupBy type() Group by the type column
* @method ModuleQuery groupByType() Group by the type column
* @method ModuleQuery groupByActivate() Group by the activate column
* @method ModuleQuery groupByPosition() Group by the position column
* @method ModuleQuery groupByCreatedAt() Group by the created_at column
@@ -55,7 +55,7 @@ use Thelia\Model\ModuleQuery;
* @method Module findOneOrCreate(PropelPDO $con = null) Return the first Module matching the query, or a new Module object populated from the query conditions when no match is found
*
* @method Module findOneByCode(string $code) Return the first Module filtered by the code column
* @method Module findOneBy type(int $ type) Return the first Module filtered by the type column
* @method Module findOneByType(int $type) Return the first Module filtered by the type column
* @method Module findOneByActivate(int $activate) Return the first Module filtered by the activate column
* @method Module findOneByPosition(int $position) Return the first Module filtered by the position column
* @method Module findOneByCreatedAt(string $created_at) Return the first Module filtered by the created_at column
@@ -63,7 +63,7 @@ use Thelia\Model\ModuleQuery;
*
* @method array findById(int $id) Return Module objects filtered by the id column
* @method array findByCode(string $code) Return Module objects filtered by the code column
* @method array findBy type(int $ type) Return Module objects filtered by the type column
* @method array findByType(int $type) Return Module objects filtered by the type column
* @method array findByActivate(int $activate) Return Module objects filtered by the activate column
* @method array findByPosition(int $position) Return Module objects filtered by the position column
* @method array findByCreatedAt(string $created_at) Return Module objects filtered by the created_at column
@@ -171,7 +171,7 @@ abstract class BaseModuleQuery extends ModelCriteria
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `id`, `code`, ` type`, `activate`, `position`, `created_at`, `updated_at` FROM `module` WHERE `id` = :p0';
$sql = 'SELECT `id`, `code`, `type`, `activate`, `position`, `created_at`, `updated_at` FROM `module` WHERE `id` = :p0';
try {
$stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
@@ -332,17 +332,17 @@ abstract class BaseModuleQuery extends ModelCriteria
}
/**
* Filter the query on the type column
* Filter the query on the type column
*
* Example usage:
* <code>
* $query->filterBy type(1234); // WHERE type = 1234
* $query->filterBy type(array(12, 34)); // WHERE type IN (12, 34)
* $query->filterBy type(array('min' => 12)); // WHERE type >= 12
* $query->filterBy type(array('max' => 12)); // WHERE type <= 12
* $query->filterByType(1234); // WHERE type = 1234
* $query->filterByType(array(12, 34)); // WHERE type IN (12, 34)
* $query->filterByType(array('min' => 12)); // WHERE type >= 12
* $query->filterByType(array('max' => 12)); // WHERE type <= 12
* </code>
*
* @param mixed $ type The value to use as filter.
* @param mixed $type 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.
@@ -350,16 +350,16 @@ abstract class BaseModuleQuery extends ModelCriteria
*
* @return ModuleQuery The current query, for fluid interface
*/
public function filterBy type($ type = null, $comparison = null)
public function filterByType($type = null, $comparison = null)
{
if (is_array($ type)) {
if (is_array($type)) {
$useMinMax = false;
if (isset($ type['min'])) {
$this->addUsingAlias(ModulePeer:: TYPE, $ type['min'], Criteria::GREATER_EQUAL);
if (isset($type['min'])) {
$this->addUsingAlias(ModulePeer::TYPE, $type['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($ type['max'])) {
$this->addUsingAlias(ModulePeer:: TYPE, $ type['max'], Criteria::LESS_EQUAL);
if (isset($type['max'])) {
$this->addUsingAlias(ModulePeer::TYPE, $type['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
@@ -370,7 +370,7 @@ abstract class BaseModuleQuery extends ModelCriteria
}
}
return $this->addUsingAlias(ModulePeer:: TYPE, $ type, $comparison);
return $this->addUsingAlias(ModulePeer::TYPE, $type, $comparison);
}
/**

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,678 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\OrderStatus;
use Thelia\Model\OrderStatusDesc;
use Thelia\Model\OrderStatusDescPeer;
use Thelia\Model\OrderStatusDescQuery;
/**
* Base class that represents a query for the 'order_status_desc' table.
*
*
*
* @method OrderStatusDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method OrderStatusDescQuery orderByStatusId($order = Criteria::ASC) Order by the status_id column
* @method OrderStatusDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method OrderStatusDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method OrderStatusDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method OrderStatusDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method OrderStatusDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method OrderStatusDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method OrderStatusDescQuery groupById() Group by the id column
* @method OrderStatusDescQuery groupByStatusId() Group by the status_id column
* @method OrderStatusDescQuery groupByLang() Group by the lang column
* @method OrderStatusDescQuery groupByTitle() Group by the title column
* @method OrderStatusDescQuery groupByDescription() Group by the description column
* @method OrderStatusDescQuery groupByChapo() Group by the chapo column
* @method OrderStatusDescQuery groupByCreatedAt() Group by the created_at column
* @method OrderStatusDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method OrderStatusDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method OrderStatusDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method OrderStatusDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method OrderStatusDescQuery leftJoinOrderStatus($relationAlias = null) Adds a LEFT JOIN clause to the query using the OrderStatus relation
* @method OrderStatusDescQuery rightJoinOrderStatus($relationAlias = null) Adds a RIGHT JOIN clause to the query using the OrderStatus relation
* @method OrderStatusDescQuery innerJoinOrderStatus($relationAlias = null) Adds a INNER JOIN clause to the query using the OrderStatus relation
*
* @method OrderStatusDesc findOne(PropelPDO $con = null) Return the first OrderStatusDesc matching the query
* @method OrderStatusDesc findOneOrCreate(PropelPDO $con = null) Return the first OrderStatusDesc matching the query, or a new OrderStatusDesc object populated from the query conditions when no match is found
*
* @method OrderStatusDesc findOneById(int $id) Return the first OrderStatusDesc filtered by the id column
* @method OrderStatusDesc findOneByStatusId(int $status_id) Return the first OrderStatusDesc filtered by the status_id column
* @method OrderStatusDesc findOneByLang(string $lang) Return the first OrderStatusDesc filtered by the lang column
* @method OrderStatusDesc findOneByTitle(string $title) Return the first OrderStatusDesc filtered by the title column
* @method OrderStatusDesc findOneByDescription(string $description) Return the first OrderStatusDesc filtered by the description column
* @method OrderStatusDesc findOneByChapo(string $chapo) Return the first OrderStatusDesc filtered by the chapo column
* @method OrderStatusDesc findOneByCreatedAt(string $created_at) Return the first OrderStatusDesc filtered by the created_at column
* @method OrderStatusDesc findOneByUpdatedAt(string $updated_at) Return the first OrderStatusDesc filtered by the updated_at column
*
* @method array findById(int $id) Return OrderStatusDesc objects filtered by the id column
* @method array findByStatusId(int $status_id) Return OrderStatusDesc objects filtered by the status_id column
* @method array findByLang(string $lang) Return OrderStatusDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return OrderStatusDesc objects filtered by the title column
* @method array findByDescription(string $description) Return OrderStatusDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return OrderStatusDesc objects filtered by the chapo column
* @method array findByCreatedAt(string $created_at) Return OrderStatusDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return OrderStatusDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseOrderStatusDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseOrderStatusDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\OrderStatusDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new OrderStatusDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param OrderStatusDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return OrderStatusDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof OrderStatusDescQuery) {
return $criteria;
}
$query = new OrderStatusDescQuery();
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 PropelPDO $con an optional connection object
*
* @return OrderStatusDesc|OrderStatusDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = OrderStatusDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(OrderStatusDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return OrderStatusDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `STATUS_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `CREATED_AT`, `UPDATED_AT` FROM `order_status_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new OrderStatusDesc();
$obj->hydrate($row);
OrderStatusDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return OrderStatusDesc|OrderStatusDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|OrderStatusDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(OrderStatusDescPeer::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 OrderStatusDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(OrderStatusDescPeer::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 OrderStatusDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(OrderStatusDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the status_id column
*
* Example usage:
* <code>
* $query->filterByStatusId(1234); // WHERE status_id = 1234
* $query->filterByStatusId(array(12, 34)); // WHERE status_id IN (12, 34)
* $query->filterByStatusId(array('min' => 12)); // WHERE status_id > 12
* </code>
*
* @see filterByOrderStatus()
*
* @param mixed $statusId 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 OrderStatusDescQuery The current query, for fluid interface
*/
public function filterByStatusId($statusId = null, $comparison = null)
{
if (is_array($statusId)) {
$useMinMax = false;
if (isset($statusId['min'])) {
$this->addUsingAlias(OrderStatusDescPeer::STATUS_ID, $statusId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($statusId['max'])) {
$this->addUsingAlias(OrderStatusDescPeer::STATUS_ID, $statusId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(OrderStatusDescPeer::STATUS_ID, $statusId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 OrderStatusDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderStatusDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderStatusDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderStatusDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(OrderStatusDescPeer::CHAPO, $chapo, $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 OrderStatusDescQuery 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(OrderStatusDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(OrderStatusDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(OrderStatusDescPeer::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 OrderStatusDescQuery 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(OrderStatusDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(OrderStatusDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(OrderStatusDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related OrderStatus object
*
* @param OrderStatus|PropelObjectCollection $orderStatus The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return OrderStatusDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByOrderStatus($orderStatus, $comparison = null)
{
if ($orderStatus instanceof OrderStatus) {
return $this
->addUsingAlias(OrderStatusDescPeer::STATUS_ID, $orderStatus->getId(), $comparison);
} elseif ($orderStatus instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(OrderStatusDescPeer::STATUS_ID, $orderStatus->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByOrderStatus() only accepts arguments of type OrderStatus or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the OrderStatus relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function joinOrderStatus($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('OrderStatus');
// 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, 'OrderStatus');
}
return $this;
}
/**
* Use the OrderStatus relation OrderStatus 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\OrderStatusQuery A secondary query class using the current class as primary query
*/
public function useOrderStatusQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinOrderStatus($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'OrderStatus', '\Thelia\Model\OrderStatusQuery');
}
/**
* Exclude object from result
*
* @param OrderStatusDesc $orderStatusDesc Object to remove from the list of results
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function prune($orderStatusDesc = null)
{
if ($orderStatusDesc) {
$this->addUsingAlias(OrderStatusDescPeer::ID, $orderStatusDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(OrderStatusDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(OrderStatusDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(OrderStatusDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(OrderStatusDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(OrderStatusDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return OrderStatusDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(OrderStatusDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,711 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Product;
use Thelia\Model\ProductDesc;
use Thelia\Model\ProductDescPeer;
use Thelia\Model\ProductDescQuery;
/**
* Base class that represents a query for the 'product_desc' table.
*
*
*
* @method ProductDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method ProductDescQuery orderByProductId($order = Criteria::ASC) Order by the product_id column
* @method ProductDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method ProductDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method ProductDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method ProductDescQuery orderByChapo($order = Criteria::ASC) Order by the chapo column
* @method ProductDescQuery orderByPostscriptum($order = Criteria::ASC) Order by the postscriptum column
* @method ProductDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ProductDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ProductDescQuery groupById() Group by the id column
* @method ProductDescQuery groupByProductId() Group by the product_id column
* @method ProductDescQuery groupByLang() Group by the lang column
* @method ProductDescQuery groupByTitle() Group by the title column
* @method ProductDescQuery groupByDescription() Group by the description column
* @method ProductDescQuery groupByChapo() Group by the chapo column
* @method ProductDescQuery groupByPostscriptum() Group by the postscriptum column
* @method ProductDescQuery groupByCreatedAt() Group by the created_at column
* @method ProductDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method ProductDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ProductDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ProductDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ProductDescQuery leftJoinProduct($relationAlias = null) Adds a LEFT JOIN clause to the query using the Product relation
* @method ProductDescQuery rightJoinProduct($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Product relation
* @method ProductDescQuery innerJoinProduct($relationAlias = null) Adds a INNER JOIN clause to the query using the Product relation
*
* @method ProductDesc findOne(PropelPDO $con = null) Return the first ProductDesc matching the query
* @method ProductDesc findOneOrCreate(PropelPDO $con = null) Return the first ProductDesc matching the query, or a new ProductDesc object populated from the query conditions when no match is found
*
* @method ProductDesc findOneById(int $id) Return the first ProductDesc filtered by the id column
* @method ProductDesc findOneByProductId(int $product_id) Return the first ProductDesc filtered by the product_id column
* @method ProductDesc findOneByLang(string $lang) Return the first ProductDesc filtered by the lang column
* @method ProductDesc findOneByTitle(string $title) Return the first ProductDesc filtered by the title column
* @method ProductDesc findOneByDescription(string $description) Return the first ProductDesc filtered by the description column
* @method ProductDesc findOneByChapo(string $chapo) Return the first ProductDesc filtered by the chapo column
* @method ProductDesc findOneByPostscriptum(string $postscriptum) Return the first ProductDesc filtered by the postscriptum column
* @method ProductDesc findOneByCreatedAt(string $created_at) Return the first ProductDesc filtered by the created_at column
* @method ProductDesc findOneByUpdatedAt(string $updated_at) Return the first ProductDesc filtered by the updated_at column
*
* @method array findById(int $id) Return ProductDesc objects filtered by the id column
* @method array findByProductId(int $product_id) Return ProductDesc objects filtered by the product_id column
* @method array findByLang(string $lang) Return ProductDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return ProductDesc objects filtered by the title column
* @method array findByDescription(string $description) Return ProductDesc objects filtered by the description column
* @method array findByChapo(string $chapo) Return ProductDesc objects filtered by the chapo column
* @method array findByPostscriptum(string $postscriptum) Return ProductDesc objects filtered by the postscriptum column
* @method array findByCreatedAt(string $created_at) Return ProductDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ProductDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseProductDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseProductDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ProductDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ProductDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param ProductDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return ProductDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof ProductDescQuery) {
return $criteria;
}
$query = new ProductDescQuery();
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 PropelPDO $con an optional connection object
*
* @return ProductDesc|ProductDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = ProductDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(ProductDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return ProductDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `PRODUCT_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CHAPO`, `POSTSCRIPTUM`, `CREATED_AT`, `UPDATED_AT` FROM `product_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new ProductDesc();
$obj->hydrate($row);
ProductDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return ProductDesc|ProductDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|ProductDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(ProductDescPeer::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 ProductDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(ProductDescPeer::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 ProductDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(ProductDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the product_id column
*
* Example usage:
* <code>
* $query->filterByProductId(1234); // WHERE product_id = 1234
* $query->filterByProductId(array(12, 34)); // WHERE product_id IN (12, 34)
* $query->filterByProductId(array('min' => 12)); // WHERE product_id > 12
* </code>
*
* @see filterByProduct()
*
* @param mixed $productId 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 ProductDescQuery The current query, for fluid interface
*/
public function filterByProductId($productId = null, $comparison = null)
{
if (is_array($productId)) {
$useMinMax = false;
if (isset($productId['min'])) {
$this->addUsingAlias(ProductDescPeer::PRODUCT_ID, $productId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($productId['max'])) {
$this->addUsingAlias(ProductDescPeer::PRODUCT_ID, $productId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ProductDescPeer::PRODUCT_ID, $productId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 ProductDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductDescPeer::DESCRIPTION, $description, $comparison);
}
/**
* Filter the query on the chapo column
*
* Example usage:
* <code>
* $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue'
* $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%'
* </code>
*
* @param string $chapo The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function filterByChapo($chapo = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($chapo)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $chapo)) {
$chapo = str_replace('*', '%', $chapo);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductDescPeer::CHAPO, $chapo, $comparison);
}
/**
* Filter the query on the postscriptum column
*
* Example usage:
* <code>
* $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue'
* $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%'
* </code>
*
* @param string $postscriptum The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function filterByPostscriptum($postscriptum = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($postscriptum)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $postscriptum)) {
$postscriptum = str_replace('*', '%', $postscriptum);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ProductDescPeer::POSTSCRIPTUM, $postscriptum, $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 ProductDescQuery 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(ProductDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(ProductDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ProductDescPeer::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 ProductDescQuery 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(ProductDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(ProductDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ProductDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Product object
*
* @param Product|PropelObjectCollection $product The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ProductDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByProduct($product, $comparison = null)
{
if ($product instanceof Product) {
return $this
->addUsingAlias(ProductDescPeer::PRODUCT_ID, $product->getId(), $comparison);
} elseif ($product instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(ProductDescPeer::PRODUCT_ID, $product->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByProduct() only accepts arguments of type Product or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Product relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function joinProduct($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Product');
// 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, 'Product');
}
return $this;
}
/**
* Use the Product relation Product 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\ProductQuery A secondary query class using the current class as primary query
*/
public function useProductQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinProduct($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Product', '\Thelia\Model\ProductQuery');
}
/**
* Exclude object from result
*
* @param ProductDesc $productDesc Object to remove from the list of results
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function prune($productDesc = null)
{
if ($productDesc) {
$this->addUsingAlias(ProductDescPeer::ID, $productDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(ProductDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(ProductDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(ProductDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(ProductDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(ProductDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return ProductDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(ProductDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,612 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Resource;
use Thelia\Model\ResourceDesc;
use Thelia\Model\ResourceDescPeer;
use Thelia\Model\ResourceDescQuery;
/**
* Base class that represents a query for the 'resource_desc' table.
*
*
*
* @method ResourceDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method ResourceDescQuery orderByResourceId($order = Criteria::ASC) Order by the resource_id column
* @method ResourceDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method ResourceDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method ResourceDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method ResourceDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method ResourceDescQuery groupById() Group by the id column
* @method ResourceDescQuery groupByResourceId() Group by the resource_id column
* @method ResourceDescQuery groupByLang() Group by the lang column
* @method ResourceDescQuery groupByTitle() Group by the title column
* @method ResourceDescQuery groupByCreatedAt() Group by the created_at column
* @method ResourceDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method ResourceDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method ResourceDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method ResourceDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method ResourceDescQuery leftJoinResource($relationAlias = null) Adds a LEFT JOIN clause to the query using the Resource relation
* @method ResourceDescQuery rightJoinResource($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Resource relation
* @method ResourceDescQuery innerJoinResource($relationAlias = null) Adds a INNER JOIN clause to the query using the Resource relation
*
* @method ResourceDesc findOne(PropelPDO $con = null) Return the first ResourceDesc matching the query
* @method ResourceDesc findOneOrCreate(PropelPDO $con = null) Return the first ResourceDesc matching the query, or a new ResourceDesc object populated from the query conditions when no match is found
*
* @method ResourceDesc findOneById(int $id) Return the first ResourceDesc filtered by the id column
* @method ResourceDesc findOneByResourceId(int $resource_id) Return the first ResourceDesc filtered by the resource_id column
* @method ResourceDesc findOneByLang(string $lang) Return the first ResourceDesc filtered by the lang column
* @method ResourceDesc findOneByTitle(string $title) Return the first ResourceDesc filtered by the title column
* @method ResourceDesc findOneByCreatedAt(string $created_at) Return the first ResourceDesc filtered by the created_at column
* @method ResourceDesc findOneByUpdatedAt(string $updated_at) Return the first ResourceDesc filtered by the updated_at column
*
* @method array findById(int $id) Return ResourceDesc objects filtered by the id column
* @method array findByResourceId(int $resource_id) Return ResourceDesc objects filtered by the resource_id column
* @method array findByLang(string $lang) Return ResourceDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return ResourceDesc objects filtered by the title column
* @method array findByCreatedAt(string $created_at) Return ResourceDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return ResourceDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseResourceDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseResourceDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\ResourceDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new ResourceDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param ResourceDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return ResourceDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof ResourceDescQuery) {
return $criteria;
}
$query = new ResourceDescQuery();
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 PropelPDO $con an optional connection object
*
* @return ResourceDesc|ResourceDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = ResourceDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(ResourceDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return ResourceDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `RESOURCE_ID`, `LANG`, `TITLE`, `CREATED_AT`, `UPDATED_AT` FROM `resource_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new ResourceDesc();
$obj->hydrate($row);
ResourceDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return ResourceDesc|ResourceDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|ResourceDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(ResourceDescPeer::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 ResourceDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(ResourceDescPeer::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 ResourceDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(ResourceDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the resource_id column
*
* Example usage:
* <code>
* $query->filterByResourceId(1234); // WHERE resource_id = 1234
* $query->filterByResourceId(array(12, 34)); // WHERE resource_id IN (12, 34)
* $query->filterByResourceId(array('min' => 12)); // WHERE resource_id > 12
* </code>
*
* @see filterByResource()
*
* @param mixed $resourceId 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 ResourceDescQuery The current query, for fluid interface
*/
public function filterByResourceId($resourceId = null, $comparison = null)
{
if (is_array($resourceId)) {
$useMinMax = false;
if (isset($resourceId['min'])) {
$this->addUsingAlias(ResourceDescPeer::RESOURCE_ID, $resourceId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($resourceId['max'])) {
$this->addUsingAlias(ResourceDescPeer::RESOURCE_ID, $resourceId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ResourceDescPeer::RESOURCE_ID, $resourceId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 ResourceDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ResourceDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(ResourceDescPeer::TITLE, $title, $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 ResourceDescQuery 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(ResourceDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(ResourceDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ResourceDescPeer::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 ResourceDescQuery 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(ResourceDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(ResourceDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(ResourceDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Resource object
*
* @param Resource|PropelObjectCollection $resource The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return ResourceDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByResource($resource, $comparison = null)
{
if ($resource instanceof Resource) {
return $this
->addUsingAlias(ResourceDescPeer::RESOURCE_ID, $resource->getId(), $comparison);
} elseif ($resource instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(ResourceDescPeer::RESOURCE_ID, $resource->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByResource() only accepts arguments of type Resource or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Resource relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function joinResource($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Resource');
// 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, 'Resource');
}
return $this;
}
/**
* Use the Resource relation Resource 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\ResourceQuery A secondary query class using the current class as primary query
*/
public function useResourceQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinResource($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Resource', '\Thelia\Model\ResourceQuery');
}
/**
* Exclude object from result
*
* @param ResourceDesc $resourceDesc Object to remove from the list of results
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function prune($resourceDesc = null)
{
if ($resourceDesc) {
$this->addUsingAlias(ResourceDescPeer::ID, $resourceDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(ResourceDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(ResourceDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(ResourceDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(ResourceDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(ResourceDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return ResourceDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(ResourceDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,645 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\Tax;
use Thelia\Model\TaxDesc;
use Thelia\Model\TaxDescPeer;
use Thelia\Model\TaxDescQuery;
/**
* Base class that represents a query for the 'tax_desc' table.
*
*
*
* @method TaxDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method TaxDescQuery orderByTaxId($order = Criteria::ASC) Order by the tax_id column
* @method TaxDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method TaxDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method TaxDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method TaxDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method TaxDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method TaxDescQuery groupById() Group by the id column
* @method TaxDescQuery groupByTaxId() Group by the tax_id column
* @method TaxDescQuery groupByLang() Group by the lang column
* @method TaxDescQuery groupByTitle() Group by the title column
* @method TaxDescQuery groupByDescription() Group by the description column
* @method TaxDescQuery groupByCreatedAt() Group by the created_at column
* @method TaxDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method TaxDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method TaxDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method TaxDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method TaxDescQuery leftJoinTax($relationAlias = null) Adds a LEFT JOIN clause to the query using the Tax relation
* @method TaxDescQuery rightJoinTax($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Tax relation
* @method TaxDescQuery innerJoinTax($relationAlias = null) Adds a INNER JOIN clause to the query using the Tax relation
*
* @method TaxDesc findOne(PropelPDO $con = null) Return the first TaxDesc matching the query
* @method TaxDesc findOneOrCreate(PropelPDO $con = null) Return the first TaxDesc matching the query, or a new TaxDesc object populated from the query conditions when no match is found
*
* @method TaxDesc findOneById(int $id) Return the first TaxDesc filtered by the id column
* @method TaxDesc findOneByTaxId(int $tax_id) Return the first TaxDesc filtered by the tax_id column
* @method TaxDesc findOneByLang(string $lang) Return the first TaxDesc filtered by the lang column
* @method TaxDesc findOneByTitle(string $title) Return the first TaxDesc filtered by the title column
* @method TaxDesc findOneByDescription(string $description) Return the first TaxDesc filtered by the description column
* @method TaxDesc findOneByCreatedAt(string $created_at) Return the first TaxDesc filtered by the created_at column
* @method TaxDesc findOneByUpdatedAt(string $updated_at) Return the first TaxDesc filtered by the updated_at column
*
* @method array findById(int $id) Return TaxDesc objects filtered by the id column
* @method array findByTaxId(int $tax_id) Return TaxDesc objects filtered by the tax_id column
* @method array findByLang(string $lang) Return TaxDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return TaxDesc objects filtered by the title column
* @method array findByDescription(string $description) Return TaxDesc objects filtered by the description column
* @method array findByCreatedAt(string $created_at) Return TaxDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return TaxDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseTaxDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseTaxDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\TaxDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new TaxDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param TaxDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return TaxDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof TaxDescQuery) {
return $criteria;
}
$query = new TaxDescQuery();
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 PropelPDO $con an optional connection object
*
* @return TaxDesc|TaxDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = TaxDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(TaxDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return TaxDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `TAX_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CREATED_AT`, `UPDATED_AT` FROM `tax_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new TaxDesc();
$obj->hydrate($row);
TaxDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return TaxDesc|TaxDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|TaxDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(TaxDescPeer::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 TaxDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(TaxDescPeer::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 TaxDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(TaxDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the tax_id column
*
* Example usage:
* <code>
* $query->filterByTaxId(1234); // WHERE tax_id = 1234
* $query->filterByTaxId(array(12, 34)); // WHERE tax_id IN (12, 34)
* $query->filterByTaxId(array('min' => 12)); // WHERE tax_id > 12
* </code>
*
* @see filterByTax()
*
* @param mixed $taxId 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 TaxDescQuery The current query, for fluid interface
*/
public function filterByTaxId($taxId = null, $comparison = null)
{
if (is_array($taxId)) {
$useMinMax = false;
if (isset($taxId['min'])) {
$this->addUsingAlias(TaxDescPeer::TAX_ID, $taxId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($taxId['max'])) {
$this->addUsingAlias(TaxDescPeer::TAX_ID, $taxId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TaxDescPeer::TAX_ID, $taxId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 TaxDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(TaxDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(TaxDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(TaxDescPeer::DESCRIPTION, $description, $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 TaxDescQuery 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(TaxDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(TaxDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TaxDescPeer::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 TaxDescQuery 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(TaxDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(TaxDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TaxDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related Tax object
*
* @param Tax|PropelObjectCollection $tax The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TaxDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByTax($tax, $comparison = null)
{
if ($tax instanceof Tax) {
return $this
->addUsingAlias(TaxDescPeer::TAX_ID, $tax->getId(), $comparison);
} elseif ($tax instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(TaxDescPeer::TAX_ID, $tax->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByTax() only accepts arguments of type Tax or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the Tax relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function joinTax($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('Tax');
// 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, 'Tax');
}
return $this;
}
/**
* Use the Tax relation Tax 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\TaxQuery A secondary query class using the current class as primary query
*/
public function useTaxQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinTax($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Tax', '\Thelia\Model\TaxQuery');
}
/**
* Exclude object from result
*
* @param TaxDesc $taxDesc Object to remove from the list of results
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function prune($taxDesc = null)
{
if ($taxDesc) {
$this->addUsingAlias(TaxDescPeer::ID, $taxDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(TaxDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(TaxDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(TaxDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(TaxDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(TaxDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return TaxDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(TaxDescPeer::CREATED_AT);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,645 +0,0 @@
<?php
namespace Thelia\Model\om;
use \Criteria;
use \Exception;
use \ModelCriteria;
use \ModelJoin;
use \PDO;
use \Propel;
use \PropelCollection;
use \PropelException;
use \PropelObjectCollection;
use \PropelPDO;
use Thelia\Model\TaxRule;
use Thelia\Model\TaxRuleDesc;
use Thelia\Model\TaxRuleDescPeer;
use Thelia\Model\TaxRuleDescQuery;
/**
* Base class that represents a query for the 'tax_rule_desc' table.
*
*
*
* @method TaxRuleDescQuery orderById($order = Criteria::ASC) Order by the id column
* @method TaxRuleDescQuery orderByTaxRuleId($order = Criteria::ASC) Order by the tax_rule_id column
* @method TaxRuleDescQuery orderByLang($order = Criteria::ASC) Order by the lang column
* @method TaxRuleDescQuery orderByTitle($order = Criteria::ASC) Order by the title column
* @method TaxRuleDescQuery orderByDescription($order = Criteria::ASC) Order by the description column
* @method TaxRuleDescQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
* @method TaxRuleDescQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
*
* @method TaxRuleDescQuery groupById() Group by the id column
* @method TaxRuleDescQuery groupByTaxRuleId() Group by the tax_rule_id column
* @method TaxRuleDescQuery groupByLang() Group by the lang column
* @method TaxRuleDescQuery groupByTitle() Group by the title column
* @method TaxRuleDescQuery groupByDescription() Group by the description column
* @method TaxRuleDescQuery groupByCreatedAt() Group by the created_at column
* @method TaxRuleDescQuery groupByUpdatedAt() Group by the updated_at column
*
* @method TaxRuleDescQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method TaxRuleDescQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method TaxRuleDescQuery innerJoin($relation) Adds a INNER JOIN clause to the query
*
* @method TaxRuleDescQuery leftJoinTaxRule($relationAlias = null) Adds a LEFT JOIN clause to the query using the TaxRule relation
* @method TaxRuleDescQuery rightJoinTaxRule($relationAlias = null) Adds a RIGHT JOIN clause to the query using the TaxRule relation
* @method TaxRuleDescQuery innerJoinTaxRule($relationAlias = null) Adds a INNER JOIN clause to the query using the TaxRule relation
*
* @method TaxRuleDesc findOne(PropelPDO $con = null) Return the first TaxRuleDesc matching the query
* @method TaxRuleDesc findOneOrCreate(PropelPDO $con = null) Return the first TaxRuleDesc matching the query, or a new TaxRuleDesc object populated from the query conditions when no match is found
*
* @method TaxRuleDesc findOneById(int $id) Return the first TaxRuleDesc filtered by the id column
* @method TaxRuleDesc findOneByTaxRuleId(int $tax_rule_id) Return the first TaxRuleDesc filtered by the tax_rule_id column
* @method TaxRuleDesc findOneByLang(string $lang) Return the first TaxRuleDesc filtered by the lang column
* @method TaxRuleDesc findOneByTitle(string $title) Return the first TaxRuleDesc filtered by the title column
* @method TaxRuleDesc findOneByDescription(string $description) Return the first TaxRuleDesc filtered by the description column
* @method TaxRuleDesc findOneByCreatedAt(string $created_at) Return the first TaxRuleDesc filtered by the created_at column
* @method TaxRuleDesc findOneByUpdatedAt(string $updated_at) Return the first TaxRuleDesc filtered by the updated_at column
*
* @method array findById(int $id) Return TaxRuleDesc objects filtered by the id column
* @method array findByTaxRuleId(int $tax_rule_id) Return TaxRuleDesc objects filtered by the tax_rule_id column
* @method array findByLang(string $lang) Return TaxRuleDesc objects filtered by the lang column
* @method array findByTitle(string $title) Return TaxRuleDesc objects filtered by the title column
* @method array findByDescription(string $description) Return TaxRuleDesc objects filtered by the description column
* @method array findByCreatedAt(string $created_at) Return TaxRuleDesc objects filtered by the created_at column
* @method array findByUpdatedAt(string $updated_at) Return TaxRuleDesc objects filtered by the updated_at column
*
* @package propel.generator.Thelia.Model.om
*/
abstract class BaseTaxRuleDescQuery extends ModelCriteria
{
/**
* Initializes internal state of BaseTaxRuleDescQuery object.
*
* @param string $dbName The dabase name
* @param string $modelName The phpName of a model, e.g. 'Book'
* @param string $modelAlias The alias for the model in this query, e.g. 'b'
*/
public function __construct($dbName = 'thelia', $modelName = 'Thelia\\Model\\TaxRuleDesc', $modelAlias = null)
{
parent::__construct($dbName, $modelName, $modelAlias);
}
/**
* Returns a new TaxRuleDescQuery object.
*
* @param string $modelAlias The alias of a model in the query
* @param TaxRuleDescQuery|Criteria $criteria Optional Criteria to build the query from
*
* @return TaxRuleDescQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof TaxRuleDescQuery) {
return $criteria;
}
$query = new TaxRuleDescQuery();
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 PropelPDO $con an optional connection object
*
* @return TaxRuleDesc|TaxRuleDesc[]|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
if ($key === null) {
return null;
}
if ((null !== ($obj = TaxRuleDescPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
// the object is alredy in the instance pool
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(TaxRuleDescPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$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 PropelPDO $con A connection object
*
* @return TaxRuleDesc A model object, or null if the key is not found
* @throws PropelException
*/
protected function findPkSimple($key, $con)
{
$sql = 'SELECT `ID`, `TAX_RULE_ID`, `LANG`, `TITLE`, `DESCRIPTION`, `CREATED_AT`, `UPDATED_AT` FROM `tax_rule_desc` 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), $e);
}
$obj = null;
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
$obj = new TaxRuleDesc();
$obj->hydrate($row);
TaxRuleDescPeer::addInstanceToPool($obj, (string) $key);
}
$stmt->closeCursor();
return $obj;
}
/**
* Find object by primary key.
*
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con A connection object
*
* @return TaxRuleDesc|TaxRuleDesc[]|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;
$stmt = $criteria
->filterByPrimaryKey($key)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
}
/**
* 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 PropelPDO $con an optional connection object
*
* @return PropelObjectCollection|TaxRuleDesc[]|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
if ($con === null) {
$con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
}
$this->basePreSelect($con);
$criteria = $this->isKeepQuery() ? clone $this : $this;
$stmt = $criteria
->filterByPrimaryKeys($keys)
->doSelect($con);
return $criteria->getFormatter()->init($criteria)->format($stmt);
}
/**
* Filter the query by primary key
*
* @param mixed $key Primary key to use for the query
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
return $this->addUsingAlias(TaxRuleDescPeer::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 TaxRuleDescQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
return $this->addUsingAlias(TaxRuleDescPeer::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 TaxRuleDescQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
if (is_array($id) && null === $comparison) {
$comparison = Criteria::IN;
}
return $this->addUsingAlias(TaxRuleDescPeer::ID, $id, $comparison);
}
/**
* Filter the query on the tax_rule_id column
*
* Example usage:
* <code>
* $query->filterByTaxRuleId(1234); // WHERE tax_rule_id = 1234
* $query->filterByTaxRuleId(array(12, 34)); // WHERE tax_rule_id IN (12, 34)
* $query->filterByTaxRuleId(array('min' => 12)); // WHERE tax_rule_id > 12
* </code>
*
* @see filterByTaxRule()
*
* @param mixed $taxRuleId 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 TaxRuleDescQuery The current query, for fluid interface
*/
public function filterByTaxRuleId($taxRuleId = null, $comparison = null)
{
if (is_array($taxRuleId)) {
$useMinMax = false;
if (isset($taxRuleId['min'])) {
$this->addUsingAlias(TaxRuleDescPeer::TAX_RULE_ID, $taxRuleId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($taxRuleId['max'])) {
$this->addUsingAlias(TaxRuleDescPeer::TAX_RULE_ID, $taxRuleId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TaxRuleDescPeer::TAX_RULE_ID, $taxRuleId, $comparison);
}
/**
* Filter the query on the lang column
*
* Example usage:
* <code>
* $query->filterByLang('fooValue'); // WHERE lang = 'fooValue'
* $query->filterByLang('%fooValue%'); // WHERE lang LIKE '%fooValue%'
* </code>
*
* @param string $lang 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 TaxRuleDescQuery The current query, for fluid interface
*/
public function filterByLang($lang = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($lang)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $lang)) {
$lang = str_replace('*', '%', $lang);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(TaxRuleDescPeer::LANG, $lang, $comparison);
}
/**
* Filter the query on the title column
*
* Example usage:
* <code>
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
* </code>
*
* @param string $title The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function filterByTitle($title = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($title)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $title)) {
$title = str_replace('*', '%', $title);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(TaxRuleDescPeer::TITLE, $title, $comparison);
}
/**
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $description The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function filterByDescription($description = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($description)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $description)) {
$description = str_replace('*', '%', $description);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(TaxRuleDescPeer::DESCRIPTION, $description, $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 TaxRuleDescQuery 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(TaxRuleDescPeer::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($createdAt['max'])) {
$this->addUsingAlias(TaxRuleDescPeer::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TaxRuleDescPeer::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 TaxRuleDescQuery 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(TaxRuleDescPeer::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($updatedAt['max'])) {
$this->addUsingAlias(TaxRuleDescPeer::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(TaxRuleDescPeer::UPDATED_AT, $updatedAt, $comparison);
}
/**
* Filter the query by a related TaxRule object
*
* @param TaxRule|PropelObjectCollection $taxRule The related object(s) to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return TaxRuleDescQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByTaxRule($taxRule, $comparison = null)
{
if ($taxRule instanceof TaxRule) {
return $this
->addUsingAlias(TaxRuleDescPeer::TAX_RULE_ID, $taxRule->getId(), $comparison);
} elseif ($taxRule instanceof PropelObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(TaxRuleDescPeer::TAX_RULE_ID, $taxRule->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterByTaxRule() only accepts arguments of type TaxRule or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the TaxRule relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function joinTaxRule($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('TaxRule');
// 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, 'TaxRule');
}
return $this;
}
/**
* Use the TaxRule relation TaxRule 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\TaxRuleQuery A secondary query class using the current class as primary query
*/
public function useTaxRuleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinTaxRule($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'TaxRule', '\Thelia\Model\TaxRuleQuery');
}
/**
* Exclude object from result
*
* @param TaxRuleDesc $taxRuleDesc Object to remove from the list of results
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function prune($taxRuleDesc = null)
{
if ($taxRuleDesc) {
$this->addUsingAlias(TaxRuleDescPeer::ID, $taxRuleDesc->getId(), Criteria::NOT_EQUAL);
}
return $this;
}
// timestampable behavior
/**
* Filter by the latest updated
*
* @param int $nbDays Maximum age of the latest update in days
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function recentlyUpdated($nbDays = 7)
{
return $this->addUsingAlias(TaxRuleDescPeer::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by update date desc
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function lastUpdatedFirst()
{
return $this->addDescendingOrderByColumn(TaxRuleDescPeer::UPDATED_AT);
}
/**
* Order by update date asc
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function firstUpdatedFirst()
{
return $this->addAscendingOrderByColumn(TaxRuleDescPeer::UPDATED_AT);
}
/**
* Filter by the latest created
*
* @param int $nbDays Maximum age of in days
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function recentlyCreated($nbDays = 7)
{
return $this->addUsingAlias(TaxRuleDescPeer::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL);
}
/**
* Order by create date desc
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function lastCreatedFirst()
{
return $this->addDescendingOrderByColumn(TaxRuleDescPeer::CREATED_AT);
}
/**
* Order by create date asc
*
* @return TaxRuleDescQuery The current query, for fluid interface
*/
public function firstCreatedFirst()
{
return $this->addAscendingOrderByColumn(TaxRuleDescPeer::CREATED_AT);
}
}