# Class Thelia\Model\om\BaseCountryI18nPeer | thelia

# Class BaseCountryI18nPeer

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

#### Direct known subclasses

Thelia\Model\CountryI18nPeer
Abstract
Namespace: Thelia\Model\om
Package: propel\generator\Thelia\Model\om
Located at core/lib/Thelia/Model/om/BaseCountryI18nPeer.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. CountryI18nPeer::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\CountryI18n``

# `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\CountryI18n``

#### 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 durirectly (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\CountryI18n` $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\CountryI18n``
  $obj A CountryI18n 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 CountryI18n object or a primary key value.

#### Throws

`PropelException`
- if the value is invalid.

`public static `Thelia\Model\CountryI18n``

# `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\CountryI18n``
Found object or null if 1) no instance exists for specified key or 2) instance pooling has been disabled.

#### See

getPrimaryKeyHash()

`public static` | # `clearInstancePool( )` Clear the instance pool. Clear the instance pool.
`public static` | # `clearRelatedInstancePool( )` Method to invalidate the instance pool of all tables related to country_i18n by a foreign key with ON DELETE CASCADE Method to invalidate the instance pool of all tables related to country_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`
(CountryI18n object, last column rank)

#### Throws

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

`public static integer`

# `doCountJoinCountry( 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 Country table

Returns the number of rows matching criteria, joining the related Country 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`

# `doSelectJoinCountry( Criteria $criteria, PropelPDO $con = null, String $join_behavior = Thelia\Model\om\Criteria::LEFT_JOIN )`

Selects a collection of CountryI18n objects pre-filled with their Country objects.

Selects a collection of CountryI18n objects pre-filled with their Country 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 CountryI18n 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 CountryI18n objects pre-filled with all related objects.

Selects a collection of CountryI18n 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 CountryI18n 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( )`

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 CountryI18n or Criteria object.

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

#### Parameters

$values
  `mixed`
  $values Criteria or CountryI18n 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 CountryI18n or Criteria object.

Performs an UPDATE on the database, given a CountryI18n or Criteria object.

#### Parameters

$values
  `mixed`
  $values Criteria or CountryI18n 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 country_i18n table.

Deletes all rows from the country_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 CountryI18n or Criteria object OR a primary key value.

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

#### Parameters

$values
  `mixed`
  $values Criteria or CountryI18n 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\CountryI18n` $obj, mixed $cols = null )`

Validates all modified columns of given CountryI18n 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 CountryI18n 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\CountryI18n``
  $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\CountryI18n``

# `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\CountryI18n``

Constants summary
`string` | `DATABASE_NAME` | `'thelia'` | # the default database name for this class the default database name for this class
`string` | `TABLE_NAME` | `'country_i18n'` | # the table name for this class the table name for this class
`string` | `OM_CLASS` | `'Thelia\\Model\\CountryI18n'` | # the related Propel class for this table the related Propel class for this table
`string` | `TM_CLASS` | `'CountryI18nTableMap'` | # the related TableMap class for this table the related TableMap class for this table
`integer` | `NUM_COLUMNS` | `6` | # 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` | `6` | # 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` | `'country_i18n.ID'` | # the column name for the ID field the column name for the ID field
`string` | `LOCALE` | `'country_i18n.LOCALE'` | # the column name for the LOCALE field the column name for the LOCALE field
`string` | `TITLE` | `'country_i18n.TITLE'` | # the column name for the TITLE field the column name for the TITLE field
`string` | `DESCRIPTION` | `'country_i18n.DESCRIPTION'` | # the column name for the DESCRIPTION field the column name for the DESCRIPTION field
`string` | `CHAPO` | `'country_i18n.CHAPO'` | # the column name for the CHAPO field the column name for the CHAPO field
`string` | `POSTSCRIPTUM` | `'country_i18n.POSTSCRIPTUM'` | # the column name for the POSTSCRIPTUM field the column name for the POSTSCRIPTUM 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 CountryI18n 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 CountryI18n 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', 'Chapo', 'Postscriptum', ), BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ), BasePeer::TYPE_COLNAME => array (CountryI18nPeer::ID, CountryI18nPeer::LOCALE, CountryI18nPeer::TITLE, CountryI18nPeer::DESCRIPTION, CountryI18nPeer::CHAPO, CountryI18nPeer::POSTSCRIPTUM, ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', ), BasePeer::TYPE_FIELDNAME => array ('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) )`

#

holds an array of fieldnames

holds an array of fieldnames

first dimension keys are the type constants e.g. CountryI18nPeer::$fieldNames[CountryI18nPeer::TYPE_PHPNAME][0] = 'Id'

`protected static array`

$fieldKeys

`array ( BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, ), BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ), BasePeer::TYPE_COLNAME => array (CountryI18nPeer::ID => 0, CountryI18nPeer::LOCALE => 1, CountryI18nPeer::TITLE => 2, CountryI18nPeer::DESCRIPTION => 3, CountryI18nPeer::CHAPO => 4, CountryI18nPeer::POSTSCRIPTUM => 5, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'CHAPO' => 4, 'POSTSCRIPTUM' => 5, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) )`

#

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. CountryI18nPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0