# Class BaseGroupPeer

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

#### Direct known subclasses

Thelia\Model\GroupPeer
Abstract
Namespace: Thelia\Model\om
Package: propel\generator\Thelia\Model\om
Located at core/lib/Thelia/Model/om/BaseGroupPeer.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. GroupPeer::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\Group`` | # `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\Group`` #### 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\Group` $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\Group`` $obj A Group 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 Group object or a primary key value. #### Throws `PropelException` - if the value is invalid.
`public static `Thelia\Model\Group`` | # `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\Group`` 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 group by a foreign key with ON DELETE CASCADE Method to invalidate the instance pool of all tables related to group 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` (Group object, last column rank) #### 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 Group or Criteria object. Performs an INSERT on the database, given a Group or Criteria object. #### Parameters $values `mixed` $values Criteria or Group 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 Group or Criteria object. Performs an UPDATE on the database, given a Group or Criteria object. #### Parameters $values `mixed` $values Criteria or Group 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 group table. Deletes all rows from the group 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 Group or Criteria object OR a primary key value. Performs a DELETE on the database, given a Group or Criteria object OR a primary key value. #### Parameters $values `mixed` $values Criteria or Group 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\Group` $obj, mixed $cols = null )` Validates all modified columns of given Group 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 Group 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\Group`` $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\Group`` | # `retrieveByPK( integer $pk, PropelPDO $con = null )` Retrieve a single object by pkey. Retrieve a single object by pkey. #### Parameters $pk `integer` $pk the primary key. $con `PropelPDO` $con the connection to use #### Returns ``Thelia\Model\Group``
`public static `Thelia\Model\Group[]`` | # `retrieveByPKs( array $pks, PropelPDO $con = null )` Retrieve multiple objects by pkey. Retrieve multiple objects by pkey. #### Parameters $pks `array` $pks List of primary keys $con `PropelPDO` $con the connection to use #### Returns ``Thelia\Model\Group[]`` #### Throws `PropelException` Any exceptions caught during processing will be rethrown wrapped into a PropelException.

Constants summary
`string` | `DATABASE_NAME` | `'thelia'` | # the default database name for this class the default database name for this class
`string` | `TABLE_NAME` | `'group'` | # the table name for this class the table name for this class
`string` | `OM_CLASS` | `'Thelia\\Model\\Group'` | # the related Propel class for this table the related Propel class for this table
`string` | `TM_CLASS` | `'GroupTableMap'` | # the related TableMap class for this table the related TableMap class for this table
`integer` | `NUM_COLUMNS` | `4` | # 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` | `4` | # 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` | `'group.id'` | # the column name for the id field the column name for the id field
`string` | `CODE` | `'group.code'` | # the column name for the code field the column name for the code field
`string` | `CREATED_AT` | `'group.created_at'` | # the column name for the created_at field the column name for the created_at field
`string` | `UPDATED_AT` | `'group.updated_at'` | # the column name for the updated_at field the column name for the updated_at 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 *
`string` | `DEFAULT_LOCALE` | `'en_US'` | # The default locale to use for translations The default locale to use for translations

Properties summary
`public static array` | $instances | `array()` | # An identiy map to hold any loaded instances of Group 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 Group 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', 'Code', 'CreatedAt', 'UpdatedAt', ), BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'code', 'createdAt', 'updatedAt', ), BasePeer::TYPE_COLNAME => array (GroupPeer::ID, GroupPeer::CODE, GroupPeer::CREATED_AT, GroupPeer::UPDATED_AT, ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'CODE', 'CREATED_AT', 'UPDATED_AT', ), BasePeer::TYPE_FIELDNAME => array ('id', 'code', 'created_at', 'updated_at', ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) )` | # holds an array of fieldnames holds an array of fieldnames first dimension keys are the type constants e.g. GroupPeer::$fieldNames[GroupPeer::TYPE_PHPNAME][0] = 'Id'
`protected static array` | $fieldKeys | `array ( BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Code' => 1, 'CreatedAt' => 2, 'UpdatedAt' => 3, ), BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'code' => 1, 'createdAt' => 2, 'updatedAt' => 3, ), BasePeer::TYPE_COLNAME => array (GroupPeer::ID => 0, GroupPeer::CODE => 1, GroupPeer::CREATED_AT => 2, GroupPeer::UPDATED_AT => 3, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'CODE' => 1, 'CREATED_AT' => 2, 'UPDATED_AT' => 3, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'code' => 1, 'created_at' => 2, 'updated_at' => 3, ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, ) )` | # 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. GroupPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0