LISTS: Adicion de ESQUEMA y MODELO
This commit is contained in:
19
workflow/engine/classes/model/ListCanceled.php
Normal file
19
workflow/engine/classes/model/ListCanceled.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'classes/model/om/BaseListCanceled.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for representing a row from the 'LIST_CANCELED' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
* @package classes.model
|
||||||
|
*/
|
||||||
|
class ListCanceled extends BaseListCanceled {
|
||||||
|
|
||||||
|
} // ListCanceled
|
||||||
23
workflow/engine/classes/model/ListCanceledPeer.php
Normal file
23
workflow/engine/classes/model/ListCanceledPeer.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// include base peer class
|
||||||
|
require_once 'classes/model/om/BaseListCanceledPeer.php';
|
||||||
|
|
||||||
|
// include object class
|
||||||
|
include_once 'classes/model/ListCanceled.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for performing query and update operations on the 'LIST_CANCELED' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
* @package classes.model
|
||||||
|
*/
|
||||||
|
class ListCanceledPeer extends BaseListCanceledPeer {
|
||||||
|
|
||||||
|
} // ListCanceledPeer
|
||||||
19
workflow/engine/classes/model/ListPaused.php
Normal file
19
workflow/engine/classes/model/ListPaused.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'classes/model/om/BaseListPaused.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for representing a row from the 'LIST_PAUSED' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
* @package classes.model
|
||||||
|
*/
|
||||||
|
class ListPaused extends BaseListPaused {
|
||||||
|
|
||||||
|
} // ListPaused
|
||||||
23
workflow/engine/classes/model/ListPausedPeer.php
Normal file
23
workflow/engine/classes/model/ListPausedPeer.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// include base peer class
|
||||||
|
require_once 'classes/model/om/BaseListPausedPeer.php';
|
||||||
|
|
||||||
|
// include object class
|
||||||
|
include_once 'classes/model/ListPaused.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skeleton subclass for performing query and update operations on the 'LIST_PAUSED' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* You should add additional methods to this class to meet the
|
||||||
|
* application requirements. This class will only be generated as
|
||||||
|
* long as it does not already exist in the output directory.
|
||||||
|
*
|
||||||
|
* @package classes.model
|
||||||
|
*/
|
||||||
|
class ListPausedPeer extends BaseListPausedPeer {
|
||||||
|
|
||||||
|
} // ListPausedPeer
|
||||||
106
workflow/engine/classes/model/map/ListCanceledMapBuilder.php
Normal file
106
workflow/engine/classes/model/map/ListCanceledMapBuilder.php
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'propel/map/MapBuilder.php';
|
||||||
|
include_once 'creole/CreoleTypes.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class adds structure of 'LIST_CANCELED' table to 'workflow' DatabaseMap object.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||||
|
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||||
|
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||||
|
* (i.e. if it's a text column type).
|
||||||
|
*
|
||||||
|
* @package workflow.classes.model.map
|
||||||
|
*/
|
||||||
|
class ListCanceledMapBuilder
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The (dot-path) name of this class
|
||||||
|
*/
|
||||||
|
const CLASS_NAME = 'classes.model.map.ListCanceledMapBuilder';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The database map.
|
||||||
|
*/
|
||||||
|
private $dbMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells us if this DatabaseMapBuilder is built so that we
|
||||||
|
* don't have to re-build it every time.
|
||||||
|
*
|
||||||
|
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||||
|
*/
|
||||||
|
public function isBuilt()
|
||||||
|
{
|
||||||
|
return ($this->dbMap !== null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the databasemap this map builder built.
|
||||||
|
*
|
||||||
|
* @return the databasemap
|
||||||
|
*/
|
||||||
|
public function getDatabaseMap()
|
||||||
|
{
|
||||||
|
return $this->dbMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The doBuild() method builds the DatabaseMap
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function doBuild()
|
||||||
|
{
|
||||||
|
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||||
|
|
||||||
|
$tMap = $this->dbMap->addTable('LIST_CANCELED');
|
||||||
|
$tMap->setPhpName('ListCanceled');
|
||||||
|
|
||||||
|
$tMap->setUseIdGenerator(false);
|
||||||
|
|
||||||
|
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_CANCELED_DATE', 'AppCanceledDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
} // doBuild()
|
||||||
|
|
||||||
|
} // ListCanceledMapBuilder
|
||||||
106
workflow/engine/classes/model/map/ListPausedMapBuilder.php
Normal file
106
workflow/engine/classes/model/map/ListPausedMapBuilder.php
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'propel/map/MapBuilder.php';
|
||||||
|
include_once 'creole/CreoleTypes.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class adds structure of 'LIST_PAUSED' table to 'workflow' DatabaseMap object.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||||
|
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||||
|
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||||
|
* (i.e. if it's a text column type).
|
||||||
|
*
|
||||||
|
* @package workflow.classes.model.map
|
||||||
|
*/
|
||||||
|
class ListPausedMapBuilder
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The (dot-path) name of this class
|
||||||
|
*/
|
||||||
|
const CLASS_NAME = 'classes.model.map.ListPausedMapBuilder';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The database map.
|
||||||
|
*/
|
||||||
|
private $dbMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells us if this DatabaseMapBuilder is built so that we
|
||||||
|
* don't have to re-build it every time.
|
||||||
|
*
|
||||||
|
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||||
|
*/
|
||||||
|
public function isBuilt()
|
||||||
|
{
|
||||||
|
return ($this->dbMap !== null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the databasemap this map builder built.
|
||||||
|
*
|
||||||
|
* @return the databasemap
|
||||||
|
*/
|
||||||
|
public function getDatabaseMap()
|
||||||
|
{
|
||||||
|
return $this->dbMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The doBuild() method builds the DatabaseMap
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws PropelException
|
||||||
|
*/
|
||||||
|
public function doBuild()
|
||||||
|
{
|
||||||
|
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||||
|
|
||||||
|
$tMap = $this->dbMap->addTable('LIST_PAUSED');
|
||||||
|
$tMap->setPhpName('ListPaused');
|
||||||
|
|
||||||
|
$tMap->setUseIdGenerator(false);
|
||||||
|
|
||||||
|
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addPrimaryKey('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_PAUSED_DATE', 'AppPausedDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_RESTART_DATE', 'AppRestartDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
} // doBuild()
|
||||||
|
|
||||||
|
} // ListPausedMapBuilder
|
||||||
1608
workflow/engine/classes/model/om/BaseListCanceled.php
Normal file
1608
workflow/engine/classes/model/om/BaseListCanceled.php
Normal file
File diff suppressed because it is too large
Load Diff
652
workflow/engine/classes/model/om/BaseListCanceledPeer.php
Normal file
652
workflow/engine/classes/model/om/BaseListCanceledPeer.php
Normal file
@@ -0,0 +1,652 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'propel/util/BasePeer.php';
|
||||||
|
// The object class -- needed for instanceof checks in this class.
|
||||||
|
// actual class may be a subclass -- as returned by ListCanceledPeer::getOMClass()
|
||||||
|
include_once 'classes/model/ListCanceled.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base static class for performing query and update operations on the 'LIST_CANCELED' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @package workflow.classes.model.om
|
||||||
|
*/
|
||||||
|
abstract class BaseListCanceledPeer
|
||||||
|
{
|
||||||
|
|
||||||
|
/** the default database name for this class */
|
||||||
|
const DATABASE_NAME = 'workflow';
|
||||||
|
|
||||||
|
/** the table name for this class */
|
||||||
|
const TABLE_NAME = 'LIST_CANCELED';
|
||||||
|
|
||||||
|
/** A class that can be returned by this peer. */
|
||||||
|
const CLASS_DEFAULT = 'classes.model.ListCanceled';
|
||||||
|
|
||||||
|
/** The total number of columns. */
|
||||||
|
const NUM_COLUMNS = 18;
|
||||||
|
|
||||||
|
/** The number of lazy-loaded columns. */
|
||||||
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/** the column name for the APP_UID field */
|
||||||
|
const APP_UID = 'LIST_CANCELED.APP_UID';
|
||||||
|
|
||||||
|
/** the column name for the USR_UID field */
|
||||||
|
const USR_UID = 'LIST_CANCELED.USR_UID';
|
||||||
|
|
||||||
|
/** the column name for the TAS_UID field */
|
||||||
|
const TAS_UID = 'LIST_CANCELED.TAS_UID';
|
||||||
|
|
||||||
|
/** the column name for the PRO_UID field */
|
||||||
|
const PRO_UID = 'LIST_CANCELED.PRO_UID';
|
||||||
|
|
||||||
|
/** the column name for the APP_NUMBER field */
|
||||||
|
const APP_NUMBER = 'LIST_CANCELED.APP_NUMBER';
|
||||||
|
|
||||||
|
/** the column name for the APP_TITLE field */
|
||||||
|
const APP_TITLE = 'LIST_CANCELED.APP_TITLE';
|
||||||
|
|
||||||
|
/** the column name for the APP_PRO_TITLE field */
|
||||||
|
const APP_PRO_TITLE = 'LIST_CANCELED.APP_PRO_TITLE';
|
||||||
|
|
||||||
|
/** the column name for the APP_TAS_TITLE field */
|
||||||
|
const APP_TAS_TITLE = 'LIST_CANCELED.APP_TAS_TITLE';
|
||||||
|
|
||||||
|
/** the column name for the APP_CANCELED_DATE field */
|
||||||
|
const APP_CANCELED_DATE = 'LIST_CANCELED.APP_CANCELED_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_INDEX field */
|
||||||
|
const DEL_INDEX = 'LIST_CANCELED.DEL_INDEX';
|
||||||
|
|
||||||
|
/** the column name for the DEL_PREVIOUS_USR_UID field */
|
||||||
|
const DEL_PREVIOUS_USR_UID = 'LIST_CANCELED.DEL_PREVIOUS_USR_UID';
|
||||||
|
|
||||||
|
/** the column name for the DEL_CURRENT_USR_USERNAME field */
|
||||||
|
const DEL_CURRENT_USR_USERNAME = 'LIST_CANCELED.DEL_CURRENT_USR_USERNAME';
|
||||||
|
|
||||||
|
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
|
||||||
|
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_CANCELED.DEL_CURRENT_USR_FIRSTNAME';
|
||||||
|
|
||||||
|
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
|
||||||
|
const DEL_CURRENT_USR_LASTNAME = 'LIST_CANCELED.DEL_CURRENT_USR_LASTNAME';
|
||||||
|
|
||||||
|
/** the column name for the DEL_DELEGATE_DATE field */
|
||||||
|
const DEL_DELEGATE_DATE = 'LIST_CANCELED.DEL_DELEGATE_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_INIT_DATE field */
|
||||||
|
const DEL_INIT_DATE = 'LIST_CANCELED.DEL_INIT_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_DUE_DATE field */
|
||||||
|
const DEL_DUE_DATE = 'LIST_CANCELED.DEL_DUE_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_PRIORITY field */
|
||||||
|
const DEL_PRIORITY = 'LIST_CANCELED.DEL_PRIORITY';
|
||||||
|
|
||||||
|
/** The PHP to DB Name Mapping */
|
||||||
|
private static $phpNameMap = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of fieldnames
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
|
*/
|
||||||
|
private static $fieldNames = array (
|
||||||
|
BasePeer::TYPE_PHPNAME => array ('AppUid', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppCanceledDate', 'DelIndex', 'DelPreviousUsrUid', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
|
||||||
|
BasePeer::TYPE_COLNAME => array (ListCanceledPeer::APP_UID, ListCanceledPeer::USR_UID, ListCanceledPeer::TAS_UID, ListCanceledPeer::PRO_UID, ListCanceledPeer::APP_NUMBER, ListCanceledPeer::APP_TITLE, ListCanceledPeer::APP_PRO_TITLE, ListCanceledPeer::APP_TAS_TITLE, ListCanceledPeer::APP_CANCELED_DATE, ListCanceledPeer::DEL_INDEX, ListCanceledPeer::DEL_PREVIOUS_USR_UID, ListCanceledPeer::DEL_CURRENT_USR_USERNAME, ListCanceledPeer::DEL_CURRENT_USR_FIRSTNAME, ListCanceledPeer::DEL_CURRENT_USR_LASTNAME, ListCanceledPeer::DEL_DELEGATE_DATE, ListCanceledPeer::DEL_INIT_DATE, ListCanceledPeer::DEL_DUE_DATE, ListCanceledPeer::DEL_PRIORITY, ),
|
||||||
|
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_CANCELED_DATE', 'DEL_INDEX', 'DEL_PREVIOUS_USR_UID', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
|
||||||
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of keys for quick access to the fieldnames array
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
|
*/
|
||||||
|
private static $fieldKeys = array (
|
||||||
|
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'UsrUid' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'AppCanceledDate' => 8, 'DelIndex' => 9, 'DelPreviousUsrUid' => 10, 'DelCurrentUsrUsername' => 11, 'DelCurrentUsrFirstname' => 12, 'DelCurrentUsrLastname' => 13, 'DelDelegateDate' => 14, 'DelInitDate' => 15, 'DelDueDate' => 16, 'DelPriority' => 17, ),
|
||||||
|
BasePeer::TYPE_COLNAME => array (ListCanceledPeer::APP_UID => 0, ListCanceledPeer::USR_UID => 1, ListCanceledPeer::TAS_UID => 2, ListCanceledPeer::PRO_UID => 3, ListCanceledPeer::APP_NUMBER => 4, ListCanceledPeer::APP_TITLE => 5, ListCanceledPeer::APP_PRO_TITLE => 6, ListCanceledPeer::APP_TAS_TITLE => 7, ListCanceledPeer::APP_CANCELED_DATE => 8, ListCanceledPeer::DEL_INDEX => 9, ListCanceledPeer::DEL_PREVIOUS_USR_UID => 10, ListCanceledPeer::DEL_CURRENT_USR_USERNAME => 11, ListCanceledPeer::DEL_CURRENT_USR_FIRSTNAME => 12, ListCanceledPeer::DEL_CURRENT_USR_LASTNAME => 13, ListCanceledPeer::DEL_DELEGATE_DATE => 14, ListCanceledPeer::DEL_INIT_DATE => 15, ListCanceledPeer::DEL_DUE_DATE => 16, ListCanceledPeer::DEL_PRIORITY => 17, ),
|
||||||
|
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'USR_UID' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'APP_CANCELED_DATE' => 8, 'DEL_INDEX' => 9, 'DEL_PREVIOUS_USR_UID' => 10, 'DEL_CURRENT_USR_USERNAME' => 11, 'DEL_CURRENT_USR_FIRSTNAME' => 12, 'DEL_CURRENT_USR_LASTNAME' => 13, 'DEL_DELEGATE_DATE' => 14, 'DEL_INIT_DATE' => 15, 'DEL_DUE_DATE' => 16, 'DEL_PRIORITY' => 17, ),
|
||||||
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return MapBuilder the map builder for this peer
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getMapBuilder()
|
||||||
|
{
|
||||||
|
include_once 'classes/model/map/ListCanceledMapBuilder.php';
|
||||||
|
return BasePeer::getMapBuilder('classes.model.map.ListCanceledMapBuilder');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets a map (hash) of PHP names to DB column names.
|
||||||
|
*
|
||||||
|
* @return array The PHP to DB name map for this peer
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
|
||||||
|
*/
|
||||||
|
public static function getPhpNameMap()
|
||||||
|
{
|
||||||
|
if (self::$phpNameMap === null) {
|
||||||
|
$map = ListCanceledPeer::getTableMap();
|
||||||
|
$columns = $map->getColumns();
|
||||||
|
$nameMap = array();
|
||||||
|
foreach ($columns as $column) {
|
||||||
|
$nameMap[$column->getPhpName()] = $column->getColumnName();
|
||||||
|
}
|
||||||
|
self::$phpNameMap = $nameMap;
|
||||||
|
}
|
||||||
|
return self::$phpNameMap;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Translates a fieldname to another type
|
||||||
|
*
|
||||||
|
* @param string $name field name
|
||||||
|
* @param string $fromType One of the class type constants TYPE_PHPNAME,
|
||||||
|
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
||||||
|
* @param string $toType One of the class type constants
|
||||||
|
* @return string translated name of the field.
|
||||||
|
*/
|
||||||
|
static public function translateFieldName($name, $fromType, $toType)
|
||||||
|
{
|
||||||
|
$toNames = self::getFieldNames($toType);
|
||||||
|
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
|
||||||
|
if ($key === null) {
|
||||||
|
throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
|
||||||
|
}
|
||||||
|
return $toNames[$key];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of of field names.
|
||||||
|
*
|
||||||
|
* @param string $type The type of fieldnames to return:
|
||||||
|
* One of the class type constants TYPE_PHPNAME,
|
||||||
|
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
||||||
|
* @return array A list of field names
|
||||||
|
*/
|
||||||
|
|
||||||
|
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
|
||||||
|
{
|
||||||
|
if (!array_key_exists($type, self::$fieldNames)) {
|
||||||
|
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
|
||||||
|
}
|
||||||
|
return self::$fieldNames[$type];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method which changes table.column to alias.column.
|
||||||
|
*
|
||||||
|
* Using this method you can maintain SQL abstraction while using column aliases.
|
||||||
|
* <code>
|
||||||
|
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
|
||||||
|
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
|
||||||
|
* </code>
|
||||||
|
* @param string $alias The alias for the current table.
|
||||||
|
* @param string $column The column name for current table. (i.e. ListCanceledPeer::COLUMN_NAME).
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function alias($alias, $column)
|
||||||
|
{
|
||||||
|
return str_replace(ListCanceledPeer::TABLE_NAME.'.', $alias.'.', $column);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* @param criteria object containing the columns to add.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function addSelectColumns(Criteria $criteria)
|
||||||
|
{
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::APP_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::USR_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::TAS_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::PRO_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::APP_NUMBER);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::APP_TITLE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::APP_PRO_TITLE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::APP_TAS_TITLE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::APP_CANCELED_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_INDEX);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_PREVIOUS_USR_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_USERNAME);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_LASTNAME);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_DELEGATE_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_INIT_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_DUE_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::DEL_PRIORITY);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const COUNT = 'COUNT(LIST_CANCELED.APP_UID)';
|
||||||
|
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_CANCELED.APP_UID)';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of rows matching criteria.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria
|
||||||
|
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
|
||||||
|
* @param Connection $con
|
||||||
|
* @return int Number of matching rows.
|
||||||
|
*/
|
||||||
|
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
|
||||||
|
{
|
||||||
|
// we're going to modify criteria, so copy it first
|
||||||
|
$criteria = clone $criteria;
|
||||||
|
|
||||||
|
// clear out anything that might confuse the ORDER BY clause
|
||||||
|
$criteria->clearSelectColumns()->clearOrderByColumns();
|
||||||
|
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::COUNT_DISTINCT);
|
||||||
|
} else {
|
||||||
|
$criteria->addSelectColumn(ListCanceledPeer::COUNT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// just in case we're grouping: add those columns to the select statement
|
||||||
|
foreach ($criteria->getGroupByColumns() as $column) {
|
||||||
|
$criteria->addSelectColumn($column);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rs = ListCanceledPeer::doSelectRS($criteria, $con);
|
||||||
|
if ($rs->next()) {
|
||||||
|
return $rs->getInt(1);
|
||||||
|
} else {
|
||||||
|
// no rows returned; we infer that means 0 matches.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Method to select one object from the DB.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria object used to create the SELECT statement.
|
||||||
|
* @param Connection $con
|
||||||
|
* @return ListCanceled
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doSelectOne(Criteria $criteria, $con = null)
|
||||||
|
{
|
||||||
|
$critcopy = clone $criteria;
|
||||||
|
$critcopy->setLimit(1);
|
||||||
|
$objects = ListCanceledPeer::doSelect($critcopy, $con);
|
||||||
|
if ($objects) {
|
||||||
|
return $objects[0];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Method to do selects.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
|
||||||
|
* @param Connection $con
|
||||||
|
* @return array Array of selected Objects
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doSelect(Criteria $criteria, $con = null)
|
||||||
|
{
|
||||||
|
return ListCanceledPeer::populateObjects(ListCanceledPeer::doSelectRS($criteria, $con));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Prepares the Criteria object and uses the parent doSelect()
|
||||||
|
* method to get a ResultSet.
|
||||||
|
*
|
||||||
|
* Use this method directly if you want to just get the resultset
|
||||||
|
* (instead of an array of objects).
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @return ResultSet The resultset object with numerically-indexed fields.
|
||||||
|
* @see BasePeer::doSelect()
|
||||||
|
*/
|
||||||
|
public static function doSelectRS(Criteria $criteria, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$criteria->getSelectColumns()) {
|
||||||
|
$criteria = clone $criteria;
|
||||||
|
ListCanceledPeer::addSelectColumns($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
// BasePeer returns a Creole ResultSet, set to return
|
||||||
|
// rows indexed numerically.
|
||||||
|
return BasePeer::doSelect($criteria, $con);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 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 function populateObjects(ResultSet $rs)
|
||||||
|
{
|
||||||
|
$results = array();
|
||||||
|
|
||||||
|
// set the class once to avoid overhead in the loop
|
||||||
|
$cls = ListCanceledPeer::getOMClass();
|
||||||
|
$cls = Propel::import($cls);
|
||||||
|
// populate the object(s)
|
||||||
|
while ($rs->next()) {
|
||||||
|
|
||||||
|
$obj = new $cls();
|
||||||
|
$obj->hydrate($rs);
|
||||||
|
$results[] = $obj;
|
||||||
|
|
||||||
|
}
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the TableMap related to this peer.
|
||||||
|
* This method is not needed for general use but a specific application could have a need.
|
||||||
|
* @return TableMap
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getTableMap()
|
||||||
|
{
|
||||||
|
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class that the Peer will make instances of.
|
||||||
|
*
|
||||||
|
* This uses a dot-path notation which is tranalted into a path
|
||||||
|
* relative to a location on the PHP include_path.
|
||||||
|
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||||
|
*
|
||||||
|
* @return string path.to.ClassName
|
||||||
|
*/
|
||||||
|
public static function getOMClass()
|
||||||
|
{
|
||||||
|
return ListCanceledPeer::CLASS_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method perform an INSERT on the database, given a ListCanceled or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ListCanceled object containing data that is used to create the INSERT statement.
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @return mixed The new primary key.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doInsert($values, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
$criteria = clone $values; // rename for clarity
|
||||||
|
} else {
|
||||||
|
$criteria = $values->buildCriteria(); // build Criteria from ListCanceled object
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table (I guess, conceivably)
|
||||||
|
$con->begin();
|
||||||
|
$pk = BasePeer::doInsert($criteria, $con);
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollback();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method perform an UPDATE on the database, given a ListCanceled or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ListCanceled object containing data create the UPDATE statement.
|
||||||
|
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
|
||||||
|
* @return int 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 function doUpdate($values, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$selectCriteria = new Criteria(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
$criteria = clone $values; // rename for clarity
|
||||||
|
|
||||||
|
$comparison = $criteria->getComparison(ListCanceledPeer::APP_UID);
|
||||||
|
$selectCriteria->add(ListCanceledPeer::APP_UID, $criteria->remove(ListCanceledPeer::APP_UID), $comparison);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$criteria = $values->buildCriteria(); // gets full criteria
|
||||||
|
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to DELETE all rows from the LIST_CANCELED table.
|
||||||
|
*
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public static function doDeleteAll($con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->begin();
|
||||||
|
$affectedRows += BasePeer::doDeleteAll(ListCanceledPeer::TABLE_NAME, $con);
|
||||||
|
$con->commit();
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollback();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method perform a DELETE on the database, given a ListCanceled or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ListCanceled object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
* This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doDelete($values, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(ListCanceledPeer::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
$criteria = clone $values; // rename for clarity
|
||||||
|
} elseif ($values instanceof ListCanceled) {
|
||||||
|
|
||||||
|
$criteria = $values->buildPkeyCriteria();
|
||||||
|
} else {
|
||||||
|
// it must be the primary key
|
||||||
|
$criteria = new Criteria(self::DATABASE_NAME);
|
||||||
|
$criteria->add(ListCanceledPeer::APP_UID, (array) $values, Criteria::IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->begin();
|
||||||
|
|
||||||
|
$affectedRows += BasePeer::doDelete($criteria, $con);
|
||||||
|
$con->commit();
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollback();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates all modified columns of given ListCanceled 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.
|
||||||
|
*
|
||||||
|
* @param ListCanceled $obj The object to validate.
|
||||||
|
* @param mixed $cols Column name or array of column names.
|
||||||
|
*
|
||||||
|
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
|
||||||
|
*/
|
||||||
|
public static function doValidate(ListCanceled $obj, $cols = null)
|
||||||
|
{
|
||||||
|
$columns = array();
|
||||||
|
|
||||||
|
if ($cols) {
|
||||||
|
$dbMap = Propel::getDatabaseMap(ListCanceledPeer::DATABASE_NAME);
|
||||||
|
$tableMap = $dbMap->getTable(ListCanceledPeer::TABLE_NAME);
|
||||||
|
|
||||||
|
if (! is_array($cols)) {
|
||||||
|
$cols = array($cols);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($cols as $colName) {
|
||||||
|
if ($tableMap->containsColumn($colName)) {
|
||||||
|
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
|
||||||
|
$columns[$colName] = $obj->$get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return BasePeer::doValidate(ListCanceledPeer::DATABASE_NAME, ListCanceledPeer::TABLE_NAME, $columns);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a single object by pkey.
|
||||||
|
*
|
||||||
|
* @param mixed $pk the primary key.
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @return ListCanceled
|
||||||
|
*/
|
||||||
|
public static function retrieveByPK($pk, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria = new Criteria(ListCanceledPeer::DATABASE_NAME);
|
||||||
|
|
||||||
|
$criteria->add(ListCanceledPeer::APP_UID, $pk);
|
||||||
|
|
||||||
|
|
||||||
|
$v = ListCanceledPeer::doSelect($criteria, $con);
|
||||||
|
|
||||||
|
return !empty($v) > 0 ? $v[0] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve multiple objects by pkey.
|
||||||
|
*
|
||||||
|
* @param array $pks List of primary keys
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function retrieveByPKs($pks, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$objs = null;
|
||||||
|
if (empty($pks)) {
|
||||||
|
$objs = array();
|
||||||
|
} else {
|
||||||
|
$criteria = new Criteria();
|
||||||
|
$criteria->add(ListCanceledPeer::APP_UID, $pks, Criteria::IN);
|
||||||
|
$objs = ListCanceledPeer::doSelect($criteria, $con);
|
||||||
|
}
|
||||||
|
return $objs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// static code to register the map builder for this Peer with the main Propel class
|
||||||
|
if (Propel::isInit()) {
|
||||||
|
// the MapBuilder classes register themselves with Propel during initialization
|
||||||
|
// so we need to load them here.
|
||||||
|
try {
|
||||||
|
BaseListCanceledPeer::getMapBuilder();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// even if Propel is not yet initialized, the map builder class can be registered
|
||||||
|
// now and then it will be loaded when Propel initializes.
|
||||||
|
require_once 'classes/model/map/ListCanceledMapBuilder.php';
|
||||||
|
Propel::registerMapBuilder('classes.model.map.ListCanceledMapBuilder');
|
||||||
|
}
|
||||||
|
|
||||||
1648
workflow/engine/classes/model/om/BaseListPaused.php
Normal file
1648
workflow/engine/classes/model/om/BaseListPaused.php
Normal file
File diff suppressed because it is too large
Load Diff
642
workflow/engine/classes/model/om/BaseListPausedPeer.php
Normal file
642
workflow/engine/classes/model/om/BaseListPausedPeer.php
Normal file
@@ -0,0 +1,642 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once 'propel/util/BasePeer.php';
|
||||||
|
// The object class -- needed for instanceof checks in this class.
|
||||||
|
// actual class may be a subclass -- as returned by ListPausedPeer::getOMClass()
|
||||||
|
include_once 'classes/model/ListPaused.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base static class for performing query and update operations on the 'LIST_PAUSED' table.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @package workflow.classes.model.om
|
||||||
|
*/
|
||||||
|
abstract class BaseListPausedPeer
|
||||||
|
{
|
||||||
|
|
||||||
|
/** the default database name for this class */
|
||||||
|
const DATABASE_NAME = 'workflow';
|
||||||
|
|
||||||
|
/** the table name for this class */
|
||||||
|
const TABLE_NAME = 'LIST_PAUSED';
|
||||||
|
|
||||||
|
/** A class that can be returned by this peer. */
|
||||||
|
const CLASS_DEFAULT = 'classes.model.ListPaused';
|
||||||
|
|
||||||
|
/** The total number of columns. */
|
||||||
|
const NUM_COLUMNS = 18;
|
||||||
|
|
||||||
|
/** The number of lazy-loaded columns. */
|
||||||
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/** the column name for the APP_UID field */
|
||||||
|
const APP_UID = 'LIST_PAUSED.APP_UID';
|
||||||
|
|
||||||
|
/** the column name for the DEL_INDEX field */
|
||||||
|
const DEL_INDEX = 'LIST_PAUSED.DEL_INDEX';
|
||||||
|
|
||||||
|
/** the column name for the USR_UID field */
|
||||||
|
const USR_UID = 'LIST_PAUSED.USR_UID';
|
||||||
|
|
||||||
|
/** the column name for the TAS_UID field */
|
||||||
|
const TAS_UID = 'LIST_PAUSED.TAS_UID';
|
||||||
|
|
||||||
|
/** the column name for the PRO_UID field */
|
||||||
|
const PRO_UID = 'LIST_PAUSED.PRO_UID';
|
||||||
|
|
||||||
|
/** the column name for the APP_NUMBER field */
|
||||||
|
const APP_NUMBER = 'LIST_PAUSED.APP_NUMBER';
|
||||||
|
|
||||||
|
/** the column name for the APP_TITLE field */
|
||||||
|
const APP_TITLE = 'LIST_PAUSED.APP_TITLE';
|
||||||
|
|
||||||
|
/** the column name for the APP_PRO_TITLE field */
|
||||||
|
const APP_PRO_TITLE = 'LIST_PAUSED.APP_PRO_TITLE';
|
||||||
|
|
||||||
|
/** the column name for the APP_TAS_TITLE field */
|
||||||
|
const APP_TAS_TITLE = 'LIST_PAUSED.APP_TAS_TITLE';
|
||||||
|
|
||||||
|
/** the column name for the APP_PAUSED_DATE field */
|
||||||
|
const APP_PAUSED_DATE = 'LIST_PAUSED.APP_PAUSED_DATE';
|
||||||
|
|
||||||
|
/** the column name for the APP_RESTART_DATE field */
|
||||||
|
const APP_RESTART_DATE = 'LIST_PAUSED.APP_RESTART_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_CURRENT_USR_USERNAME field */
|
||||||
|
const DEL_CURRENT_USR_USERNAME = 'LIST_PAUSED.DEL_CURRENT_USR_USERNAME';
|
||||||
|
|
||||||
|
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
|
||||||
|
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_PAUSED.DEL_CURRENT_USR_FIRSTNAME';
|
||||||
|
|
||||||
|
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
|
||||||
|
const DEL_CURRENT_USR_LASTNAME = 'LIST_PAUSED.DEL_CURRENT_USR_LASTNAME';
|
||||||
|
|
||||||
|
/** the column name for the DEL_DELEGATE_DATE field */
|
||||||
|
const DEL_DELEGATE_DATE = 'LIST_PAUSED.DEL_DELEGATE_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_INIT_DATE field */
|
||||||
|
const DEL_INIT_DATE = 'LIST_PAUSED.DEL_INIT_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_DUE_DATE field */
|
||||||
|
const DEL_DUE_DATE = 'LIST_PAUSED.DEL_DUE_DATE';
|
||||||
|
|
||||||
|
/** the column name for the DEL_PRIORITY field */
|
||||||
|
const DEL_PRIORITY = 'LIST_PAUSED.DEL_PRIORITY';
|
||||||
|
|
||||||
|
/** The PHP to DB Name Mapping */
|
||||||
|
private static $phpNameMap = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of fieldnames
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
|
*/
|
||||||
|
private static $fieldNames = array (
|
||||||
|
BasePeer::TYPE_PHPNAME => array ('AppUid', 'DelIndex', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppPausedDate', 'AppRestartDate', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
|
||||||
|
BasePeer::TYPE_COLNAME => array (ListPausedPeer::APP_UID, ListPausedPeer::DEL_INDEX, ListPausedPeer::USR_UID, ListPausedPeer::TAS_UID, ListPausedPeer::PRO_UID, ListPausedPeer::APP_NUMBER, ListPausedPeer::APP_TITLE, ListPausedPeer::APP_PRO_TITLE, ListPausedPeer::APP_TAS_TITLE, ListPausedPeer::APP_PAUSED_DATE, ListPausedPeer::APP_RESTART_DATE, ListPausedPeer::DEL_CURRENT_USR_USERNAME, ListPausedPeer::DEL_CURRENT_USR_FIRSTNAME, ListPausedPeer::DEL_CURRENT_USR_LASTNAME, ListPausedPeer::DEL_DELEGATE_DATE, ListPausedPeer::DEL_INIT_DATE, ListPausedPeer::DEL_DUE_DATE, ListPausedPeer::DEL_PRIORITY, ),
|
||||||
|
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'DEL_INDEX', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_PAUSED_DATE', 'APP_RESTART_DATE', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
|
||||||
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* holds an array of keys for quick access to the fieldnames array
|
||||||
|
*
|
||||||
|
* first dimension keys are the type constants
|
||||||
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
|
*/
|
||||||
|
private static $fieldKeys = array (
|
||||||
|
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'DelIndex' => 1, 'UsrUid' => 2, 'TasUid' => 3, 'ProUid' => 4, 'AppNumber' => 5, 'AppTitle' => 6, 'AppProTitle' => 7, 'AppTasTitle' => 8, 'AppPausedDate' => 9, 'AppRestartDate' => 10, 'DelCurrentUsrUsername' => 11, 'DelCurrentUsrFirstname' => 12, 'DelCurrentUsrLastname' => 13, 'DelDelegateDate' => 14, 'DelInitDate' => 15, 'DelDueDate' => 16, 'DelPriority' => 17, ),
|
||||||
|
BasePeer::TYPE_COLNAME => array (ListPausedPeer::APP_UID => 0, ListPausedPeer::DEL_INDEX => 1, ListPausedPeer::USR_UID => 2, ListPausedPeer::TAS_UID => 3, ListPausedPeer::PRO_UID => 4, ListPausedPeer::APP_NUMBER => 5, ListPausedPeer::APP_TITLE => 6, ListPausedPeer::APP_PRO_TITLE => 7, ListPausedPeer::APP_TAS_TITLE => 8, ListPausedPeer::APP_PAUSED_DATE => 9, ListPausedPeer::APP_RESTART_DATE => 10, ListPausedPeer::DEL_CURRENT_USR_USERNAME => 11, ListPausedPeer::DEL_CURRENT_USR_FIRSTNAME => 12, ListPausedPeer::DEL_CURRENT_USR_LASTNAME => 13, ListPausedPeer::DEL_DELEGATE_DATE => 14, ListPausedPeer::DEL_INIT_DATE => 15, ListPausedPeer::DEL_DUE_DATE => 16, ListPausedPeer::DEL_PRIORITY => 17, ),
|
||||||
|
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'USR_UID' => 2, 'TAS_UID' => 3, 'PRO_UID' => 4, 'APP_NUMBER' => 5, 'APP_TITLE' => 6, 'APP_PRO_TITLE' => 7, 'APP_TAS_TITLE' => 8, 'APP_PAUSED_DATE' => 9, 'APP_RESTART_DATE' => 10, 'DEL_CURRENT_USR_USERNAME' => 11, 'DEL_CURRENT_USR_FIRSTNAME' => 12, 'DEL_CURRENT_USR_LASTNAME' => 13, 'DEL_DELEGATE_DATE' => 14, 'DEL_INIT_DATE' => 15, 'DEL_DUE_DATE' => 16, 'DEL_PRIORITY' => 17, ),
|
||||||
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return MapBuilder the map builder for this peer
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getMapBuilder()
|
||||||
|
{
|
||||||
|
include_once 'classes/model/map/ListPausedMapBuilder.php';
|
||||||
|
return BasePeer::getMapBuilder('classes.model.map.ListPausedMapBuilder');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets a map (hash) of PHP names to DB column names.
|
||||||
|
*
|
||||||
|
* @return array The PHP to DB name map for this peer
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
|
||||||
|
*/
|
||||||
|
public static function getPhpNameMap()
|
||||||
|
{
|
||||||
|
if (self::$phpNameMap === null) {
|
||||||
|
$map = ListPausedPeer::getTableMap();
|
||||||
|
$columns = $map->getColumns();
|
||||||
|
$nameMap = array();
|
||||||
|
foreach ($columns as $column) {
|
||||||
|
$nameMap[$column->getPhpName()] = $column->getColumnName();
|
||||||
|
}
|
||||||
|
self::$phpNameMap = $nameMap;
|
||||||
|
}
|
||||||
|
return self::$phpNameMap;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Translates a fieldname to another type
|
||||||
|
*
|
||||||
|
* @param string $name field name
|
||||||
|
* @param string $fromType One of the class type constants TYPE_PHPNAME,
|
||||||
|
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
||||||
|
* @param string $toType One of the class type constants
|
||||||
|
* @return string translated name of the field.
|
||||||
|
*/
|
||||||
|
static public function translateFieldName($name, $fromType, $toType)
|
||||||
|
{
|
||||||
|
$toNames = self::getFieldNames($toType);
|
||||||
|
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
|
||||||
|
if ($key === null) {
|
||||||
|
throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
|
||||||
|
}
|
||||||
|
return $toNames[$key];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of of field names.
|
||||||
|
*
|
||||||
|
* @param string $type The type of fieldnames to return:
|
||||||
|
* One of the class type constants TYPE_PHPNAME,
|
||||||
|
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
||||||
|
* @return array A list of field names
|
||||||
|
*/
|
||||||
|
|
||||||
|
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
|
||||||
|
{
|
||||||
|
if (!array_key_exists($type, self::$fieldNames)) {
|
||||||
|
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
|
||||||
|
}
|
||||||
|
return self::$fieldNames[$type];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience method which changes table.column to alias.column.
|
||||||
|
*
|
||||||
|
* Using this method you can maintain SQL abstraction while using column aliases.
|
||||||
|
* <code>
|
||||||
|
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
|
||||||
|
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
|
||||||
|
* </code>
|
||||||
|
* @param string $alias The alias for the current table.
|
||||||
|
* @param string $column The column name for current table. (i.e. ListPausedPeer::COLUMN_NAME).
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function alias($alias, $column)
|
||||||
|
{
|
||||||
|
return str_replace(ListPausedPeer::TABLE_NAME.'.', $alias.'.', $column);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* @param criteria object containing the columns to add.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function addSelectColumns(Criteria $criteria)
|
||||||
|
{
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::APP_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_INDEX);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::USR_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::TAS_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::PRO_UID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::APP_NUMBER);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::APP_TITLE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::APP_PRO_TITLE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::APP_TAS_TITLE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::APP_PAUSED_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::APP_RESTART_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_USERNAME);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_LASTNAME);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_DELEGATE_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_INIT_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_DUE_DATE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::DEL_PRIORITY);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const COUNT = 'COUNT(LIST_PAUSED.APP_UID)';
|
||||||
|
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_PAUSED.APP_UID)';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of rows matching criteria.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria
|
||||||
|
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
|
||||||
|
* @param Connection $con
|
||||||
|
* @return int Number of matching rows.
|
||||||
|
*/
|
||||||
|
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
|
||||||
|
{
|
||||||
|
// we're going to modify criteria, so copy it first
|
||||||
|
$criteria = clone $criteria;
|
||||||
|
|
||||||
|
// clear out anything that might confuse the ORDER BY clause
|
||||||
|
$criteria->clearSelectColumns()->clearOrderByColumns();
|
||||||
|
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::COUNT_DISTINCT);
|
||||||
|
} else {
|
||||||
|
$criteria->addSelectColumn(ListPausedPeer::COUNT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// just in case we're grouping: add those columns to the select statement
|
||||||
|
foreach ($criteria->getGroupByColumns() as $column) {
|
||||||
|
$criteria->addSelectColumn($column);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rs = ListPausedPeer::doSelectRS($criteria, $con);
|
||||||
|
if ($rs->next()) {
|
||||||
|
return $rs->getInt(1);
|
||||||
|
} else {
|
||||||
|
// no rows returned; we infer that means 0 matches.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Method to select one object from the DB.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria object used to create the SELECT statement.
|
||||||
|
* @param Connection $con
|
||||||
|
* @return ListPaused
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doSelectOne(Criteria $criteria, $con = null)
|
||||||
|
{
|
||||||
|
$critcopy = clone $criteria;
|
||||||
|
$critcopy->setLimit(1);
|
||||||
|
$objects = ListPausedPeer::doSelect($critcopy, $con);
|
||||||
|
if ($objects) {
|
||||||
|
return $objects[0];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Method to do selects.
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
|
||||||
|
* @param Connection $con
|
||||||
|
* @return array Array of selected Objects
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doSelect(Criteria $criteria, $con = null)
|
||||||
|
{
|
||||||
|
return ListPausedPeer::populateObjects(ListPausedPeer::doSelectRS($criteria, $con));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Prepares the Criteria object and uses the parent doSelect()
|
||||||
|
* method to get a ResultSet.
|
||||||
|
*
|
||||||
|
* Use this method directly if you want to just get the resultset
|
||||||
|
* (instead of an array of objects).
|
||||||
|
*
|
||||||
|
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
* @return ResultSet The resultset object with numerically-indexed fields.
|
||||||
|
* @see BasePeer::doSelect()
|
||||||
|
*/
|
||||||
|
public static function doSelectRS(Criteria $criteria, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$criteria->getSelectColumns()) {
|
||||||
|
$criteria = clone $criteria;
|
||||||
|
ListPausedPeer::addSelectColumns($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
// BasePeer returns a Creole ResultSet, set to return
|
||||||
|
// rows indexed numerically.
|
||||||
|
return BasePeer::doSelect($criteria, $con);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 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 function populateObjects(ResultSet $rs)
|
||||||
|
{
|
||||||
|
$results = array();
|
||||||
|
|
||||||
|
// set the class once to avoid overhead in the loop
|
||||||
|
$cls = ListPausedPeer::getOMClass();
|
||||||
|
$cls = Propel::import($cls);
|
||||||
|
// populate the object(s)
|
||||||
|
while ($rs->next()) {
|
||||||
|
|
||||||
|
$obj = new $cls();
|
||||||
|
$obj->hydrate($rs);
|
||||||
|
$results[] = $obj;
|
||||||
|
|
||||||
|
}
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the TableMap related to this peer.
|
||||||
|
* This method is not needed for general use but a specific application could have a need.
|
||||||
|
* @return TableMap
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function getTableMap()
|
||||||
|
{
|
||||||
|
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class that the Peer will make instances of.
|
||||||
|
*
|
||||||
|
* This uses a dot-path notation which is tranalted into a path
|
||||||
|
* relative to a location on the PHP include_path.
|
||||||
|
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
|
||||||
|
*
|
||||||
|
* @return string path.to.ClassName
|
||||||
|
*/
|
||||||
|
public static function getOMClass()
|
||||||
|
{
|
||||||
|
return ListPausedPeer::CLASS_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method perform an INSERT on the database, given a ListPaused or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ListPaused object containing data that is used to create the INSERT statement.
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @return mixed The new primary key.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doInsert($values, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
$criteria = clone $values; // rename for clarity
|
||||||
|
} else {
|
||||||
|
$criteria = $values->buildCriteria(); // build Criteria from ListPaused object
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table (I guess, conceivably)
|
||||||
|
$con->begin();
|
||||||
|
$pk = BasePeer::doInsert($criteria, $con);
|
||||||
|
$con->commit();
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollback();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method perform an UPDATE on the database, given a ListPaused or Criteria object.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ListPaused object containing data create the UPDATE statement.
|
||||||
|
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
|
||||||
|
* @return int 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 function doUpdate($values, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$selectCriteria = new Criteria(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
$criteria = clone $values; // rename for clarity
|
||||||
|
|
||||||
|
$comparison = $criteria->getComparison(ListPausedPeer::APP_UID);
|
||||||
|
$selectCriteria->add(ListPausedPeer::APP_UID, $criteria->remove(ListPausedPeer::APP_UID), $comparison);
|
||||||
|
|
||||||
|
$comparison = $criteria->getComparison(ListPausedPeer::DEL_INDEX);
|
||||||
|
$selectCriteria->add(ListPausedPeer::DEL_INDEX, $criteria->remove(ListPausedPeer::DEL_INDEX), $comparison);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$criteria = $values->buildCriteria(); // gets full criteria
|
||||||
|
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to DELETE all rows from the LIST_PAUSED table.
|
||||||
|
*
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
*/
|
||||||
|
public static function doDeleteAll($con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->begin();
|
||||||
|
$affectedRows += BasePeer::doDeleteAll(ListPausedPeer::TABLE_NAME, $con);
|
||||||
|
$con->commit();
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollback();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method perform a DELETE on the database, given a ListPaused or Criteria object OR a primary key value.
|
||||||
|
*
|
||||||
|
* @param mixed $values Criteria or ListPaused object or primary key or array of primary keys
|
||||||
|
* which is used to create the DELETE statement
|
||||||
|
* @param Connection $con the connection to use
|
||||||
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
|
* This includes CASCADE-related rows
|
||||||
|
* if supported by native driver or if emulated using Propel.
|
||||||
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
|
* rethrown wrapped into a PropelException.
|
||||||
|
*/
|
||||||
|
public static function doDelete($values, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(ListPausedPeer::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($values instanceof Criteria) {
|
||||||
|
$criteria = clone $values; // rename for clarity
|
||||||
|
} elseif ($values instanceof ListPaused) {
|
||||||
|
|
||||||
|
$criteria = $values->buildPkeyCriteria();
|
||||||
|
} else {
|
||||||
|
// it must be the primary key
|
||||||
|
$criteria = new Criteria(self::DATABASE_NAME);
|
||||||
|
// primary key is composite; we therefore, expect
|
||||||
|
// the primary key passed to be an array of pkey
|
||||||
|
// values
|
||||||
|
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||||
|
// array is not multi-dimensional
|
||||||
|
$values = array($values);
|
||||||
|
}
|
||||||
|
$vals = array();
|
||||||
|
foreach ($values as $value) {
|
||||||
|
|
||||||
|
$vals[0][] = $value[0];
|
||||||
|
$vals[1][] = $value[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria->add(ListPausedPeer::APP_UID, $vals[0], Criteria::IN);
|
||||||
|
$criteria->add(ListPausedPeer::DEL_INDEX, $vals[1], Criteria::IN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the correct dbName
|
||||||
|
$criteria->setDbName(self::DATABASE_NAME);
|
||||||
|
|
||||||
|
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||||
|
|
||||||
|
try {
|
||||||
|
// use transaction because $criteria could contain info
|
||||||
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
|
$con->begin();
|
||||||
|
|
||||||
|
$affectedRows += BasePeer::doDelete($criteria, $con);
|
||||||
|
$con->commit();
|
||||||
|
return $affectedRows;
|
||||||
|
} catch (PropelException $e) {
|
||||||
|
$con->rollback();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates all modified columns of given ListPaused 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.
|
||||||
|
*
|
||||||
|
* @param ListPaused $obj The object to validate.
|
||||||
|
* @param mixed $cols Column name or array of column names.
|
||||||
|
*
|
||||||
|
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
|
||||||
|
*/
|
||||||
|
public static function doValidate(ListPaused $obj, $cols = null)
|
||||||
|
{
|
||||||
|
$columns = array();
|
||||||
|
|
||||||
|
if ($cols) {
|
||||||
|
$dbMap = Propel::getDatabaseMap(ListPausedPeer::DATABASE_NAME);
|
||||||
|
$tableMap = $dbMap->getTable(ListPausedPeer::TABLE_NAME);
|
||||||
|
|
||||||
|
if (! is_array($cols)) {
|
||||||
|
$cols = array($cols);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($cols as $colName) {
|
||||||
|
if ($tableMap->containsColumn($colName)) {
|
||||||
|
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
|
||||||
|
$columns[$colName] = $obj->$get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return BasePeer::doValidate(ListPausedPeer::DATABASE_NAME, ListPausedPeer::TABLE_NAME, $columns);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve object using using composite pkey values.
|
||||||
|
* @param string $app_uid
|
||||||
|
* @param int $del_index
|
||||||
|
* @param Connection $con
|
||||||
|
* @return ListPaused
|
||||||
|
*/
|
||||||
|
public static function retrieveByPK($app_uid, $del_index, $con = null)
|
||||||
|
{
|
||||||
|
if ($con === null) {
|
||||||
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
|
}
|
||||||
|
$criteria = new Criteria();
|
||||||
|
$criteria->add(ListPausedPeer::APP_UID, $app_uid);
|
||||||
|
$criteria->add(ListPausedPeer::DEL_INDEX, $del_index);
|
||||||
|
$v = ListPausedPeer::doSelect($criteria, $con);
|
||||||
|
|
||||||
|
return !empty($v) ? $v[0] : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// static code to register the map builder for this Peer with the main Propel class
|
||||||
|
if (Propel::isInit()) {
|
||||||
|
// the MapBuilder classes register themselves with Propel during initialization
|
||||||
|
// so we need to load them here.
|
||||||
|
try {
|
||||||
|
BaseListPausedPeer::getMapBuilder();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// even if Propel is not yet initialized, the map builder class can be registered
|
||||||
|
// now and then it will be loaded when Propel initializes.
|
||||||
|
require_once 'classes/model/map/ListPausedMapBuilder.php';
|
||||||
|
Propel::registerMapBuilder('classes.model.map.ListPausedMapBuilder');
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user