class CouponVersionTableMap extends TableMap

This class defines the structure of the 'coupon_version' 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).

Traits

Propel\Runtime\ActiveQuery\InstancePoolTrait
Propel\Runtime\Map\TableMapTrait

Constants

CLASS_NAME

The (dot-path) name of this class

DATABASE_NAME

The default database name for this class

TABLE_NAME

The table name for this class

OM_CLASS

The related Propel class for this table

CLASS_DEFAULT

A class that can be returned by this tableMap

NUM_COLUMNS

The total number of columns

NUM_LAZY_LOAD_COLUMNS

The number of lazy-loaded columns

NUM_HYDRATE_COLUMNS

The number of columns to hydrate (NUMCOLUMNS - NUMLAZYLOADCOLUMNS)

ID

the column name for the ID field

CODE

the column name for the CODE field

TYPE

the column name for the TYPE field

SERIALIZED_EFFECTS

the column name for the SERIALIZED_EFFECTS field

IS_ENABLED

the column name for the IS_ENABLED field

START_DATE

the column name for the START_DATE field

EXPIRATION_DATE

the column name for the EXPIRATION_DATE field

MAX_USAGE

the column name for the MAX_USAGE field

IS_CUMULATIVE

the column name for the IS_CUMULATIVE field

IS_REMOVING_POSTAGE

the column name for the ISREMOVINGPOSTAGE field

IS_AVAILABLE_ON_SPECIAL_OFFERS

the column name for the ISAVAILABLEONSPECIALOFFERS field

IS_USED

the column name for the IS_USED field

SERIALIZED_CONDITIONS

the column name for the SERIALIZED_CONDITIONS field

PER_CUSTOMER_USAGE_COUNT

the column name for the PERCUSTOMERUSAGE_COUNT field

CREATED_AT

the column name for the CREATED_AT field

UPDATED_AT

the column name for the UPDATED_AT field

VERSION

the column name for the VERSION field

VERSION_CREATED_AT

the column name for the VERSIONCREATEDAT field

VERSION_CREATED_BY

the column name for the VERSIONCREATEDBY field

DEFAULT_STRING_FORMAT

The default string format for model objects of the related table

Methods

void
initialize()

Initialize the table attributes and columns Relations are not initialized by this method since they are lazy loaded

buildRelations()

Build the RelationMap objects for this table relationships

static 
addInstanceToPool( CouponVersion $obj, string $key = null)

Adds an object to the instance pool.

static 
removeInstanceFromPool( mixed $value)

Removes an object from the instance pool.

static 
getPrimaryKeyHashFromRow( array $row, int $offset, string $indexType = TableMap::TYPE_NUM)

Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.

static  mixed
getPrimaryKeyFromRow( array $row, int $offset, string $indexType = TableMap::TYPE_NUM)

Retrieves the primary key from the DB resultset row For tables with a single-column primary key, that simple pkey value will be returned. For tables with a multi-column primary key, an array of the primary key columns will be returned.

static  string
getOMClass( boolean $withPrefix = true)

The class that the tableMap will make instances of.

static  array
populateObject( array $row, int $offset, string $indexType = TableMap::TYPE_NUM)

Populates an object of the default type or an object that inherit from the default.

static  array
populateObjects( DataFetcherInterface $dataFetcher)

The returned array will contain objects of the default type or objects that inherit from the default.

static 
addSelectColumns( Criteria $criteria, string $alias = null)

Add all the columns needed to create a new object.

static  TableMap
getTableMap()

Returns the TableMap related to this object.

static 
buildTableMap()

Add a TableMap instance to the database for this tableMap class.

static  int
doDelete( mixed $values, ConnectionInterface $con = null)

Performs a DELETE on the database, given a CouponVersion or Criteria object OR a primary key value.

static  int
doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the coupon_version table.

static  mixed
doInsert( mixed $criteria, ConnectionInterface $con = null)

Performs an INSERT on the database, given a CouponVersion or Criteria object.

Details

at line 210
void initialize()

Initialize the table attributes and columns Relations are not initialized by this method since they are lazy loaded

Return Value

void

Exceptions

PropelException

at line 243
buildRelations()

Build the RelationMap objects for this table relationships

at line 259
static addInstanceToPool( CouponVersion $obj, string $key = null)

Adds an object to the instance pool.

Propel keeps cached copies of objects in an instance pool when they are retrieved from the database. In some cases you may need to explicitly add objects to the cache in order to ensure that the same objects are always returned by find() and findPk() calls.

Parameters

CouponVersion $obj A \Thelia\Model\CouponVersion object.
string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).

at line 279
static removeInstanceFromPool( mixed $value)

Removes an object from the instance pool.

Propel keeps cached copies of objects in an instance pool when they are retrieved from the database. In some cases -- especially when you override doDelete methods in your stub classes -- you may need to explicitly remove objects from the cache in order to prevent returning objects that no longer exist.

Parameters

mixed $value A \Thelia\Model\CouponVersion object or a primary key value.

at line 312
static getPrimaryKeyHashFromRow( array $row, int $offset, string $indexType = TableMap::TYPE_NUM)

Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.

For tables with a single-column primary key, that simple pkey value will be returned. For tables with a multi-column primary key, a serialize()d version of the primary key will be returned.

Parameters

array $row resultset row.
int $offset The 0-based offset for reading from the resultset row.
string $indexType One of the class type constants TableMap::TYPEPHPNAME, TableMap::TYPESTUDLYPHPNAME TableMap::TYPECOLNAME, TableMap::TYPEFIELDNAME, TableMap::TYPE_NUM

at line 334
static mixed getPrimaryKeyFromRow( array $row, int $offset, string $indexType = TableMap::TYPE_NUM)

Retrieves the primary key from the DB resultset row For tables with a single-column primary key, that simple pkey value will be returned. For tables with a multi-column primary key, an array of the primary key columns will be returned.

Parameters

array $row resultset row.
int $offset The 0-based offset for reading from the resultset row.
string $indexType One of the class type constants TableMap::TYPEPHPNAME, TableMap::TYPESTUDLYPHPNAME TableMap::TYPECOLNAME, TableMap::TYPEFIELDNAME, TableMap::TYPE_NUM

Return Value

mixed The primary key of the row

at line 351
static string getOMClass( boolean $withPrefix = true)

The class that the tableMap will make instances of.

If $withPrefix is true, the returned path uses a dot-path notation which is translated into a path relative to a location on the PHP include_path. (e.g. path.to.MyClass -> 'path/to/MyClass.php')

Parameters

boolean $withPrefix Whether or not to return the path with the class name

Return Value

string path.to.ClassName

at line 369
static array populateObject( array $row, int $offset, string $indexType = TableMap::TYPE_NUM)

Populates an object of the default type or an object that inherit from the default.

Parameters

array $row row returned by DataFetcher->fetch().
int $offset The 0-based offset for reading from the resultset row.
string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). One of the class type constants TableMap::TYPEPHPNAME, TableMap::TYPESTUDLYPHPNAME TableMap::TYPECOLNAME, TableMap::TYPEFIELDNAME, TableMap::TYPE_NUM.

Return Value

array (CouponVersion object, last column rank)

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.

at line 396
static array populateObjects( DataFetcherInterface $dataFetcher)

The returned array will contain objects of the default type or objects that inherit from the default.

Parameters

DataFetcherInterface $dataFetcher

Return Value

array

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.

at line 432
static addSelectColumns( Criteria $criteria, string $alias = null)

Add all the columns needed to create a new object.

Note: any columns that were marked with lazyLoad="true" in the XML schema will not be added to the select list and only loaded on demand.

Parameters

Criteria $criteria object containing the columns to add.
string $alias optional table alias

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.

at line 484
static TableMap getTableMap()

Returns the TableMap related to this object.

This method is not needed for general use but a specific application could have a need.

Return Value

TableMap

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.

at line 492
static buildTableMap()

Add a TableMap instance to the database for this tableMap class.

at line 511
static int doDelete( mixed $values, ConnectionInterface $con = null)

Performs a DELETE on the database, given a CouponVersion or Criteria object OR a primary key value.

Parameters

mixed $values Criteria or CouponVersion object or primary key or array of primary keys which is used to create the DELETE statement
ConnectionInterface $con the connection to use

Return Value

int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows if supported by native driver or if emulated using Propel.

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.

at line 555
static int doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the coupon_version table.

Parameters

ConnectionInterface $con the connection to use

Return Value

int The number of affected rows (if supported by underlying database driver).

at line 569
static mixed doInsert( mixed $criteria, ConnectionInterface $con = null)

Performs an INSERT on the database, given a CouponVersion or Criteria object.

Parameters

mixed $criteria Criteria or CouponVersion object containing data that is used to create the INSERT statement.
ConnectionInterface $con the ConnectionInterface connection to use

Return Value

mixed The new primary key.

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.