lib-model-om
[ class tree: lib-model-om ] [ index: lib-model-om ] [ all elements ]

Source for file BaseEtvaVolumePhysicalPeer.php

Documentation is available at BaseEtvaVolumePhysicalPeer.php

  1. <?php
  2.  
  3. /**
  4.  * Base static class for performing query and update operations on the 'volume_pysical' table.
  5.  *
  6.  * 
  7.  *
  8.  * This class was autogenerated by Propel 1.3.0-dev on:
  9.  *
  10.  * Thu Jun 18 14:28:38 2009
  11.  *
  12.  * @package    lib.model.om
  13.  */
  14. abstract class BaseEtvaVolumePhysicalPeer {
  15.  
  16.     /** the default database name for this class */
  17.     const DATABASE_NAME 'propel';
  18.  
  19.     /** the table name for this class */
  20.     const TABLE_NAME 'volume_pysical';
  21.  
  22.     /** A class that can be returned by this peer. */
  23.     const CLASS_DEFAULT 'lib.model.EtvaVolumePhysical';
  24.  
  25.     /** The total number of columns. */
  26.     const NUM_COLUMNS 3;
  27.  
  28.     /** The number of lazy-loaded columns. */
  29.     const NUM_LAZY_LOAD_COLUMNS 0;
  30.  
  31.     /** the column name for the ID field */
  32.     const ID 'volume_pysical.ID';
  33.  
  34.     /** the column name for the VOLUMEGROUP_ID field */
  35.     const VOLUMEGROUP_ID 'volume_pysical.VOLUMEGROUP_ID';
  36.  
  37.     /** the column name for the PHYSICALVOLUME_ID field */
  38.     const PHYSICALVOLUME_ID 'volume_pysical.PHYSICALVOLUME_ID';
  39.  
  40.     /**
  41.      * An identiy map to hold any loaded instances of EtvaVolumePhysical objects.
  42.      * This must be public so that other peer classes can access this when hydrating from JOIN
  43.      * queries.
  44.      * @var        array EtvaVolumePhysical[]
  45.      */
  46.     public static $instances array();
  47.  
  48.     /**
  49.      * The MapBuilder instance for this peer.
  50.      * @var        MapBuilder 
  51.      */
  52.     private static $mapBuilder null;
  53.  
  54.     /**
  55.      * holds an array of fieldnames
  56.      *
  57.      * first dimension keys are the type constants
  58.      * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
  59.      */
  60.     private static $fieldNames array (
  61.         BasePeer::TYPE_PHPNAME => array ('Id''VolumegroupId''PhysicalvolumeId'),
  62.         BasePeer::TYPE_STUDLYPHPNAME => array ('id''volumegroupId''physicalvolumeId'),
  63.         BasePeer::TYPE_COLNAME => array (self::IDself::VOLUMEGROUP_IDself::PHYSICALVOLUME_ID),
  64.         BasePeer::TYPE_FIELDNAME => array ('id''volumegroup_id''physicalvolume_id'),
  65.         BasePeer::TYPE_NUM => array (012)
  66.     );
  67.  
  68.     /**
  69.      * holds an array of keys for quick access to the fieldnames array
  70.      *
  71.      * first dimension keys are the type constants
  72.      * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
  73.      */
  74.     private static $fieldKeys array (
  75.         BasePeer::TYPE_PHPNAME => array ('Id' => 0'VolumegroupId' => 1'PhysicalvolumeId' => 2),
  76.         BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0'volumegroupId' => 1'physicalvolumeId' => 2),
  77.         BasePeer::TYPE_COLNAME => array (self::ID => 0self::VOLUMEGROUP_ID => 1self::PHYSICALVOLUME_ID => 2),
  78.         BasePeer::TYPE_FIELDNAME => array ('id' => 0'volumegroup_id' => 1'physicalvolume_id' => 2),
  79.         BasePeer::TYPE_NUM => array (012)
  80.     );
  81.  
  82.     /**
  83.      * Get a (singleton) instance of the MapBuilder for this peer class.
  84.      * @return     MapBuilder The map builder for this peer
  85.      */
  86.     public static function getMapBuilder()
  87.     {
  88.         if (self::$mapBuilder === null{
  89.             self::$mapBuilder new EtvaVolumePhysicalMapBuilder();
  90.         }
  91.         return self::$mapBuilder;
  92.     }
  93.     /**
  94.      * Translates a fieldname to another type
  95.      *
  96.      * @param      string $name field name
  97.      * @param      string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  98.      *                          BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  99.      * @param      string $toType   One of the class type constants
  100.      * @return     string translated name of the field.
  101.      * @throws     PropelException - if the specified name could not be found in the fieldname mappings.
  102.      */
  103.     static public function translateFieldName($name$fromType$toType)
  104.     {
  105.         $toNames self::getFieldNames($toType);
  106.         $key = isset(self::$fieldKeys[$fromType][$name]self::$fieldKeys[$fromType][$namenull;
  107.         if ($key === null{
  108.             throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: print_r(self::$fieldKeys[$fromType]true));
  109.         }
  110.         return $toNames[$key];
  111.     }
  112.  
  113.     /**
  114.      * Returns an array of field names.
  115.      *
  116.      * @param      string $type The type of fieldnames to return:
  117.      *                       One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  118.      *                       BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  119.      * @return     array A list of field names
  120.      */
  121.  
  122.     static public function getFieldNames($type BasePeer::TYPE_PHPNAME)
  123.     {
  124.         if (!array_key_exists($typeself::$fieldNames)) {
  125.             throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' $type ' was given.');
  126.         }
  127.         return self::$fieldNames[$type];
  128.     }
  129.  
  130.     /**
  131.      * Convenience method which changes table.column to alias.column.
  132.      *
  133.      * Using this method you can maintain SQL abstraction while using column aliases.
  134.      * <code>
  135.      *        $c->addAlias("alias1", TablePeer::TABLE_NAME);
  136.      *        $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
  137.      * </code>
  138.      * @param      string $alias The alias for the current table.
  139.      * @param      string $column The column name for current table. (i.e. EtvaVolumePhysicalPeer::COLUMN_NAME).
  140.      * @return     string 
  141.      */
  142.     public static function alias($alias$column)
  143.     {
  144.         return str_replace(EtvaVolumePhysicalPeer::TABLE_NAME.'.'$alias.'.'$column);
  145.     }
  146.  
  147.     /**
  148.      * Add all the columns needed to create a new object.
  149.      *
  150.      * Note: any columns that were marked with lazyLoad="true" in the
  151.      * XML schema will not be added to the select list and only loaded
  152.      * on demand.
  153.      *
  154.      * @param      criteria object containing the columns to add.
  155.      * @throws     PropelException Any exceptions caught during processing will be
  156.      *          rethrown wrapped into a PropelException.
  157.      */
  158.     public static function addSelectColumns(Criteria $criteria)
  159.     {
  160.  
  161.         $criteria->addSelectColumn(EtvaVolumePhysicalPeer::ID);
  162.  
  163.         $criteria->addSelectColumn(EtvaVolumePhysicalPeer::VOLUMEGROUP_ID);
  164.  
  165.         $criteria->addSelectColumn(EtvaVolumePhysicalPeer::PHYSICALVOLUME_ID);
  166.  
  167.     }
  168.  
  169.     /**
  170.      * Returns the number of rows matching criteria.
  171.      *
  172.      * @param      Criteria $criteria 
  173.      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  174.      * @param      PropelPDO $con 
  175.      * @return     int Number of matching rows.
  176.      */
  177.     public static function doCount(Criteria $criteria$distinct falsePropelPDO $con null)
  178.     {
  179.         // we may modify criteria, so copy it first
  180.         $criteria clone $criteria;
  181.  
  182.         // We need to set the primary table name, since in the case that there are no WHERE columns
  183.         // it will be impossible for the BasePeer::createSelectSql() method to determine which
  184.         // tables go into the FROM clause.
  185.         $criteria->setPrimaryTableName(EtvaVolumePhysicalPeer::TABLE_NAME);
  186.  
  187.         if ($distinct && !in_array(Criteria::DISTINCT$criteria->getSelectModifiers())) {
  188.             $criteria->setDistinct();
  189.         }
  190.  
  191.         if (!$criteria->hasSelectClause()) {
  192.             EtvaVolumePhysicalPeer::addSelectColumns($criteria);
  193.         }
  194.  
  195.         $criteria->clearOrderByColumns()// ORDER BY won't ever affect the count
  196.         $criteria->setDbName(self::DATABASE_NAME)// Set the correct dbName
  197.  
  198.         if ($con === null{
  199.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  200.         }
  201.  
  202.  
  203.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doCount:doCount'as $callable)
  204.     {
  205.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$criteria$con);
  206.     }
  207.  
  208.  
  209.         // BasePeer returns a PDOStatement
  210.         $stmt BasePeer::doCount($criteria$con);
  211.  
  212.         if ($row $stmt->fetch(PDO::FETCH_NUM)) {
  213.             $count = (int) $row[0];
  214.         else {
  215.             $count 0// no rows returned; we infer that means 0 matches.
  216.         }
  217.         $stmt->closeCursor();
  218.         return $count;
  219.     }
  220.     /**
  221.      * Method to select one object from the DB.
  222.      *
  223.      * @param      Criteria $criteria object used to create the SELECT statement.
  224.      * @param      PropelPDO $con 
  225.      * @return     EtvaVolumePhysical 
  226.      * @throws     PropelException Any exceptions caught during processing will be
  227.      *          rethrown wrapped into a PropelException.
  228.      */
  229.     public static function doSelectOne(Criteria $criteriaPropelPDO $con null)
  230.     {
  231.         $critcopy clone $criteria;
  232.         $critcopy->setLimit(1);
  233.         $objects EtvaVolumePhysicalPeer::doSelect($critcopy$con);
  234.         if ($objects{
  235.             return $objects[0];
  236.         }
  237.         return null;
  238.     }
  239.     /**
  240.      * Method to do selects.
  241.      *
  242.      * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  243.      * @param      PropelPDO $con 
  244.      * @return     array Array of selected Objects
  245.      * @throws     PropelException Any exceptions caught during processing will be
  246.      *          rethrown wrapped into a PropelException.
  247.      */
  248.     public static function doSelect(Criteria $criteriaPropelPDO $con null)
  249.     {
  250.         return EtvaVolumePhysicalPeer::populateObjects(EtvaVolumePhysicalPeer::doSelectStmt($criteria$con));
  251.     }
  252.     /**
  253.      * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
  254.      *
  255.      * Use this method directly if you want to work with an executed statement durirectly (for example
  256.      * to perform your own object hydration).
  257.      *
  258.      * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  259.      * @param      PropelPDO $con The connection to use
  260.      * @throws     PropelException Any exceptions caught during processing will be
  261.      *          rethrown wrapped into a PropelException.
  262.      * @return     PDOStatement The executed PDOStatement object.
  263.      * @see        BasePeer::doSelect()
  264.      */
  265.     public static function doSelectStmt(Criteria $criteriaPropelPDO $con null)
  266.     {
  267.  
  268.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doSelectStmt:doSelectStmt'as $callable)
  269.     {
  270.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$criteria$con);
  271.     }
  272.  
  273.  
  274.         if ($con === null{
  275.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  276.         }
  277.  
  278.         if (!$criteria->hasSelectClause()) {
  279.             $criteria clone $criteria;
  280.             EtvaVolumePhysicalPeer::addSelectColumns($criteria);
  281.         }
  282.  
  283.         // Set the correct dbName
  284.         $criteria->setDbName(self::DATABASE_NAME);
  285.  
  286.         // BasePeer returns a PDOStatement
  287.         return BasePeer::doSelect($criteria$con);
  288.     }
  289.     /**
  290.      * Adds an object to the instance pool.
  291.      *
  292.      * Propel keeps cached copies of objects in an instance pool when they are retrieved
  293.      * from the database.  In some cases -- especially when you override doSelect*()
  294.      * methods in your stub classes -- you may need to explicitly add objects
  295.      * to the cache in order to ensure that the same objects are always returned by doSelect*()
  296.      * and retrieveByPK*() calls.
  297.      *
  298.      * @param      EtvaVolumePhysical $value A EtvaVolumePhysical object.
  299.      * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  300.      */
  301.     public static function addInstanceToPool(EtvaVolumePhysical $obj$key null)
  302.     {
  303.         if (Propel::isInstancePoolingEnabled()) {
  304.             if ($key === null{
  305.                 $key = (string) $obj->getId();
  306.             // if key === null
  307.             self::$instances[$key$obj;
  308.         }
  309.     }
  310.  
  311.     /**
  312.      * Removes an object from the instance pool.
  313.      *
  314.      * Propel keeps cached copies of objects in an instance pool when they are retrieved
  315.      * from the database.  In some cases -- especially when you override doDelete
  316.      * methods in your stub classes -- you may need to explicitly remove objects
  317.      * from the cache in order to prevent returning objects that no longer exist.
  318.      *
  319.      * @param      mixed $value A EtvaVolumePhysical object or a primary key value.
  320.      */
  321.     public static function removeInstanceFromPool($value)
  322.     {
  323.         if (Propel::isInstancePoolingEnabled(&& $value !== null{
  324.             if (is_object($value&& $value instanceof EtvaVolumePhysical{
  325.                 $key = (string) $value->getId();
  326.             elseif (is_scalar($value)) {
  327.                 // assume we've been passed a primary key
  328.                 $key = (string) $value;
  329.             else {
  330.                 $e new PropelException("Invalid value passed to removeInstanceFromPool().  Expected primary key or EtvaVolumePhysical object; got " (is_object($valueget_class($value' object.' var_export($value,true)));
  331.                 throw $e;
  332.             }
  333.  
  334.             unset(self::$instances[$key]);
  335.         }
  336.     // removeInstanceFromPool()
  337.  
  338.     /**
  339.      * 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.
  340.      *
  341.      * For tables with a single-column primary key, that simple pkey value will be returned.  For tables with
  342.      * a multi-column primary key, a serialize()d version of the primary key will be returned.
  343.      *
  344.      * @param      string $key The key (@see getPrimaryKeyHash()) for this instance.
  345.      * @return     EtvaVolumePhysical Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
  346.      * @see        getPrimaryKeyHash()
  347.      */
  348.     public static function getInstanceFromPool($key)
  349.     {
  350.         if (Propel::isInstancePoolingEnabled()) {
  351.             if (isset(self::$instances[$key])) {
  352.                 return self::$instances[$key];
  353.             }
  354.         }
  355.         return null// just to be explicit
  356.     }
  357.     
  358.     /**
  359.      * Clear the instance pool.
  360.      *
  361.      * @return     void 
  362.      */
  363.     public static function clearInstancePool()
  364.     {
  365.         self::$instances array();
  366.     }
  367.     
  368.     /**
  369.      * 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.
  370.      *
  371.      * For tables with a single-column primary key, that simple pkey value will be returned.  For tables with
  372.      * a multi-column primary key, a serialize()d version of the primary key will be returned.
  373.      *
  374.      * @param      array $row PropelPDO resultset row.
  375.      * @param      int $startcol The 0-based offset for reading from the resultset row.
  376.      * @return     string A string version of PK or NULL if the components of primary key in result array are all null.
  377.      */
  378.     public static function getPrimaryKeyHashFromRow($row$startcol 0)
  379.     {
  380.         // If the PK cannot be derived from the row, return NULL.
  381.         if ($row[$startcol 0=== null{
  382.             return null;
  383.         }
  384.         return (string) $row[$startcol 0];
  385.     }
  386.  
  387.     /**
  388.      * The returned array will contain objects of the default type or
  389.      * objects that inherit from the default.
  390.      *
  391.      * @throws     PropelException Any exceptions caught during processing will be
  392.      *          rethrown wrapped into a PropelException.
  393.      */
  394.     public static function populateObjects(PDOStatement $stmt)
  395.     {
  396.         $results array();
  397.     
  398.         // set the class once to avoid overhead in the loop
  399.         $cls EtvaVolumePhysicalPeer::getOMClass();
  400.         $cls substr('.'.$clsstrrpos('.'.$cls'.'1);
  401.         // populate the object(s)
  402.         while ($row $stmt->fetch(PDO::FETCH_NUM)) {
  403.             $key EtvaVolumePhysicalPeer::getPrimaryKeyHashFromRow($row0);
  404.             if (null !== ($obj EtvaVolumePhysicalPeer::getInstanceFromPool($key))) {
  405.                 // We no longer rehydrate the object, since this can cause data loss.
  406.                 // See http://propel.phpdb.org/trac/ticket/509
  407.                 // $obj->hydrate($row, 0, true); // rehydrate
  408.                 $results[$obj;
  409.             else {
  410.         
  411.                 $obj new $cls();
  412.                 $obj->hydrate($row);
  413.                 $results[$obj;
  414.                 EtvaVolumePhysicalPeer::addInstanceToPool($obj$key);
  415.             // if key exists
  416.         }
  417.         $stmt->closeCursor();
  418.         return $results;
  419.     }
  420.  
  421.     /**
  422.      * Returns the number of rows matching criteria, joining the related EtvaVolumegroup table
  423.      *
  424.      * @param      Criteria $c 
  425.      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  426.      * @param      PropelPDO $con 
  427.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  428.      * @return     int Number of matching rows.
  429.      */
  430.     public static function doCountJoinEtvaVolumegroup(Criteria $criteria$distinct falsePropelPDO $con null$join_behavior Criteria::LEFT_JOIN)
  431.     {
  432.         // we're going to modify criteria, so copy it first
  433.         $criteria clone $criteria;
  434.  
  435.         // We need to set the primary table name, since in the case that there are no WHERE columns
  436.         // it will be impossible for the BasePeer::createSelectSql() method to determine which
  437.         // tables go into the FROM clause.
  438.         $criteria->setPrimaryTableName(EtvaVolumePhysicalPeer::TABLE_NAME);
  439.  
  440.         if ($distinct && !in_array(Criteria::DISTINCT$criteria->getSelectModifiers())) {
  441.             $criteria->setDistinct();
  442.         }
  443.  
  444.         if (!$criteria->hasSelectClause()) {
  445.             EtvaVolumePhysicalPeer::addSelectColumns($criteria);
  446.         }
  447.  
  448.         $criteria->clearOrderByColumns()// ORDER BY won't ever affect the count
  449.  
  450.         // Set the correct dbName
  451.         $criteria->setDbName(self::DATABASE_NAME);
  452.  
  453.         if ($con === null{
  454.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  455.         }
  456.  
  457.         $criteria->addJoin(array(EtvaVolumePhysicalPeer::VOLUMEGROUP_ID,)array(EtvaVolumegroupPeer::ID,)$join_behavior);
  458.  
  459.  
  460.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doCount:doCount'as $callable)
  461.     {
  462.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$criteria$con);
  463.     }
  464.  
  465.  
  466.         $stmt BasePeer::doCount($criteria$con);
  467.  
  468.         if ($row $stmt->fetch(PDO::FETCH_NUM)) {
  469.             $count = (int) $row[0];
  470.         else {
  471.             $count 0// no rows returned; we infer that means 0 matches.
  472.         }
  473.         $stmt->closeCursor();
  474.         return $count;
  475.     }
  476.  
  477.  
  478.     /**
  479.      * Returns the number of rows matching criteria, joining the related EtvaPhysicalvolume table
  480.      *
  481.      * @param      Criteria $c 
  482.      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  483.      * @param      PropelPDO $con 
  484.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  485.      * @return     int Number of matching rows.
  486.      */
  487.     public static function doCountJoinEtvaPhysicalvolume(Criteria $criteria$distinct falsePropelPDO $con null$join_behavior Criteria::LEFT_JOIN)
  488.     {
  489.         // we're going to modify criteria, so copy it first
  490.         $criteria clone $criteria;
  491.  
  492.         // We need to set the primary table name, since in the case that there are no WHERE columns
  493.         // it will be impossible for the BasePeer::createSelectSql() method to determine which
  494.         // tables go into the FROM clause.
  495.         $criteria->setPrimaryTableName(EtvaVolumePhysicalPeer::TABLE_NAME);
  496.  
  497.         if ($distinct && !in_array(Criteria::DISTINCT$criteria->getSelectModifiers())) {
  498.             $criteria->setDistinct();
  499.         }
  500.  
  501.         if (!$criteria->hasSelectClause()) {
  502.             EtvaVolumePhysicalPeer::addSelectColumns($criteria);
  503.         }
  504.  
  505.         $criteria->clearOrderByColumns()// ORDER BY won't ever affect the count
  506.  
  507.         // Set the correct dbName
  508.         $criteria->setDbName(self::DATABASE_NAME);
  509.  
  510.         if ($con === null{
  511.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  512.         }
  513.  
  514.         $criteria->addJoin(array(EtvaVolumePhysicalPeer::PHYSICALVOLUME_ID,)array(EtvaPhysicalvolumePeer::ID,)$join_behavior);
  515.  
  516.  
  517.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doCount:doCount'as $callable)
  518.     {
  519.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$criteria$con);
  520.     }
  521.  
  522.  
  523.         $stmt BasePeer::doCount($criteria$con);
  524.  
  525.         if ($row $stmt->fetch(PDO::FETCH_NUM)) {
  526.             $count = (int) $row[0];
  527.         else {
  528.             $count 0// no rows returned; we infer that means 0 matches.
  529.         }
  530.         $stmt->closeCursor();
  531.         return $count;
  532.     }
  533.  
  534.  
  535.     /**
  536.      * Selects a collection of EtvaVolumePhysical objects pre-filled with their EtvaVolumegroup objects.
  537.      * @param      Criteria  $c 
  538.      * @param      PropelPDO $con 
  539.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  540.      * @return     array Array of EtvaVolumePhysical objects.
  541.      * @throws     PropelException Any exceptions caught during processing will be
  542.      *          rethrown wrapped into a PropelException.
  543.      */
  544.     public static function doSelectJoinEtvaVolumegroup(Criteria $c$con null$join_behavior Criteria::LEFT_JOIN)
  545.     {
  546.  
  547.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doSelectJoin:doSelectJoin'as $callable)
  548.     {
  549.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$c$con);
  550.     }
  551.  
  552.  
  553.         $c clone $c;
  554.  
  555.         // Set the correct dbName if it has not been overridden
  556.         if ($c->getDbName(== Propel::getDefaultDB()) {
  557.             $c->setDbName(self::DATABASE_NAME);
  558.         }
  559.  
  560.         EtvaVolumePhysicalPeer::addSelectColumns($c);
  561.         $startcol (EtvaVolumePhysicalPeer::NUM_COLUMNS EtvaVolumePhysicalPeer::NUM_LAZY_LOAD_COLUMNS);
  562.         EtvaVolumegroupPeer::addSelectColumns($c);
  563.  
  564.         $c->addJoin(array(EtvaVolumePhysicalPeer::VOLUMEGROUP_ID,)array(EtvaVolumegroupPeer::ID,)$join_behavior);
  565.         $stmt BasePeer::doSelect($c$con);
  566.         $results array();
  567.  
  568.         while ($row $stmt->fetch(PDO::FETCH_NUM)) {
  569.             $key1 EtvaVolumePhysicalPeer::getPrimaryKeyHashFromRow($row0);
  570.             if (null !== ($obj1 EtvaVolumePhysicalPeer::getInstanceFromPool($key1))) {
  571.                 // We no longer rehydrate the object, since this can cause data loss.
  572.                 // See http://propel.phpdb.org/trac/ticket/509
  573.                 // $obj1->hydrate($row, 0, true); // rehydrate
  574.             else {
  575.  
  576.                 $omClass EtvaVolumePhysicalPeer::getOMClass();
  577.  
  578.                 $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  579.                 $obj1 new $cls();
  580.                 $obj1->hydrate($row);
  581.                 EtvaVolumePhysicalPeer::addInstanceToPool($obj1$key1);
  582.             // if $obj1 already loaded
  583.  
  584.             $key2 EtvaVolumegroupPeer::getPrimaryKeyHashFromRow($row$startcol);
  585.             if ($key2 !== null{
  586.                 $obj2 EtvaVolumegroupPeer::getInstanceFromPool($key2);
  587.                 if (!$obj2{
  588.  
  589.                     $omClass EtvaVolumegroupPeer::getOMClass();
  590.  
  591.                     $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  592.                     $obj2 new $cls();
  593.                     $obj2->hydrate($row$startcol);
  594.                     EtvaVolumegroupPeer::addInstanceToPool($obj2$key2);
  595.                 // if obj2 already loaded
  596.  
  597.                 // Add the $obj1 (EtvaVolumePhysical) to $obj2 (EtvaVolumegroup)
  598.                 $obj2->addEtvaVolumePhysical($obj1);
  599.  
  600.             // if joined row was not null
  601.  
  602.             $results[$obj1;
  603.         }
  604.         $stmt->closeCursor();
  605.         return $results;
  606.     }
  607.  
  608.  
  609.     /**
  610.      * Selects a collection of EtvaVolumePhysical objects pre-filled with their EtvaPhysicalvolume objects.
  611.      * @param      Criteria  $c 
  612.      * @param      PropelPDO $con 
  613.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  614.      * @return     array Array of EtvaVolumePhysical objects.
  615.      * @throws     PropelException Any exceptions caught during processing will be
  616.      *          rethrown wrapped into a PropelException.
  617.      */
  618.     public static function doSelectJoinEtvaPhysicalvolume(Criteria $c$con null$join_behavior Criteria::LEFT_JOIN)
  619.     {
  620.         $c clone $c;
  621.  
  622.         // Set the correct dbName if it has not been overridden
  623.         if ($c->getDbName(== Propel::getDefaultDB()) {
  624.             $c->setDbName(self::DATABASE_NAME);
  625.         }
  626.  
  627.         EtvaVolumePhysicalPeer::addSelectColumns($c);
  628.         $startcol (EtvaVolumePhysicalPeer::NUM_COLUMNS EtvaVolumePhysicalPeer::NUM_LAZY_LOAD_COLUMNS);
  629.         EtvaPhysicalvolumePeer::addSelectColumns($c);
  630.  
  631.         $c->addJoin(array(EtvaVolumePhysicalPeer::PHYSICALVOLUME_ID,)array(EtvaPhysicalvolumePeer::ID,)$join_behavior);
  632.         $stmt BasePeer::doSelect($c$con);
  633.         $results array();
  634.  
  635.         while ($row $stmt->fetch(PDO::FETCH_NUM)) {
  636.             $key1 EtvaVolumePhysicalPeer::getPrimaryKeyHashFromRow($row0);
  637.             if (null !== ($obj1 EtvaVolumePhysicalPeer::getInstanceFromPool($key1))) {
  638.                 // We no longer rehydrate the object, since this can cause data loss.
  639.                 // See http://propel.phpdb.org/trac/ticket/509
  640.                 // $obj1->hydrate($row, 0, true); // rehydrate
  641.             else {
  642.  
  643.                 $omClass EtvaVolumePhysicalPeer::getOMClass();
  644.  
  645.                 $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  646.                 $obj1 new $cls();
  647.                 $obj1->hydrate($row);
  648.                 EtvaVolumePhysicalPeer::addInstanceToPool($obj1$key1);
  649.             // if $obj1 already loaded
  650.  
  651.             $key2 EtvaPhysicalvolumePeer::getPrimaryKeyHashFromRow($row$startcol);
  652.             if ($key2 !== null{
  653.                 $obj2 EtvaPhysicalvolumePeer::getInstanceFromPool($key2);
  654.                 if (!$obj2{
  655.  
  656.                     $omClass EtvaPhysicalvolumePeer::getOMClass();
  657.  
  658.                     $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  659.                     $obj2 new $cls();
  660.                     $obj2->hydrate($row$startcol);
  661.                     EtvaPhysicalvolumePeer::addInstanceToPool($obj2$key2);
  662.                 // if obj2 already loaded
  663.  
  664.                 // Add the $obj1 (EtvaVolumePhysical) to $obj2 (EtvaPhysicalvolume)
  665.                 $obj2->addEtvaVolumePhysical($obj1);
  666.  
  667.             // if joined row was not null
  668.  
  669.             $results[$obj1;
  670.         }
  671.         $stmt->closeCursor();
  672.         return $results;
  673.     }
  674.  
  675.  
  676.     /**
  677.      * Returns the number of rows matching criteria, joining all related tables
  678.      *
  679.      * @param      Criteria $c 
  680.      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  681.      * @param      PropelPDO $con 
  682.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  683.      * @return     int Number of matching rows.
  684.      */
  685.     public static function doCountJoinAll(Criteria $criteria$distinct falsePropelPDO $con null$join_behavior Criteria::LEFT_JOIN)
  686.     {
  687.         // we're going to modify criteria, so copy it first
  688.         $criteria clone $criteria;
  689.  
  690.         // We need to set the primary table name, since in the case that there are no WHERE columns
  691.         // it will be impossible for the BasePeer::createSelectSql() method to determine which
  692.         // tables go into the FROM clause.
  693.         $criteria->setPrimaryTableName(EtvaVolumePhysicalPeer::TABLE_NAME);
  694.  
  695.         if ($distinct && !in_array(Criteria::DISTINCT$criteria->getSelectModifiers())) {
  696.             $criteria->setDistinct();
  697.         }
  698.  
  699.         if (!$criteria->hasSelectClause()) {
  700.             EtvaVolumePhysicalPeer::addSelectColumns($criteria);
  701.         }
  702.  
  703.         $criteria->clearOrderByColumns()// ORDER BY won't ever affect the count
  704.  
  705.         // Set the correct dbName
  706.         $criteria->setDbName(self::DATABASE_NAME);
  707.  
  708.         if ($con === null{
  709.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  710.         }
  711.  
  712.         $criteria->addJoin(array(EtvaVolumePhysicalPeer::VOLUMEGROUP_ID,)array(EtvaVolumegroupPeer::ID,)$join_behavior);
  713.         $criteria->addJoin(array(EtvaVolumePhysicalPeer::PHYSICALVOLUME_ID,)array(EtvaPhysicalvolumePeer::ID,)$join_behavior);
  714.  
  715.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doCount:doCount'as $callable)
  716.     {
  717.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$criteria$con);
  718.     }
  719.  
  720.  
  721.         $stmt BasePeer::doCount($criteria$con);
  722.  
  723.         if ($row $stmt->fetch(PDO::FETCH_NUM)) {
  724.             $count = (int) $row[0];
  725.         else {
  726.             $count 0// no rows returned; we infer that means 0 matches.
  727.         }
  728.         $stmt->closeCursor();
  729.         return $count;
  730.     }
  731.  
  732.     /**
  733.      * Selects a collection of EtvaVolumePhysical objects pre-filled with all related objects.
  734.      *
  735.      * @param      Criteria  $c 
  736.      * @param      PropelPDO $con 
  737.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  738.      * @return     array Array of EtvaVolumePhysical objects.
  739.      * @throws     PropelException Any exceptions caught during processing will be
  740.      *          rethrown wrapped into a PropelException.
  741.      */
  742.     public static function doSelectJoinAll(Criteria $c$con null$join_behavior Criteria::LEFT_JOIN)
  743.     {
  744.  
  745.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doSelectJoinAll:doSelectJoinAll'as $callable)
  746.     {
  747.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$c$con);
  748.     }
  749.  
  750.  
  751.         $c clone $c;
  752.  
  753.         // Set the correct dbName if it has not been overridden
  754.         if ($c->getDbName(== Propel::getDefaultDB()) {
  755.             $c->setDbName(self::DATABASE_NAME);
  756.         }
  757.  
  758.         EtvaVolumePhysicalPeer::addSelectColumns($c);
  759.         $startcol2 (EtvaVolumePhysicalPeer::NUM_COLUMNS EtvaVolumePhysicalPeer::NUM_LAZY_LOAD_COLUMNS);
  760.  
  761.         EtvaVolumegroupPeer::addSelectColumns($c);
  762.         $startcol3 $startcol2 (EtvaVolumegroupPeer::NUM_COLUMNS EtvaVolumegroupPeer::NUM_LAZY_LOAD_COLUMNS);
  763.  
  764.         EtvaPhysicalvolumePeer::addSelectColumns($c);
  765.         $startcol4 $startcol3 (EtvaPhysicalvolumePeer::NUM_COLUMNS EtvaPhysicalvolumePeer::NUM_LAZY_LOAD_COLUMNS);
  766.  
  767.         $c->addJoin(array(EtvaVolumePhysicalPeer::VOLUMEGROUP_ID,)array(EtvaVolumegroupPeer::ID,)$join_behavior);
  768.         $c->addJoin(array(EtvaVolumePhysicalPeer::PHYSICALVOLUME_ID,)array(EtvaPhysicalvolumePeer::ID,)$join_behavior);
  769.         $stmt BasePeer::doSelect($c$con);
  770.         $results array();
  771.  
  772.         while ($row $stmt->fetch(PDO::FETCH_NUM)) {
  773.             $key1 EtvaVolumePhysicalPeer::getPrimaryKeyHashFromRow($row0);
  774.             if (null !== ($obj1 EtvaVolumePhysicalPeer::getInstanceFromPool($key1))) {
  775.                 // We no longer rehydrate the object, since this can cause data loss.
  776.                 // See http://propel.phpdb.org/trac/ticket/509
  777.                 // $obj1->hydrate($row, 0, true); // rehydrate
  778.             else {
  779.                 $omClass EtvaVolumePhysicalPeer::getOMClass();
  780.  
  781.                 $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  782.                 $obj1 new $cls();
  783.                 $obj1->hydrate($row);
  784.                 EtvaVolumePhysicalPeer::addInstanceToPool($obj1$key1);
  785.             // if obj1 already loaded
  786.  
  787.             // Add objects for joined EtvaVolumegroup rows
  788.  
  789.             $key2 EtvaVolumegroupPeer::getPrimaryKeyHashFromRow($row$startcol2);
  790.             if ($key2 !== null{
  791.                 $obj2 EtvaVolumegroupPeer::getInstanceFromPool($key2);
  792.                 if (!$obj2{
  793.  
  794.                     $omClass EtvaVolumegroupPeer::getOMClass();
  795.  
  796.  
  797.                     $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  798.                     $obj2 new $cls();
  799.                     $obj2->hydrate($row$startcol2);
  800.                     EtvaVolumegroupPeer::addInstanceToPool($obj2$key2);
  801.                 // if obj2 loaded
  802.  
  803.                 // Add the $obj1 (EtvaVolumePhysical) to the collection in $obj2 (EtvaVolumegroup)
  804.                 $obj2->addEtvaVolumePhysical($obj1);
  805.             // if joined row not null
  806.  
  807.             // Add objects for joined EtvaPhysicalvolume rows
  808.  
  809.             $key3 EtvaPhysicalvolumePeer::getPrimaryKeyHashFromRow($row$startcol3);
  810.             if ($key3 !== null{
  811.                 $obj3 EtvaPhysicalvolumePeer::getInstanceFromPool($key3);
  812.                 if (!$obj3{
  813.  
  814.                     $omClass EtvaPhysicalvolumePeer::getOMClass();
  815.  
  816.  
  817.                     $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  818.                     $obj3 new $cls();
  819.                     $obj3->hydrate($row$startcol3);
  820.                     EtvaPhysicalvolumePeer::addInstanceToPool($obj3$key3);
  821.                 // if obj3 loaded
  822.  
  823.                 // Add the $obj1 (EtvaVolumePhysical) to the collection in $obj3 (EtvaPhysicalvolume)
  824.                 $obj3->addEtvaVolumePhysical($obj1);
  825.             // if joined row not null
  826.  
  827.             $results[$obj1;
  828.         }
  829.         $stmt->closeCursor();
  830.         return $results;
  831.     }
  832.  
  833.  
  834.     /**
  835.      * Returns the number of rows matching criteria, joining the related EtvaVolumegroup table
  836.      *
  837.      * @param      Criteria $c 
  838.      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  839.      * @param      PropelPDO $con 
  840.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  841.      * @return     int Number of matching rows.
  842.      */
  843.     public static function doCountJoinAllExceptEtvaVolumegroup(Criteria $criteria$distinct falsePropelPDO $con null$join_behavior Criteria::LEFT_JOIN)
  844.     {
  845.         // we're going to modify criteria, so copy it first
  846.         $criteria clone $criteria;
  847.  
  848.         if ($distinct && !in_array(Criteria::DISTINCT$criteria->getSelectModifiers())) {
  849.             $criteria->setDistinct();
  850.         }
  851.  
  852.         if (!$criteria->hasSelectClause()) {
  853.             EtvaVolumePhysicalPeer::addSelectColumns($criteria);
  854.         }
  855.  
  856.         $criteria->clearOrderByColumns()// ORDER BY won't ever affect the count
  857.  
  858.         // Set the correct dbName
  859.         $criteria->setDbName(self::DATABASE_NAME);
  860.  
  861.         if ($con === null{
  862.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  863.         }
  864.     
  865.                 $criteria->addJoin(array(EtvaVolumePhysicalPeer::PHYSICALVOLUME_ID,)array(EtvaPhysicalvolumePeer::ID,)$join_behavior);
  866.  
  867.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doCount:doCount'as $callable)
  868.     {
  869.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$criteria$con);
  870.     }
  871.  
  872.  
  873.         $stmt BasePeer::doCount($criteria$con);
  874.  
  875.         if ($row $stmt->fetch(PDO::FETCH_NUM)) {
  876.             $count = (int) $row[0];
  877.         else {
  878.             $count 0// no rows returned; we infer that means 0 matches.
  879.         }
  880.         $stmt->closeCursor();
  881.         return $count;
  882.     }
  883.  
  884.  
  885.     /**
  886.      * Returns the number of rows matching criteria, joining the related EtvaPhysicalvolume table
  887.      *
  888.      * @param      Criteria $c 
  889.      * @param      boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  890.      * @param      PropelPDO $con 
  891.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  892.      * @return     int Number of matching rows.
  893.      */
  894.     public static function doCountJoinAllExceptEtvaPhysicalvolume(Criteria $criteria$distinct falsePropelPDO $con null$join_behavior Criteria::LEFT_JOIN)
  895.     {
  896.         // we're going to modify criteria, so copy it first
  897.         $criteria clone $criteria;
  898.  
  899.         if ($distinct && !in_array(Criteria::DISTINCT$criteria->getSelectModifiers())) {
  900.             $criteria->setDistinct();
  901.         }
  902.  
  903.         if (!$criteria->hasSelectClause()) {
  904.             EtvaVolumePhysicalPeer::addSelectColumns($criteria);
  905.         }
  906.  
  907.         $criteria->clearOrderByColumns()// ORDER BY won't ever affect the count
  908.  
  909.         // Set the correct dbName
  910.         $criteria->setDbName(self::DATABASE_NAME);
  911.  
  912.         if ($con === null{
  913.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  914.         }
  915.     
  916.                 $criteria->addJoin(array(EtvaVolumePhysicalPeer::VOLUMEGROUP_ID,)array(EtvaVolumegroupPeer::ID,)$join_behavior);
  917.  
  918.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doCount:doCount'as $callable)
  919.     {
  920.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$criteria$con);
  921.     }
  922.  
  923.  
  924.         $stmt BasePeer::doCount($criteria$con);
  925.  
  926.         if ($row $stmt->fetch(PDO::FETCH_NUM)) {
  927.             $count = (int) $row[0];
  928.         else {
  929.             $count 0// no rows returned; we infer that means 0 matches.
  930.         }
  931.         $stmt->closeCursor();
  932.         return $count;
  933.     }
  934.  
  935.  
  936.     /**
  937.      * Selects a collection of EtvaVolumePhysical objects pre-filled with all related objects except EtvaVolumegroup.
  938.      *
  939.      * @param      Criteria  $c 
  940.      * @param      PropelPDO $con 
  941.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  942.      * @return     array Array of EtvaVolumePhysical objects.
  943.      * @throws     PropelException Any exceptions caught during processing will be
  944.      *          rethrown wrapped into a PropelException.
  945.      */
  946.     public static function doSelectJoinAllExceptEtvaVolumegroup(Criteria $c$con null$join_behavior Criteria::LEFT_JOIN)
  947.     {
  948.  
  949.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doSelectJoinAllExcept:doSelectJoinAllExcept'as $callable)
  950.     {
  951.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$c$con);
  952.     }
  953.  
  954.  
  955.         $c clone $c;
  956.  
  957.         // Set the correct dbName if it has not been overridden
  958.         // $c->getDbName() will return the same object if not set to another value
  959.         // so == check is okay and faster
  960.         if ($c->getDbName(== Propel::getDefaultDB()) {
  961.             $c->setDbName(self::DATABASE_NAME);
  962.         }
  963.  
  964.         EtvaVolumePhysicalPeer::addSelectColumns($c);
  965.         $startcol2 (EtvaVolumePhysicalPeer::NUM_COLUMNS EtvaVolumePhysicalPeer::NUM_LAZY_LOAD_COLUMNS);
  966.  
  967.         EtvaPhysicalvolumePeer::addSelectColumns($c);
  968.         $startcol3 $startcol2 (EtvaPhysicalvolumePeer::NUM_COLUMNS EtvaPhysicalvolumePeer::NUM_LAZY_LOAD_COLUMNS);
  969.  
  970.                 $c->addJoin(array(EtvaVolumePhysicalPeer::PHYSICALVOLUME_ID,)array(EtvaPhysicalvolumePeer::ID,)$join_behavior);
  971.  
  972.         $stmt BasePeer::doSelect($c$con);
  973.         $results array();
  974.  
  975.         while ($row $stmt->fetch(PDO::FETCH_NUM)) {
  976.             $key1 EtvaVolumePhysicalPeer::getPrimaryKeyHashFromRow($row0);
  977.             if (null !== ($obj1 EtvaVolumePhysicalPeer::getInstanceFromPool($key1))) {
  978.                 // We no longer rehydrate the object, since this can cause data loss.
  979.                 // See http://propel.phpdb.org/trac/ticket/509
  980.                 // $obj1->hydrate($row, 0, true); // rehydrate
  981.             else {
  982.                 $omClass EtvaVolumePhysicalPeer::getOMClass();
  983.  
  984.                 $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  985.                 $obj1 new $cls();
  986.                 $obj1->hydrate($row);
  987.                 EtvaVolumePhysicalPeer::addInstanceToPool($obj1$key1);
  988.             // if obj1 already loaded
  989.  
  990.                 // Add objects for joined EtvaPhysicalvolume rows
  991.  
  992.                 $key2 EtvaPhysicalvolumePeer::getPrimaryKeyHashFromRow($row$startcol2);
  993.                 if ($key2 !== null{
  994.                     $obj2 EtvaPhysicalvolumePeer::getInstanceFromPool($key2);
  995.                     if (!$obj2{
  996.     
  997.                         $omClass EtvaPhysicalvolumePeer::getOMClass();
  998.  
  999.  
  1000.                     $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  1001.                     $obj2 new $cls();
  1002.                     $obj2->hydrate($row$startcol2);
  1003.                     EtvaPhysicalvolumePeer::addInstanceToPool($obj2$key2);
  1004.                 // if $obj2 already loaded
  1005.  
  1006.                 // Add the $obj1 (EtvaVolumePhysical) to the collection in $obj2 (EtvaPhysicalvolume)
  1007.                 $obj2->addEtvaVolumePhysical($obj1);
  1008.  
  1009.             // if joined row is not null
  1010.  
  1011.             $results[$obj1;
  1012.         }
  1013.         $stmt->closeCursor();
  1014.         return $results;
  1015.     }
  1016.  
  1017.  
  1018.     /**
  1019.      * Selects a collection of EtvaVolumePhysical objects pre-filled with all related objects except EtvaPhysicalvolume.
  1020.      *
  1021.      * @param      Criteria  $c 
  1022.      * @param      PropelPDO $con 
  1023.      * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1024.      * @return     array Array of EtvaVolumePhysical objects.
  1025.      * @throws     PropelException Any exceptions caught during processing will be
  1026.      *          rethrown wrapped into a PropelException.
  1027.      */
  1028.     public static function doSelectJoinAllExceptEtvaPhysicalvolume(Criteria $c$con null$join_behavior Criteria::LEFT_JOIN)
  1029.     {
  1030.         $c clone $c;
  1031.  
  1032.         // Set the correct dbName if it has not been overridden
  1033.         // $c->getDbName() will return the same object if not set to another value
  1034.         // so == check is okay and faster
  1035.         if ($c->getDbName(== Propel::getDefaultDB()) {
  1036.             $c->setDbName(self::DATABASE_NAME);
  1037.         }
  1038.  
  1039.         EtvaVolumePhysicalPeer::addSelectColumns($c);
  1040.         $startcol2 (EtvaVolumePhysicalPeer::NUM_COLUMNS EtvaVolumePhysicalPeer::NUM_LAZY_LOAD_COLUMNS);
  1041.  
  1042.         EtvaVolumegroupPeer::addSelectColumns($c);
  1043.         $startcol3 $startcol2 (EtvaVolumegroupPeer::NUM_COLUMNS EtvaVolumegroupPeer::NUM_LAZY_LOAD_COLUMNS);
  1044.  
  1045.                 $c->addJoin(array(EtvaVolumePhysicalPeer::VOLUMEGROUP_ID,)array(EtvaVolumegroupPeer::ID,)$join_behavior);
  1046.  
  1047.         $stmt BasePeer::doSelect($c$con);
  1048.         $results array();
  1049.  
  1050.         while ($row $stmt->fetch(PDO::FETCH_NUM)) {
  1051.             $key1 EtvaVolumePhysicalPeer::getPrimaryKeyHashFromRow($row0);
  1052.             if (null !== ($obj1 EtvaVolumePhysicalPeer::getInstanceFromPool($key1))) {
  1053.                 // We no longer rehydrate the object, since this can cause data loss.
  1054.                 // See http://propel.phpdb.org/trac/ticket/509
  1055.                 // $obj1->hydrate($row, 0, true); // rehydrate
  1056.             else {
  1057.                 $omClass EtvaVolumePhysicalPeer::getOMClass();
  1058.  
  1059.                 $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  1060.                 $obj1 new $cls();
  1061.                 $obj1->hydrate($row);
  1062.                 EtvaVolumePhysicalPeer::addInstanceToPool($obj1$key1);
  1063.             // if obj1 already loaded
  1064.  
  1065.                 // Add objects for joined EtvaVolumegroup rows
  1066.  
  1067.                 $key2 EtvaVolumegroupPeer::getPrimaryKeyHashFromRow($row$startcol2);
  1068.                 if ($key2 !== null{
  1069.                     $obj2 EtvaVolumegroupPeer::getInstanceFromPool($key2);
  1070.                     if (!$obj2{
  1071.     
  1072.                         $omClass EtvaVolumegroupPeer::getOMClass();
  1073.  
  1074.  
  1075.                     $cls substr('.'.$omClassstrrpos('.'.$omClass'.'1);
  1076.                     $obj2 new $cls();
  1077.                     $obj2->hydrate($row$startcol2);
  1078.                     EtvaVolumegroupPeer::addInstanceToPool($obj2$key2);
  1079.                 // if $obj2 already loaded
  1080.  
  1081.                 // Add the $obj1 (EtvaVolumePhysical) to the collection in $obj2 (EtvaVolumegroup)
  1082.                 $obj2->addEtvaVolumePhysical($obj1);
  1083.  
  1084.             // if joined row is not null
  1085.  
  1086.             $results[$obj1;
  1087.         }
  1088.         $stmt->closeCursor();
  1089.         return $results;
  1090.     }
  1091.  
  1092.  
  1093.   static public function getUniqueColumnNames()
  1094.   {
  1095.     return array();
  1096.   }
  1097.     /**
  1098.      * Returns the TableMap related to this peer.
  1099.      * This method is not needed for general use but a specific application could have a need.
  1100.      * @return     TableMap 
  1101.      * @throws     PropelException Any exceptions caught during processing will be
  1102.      *          rethrown wrapped into a PropelException.
  1103.      */
  1104.     public static function getTableMap()
  1105.     {
  1106.         return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
  1107.     }
  1108.  
  1109.     /**
  1110.      * The class that the Peer will make instances of.
  1111.      *
  1112.      * This uses a dot-path notation which is tranalted into a path
  1113.      * relative to a location on the PHP include_path.
  1114.      * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
  1115.      *
  1116.      * @return     string path.to.ClassName
  1117.      */
  1118.     public static function getOMClass()
  1119.     {
  1120.         return EtvaVolumePhysicalPeer::CLASS_DEFAULT;
  1121.     }
  1122.  
  1123.     /**
  1124.      * Method perform an INSERT on the database, given a EtvaVolumePhysical or Criteria object.
  1125.      *
  1126.      * @param      mixed $values Criteria or EtvaVolumePhysical object containing data that is used to create the INSERT statement.
  1127.      * @param      PropelPDO $con the PropelPDO connection to use
  1128.      * @return     mixed The new primary key.
  1129.      * @throws     PropelException Any exceptions caught during processing will be
  1130.      *          rethrown wrapped into a PropelException.
  1131.      */
  1132.     public static function doInsert($valuesPropelPDO $con null)
  1133.     {
  1134.  
  1135.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doInsert:pre'as $callable)
  1136.     {
  1137.       $ret call_user_func($callable'BaseEtvaVolumePhysicalPeer'$values$con);
  1138.       if (false !== $ret)
  1139.       {
  1140.         return $ret;
  1141.       }
  1142.     }
  1143.  
  1144.  
  1145.         if ($con === null{
  1146.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_WRITE);
  1147.         }
  1148.  
  1149.         if ($values instanceof Criteria{
  1150.             $criteria clone $values// rename for clarity
  1151.         else {
  1152.             $criteria $values->buildCriteria()// build Criteria from EtvaVolumePhysical object
  1153.         }
  1154.  
  1155.         if ($criteria->containsKey(EtvaVolumePhysicalPeer::ID&& $criteria->keyContainsValue(EtvaVolumePhysicalPeer::ID) ) {
  1156.             throw new PropelException('Cannot insert a value for auto-increment primary key ('.EtvaVolumePhysicalPeer::ID.')');
  1157.         }
  1158.  
  1159.  
  1160.         // Set the correct dbName
  1161.         $criteria->setDbName(self::DATABASE_NAME);
  1162.  
  1163.         try {
  1164.             // use transaction because $criteria could contain info
  1165.             // for more than one table (I guess, conceivably)
  1166.             $con->beginTransaction();
  1167.             $pk BasePeer::doInsert($criteria$con);
  1168.             $con->commit();
  1169.         catch(PropelException $e{
  1170.             $con->rollBack();
  1171.             throw $e;
  1172.         }
  1173.  
  1174.         
  1175.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doInsert:post'as $callable)
  1176.     {
  1177.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$values$con$pk);
  1178.     }
  1179.  
  1180.     return $pk;
  1181.     }
  1182.  
  1183.     /**
  1184.      * Method perform an UPDATE on the database, given a EtvaVolumePhysical or Criteria object.
  1185.      *
  1186.      * @param      mixed $values Criteria or EtvaVolumePhysical object containing data that is used to create the UPDATE statement.
  1187.      * @param      PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
  1188.      * @return     int The number of affected rows (if supported by underlying database driver).
  1189.      * @throws     PropelException Any exceptions caught during processing will be
  1190.      *          rethrown wrapped into a PropelException.
  1191.      */
  1192.     public static function doUpdate($valuesPropelPDO $con null)
  1193.     {
  1194.  
  1195.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doUpdate:pre'as $callable)
  1196.     {
  1197.       $ret call_user_func($callable'BaseEtvaVolumePhysicalPeer'$values$con);
  1198.       if (false !== $ret)
  1199.       {
  1200.         return $ret;
  1201.       }
  1202.     }
  1203.  
  1204.  
  1205.         if ($con === null{
  1206.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_WRITE);
  1207.         }
  1208.  
  1209.         $selectCriteria new Criteria(self::DATABASE_NAME);
  1210.  
  1211.         if ($values instanceof Criteria{
  1212.             $criteria clone $values// rename for clarity
  1213.  
  1214.             $comparison $criteria->getComparison(EtvaVolumePhysicalPeer::ID);
  1215.             $selectCriteria->add(EtvaVolumePhysicalPeer::ID$criteria->remove(EtvaVolumePhysicalPeer::ID)$comparison);
  1216.  
  1217.         else // $values is EtvaVolumePhysical object
  1218.             $criteria $values->buildCriteria()// gets full criteria
  1219.             $selectCriteria $values->buildPkeyCriteria()// gets criteria w/ primary key(s)
  1220.         }
  1221.  
  1222.         // set the correct dbName
  1223.         $criteria->setDbName(self::DATABASE_NAME);
  1224.  
  1225.         $ret BasePeer::doUpdate($selectCriteria$criteria$con);
  1226.     
  1227.  
  1228.     foreach (sfMixer::getCallables('BaseEtvaVolumePhysicalPeer:doUpdate:post'as $callable)
  1229.     {
  1230.       call_user_func($callable'BaseEtvaVolumePhysicalPeer'$values$con$ret);
  1231.     }
  1232.  
  1233.     return $ret;
  1234.   }
  1235.  
  1236.     /**
  1237.      * Method to DELETE all rows from the volume_pysical table.
  1238.      *
  1239.      * @return     int The number of affected rows (if supported by underlying database driver).
  1240.      */
  1241.     public static function doDeleteAll($con null)
  1242.     {
  1243.         if ($con === null{
  1244.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_WRITE);
  1245.         }
  1246.         $affectedRows 0// initialize var to track total num of affected rows
  1247.         try {
  1248.             // use transaction because $criteria could contain info
  1249.             // for more than one table or we could emulating ON DELETE CASCADE, etc.
  1250.             $con->beginTransaction();
  1251.             $affectedRows += BasePeer::doDeleteAll(EtvaVolumePhysicalPeer::TABLE_NAME$con);
  1252.             $con->commit();
  1253.             return $affectedRows;
  1254.         catch (PropelException $e{
  1255.             $con->rollBack();
  1256.             throw $e;
  1257.         }
  1258.     }
  1259.  
  1260.     /**
  1261.      * Method perform a DELETE on the database, given a EtvaVolumePhysical or Criteria object OR a primary key value.
  1262.      *
  1263.      * @param      mixed $values Criteria or EtvaVolumePhysical object or primary key or array of primary keys
  1264.      *               which is used to create the DELETE statement
  1265.      * @param      PropelPDO $con the connection to use
  1266.      * @return     int     The number of affected rows (if supported by underlying database driver).  This includes CASCADE-related rows
  1267.      *                 if supported by native driver or if emulated using Propel.
  1268.      * @throws     PropelException Any exceptions caught during processing will be
  1269.      *          rethrown wrapped into a PropelException.
  1270.      */
  1271.      public static function doDelete($valuesPropelPDO $con null)
  1272.      {
  1273.         if ($con === null{
  1274.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_WRITE);
  1275.         }
  1276.  
  1277.         if ($values instanceof Criteria{
  1278.             // invalidate the cache for all objects of this type, since we have no
  1279.             // way of knowing (without running a query) what objects should be invalidated
  1280.             // from the cache based on this Criteria.
  1281.             EtvaVolumePhysicalPeer::clearInstancePool();
  1282.  
  1283.             // rename for clarity
  1284.             $criteria clone $values;
  1285.         elseif ($values instanceof EtvaVolumePhysical{
  1286.             // invalidate the cache for this single object
  1287.             EtvaVolumePhysicalPeer::removeInstanceFromPool($values);
  1288.             // create criteria based on pk values
  1289.             $criteria $values->buildPkeyCriteria();
  1290.         else {
  1291.             // it must be the primary key
  1292.  
  1293.  
  1294.  
  1295.             $criteria new Criteria(self::DATABASE_NAME);
  1296.             $criteria->add(EtvaVolumePhysicalPeer::ID(array) $valuesCriteria::IN);
  1297.  
  1298.             foreach ((array) $values as $singleval{
  1299.                 // we can invalidate the cache for this single object
  1300.                 EtvaVolumePhysicalPeer::removeInstanceFromPool($singleval);
  1301.             }
  1302.         }
  1303.  
  1304.         // Set the correct dbName
  1305.         $criteria->setDbName(self::DATABASE_NAME);
  1306.  
  1307.         $affectedRows 0// initialize var to track total num of affected rows
  1308.  
  1309.         try {
  1310.             // use transaction because $criteria could contain info
  1311.             // for more than one table or we could emulating ON DELETE CASCADE, etc.
  1312.             $con->beginTransaction();
  1313.             
  1314.             $affectedRows += BasePeer::doDelete($criteria$con);
  1315.  
  1316.             $con->commit();
  1317.             return $affectedRows;
  1318.         catch (PropelException $e{
  1319.             $con->rollBack();
  1320.             throw $e;
  1321.         }
  1322.     }
  1323.  
  1324.     /**
  1325.      * Validates all modified columns of given EtvaVolumePhysical object.
  1326.      * If parameter $columns is either a single column name or an array of column names
  1327.      * than only those columns are validated.
  1328.      *
  1329.      * NOTICE: This does not apply to primary or foreign keys for now.
  1330.      *
  1331.      * @param      EtvaVolumePhysical $obj The object to validate.
  1332.      * @param      mixed $cols Column name or array of column names.
  1333.      *
  1334.      * @return     mixed TRUE if all columns are valid or the error message of the first invalid column.
  1335.      */
  1336.     public static function doValidate(EtvaVolumePhysical $obj$cols null)
  1337.     {
  1338.         $columns array();
  1339.  
  1340.         if ($cols{
  1341.             $dbMap Propel::getDatabaseMap(EtvaVolumePhysicalPeer::DATABASE_NAME);
  1342.             $tableMap $dbMap->getTable(EtvaVolumePhysicalPeer::TABLE_NAME);
  1343.  
  1344.             if (is_array($cols)) {
  1345.                 $cols array($cols);
  1346.             }
  1347.  
  1348.             foreach ($cols as $colName{
  1349.                 if ($tableMap->containsColumn($colName)) {
  1350.                     $get 'get' $tableMap->getColumn($colName)->getPhpName();
  1351.                     $columns[$colName$obj->$get();
  1352.                 }
  1353.             }
  1354.         else {
  1355.  
  1356.         }
  1357.  
  1358.         $res =  BasePeer::doValidate(EtvaVolumePhysicalPeer::DATABASE_NAMEEtvaVolumePhysicalPeer::TABLE_NAME$columns);
  1359.     if ($res !== true{
  1360.         $request sfContext::getInstance()->getRequest();
  1361.         foreach ($res as $failed{
  1362.             $col EtvaVolumePhysicalPeer::translateFieldname($failed->getColumn()BasePeer::TYPE_COLNAMEBasePeer::TYPE_PHPNAME);
  1363.         }
  1364.     }
  1365.  
  1366.     return $res;
  1367.     }
  1368.  
  1369.     /**
  1370.      * Retrieve a single object by pkey.
  1371.      *
  1372.      * @param      int $pk the primary key.
  1373.      * @param      PropelPDO $con the connection to use
  1374.      * @return     EtvaVolumePhysical 
  1375.      */
  1376.     public static function retrieveByPK($pkPropelPDO $con null)
  1377.     {
  1378.  
  1379.         if (null !== ($obj EtvaVolumePhysicalPeer::getInstanceFromPool((string) $pk))) {
  1380.             return $obj;
  1381.         }
  1382.  
  1383.         if ($con === null{
  1384.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  1385.         }
  1386.  
  1387.         $criteria new Criteria(EtvaVolumePhysicalPeer::DATABASE_NAME);
  1388.         $criteria->add(EtvaVolumePhysicalPeer::ID$pk);
  1389.  
  1390.         $v EtvaVolumePhysicalPeer::doSelect($criteria$con);
  1391.  
  1392.         return !empty($v$v[0null;
  1393.     }
  1394.  
  1395.     /**
  1396.      * Retrieve multiple objects by pkey.
  1397.      *
  1398.      * @param      array $pks List of primary keys
  1399.      * @param      PropelPDO $con the connection to use
  1400.      * @throws     PropelException Any exceptions caught during processing will be
  1401.      *          rethrown wrapped into a PropelException.
  1402.      */
  1403.     public static function retrieveByPKs($pksPropelPDO $con null)
  1404.     {
  1405.         if ($con === null{
  1406.             $con Propel::getConnection(EtvaVolumePhysicalPeer::DATABASE_NAMEPropel::CONNECTION_READ);
  1407.         }
  1408.  
  1409.         $objs null;
  1410.         if (empty($pks)) {
  1411.             $objs array();
  1412.         else {
  1413.             $criteria new Criteria(EtvaVolumePhysicalPeer::DATABASE_NAME);
  1414.             $criteria->add(EtvaVolumePhysicalPeer::ID$pksCriteria::IN);
  1415.             $objs EtvaVolumePhysicalPeer::doSelect($criteria$con);
  1416.         }
  1417.         return $objs;
  1418.     }
  1419.  
  1420. // BaseEtvaVolumePhysicalPeer
  1421.  
  1422. // This is the static code needed to register the MapBuilder for this table with the main Propel class.
  1423. //
  1424. // NOTE: This static code cannot call methods on the EtvaVolumePhysicalPeer class, because it is not defined yet.
  1425. // If you need to use overridden methods, you can add this code to the bottom of the EtvaVolumePhysicalPeer class:
  1426. //
  1427. // Propel::getDatabaseMap(EtvaVolumePhysicalPeer::DATABASE_NAME)->addTableBuilder(EtvaVolumePhysicalPeer::TABLE_NAME, EtvaVolumePhysicalPeer::getMapBuilder());
  1428. //
  1429. // Doing so will effectively overwrite the registration below.
  1430.  
  1431. Propel::getDatabaseMap(BaseEtvaVolumePhysicalPeer::DATABASE_NAME)->addTableBuilder(BaseEtvaVolumePhysicalPeer::TABLE_NAMEBaseEtvaVolumePhysicalPeer::getMapBuilder());

Documentation generated on Fri, 19 Jun 2009 10:49:04 +0100 by phpDocumentor 1.4.2