# Class BaseMessageI18nPeer

Base static class for performing query and update operations on the 'message_i18n' table.

#### Direct known subclasses

Thelia\Model\MessageI18nPeer
Abstract
Namespace: Thelia\Model\om
Package: propel\generator\Thelia\Model\om
Located at core/lib/Thelia/Model/om/BaseMessageI18nPeer.php

Methods summary
`public static string` | # `translateFieldName( string $name, string $fromType, string $toType )` Translates a fieldname to another type Translates a fieldname to another type #### Parameters $name `string` $name field name $fromType `string` $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM $toType `string` $toType One of the class type constants #### Returns `string` translated name of the field. #### Throws `PropelException` - if the specified name could not be found in the fieldname mappings.
`public static array` | # `getFieldNames( string $type = Thelia\Model\om\BasePeer::TYPE_PHPNAME )` Returns an array of field names. Returns an array of field names. #### Parameters $type `string` $type The type of fieldnames to return: One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM #### Returns `array` A list of field names #### Throws `PropelException` - if the type is not valid.
`public static string` | # `alias( string $alias, string $column )` Convenience method which changes table.column to alias.column. Convenience method which changes table.column to alias.column. Using this method you can maintain SQL abstraction while using column aliases.
    $c->addAlias("alias1", TablePeer::TABLE_NAME);
    $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
#### Parameters $alias `string` $alias The alias for the current table. $column `string` $column The column name for current table. (i.e. MessageI18nPeer::COLUMN_NAME). #### Returns `string`
`public static` | # `addSelectColumns( Criteria $criteria, string $alias = null )` Add all the columns needed to create a new object. 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` $criteria object containing the columns to add. $alias `string` $alias optional table alias #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static integer` | # `doCount( Criteria $criteria, boolean $distinct = false, PropelPDO $con = null )` Returns the number of rows matching criteria. Returns the number of rows matching criteria. #### Parameters $criteria `Criteria` $criteria $distinct `boolean` $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. $con `PropelPDO` $con #### Returns `integer` Number of matching rows.
`public static `Thelia\Model\MessageI18n`` | # `doSelectOne( Criteria $criteria, PropelPDO $con = null )` Selects one object from the DB. Selects one object from the DB. #### Parameters $criteria `Criteria` $criteria object used to create the SELECT statement. $con `PropelPDO` $con #### Returns ``Thelia\Model\MessageI18n`` #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static array` | # `doSelect( Criteria $criteria, PropelPDO $con = null )` Selects several row from the DB. Selects several row from the DB. #### Parameters $criteria `Criteria` $criteria The Criteria object used to build the SELECT statement. $con `PropelPDO` $con #### Returns `array` Array of selected Objects #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static PDOStatement` | # `doSelectStmt( Criteria $criteria, PropelPDO $con = null )` Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement. Use this method directly if you want to work with an executed statement directly (for example to perform your own object hydration). #### Parameters $criteria `Criteria` $criteria The Criteria object used to build the SELECT statement. $con `PropelPDO` $con The connection to use #### Returns `PDOStatement` The executed PDOStatement object. #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException. #### See BasePeer::doSelect()
`public static` | # `addInstanceToPool( `Thelia\Model\MessageI18n` $obj, string $key = null )` Adds an object to the instance pool. 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 -- especially when you override doSelect*() methods in your stub classes -- you may need to explicitly add objects to the cache in order to ensure that the same objects are always returned by doSelect*() and retrieveByPK*() calls. #### Parameters $obj ``Thelia\Model\MessageI18n`` $obj A MessageI18n object. $key `string` $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
`public static` | # `removeInstanceFromPool( mixed $value )` Removes an object from the instance pool. 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 $value `mixed` $value A MessageI18n object or a primary key value. #### Throws `PropelException` - if the value is invalid.
`public static `Thelia\Model\MessageI18n`` | # `getInstanceFromPool( string $key )` 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. 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 $key `string` $key The key (@see getPrimaryKeyHash()) for this instance. #### Returns ``Thelia\Model\MessageI18n`` Found object or null if 1) no instance exists for specified key or 2) instance pooling has been disabled. #### See getPrimaryKeyHash()
`public static` | # `clearInstancePool( mixed $and_clear_all_references = false )` Clear the instance pool. Clear the instance pool.
`public static` | # `clearRelatedInstancePool( )` Method to invalidate the instance pool of all tables related to message_i18n by a foreign key with ON DELETE CASCADE Method to invalidate the instance pool of all tables related to message_i18n by a foreign key with ON DELETE CASCADE
`public static string` | # `getPrimaryKeyHashFromRow( array $row, integer $startcol = 0 )` 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. 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 $row `array` $row PropelPDO resultset row. $startcol `integer` $startcol The 0-based offset for reading from the resultset row. #### Returns `string` A string version of PK or null if the components of primary key in result array are all null.
`public static mixed` | # `getPrimaryKeyFromRow( array $row, integer $startcol = 0 )` 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. 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 $row `array` $row PropelPDO resultset row. $startcol `integer` $startcol The 0-based offset for reading from the resultset row. #### Returns `mixed` The primary key of the row
`public static` | # `populateObjects( PDOStatement $stmt )` The returned array will contain objects of the default type or objects that inherit from the default. The returned array will contain objects of the default type or objects that inherit from the default. #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static array` | # `populateObject( array $row, integer $startcol = 0 )` Populates an object of the default type or an object that inherit from the default. Populates an object of the default type or an object that inherit from the default. #### Parameters $row `array` $row PropelPDO resultset row. $startcol `integer` $startcol The 0-based offset for reading from the resultset row. #### Returns `array` (MessageI18n object, last column rank) #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static integer` | # `doCountJoinMessage( Criteria $criteria, boolean $distinct = false, PropelPDO $con = null, String $join_behavior = Thelia\Model\om\Criteria::LEFT_JOIN )` Returns the number of rows matching criteria, joining the related Message table Returns the number of rows matching criteria, joining the related Message table #### Parameters $criteria `Criteria` $criteria $distinct `boolean` $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. $con `PropelPDO` $con $join_behavior `String` $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN #### Returns `integer` Number of matching rows.
`public static array` | # `doSelectJoinMessage( Criteria $criteria, PropelPDO $con = null, String $join_behavior = Thelia\Model\om\Criteria::LEFT_JOIN )` Selects a collection of MessageI18n objects pre-filled with their Message objects. Selects a collection of MessageI18n objects pre-filled with their Message objects. #### Parameters $criteria `Criteria` $criteria $con `PropelPDO` $con $join_behavior `String` $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN #### Returns `array` Array of MessageI18n objects. #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static integer` | # `doCountJoinAll( Criteria $criteria, boolean $distinct = false, PropelPDO $con = null, String $join_behavior = Thelia\Model\om\Criteria::LEFT_JOIN )` Returns the number of rows matching criteria, joining all related tables Returns the number of rows matching criteria, joining all related tables #### Parameters $criteria `Criteria` $criteria $distinct `boolean` $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead. $con `PropelPDO` $con $join_behavior `String` $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN #### Returns `integer` Number of matching rows.
`public static array` | # `doSelectJoinAll( Criteria $criteria, PropelPDO $con = null, String $join_behavior = Thelia\Model\om\Criteria::LEFT_JOIN )` Selects a collection of MessageI18n objects pre-filled with all related objects. Selects a collection of MessageI18n objects pre-filled with all related objects. #### Parameters $criteria `Criteria` $criteria $con `PropelPDO` $con $join_behavior `String` $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN #### Returns `array` Array of MessageI18n objects. #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static TableMap` | # `getTableMap( )` Returns the TableMap related to this peer. This method is not needed for general use but a specific application could have a need. Returns the TableMap related to this peer. This method is not needed for general use but a specific application could have a need. #### Returns `TableMap` #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static` | # `buildTableMap( )` Add a TableMap instance to the database for this peer class. Add a TableMap instance to the database for this peer class.
`public static string` | # `getOMClass( mixed $row = 0, mixed $colnum = 0 )` The class that the Peer will make instances of. The class that the Peer will make instances of. #### Returns `string` ClassName
`public static mixed` | # `doInsert( mixed $values, PropelPDO $con = null )` Performs an INSERT on the database, given a MessageI18n or Criteria object. Performs an INSERT on the database, given a MessageI18n or Criteria object. #### Parameters $values `mixed` $values Criteria or MessageI18n object containing data that is used to create the INSERT statement. $con `PropelPDO` $con the PropelPDO connection to use #### Returns `mixed` The new primary key. #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static integer` | # `doUpdate( mixed $values, PropelPDO $con = null )` Performs an UPDATE on the database, given a MessageI18n or Criteria object. Performs an UPDATE on the database, given a MessageI18n or Criteria object. #### Parameters $values `mixed` $values Criteria or MessageI18n object containing data that is used to create the UPDATE statement. $con `PropelPDO` $con The connection to use (specify PropelPDO connection object to exert more control over transactions). #### Returns `integer` The number of affected rows (if supported by underlying database driver). #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static integer` | # `doDeleteAll( PropelPDO $con = null )` Deletes all rows from the message_i18n table. Deletes all rows from the message_i18n table. #### Parameters $con `PropelPDO` $con the connection to use #### Returns `integer` The number of affected rows (if supported by underlying database driver). #### Throws `PropelException`
`public static integer` | # `doDelete( mixed $values, PropelPDO $con = null )` Performs a DELETE on the database, given a MessageI18n or Criteria object OR a primary key value. Performs a DELETE on the database, given a MessageI18n or Criteria object OR a primary key value. #### Parameters $values `mixed` $values Criteria or MessageI18n object or primary key or array of primary keys which is used to create the DELETE statement $con `PropelPDO` $con the connection to use #### Returns `integer` The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows if supported by native driver or if emulated using Propel. #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.
`public static mixed` | # `doValidate( `Thelia\Model\MessageI18n` $obj, mixed $cols = null )` Validates all modified columns of given MessageI18n object. If parameter $columns is either a single column name or an array of column names than only those columns are validated. Validates all modified columns of given MessageI18n object. If parameter $columns is either a single column name or an array of column names than only those columns are validated. NOTICE: This does not apply to primary or foreign keys for now. #### Parameters $obj ``Thelia\Model\MessageI18n`` $obj The object to validate. $cols `mixed` $cols Column name or array of column names. #### Returns `mixed` TRUE if all columns are valid or the error message of the first invalid column.
`public static `Thelia\Model\MessageI18n`` | # `retrieveByPK( integer $id, string $locale, PropelPDO $con = null )` Retrieve object using using composite pkey values. Retrieve object using using composite pkey values. #### Parameters $id `integer` $id $locale `string` $locale $con `PropelPDO` $con #### Returns ``Thelia\Model\MessageI18n``

Constants summary
`string` | `DATABASE_NAME` | `'thelia'` | # the default database name for this class the default database name for this class
`string` | `TABLE_NAME` | `'message_i18n'` | # the table name for this class the table name for this class
`string` | `OM_CLASS` | `'Thelia\\Model\\MessageI18n'` | # the related Propel class for this table the related Propel class for this table
`string` | `TM_CLASS` | `'MessageI18nTableMap'` | # the related TableMap class for this table the related TableMap class for this table
`integer` | `NUM_COLUMNS` | `5` | # The total number of columns. The total number of columns.
`integer` | `NUM_LAZY_LOAD_COLUMNS` | `0` | # The number of lazy-loaded columns. The number of lazy-loaded columns.
`integer` | `NUM_HYDRATE_COLUMNS` | `5` | # The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
`string` | `ID` | `'message_i18n.id'` | # the column name for the id field the column name for the id field
`string` | `LOCALE` | `'message_i18n.locale'` | # the column name for the locale field the column name for the locale field
`string` | `TITLE` | `'message_i18n.title'` | # the column name for the title field the column name for the title field
`string` | `DESCRIPTION` | `'message_i18n.description'` | # the column name for the description field the column name for the description field
`string` | `DESCRIPTION_HTML` | `'message_i18n.description_html'` | # the column name for the description_html field the column name for the description_html field
`string` | `DEFAULT_STRING_FORMAT` | `'YAML'` | # The default string format for model objects of the related table * The default string format for model objects of the related table *

Properties summary
`public static array` | $instances | `array()` | # An identiy map to hold any loaded instances of MessageI18n objects. This must be public so that other peer classes can access this when hydrating from JOIN queries. An identiy map to hold any loaded instances of MessageI18n objects. This must be public so that other peer classes can access this when hydrating from JOIN queries.
`protected static array` | $fieldNames | `array ( BasePeer::TYPE_PHPNAME => array ('Id', 'Locale', 'Title', 'Description', 'DescriptionHtml', ), BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'locale', 'title', 'description', 'descriptionHtml', ), BasePeer::TYPE_COLNAME => array (MessageI18nPeer::ID, MessageI18nPeer::LOCALE, MessageI18nPeer::TITLE, MessageI18nPeer::DESCRIPTION, MessageI18nPeer::DESCRIPTION_HTML, ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'DESCRIPTION_HTML', ), BasePeer::TYPE_FIELDNAME => array ('id', 'locale', 'title', 'description', 'description_html', ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) )` | # holds an array of fieldnames holds an array of fieldnames first dimension keys are the type constants e.g. MessageI18nPeer::$fieldNames[MessageI18nPeer::TYPE_PHPNAME][0] = 'Id'
`protected static array` | $fieldKeys | `array ( BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'DescriptionHtml' => 4, ), BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'descriptionHtml' => 4, ), BasePeer::TYPE_COLNAME => array (MessageI18nPeer::ID => 0, MessageI18nPeer::LOCALE => 1, MessageI18nPeer::TITLE => 2, MessageI18nPeer::DESCRIPTION => 3, MessageI18nPeer::DESCRIPTION_HTML => 4, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'DESCRIPTION_HTML' => 4, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'description_html' => 4, ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) )` | # holds an array of keys for quick access to the fieldnames array holds an array of keys for quick access to the fieldnames array first dimension keys are the type constants e.g. MessageI18nPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0