PM-939 "Support for Message-Event (Endpoints and Backend)"

- Se han implementado los siguientes Endpoints:
    GET    /api/1.0/{workspace}/project/{prj_uid}/message-event-definitions
    GET    /api/1.0/{workspace}/project/{prj_uid}/message-event-definition/{msged_uid}
    GET    /api/1.0/{workspace}/project/{prj_uid}/message-event-definition/event/{evn_uid}
    POST   /api/1.0/{workspace}/project/{prj_uid}/message-event-definition
    PUT    /api/1.0/{workspace}/project/{prj_uid}/message-event-definition/{msged_uid}
    DELETE /api/1.0/{workspace}/project/{prj_uid}/message-event-definition/{msged_uid}
- Se han implementado los metodos necesarios/requeridos para el backend
  del DESIGNER para esta nueva funcionalidad
This commit is contained in:
Victor Saisa Lopez
2015-02-13 16:32:43 -04:00
parent 8b18dda574
commit b83718f295
32 changed files with 8344 additions and 58 deletions

View File

@@ -0,0 +1,5 @@
<?php
class MessageApplication extends BaseMessageApplication
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageApplicationPeer extends BaseMessageApplicationPeer
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventDefinition extends BaseMessageEventDefinition
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventDefinitionPeer extends BaseMessageEventDefinitionPeer
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventRelation extends BaseMessageEventRelation
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventRelationPeer extends BaseMessageEventRelationPeer
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventTaskRelation extends BaseMessageEventTaskRelation
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventTaskRelationPeer extends BaseMessageEventTaskRelationPeer
{
}

View File

@@ -0,0 +1,92 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_APPLICATION' 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 MessageApplicationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageApplicationMapBuilder';
/**
* 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('MESSAGE_APPLICATION');
$tMap->setPhpName('MessageApplication');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGAPP_UID', 'MsgappUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_THROW', 'EvnUidThrow', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_CATCH', 'EvnUidCatch', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGAPP_VARIABLES', 'MsgappVariables', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('MSGAPP_CORRELATION', 'MsgappCorrelation', 'string', CreoleTypes::VARCHAR, true, 512);
$tMap->addColumn('MSGAPP_THROW_DATE', 'MsgappThrowDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('MSGAPP_CATCH_DATE', 'MsgappCatchDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('MSGAPP_STATUS', 'MsgappStatus', 'string', CreoleTypes::VARCHAR, true, 25);
$tMap->addValidator('MSGAPP_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'READ|UNREAD', 'Please enter a valid value for MSGAPP_STATUS');
} // doBuild()
} // MessageApplicationMapBuilder

View File

@@ -0,0 +1,84 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_EVENT_DEFINITION' 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 MessageEventDefinitionMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageEventDefinitionMapBuilder';
/**
* 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('MESSAGE_EVENT_DEFINITION');
$tMap->setPhpName('MessageEventDefinition');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGED_UID', 'MsgedUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGT_UID', 'MsgtUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGED_USR_UID', 'MsgedUsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGED_VARIABLES', 'MsgedVariables', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('MSGED_CORRELATION', 'MsgedCorrelation', 'string', CreoleTypes::VARCHAR, true, 512);
} // doBuild()
} // MessageEventDefinitionMapBuilder

View File

@@ -0,0 +1,78 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_EVENT_RELATION' 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 MessageEventRelationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageEventRelationMapBuilder';
/**
* 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('MESSAGE_EVENT_RELATION');
$tMap->setPhpName('MessageEventRelation');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGER_UID', 'MsgerUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_THROW', 'EvnUidThrow', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_CATCH', 'EvnUidCatch', 'string', CreoleTypes::VARCHAR, true, 32);
} // doBuild()
} // MessageEventRelationMapBuilder

View File

@@ -0,0 +1,78 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_EVENT_TASK_RELATION' 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 MessageEventTaskRelationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageEventTaskRelationMapBuilder';
/**
* 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('MESSAGE_EVENT_TASK_RELATION');
$tMap->setPhpName('MessageEventTaskRelation');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGETR_UID', 'MsgetrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
} // doBuild()
} // MessageEventTaskRelationMapBuilder

View File

@@ -69,7 +69,7 @@ class TaskMapBuilder
$tMap->addPrimaryKey('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_TYPE', 'TasType', 'string', CreoleTypes::VARCHAR, true, 20);
$tMap->addColumn('TAS_TYPE', 'TasType', 'string', CreoleTypes::VARCHAR, true, 50);
$tMap->addColumn('TAS_DURATION', 'TasDuration', 'double', CreoleTypes::DOUBLE, true, null);
@@ -159,7 +159,7 @@ class TaskMapBuilder
$tMap->addColumn('TAS_SELFSERVICE_EXECUTION', 'TasSelfserviceExecution', 'string', CreoleTypes::VARCHAR, false, 15);
$tMap->addValidator('TAS_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT', 'Please enter a valid value for TAS_TYPE');
$tMap->addValidator('TAS_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT|START-MESSAGE-EVENT|END-MESSAGE-EVENT|INTERMEDIATE-START-MESSAGE-EVENT|INTERMEDIATE-END-MESSAGE-EVENT', 'Please enter a valid value for TAS_TYPE');
$tMap->addValidator('TAS_TIMEUNIT', 'validValues', 'propel.validator.ValidValuesValidator', 'MINUTES|HOURS|DAYS|WEEKS|MONTHS', 'Please select a valid value for TAS_TIMEUNIT.');

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,615 @@
<?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 MessageApplicationPeer::getOMClass()
include_once 'classes/model/MessageApplication.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_APPLICATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageApplicationPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_APPLICATION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageApplication';
/** The total number of columns. */
const NUM_COLUMNS = 10;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGAPP_UID field */
const MSGAPP_UID = 'MESSAGE_APPLICATION.MSGAPP_UID';
/** the column name for the APP_UID field */
const APP_UID = 'MESSAGE_APPLICATION.APP_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_APPLICATION.PRJ_UID';
/** the column name for the EVN_UID_THROW field */
const EVN_UID_THROW = 'MESSAGE_APPLICATION.EVN_UID_THROW';
/** the column name for the EVN_UID_CATCH field */
const EVN_UID_CATCH = 'MESSAGE_APPLICATION.EVN_UID_CATCH';
/** the column name for the MSGAPP_VARIABLES field */
const MSGAPP_VARIABLES = 'MESSAGE_APPLICATION.MSGAPP_VARIABLES';
/** the column name for the MSGAPP_CORRELATION field */
const MSGAPP_CORRELATION = 'MESSAGE_APPLICATION.MSGAPP_CORRELATION';
/** the column name for the MSGAPP_THROW_DATE field */
const MSGAPP_THROW_DATE = 'MESSAGE_APPLICATION.MSGAPP_THROW_DATE';
/** the column name for the MSGAPP_CATCH_DATE field */
const MSGAPP_CATCH_DATE = 'MESSAGE_APPLICATION.MSGAPP_CATCH_DATE';
/** the column name for the MSGAPP_STATUS field */
const MSGAPP_STATUS = 'MESSAGE_APPLICATION.MSGAPP_STATUS';
/** 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 ('MsgappUid', 'AppUid', 'PrjUid', 'EvnUidThrow', 'EvnUidCatch', 'MsgappVariables', 'MsgappCorrelation', 'MsgappThrowDate', 'MsgappCatchDate', 'MsgappStatus', ),
BasePeer::TYPE_COLNAME => array (MessageApplicationPeer::MSGAPP_UID, MessageApplicationPeer::APP_UID, MessageApplicationPeer::PRJ_UID, MessageApplicationPeer::EVN_UID_THROW, MessageApplicationPeer::EVN_UID_CATCH, MessageApplicationPeer::MSGAPP_VARIABLES, MessageApplicationPeer::MSGAPP_CORRELATION, MessageApplicationPeer::MSGAPP_THROW_DATE, MessageApplicationPeer::MSGAPP_CATCH_DATE, MessageApplicationPeer::MSGAPP_STATUS, ),
BasePeer::TYPE_FIELDNAME => array ('MSGAPP_UID', 'APP_UID', 'PRJ_UID', 'EVN_UID_THROW', 'EVN_UID_CATCH', 'MSGAPP_VARIABLES', 'MSGAPP_CORRELATION', 'MSGAPP_THROW_DATE', 'MSGAPP_CATCH_DATE', 'MSGAPP_STATUS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
);
/**
* 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 ('MsgappUid' => 0, 'AppUid' => 1, 'PrjUid' => 2, 'EvnUidThrow' => 3, 'EvnUidCatch' => 4, 'MsgappVariables' => 5, 'MsgappCorrelation' => 6, 'MsgappThrowDate' => 7, 'MsgappCatchDate' => 8, 'MsgappStatus' => 9, ),
BasePeer::TYPE_COLNAME => array (MessageApplicationPeer::MSGAPP_UID => 0, MessageApplicationPeer::APP_UID => 1, MessageApplicationPeer::PRJ_UID => 2, MessageApplicationPeer::EVN_UID_THROW => 3, MessageApplicationPeer::EVN_UID_CATCH => 4, MessageApplicationPeer::MSGAPP_VARIABLES => 5, MessageApplicationPeer::MSGAPP_CORRELATION => 6, MessageApplicationPeer::MSGAPP_THROW_DATE => 7, MessageApplicationPeer::MSGAPP_CATCH_DATE => 8, MessageApplicationPeer::MSGAPP_STATUS => 9, ),
BasePeer::TYPE_FIELDNAME => array ('MSGAPP_UID' => 0, 'APP_UID' => 1, 'PRJ_UID' => 2, 'EVN_UID_THROW' => 3, 'EVN_UID_CATCH' => 4, 'MSGAPP_VARIABLES' => 5, 'MSGAPP_CORRELATION' => 6, 'MSGAPP_THROW_DATE' => 7, 'MSGAPP_CATCH_DATE' => 8, 'MSGAPP_STATUS' => 9, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
);
/**
* @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/MessageApplicationMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageApplicationMapBuilder');
}
/**
* 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 = MessageApplicationPeer::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. MessageApplicationPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageApplicationPeer::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(MessageApplicationPeer::MSGAPP_UID);
$criteria->addSelectColumn(MessageApplicationPeer::APP_UID);
$criteria->addSelectColumn(MessageApplicationPeer::PRJ_UID);
$criteria->addSelectColumn(MessageApplicationPeer::EVN_UID_THROW);
$criteria->addSelectColumn(MessageApplicationPeer::EVN_UID_CATCH);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_VARIABLES);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_CORRELATION);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_THROW_DATE);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_CATCH_DATE);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_STATUS);
}
const COUNT = 'COUNT(MESSAGE_APPLICATION.MSGAPP_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_APPLICATION.MSGAPP_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(MessageApplicationPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageApplicationPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageApplicationPeer::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 MessageApplication
* @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 = MessageApplicationPeer::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 MessageApplicationPeer::populateObjects(MessageApplicationPeer::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;
MessageApplicationPeer::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 = MessageApplicationPeer::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 MessageApplicationPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageApplication or Criteria object.
*
* @param mixed $values Criteria or MessageApplication 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 MessageApplication 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 MessageApplication or Criteria object.
*
* @param mixed $values Criteria or MessageApplication 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(MessageApplicationPeer::MSGAPP_UID);
$selectCriteria->add(MessageApplicationPeer::MSGAPP_UID, $criteria->remove(MessageApplicationPeer::MSGAPP_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 MESSAGE_APPLICATION 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(MessageApplicationPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageApplication or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageApplication 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(MessageApplicationPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageApplication) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageApplicationPeer::MSGAPP_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 MessageApplication 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 MessageApplication $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(MessageApplication $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageApplicationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageApplicationPeer::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 {
if ($obj->isNew() || $obj->isColumnModified(MessageApplicationPeer::MSGAPP_STATUS))
$columns[MessageApplicationPeer::MSGAPP_STATUS] = $obj->getMsgappStatus();
}
return BasePeer::doValidate(MessageApplicationPeer::DATABASE_NAME, MessageApplicationPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageApplication
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageApplicationPeer::DATABASE_NAME);
$criteria->add(MessageApplicationPeer::MSGAPP_UID, $pk);
$v = MessageApplicationPeer::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(MessageApplicationPeer::MSGAPP_UID, $pks, Criteria::IN);
$objs = MessageApplicationPeer::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 {
BaseMessageApplicationPeer::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/MessageApplicationMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageApplicationMapBuilder');
}

View File

@@ -0,0 +1,858 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessageEventDefinitionPeer.php';
/**
* Base class that represents a row from the 'MESSAGE_EVENT_DEFINITION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventDefinition extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var MessageEventDefinitionPeer
*/
protected static $peer;
/**
* The value for the msged_uid field.
* @var string
*/
protected $msged_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the evn_uid field.
* @var string
*/
protected $evn_uid;
/**
* The value for the msgt_uid field.
* @var string
*/
protected $msgt_uid = '';
/**
* The value for the msged_usr_uid field.
* @var string
*/
protected $msged_usr_uid = '';
/**
* The value for the msged_variables field.
* @var string
*/
protected $msged_variables = '';
/**
* The value for the msged_correlation field.
* @var string
*/
protected $msged_correlation = '';
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [msged_uid] column value.
*
* @return string
*/
public function getMsgedUid()
{
return $this->msged_uid;
}
/**
* Get the [prj_uid] column value.
*
* @return string
*/
public function getPrjUid()
{
return $this->prj_uid;
}
/**
* Get the [evn_uid] column value.
*
* @return string
*/
public function getEvnUid()
{
return $this->evn_uid;
}
/**
* Get the [msgt_uid] column value.
*
* @return string
*/
public function getMsgtUid()
{
return $this->msgt_uid;
}
/**
* Get the [msged_usr_uid] column value.
*
* @return string
*/
public function getMsgedUsrUid()
{
return $this->msged_usr_uid;
}
/**
* Get the [msged_variables] column value.
*
* @return string
*/
public function getMsgedVariables()
{
return $this->msged_variables;
}
/**
* Get the [msged_correlation] column value.
*
* @return string
*/
public function getMsgedCorrelation()
{
return $this->msged_correlation;
}
/**
* Set the value of [msged_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->msged_uid !== $v) {
$this->msged_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_UID;
}
} // setMsgedUid()
/**
* Set the value of [prj_uid] column.
*
* @param string $v new value
* @return void
*/
public function setPrjUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->prj_uid !== $v) {
$this->prj_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::PRJ_UID;
}
} // setPrjUid()
/**
* Set the value of [evn_uid] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->evn_uid !== $v) {
$this->evn_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::EVN_UID;
}
} // setEvnUid()
/**
* Set the value of [msgt_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgtUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->msgt_uid !== $v || $v === '') {
$this->msgt_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGT_UID;
}
} // setMsgtUid()
/**
* Set the value of [msged_usr_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedUsrUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->msged_usr_uid !== $v || $v === '') {
$this->msged_usr_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_USR_UID;
}
} // setMsgedUsrUid()
/**
* Set the value of [msged_variables] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedVariables($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->msged_variables !== $v || $v === '') {
$this->msged_variables = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_VARIABLES;
}
} // setMsgedVariables()
/**
* Set the value of [msged_correlation] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedCorrelation($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->msged_correlation !== $v || $v === '') {
$this->msged_correlation = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_CORRELATION;
}
} // setMsgedCorrelation()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
* An offset (1-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
* @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
* @param int $startcol 1-based offset column which indicates which restultset column to start with.
* @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
$this->msged_uid = $rs->getString($startcol + 0);
$this->prj_uid = $rs->getString($startcol + 1);
$this->evn_uid = $rs->getString($startcol + 2);
$this->msgt_uid = $rs->getString($startcol + 3);
$this->msged_usr_uid = $rs->getString($startcol + 4);
$this->msged_variables = $rs->getString($startcol + 5);
$this->msged_correlation = $rs->getString($startcol + 6);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 7; // 7 = MessageEventDefinitionPeer::NUM_COLUMNS - MessageEventDefinitionPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating MessageEventDefinition object", $e);
}
}
/**
* Removes this object from datastore and sets delete attribute.
*
* @param Connection $con
* @return void
* @throws PropelException
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
public function delete($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventDefinitionPeer::DATABASE_NAME);
}
try {
$con->begin();
MessageEventDefinitionPeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update
* @throws PropelException
* @see doSave()
*/
public function save($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventDefinitionPeer::DATABASE_NAME);
}
try {
$con->begin();
$affectedRows = $this->doSave($con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update and any referring
* @throws PropelException
* @see save()
*/
protected function doSave($con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessageEventDefinitionPeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows).
$this->setNew(false);
} else {
$affectedRows += MessageEventDefinitionPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
$this->alreadyInSave = false;
}
return $affectedRows;
} // doSave()
/**
* Array of ValidationFailed objects.
* @var array ValidationFailed[]
*/
protected $validationFailures = array();
/**
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
* @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
{
return $this->validationFailures;
}
/**
* Validates the objects modified field values and all objects related to this table.
*
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
* @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
public function validate($columns = null)
{
$res = $this->doValidate($columns);
if ($res === true) {
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
}
/**
* This function performs the validation work for complex object models.
*
* In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
if (($retval = MessageEventDefinitionPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
return (!empty($failureMap) ? $failureMap : true);
}
/**
* Retrieves a field from the object by name passed in as a string.
*
* @param string $name name
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventDefinitionPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
/**
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
switch($pos) {
case 0:
return $this->getMsgedUid();
break;
case 1:
return $this->getPrjUid();
break;
case 2:
return $this->getEvnUid();
break;
case 3:
return $this->getMsgtUid();
break;
case 4:
return $this->getMsgedUsrUid();
break;
case 5:
return $this->getMsgedVariables();
break;
case 6:
return $this->getMsgedCorrelation();
break;
default:
return null;
break;
} // switch()
}
/**
* Exports the object as an array.
*
* You can specify the key type of the array by passing one of the class
* type constants.
*
* @param string $keyType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventDefinitionPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMsgedUid(),
$keys[1] => $this->getPrjUid(),
$keys[2] => $this->getEvnUid(),
$keys[3] => $this->getMsgtUid(),
$keys[4] => $this->getMsgedUsrUid(),
$keys[5] => $this->getMsgedVariables(),
$keys[6] => $this->getMsgedCorrelation(),
);
return $result;
}
/**
* Sets a field from the object by name passed in as a string.
*
* @param string $name peer name
* @param mixed $value field value
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventDefinitionPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @param mixed $value field value
* @return void
*/
public function setByPosition($pos, $value)
{
switch($pos) {
case 0:
$this->setMsgedUid($value);
break;
case 1:
$this->setPrjUid($value);
break;
case 2:
$this->setEvnUid($value);
break;
case 3:
$this->setMsgtUid($value);
break;
case 4:
$this->setMsgedUsrUid($value);
break;
case 5:
$this->setMsgedVariables($value);
break;
case 6:
$this->setMsgedCorrelation($value);
break;
} // switch()
}
/**
* Populates the object using an array.
*
* This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column.
*
* You can specify the key type of the array by additionally passing one
* of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
* TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
*
* @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses.
* @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventDefinitionPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMsgedUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setPrjUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setEvnUid($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setMsgtUid($arr[$keys[3]]);
}
if (array_key_exists($keys[4], $arr)) {
$this->setMsgedUsrUid($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setMsgedVariables($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
$this->setMsgedCorrelation($arr[$keys[6]]);
}
}
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
* @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
$criteria = new Criteria(MessageEventDefinitionPeer::DATABASE_NAME);
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_UID)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, $this->msged_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::PRJ_UID)) {
$criteria->add(MessageEventDefinitionPeer::PRJ_UID, $this->prj_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::EVN_UID)) {
$criteria->add(MessageEventDefinitionPeer::EVN_UID, $this->evn_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGT_UID)) {
$criteria->add(MessageEventDefinitionPeer::MSGT_UID, $this->msgt_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_USR_UID)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_USR_UID, $this->msged_usr_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_VARIABLES)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_VARIABLES, $this->msged_variables);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_CORRELATION)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_CORRELATION, $this->msged_correlation);
}
return $criteria;
}
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessageEventDefinitionPeer::DATABASE_NAME);
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, $this->msged_uid);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return string
*/
public function getPrimaryKey()
{
return $this->getMsgedUid();
}
/**
* Generic method to set the primary key (msged_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMsgedUid($key);
}
/**
* Sets contents of passed object to values from current object.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of MessageEventDefinition (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setPrjUid($this->prj_uid);
$copyObj->setEvnUid($this->evn_uid);
$copyObj->setMsgtUid($this->msgt_uid);
$copyObj->setMsgedUsrUid($this->msged_usr_uid);
$copyObj->setMsgedVariables($this->msged_variables);
$copyObj->setMsgedCorrelation($this->msged_correlation);
$copyObj->setNew(true);
$copyObj->setMsgedUid(NULL); // this is a pkey column, so set to default value
}
/**
* Makes a copy of this object that will be inserted as a new row in table when saved.
* It creates a new object filling in the simple attributes, but skipping any primary
* keys that are defined for the table.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return MessageEventDefinition Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
$copyObj = new $clazz();
$this->copyInto($copyObj, $deepCopy);
return $copyObj;
}
/**
* Returns a peer instance associated with this om.
*
* Since Peer classes are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessageEventDefinitionPeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessageEventDefinitionPeer();
}
return self::$peer;
}
}

View File

@@ -0,0 +1,597 @@
<?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 MessageEventDefinitionPeer::getOMClass()
include_once 'classes/model/MessageEventDefinition.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_EVENT_DEFINITION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventDefinitionPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_EVENT_DEFINITION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageEventDefinition';
/** The total number of columns. */
const NUM_COLUMNS = 7;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGED_UID field */
const MSGED_UID = 'MESSAGE_EVENT_DEFINITION.MSGED_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_EVENT_DEFINITION.PRJ_UID';
/** the column name for the EVN_UID field */
const EVN_UID = 'MESSAGE_EVENT_DEFINITION.EVN_UID';
/** the column name for the MSGT_UID field */
const MSGT_UID = 'MESSAGE_EVENT_DEFINITION.MSGT_UID';
/** the column name for the MSGED_USR_UID field */
const MSGED_USR_UID = 'MESSAGE_EVENT_DEFINITION.MSGED_USR_UID';
/** the column name for the MSGED_VARIABLES field */
const MSGED_VARIABLES = 'MESSAGE_EVENT_DEFINITION.MSGED_VARIABLES';
/** the column name for the MSGED_CORRELATION field */
const MSGED_CORRELATION = 'MESSAGE_EVENT_DEFINITION.MSGED_CORRELATION';
/** 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 ('MsgedUid', 'PrjUid', 'EvnUid', 'MsgtUid', 'MsgedUsrUid', 'MsgedVariables', 'MsgedCorrelation', ),
BasePeer::TYPE_COLNAME => array (MessageEventDefinitionPeer::MSGED_UID, MessageEventDefinitionPeer::PRJ_UID, MessageEventDefinitionPeer::EVN_UID, MessageEventDefinitionPeer::MSGT_UID, MessageEventDefinitionPeer::MSGED_USR_UID, MessageEventDefinitionPeer::MSGED_VARIABLES, MessageEventDefinitionPeer::MSGED_CORRELATION, ),
BasePeer::TYPE_FIELDNAME => array ('MSGED_UID', 'PRJ_UID', 'EVN_UID', 'MSGT_UID', 'MSGED_USR_UID', 'MSGED_VARIABLES', 'MSGED_CORRELATION', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
/**
* 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 ('MsgedUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'MsgtUid' => 3, 'MsgedUsrUid' => 4, 'MsgedVariables' => 5, 'MsgedCorrelation' => 6, ),
BasePeer::TYPE_COLNAME => array (MessageEventDefinitionPeer::MSGED_UID => 0, MessageEventDefinitionPeer::PRJ_UID => 1, MessageEventDefinitionPeer::EVN_UID => 2, MessageEventDefinitionPeer::MSGT_UID => 3, MessageEventDefinitionPeer::MSGED_USR_UID => 4, MessageEventDefinitionPeer::MSGED_VARIABLES => 5, MessageEventDefinitionPeer::MSGED_CORRELATION => 6, ),
BasePeer::TYPE_FIELDNAME => array ('MSGED_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'MSGT_UID' => 3, 'MSGED_USR_UID' => 4, 'MSGED_VARIABLES' => 5, 'MSGED_CORRELATION' => 6, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
/**
* @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/MessageEventDefinitionMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageEventDefinitionMapBuilder');
}
/**
* 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 = MessageEventDefinitionPeer::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. MessageEventDefinitionPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageEventDefinitionPeer::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(MessageEventDefinitionPeer::MSGED_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::PRJ_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::EVN_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGT_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_USR_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_VARIABLES);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_CORRELATION);
}
const COUNT = 'COUNT(MESSAGE_EVENT_DEFINITION.MSGED_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_EVENT_DEFINITION.MSGED_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(MessageEventDefinitionPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageEventDefinitionPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageEventDefinitionPeer::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 MessageEventDefinition
* @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 = MessageEventDefinitionPeer::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 MessageEventDefinitionPeer::populateObjects(MessageEventDefinitionPeer::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;
MessageEventDefinitionPeer::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 = MessageEventDefinitionPeer::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 MessageEventDefinitionPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageEventDefinition or Criteria object.
*
* @param mixed $values Criteria or MessageEventDefinition 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 MessageEventDefinition 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 MessageEventDefinition or Criteria object.
*
* @param mixed $values Criteria or MessageEventDefinition 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(MessageEventDefinitionPeer::MSGED_UID);
$selectCriteria->add(MessageEventDefinitionPeer::MSGED_UID, $criteria->remove(MessageEventDefinitionPeer::MSGED_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 MESSAGE_EVENT_DEFINITION 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(MessageEventDefinitionPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageEventDefinition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageEventDefinition 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(MessageEventDefinitionPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageEventDefinition) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageEventDefinitionPeer::MSGED_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 MessageEventDefinition 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 MessageEventDefinition $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(MessageEventDefinition $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageEventDefinitionPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageEventDefinitionPeer::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(MessageEventDefinitionPeer::DATABASE_NAME, MessageEventDefinitionPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageEventDefinition
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageEventDefinitionPeer::DATABASE_NAME);
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, $pk);
$v = MessageEventDefinitionPeer::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(MessageEventDefinitionPeer::MSGED_UID, $pks, Criteria::IN);
$objs = MessageEventDefinitionPeer::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 {
BaseMessageEventDefinitionPeer::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/MessageEventDefinitionMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageEventDefinitionMapBuilder');
}

View File

@@ -0,0 +1,684 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessageEventRelationPeer.php';
/**
* Base class that represents a row from the 'MESSAGE_EVENT_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventRelation extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var MessageEventRelationPeer
*/
protected static $peer;
/**
* The value for the msger_uid field.
* @var string
*/
protected $msger_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the evn_uid_throw field.
* @var string
*/
protected $evn_uid_throw;
/**
* The value for the evn_uid_catch field.
* @var string
*/
protected $evn_uid_catch;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [msger_uid] column value.
*
* @return string
*/
public function getMsgerUid()
{
return $this->msger_uid;
}
/**
* Get the [prj_uid] column value.
*
* @return string
*/
public function getPrjUid()
{
return $this->prj_uid;
}
/**
* Get the [evn_uid_throw] column value.
*
* @return string
*/
public function getEvnUidThrow()
{
return $this->evn_uid_throw;
}
/**
* Get the [evn_uid_catch] column value.
*
* @return string
*/
public function getEvnUidCatch()
{
return $this->evn_uid_catch;
}
/**
* Set the value of [msger_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgerUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->msger_uid !== $v) {
$this->msger_uid = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::MSGER_UID;
}
} // setMsgerUid()
/**
* Set the value of [prj_uid] column.
*
* @param string $v new value
* @return void
*/
public function setPrjUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->prj_uid !== $v) {
$this->prj_uid = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::PRJ_UID;
}
} // setPrjUid()
/**
* Set the value of [evn_uid_throw] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUidThrow($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->evn_uid_throw !== $v) {
$this->evn_uid_throw = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::EVN_UID_THROW;
}
} // setEvnUidThrow()
/**
* Set the value of [evn_uid_catch] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUidCatch($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->evn_uid_catch !== $v) {
$this->evn_uid_catch = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::EVN_UID_CATCH;
}
} // setEvnUidCatch()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
* An offset (1-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
* @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
* @param int $startcol 1-based offset column which indicates which restultset column to start with.
* @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
$this->msger_uid = $rs->getString($startcol + 0);
$this->prj_uid = $rs->getString($startcol + 1);
$this->evn_uid_throw = $rs->getString($startcol + 2);
$this->evn_uid_catch = $rs->getString($startcol + 3);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 4; // 4 = MessageEventRelationPeer::NUM_COLUMNS - MessageEventRelationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating MessageEventRelation object", $e);
}
}
/**
* Removes this object from datastore and sets delete attribute.
*
* @param Connection $con
* @return void
* @throws PropelException
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
public function delete($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
MessageEventRelationPeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update
* @throws PropelException
* @see doSave()
*/
public function save($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
$affectedRows = $this->doSave($con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update and any referring
* @throws PropelException
* @see save()
*/
protected function doSave($con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessageEventRelationPeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows).
$this->setNew(false);
} else {
$affectedRows += MessageEventRelationPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
$this->alreadyInSave = false;
}
return $affectedRows;
} // doSave()
/**
* Array of ValidationFailed objects.
* @var array ValidationFailed[]
*/
protected $validationFailures = array();
/**
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
* @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
{
return $this->validationFailures;
}
/**
* Validates the objects modified field values and all objects related to this table.
*
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
* @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
public function validate($columns = null)
{
$res = $this->doValidate($columns);
if ($res === true) {
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
}
/**
* This function performs the validation work for complex object models.
*
* In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
if (($retval = MessageEventRelationPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
return (!empty($failureMap) ? $failureMap : true);
}
/**
* Retrieves a field from the object by name passed in as a string.
*
* @param string $name name
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
/**
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
switch($pos) {
case 0:
return $this->getMsgerUid();
break;
case 1:
return $this->getPrjUid();
break;
case 2:
return $this->getEvnUidThrow();
break;
case 3:
return $this->getEvnUidCatch();
break;
default:
return null;
break;
} // switch()
}
/**
* Exports the object as an array.
*
* You can specify the key type of the array by passing one of the class
* type constants.
*
* @param string $keyType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventRelationPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMsgerUid(),
$keys[1] => $this->getPrjUid(),
$keys[2] => $this->getEvnUidThrow(),
$keys[3] => $this->getEvnUidCatch(),
);
return $result;
}
/**
* Sets a field from the object by name passed in as a string.
*
* @param string $name peer name
* @param mixed $value field value
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @param mixed $value field value
* @return void
*/
public function setByPosition($pos, $value)
{
switch($pos) {
case 0:
$this->setMsgerUid($value);
break;
case 1:
$this->setPrjUid($value);
break;
case 2:
$this->setEvnUidThrow($value);
break;
case 3:
$this->setEvnUidCatch($value);
break;
} // switch()
}
/**
* Populates the object using an array.
*
* This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column.
*
* You can specify the key type of the array by additionally passing one
* of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
* TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
*
* @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses.
* @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventRelationPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMsgerUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setPrjUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setEvnUidThrow($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setEvnUidCatch($arr[$keys[3]]);
}
}
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
* @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
$criteria = new Criteria(MessageEventRelationPeer::DATABASE_NAME);
if ($this->isColumnModified(MessageEventRelationPeer::MSGER_UID)) {
$criteria->add(MessageEventRelationPeer::MSGER_UID, $this->msger_uid);
}
if ($this->isColumnModified(MessageEventRelationPeer::PRJ_UID)) {
$criteria->add(MessageEventRelationPeer::PRJ_UID, $this->prj_uid);
}
if ($this->isColumnModified(MessageEventRelationPeer::EVN_UID_THROW)) {
$criteria->add(MessageEventRelationPeer::EVN_UID_THROW, $this->evn_uid_throw);
}
if ($this->isColumnModified(MessageEventRelationPeer::EVN_UID_CATCH)) {
$criteria->add(MessageEventRelationPeer::EVN_UID_CATCH, $this->evn_uid_catch);
}
return $criteria;
}
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessageEventRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventRelationPeer::MSGER_UID, $this->msger_uid);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return string
*/
public function getPrimaryKey()
{
return $this->getMsgerUid();
}
/**
* Generic method to set the primary key (msger_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMsgerUid($key);
}
/**
* Sets contents of passed object to values from current object.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of MessageEventRelation (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setPrjUid($this->prj_uid);
$copyObj->setEvnUidThrow($this->evn_uid_throw);
$copyObj->setEvnUidCatch($this->evn_uid_catch);
$copyObj->setNew(true);
$copyObj->setMsgerUid(NULL); // this is a pkey column, so set to default value
}
/**
* Makes a copy of this object that will be inserted as a new row in table when saved.
* It creates a new object filling in the simple attributes, but skipping any primary
* keys that are defined for the table.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return MessageEventRelation Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
$copyObj = new $clazz();
$this->copyInto($copyObj, $deepCopy);
return $copyObj;
}
/**
* Returns a peer instance associated with this om.
*
* Since Peer classes are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessageEventRelationPeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessageEventRelationPeer();
}
return self::$peer;
}
}

View File

@@ -0,0 +1,582 @@
<?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 MessageEventRelationPeer::getOMClass()
include_once 'classes/model/MessageEventRelation.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_EVENT_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventRelationPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_EVENT_RELATION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageEventRelation';
/** The total number of columns. */
const NUM_COLUMNS = 4;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGER_UID field */
const MSGER_UID = 'MESSAGE_EVENT_RELATION.MSGER_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_EVENT_RELATION.PRJ_UID';
/** the column name for the EVN_UID_THROW field */
const EVN_UID_THROW = 'MESSAGE_EVENT_RELATION.EVN_UID_THROW';
/** the column name for the EVN_UID_CATCH field */
const EVN_UID_CATCH = 'MESSAGE_EVENT_RELATION.EVN_UID_CATCH';
/** 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 ('MsgerUid', 'PrjUid', 'EvnUidThrow', 'EvnUidCatch', ),
BasePeer::TYPE_COLNAME => array (MessageEventRelationPeer::MSGER_UID, MessageEventRelationPeer::PRJ_UID, MessageEventRelationPeer::EVN_UID_THROW, MessageEventRelationPeer::EVN_UID_CATCH, ),
BasePeer::TYPE_FIELDNAME => array ('MSGER_UID', 'PRJ_UID', 'EVN_UID_THROW', 'EVN_UID_CATCH', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* 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 ('MsgerUid' => 0, 'PrjUid' => 1, 'EvnUidThrow' => 2, 'EvnUidCatch' => 3, ),
BasePeer::TYPE_COLNAME => array (MessageEventRelationPeer::MSGER_UID => 0, MessageEventRelationPeer::PRJ_UID => 1, MessageEventRelationPeer::EVN_UID_THROW => 2, MessageEventRelationPeer::EVN_UID_CATCH => 3, ),
BasePeer::TYPE_FIELDNAME => array ('MSGER_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID_THROW' => 2, 'EVN_UID_CATCH' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* @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/MessageEventRelationMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageEventRelationMapBuilder');
}
/**
* 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 = MessageEventRelationPeer::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. MessageEventRelationPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageEventRelationPeer::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(MessageEventRelationPeer::MSGER_UID);
$criteria->addSelectColumn(MessageEventRelationPeer::PRJ_UID);
$criteria->addSelectColumn(MessageEventRelationPeer::EVN_UID_THROW);
$criteria->addSelectColumn(MessageEventRelationPeer::EVN_UID_CATCH);
}
const COUNT = 'COUNT(MESSAGE_EVENT_RELATION.MSGER_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_EVENT_RELATION.MSGER_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(MessageEventRelationPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageEventRelationPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageEventRelationPeer::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 MessageEventRelation
* @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 = MessageEventRelationPeer::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 MessageEventRelationPeer::populateObjects(MessageEventRelationPeer::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;
MessageEventRelationPeer::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 = MessageEventRelationPeer::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 MessageEventRelationPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageEventRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventRelation 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 MessageEventRelation 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 MessageEventRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventRelation 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(MessageEventRelationPeer::MSGER_UID);
$selectCriteria->add(MessageEventRelationPeer::MSGER_UID, $criteria->remove(MessageEventRelationPeer::MSGER_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 MESSAGE_EVENT_RELATION 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(MessageEventRelationPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageEventRelation or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageEventRelation 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(MessageEventRelationPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageEventRelation) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageEventRelationPeer::MSGER_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 MessageEventRelation 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 MessageEventRelation $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(MessageEventRelation $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageEventRelationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageEventRelationPeer::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(MessageEventRelationPeer::DATABASE_NAME, MessageEventRelationPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageEventRelation
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageEventRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventRelationPeer::MSGER_UID, $pk);
$v = MessageEventRelationPeer::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(MessageEventRelationPeer::MSGER_UID, $pks, Criteria::IN);
$objs = MessageEventRelationPeer::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 {
BaseMessageEventRelationPeer::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/MessageEventRelationMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageEventRelationMapBuilder');
}

View File

@@ -0,0 +1,684 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessageEventTaskRelationPeer.php';
/**
* Base class that represents a row from the 'MESSAGE_EVENT_TASK_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventTaskRelation extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var MessageEventTaskRelationPeer
*/
protected static $peer;
/**
* The value for the msgetr_uid field.
* @var string
*/
protected $msgetr_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the evn_uid field.
* @var string
*/
protected $evn_uid;
/**
* The value for the tas_uid field.
* @var string
*/
protected $tas_uid;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [msgetr_uid] column value.
*
* @return string
*/
public function getMsgetrUid()
{
return $this->msgetr_uid;
}
/**
* Get the [prj_uid] column value.
*
* @return string
*/
public function getPrjUid()
{
return $this->prj_uid;
}
/**
* Get the [evn_uid] column value.
*
* @return string
*/
public function getEvnUid()
{
return $this->evn_uid;
}
/**
* Get the [tas_uid] column value.
*
* @return string
*/
public function getTasUid()
{
return $this->tas_uid;
}
/**
* Set the value of [msgetr_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgetrUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->msgetr_uid !== $v) {
$this->msgetr_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::MSGETR_UID;
}
} // setMsgetrUid()
/**
* Set the value of [prj_uid] column.
*
* @param string $v new value
* @return void
*/
public function setPrjUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->prj_uid !== $v) {
$this->prj_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::PRJ_UID;
}
} // setPrjUid()
/**
* Set the value of [evn_uid] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->evn_uid !== $v) {
$this->evn_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::EVN_UID;
}
} // setEvnUid()
/**
* Set the value of [tas_uid] column.
*
* @param string $v new value
* @return void
*/
public function setTasUid($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->tas_uid !== $v) {
$this->tas_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::TAS_UID;
}
} // setTasUid()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
* An offset (1-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
* @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
* @param int $startcol 1-based offset column which indicates which restultset column to start with.
* @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
$this->msgetr_uid = $rs->getString($startcol + 0);
$this->prj_uid = $rs->getString($startcol + 1);
$this->evn_uid = $rs->getString($startcol + 2);
$this->tas_uid = $rs->getString($startcol + 3);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 4; // 4 = MessageEventTaskRelationPeer::NUM_COLUMNS - MessageEventTaskRelationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating MessageEventTaskRelation object", $e);
}
}
/**
* Removes this object from datastore and sets delete attribute.
*
* @param Connection $con
* @return void
* @throws PropelException
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
public function delete($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
MessageEventTaskRelationPeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update
* @throws PropelException
* @see doSave()
*/
public function save($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
$affectedRows = $this->doSave($con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update and any referring
* @throws PropelException
* @see save()
*/
protected function doSave($con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessageEventTaskRelationPeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows).
$this->setNew(false);
} else {
$affectedRows += MessageEventTaskRelationPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
$this->alreadyInSave = false;
}
return $affectedRows;
} // doSave()
/**
* Array of ValidationFailed objects.
* @var array ValidationFailed[]
*/
protected $validationFailures = array();
/**
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
* @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
{
return $this->validationFailures;
}
/**
* Validates the objects modified field values and all objects related to this table.
*
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
* @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
public function validate($columns = null)
{
$res = $this->doValidate($columns);
if ($res === true) {
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
}
/**
* This function performs the validation work for complex object models.
*
* In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
if (($retval = MessageEventTaskRelationPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
return (!empty($failureMap) ? $failureMap : true);
}
/**
* Retrieves a field from the object by name passed in as a string.
*
* @param string $name name
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
/**
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
switch($pos) {
case 0:
return $this->getMsgetrUid();
break;
case 1:
return $this->getPrjUid();
break;
case 2:
return $this->getEvnUid();
break;
case 3:
return $this->getTasUid();
break;
default:
return null;
break;
} // switch()
}
/**
* Exports the object as an array.
*
* You can specify the key type of the array by passing one of the class
* type constants.
*
* @param string $keyType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventTaskRelationPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMsgetrUid(),
$keys[1] => $this->getPrjUid(),
$keys[2] => $this->getEvnUid(),
$keys[3] => $this->getTasUid(),
);
return $result;
}
/**
* Sets a field from the object by name passed in as a string.
*
* @param string $name peer name
* @param mixed $value field value
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @param mixed $value field value
* @return void
*/
public function setByPosition($pos, $value)
{
switch($pos) {
case 0:
$this->setMsgetrUid($value);
break;
case 1:
$this->setPrjUid($value);
break;
case 2:
$this->setEvnUid($value);
break;
case 3:
$this->setTasUid($value);
break;
} // switch()
}
/**
* Populates the object using an array.
*
* This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column.
*
* You can specify the key type of the array by additionally passing one
* of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
* TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
*
* @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses.
* @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventTaskRelationPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMsgetrUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setPrjUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setEvnUid($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setTasUid($arr[$keys[3]]);
}
}
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
* @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
if ($this->isColumnModified(MessageEventTaskRelationPeer::MSGETR_UID)) {
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $this->msgetr_uid);
}
if ($this->isColumnModified(MessageEventTaskRelationPeer::PRJ_UID)) {
$criteria->add(MessageEventTaskRelationPeer::PRJ_UID, $this->prj_uid);
}
if ($this->isColumnModified(MessageEventTaskRelationPeer::EVN_UID)) {
$criteria->add(MessageEventTaskRelationPeer::EVN_UID, $this->evn_uid);
}
if ($this->isColumnModified(MessageEventTaskRelationPeer::TAS_UID)) {
$criteria->add(MessageEventTaskRelationPeer::TAS_UID, $this->tas_uid);
}
return $criteria;
}
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $this->msgetr_uid);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return string
*/
public function getPrimaryKey()
{
return $this->getMsgetrUid();
}
/**
* Generic method to set the primary key (msgetr_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMsgetrUid($key);
}
/**
* Sets contents of passed object to values from current object.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of MessageEventTaskRelation (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setPrjUid($this->prj_uid);
$copyObj->setEvnUid($this->evn_uid);
$copyObj->setTasUid($this->tas_uid);
$copyObj->setNew(true);
$copyObj->setMsgetrUid(NULL); // this is a pkey column, so set to default value
}
/**
* Makes a copy of this object that will be inserted as a new row in table when saved.
* It creates a new object filling in the simple attributes, but skipping any primary
* keys that are defined for the table.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return MessageEventTaskRelation Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
$copyObj = new $clazz();
$this->copyInto($copyObj, $deepCopy);
return $copyObj;
}
/**
* Returns a peer instance associated with this om.
*
* Since Peer classes are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessageEventTaskRelationPeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessageEventTaskRelationPeer();
}
return self::$peer;
}
}

View File

@@ -0,0 +1,582 @@
<?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 MessageEventTaskRelationPeer::getOMClass()
include_once 'classes/model/MessageEventTaskRelation.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_EVENT_TASK_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventTaskRelationPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_EVENT_TASK_RELATION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageEventTaskRelation';
/** The total number of columns. */
const NUM_COLUMNS = 4;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGETR_UID field */
const MSGETR_UID = 'MESSAGE_EVENT_TASK_RELATION.MSGETR_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_EVENT_TASK_RELATION.PRJ_UID';
/** the column name for the EVN_UID field */
const EVN_UID = 'MESSAGE_EVENT_TASK_RELATION.EVN_UID';
/** the column name for the TAS_UID field */
const TAS_UID = 'MESSAGE_EVENT_TASK_RELATION.TAS_UID';
/** 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 ('MsgetrUid', 'PrjUid', 'EvnUid', 'TasUid', ),
BasePeer::TYPE_COLNAME => array (MessageEventTaskRelationPeer::MSGETR_UID, MessageEventTaskRelationPeer::PRJ_UID, MessageEventTaskRelationPeer::EVN_UID, MessageEventTaskRelationPeer::TAS_UID, ),
BasePeer::TYPE_FIELDNAME => array ('MSGETR_UID', 'PRJ_UID', 'EVN_UID', 'TAS_UID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* 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 ('MsgetrUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'TasUid' => 3, ),
BasePeer::TYPE_COLNAME => array (MessageEventTaskRelationPeer::MSGETR_UID => 0, MessageEventTaskRelationPeer::PRJ_UID => 1, MessageEventTaskRelationPeer::EVN_UID => 2, MessageEventTaskRelationPeer::TAS_UID => 3, ),
BasePeer::TYPE_FIELDNAME => array ('MSGETR_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'TAS_UID' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* @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/MessageEventTaskRelationMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageEventTaskRelationMapBuilder');
}
/**
* 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 = MessageEventTaskRelationPeer::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. MessageEventTaskRelationPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageEventTaskRelationPeer::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(MessageEventTaskRelationPeer::MSGETR_UID);
$criteria->addSelectColumn(MessageEventTaskRelationPeer::PRJ_UID);
$criteria->addSelectColumn(MessageEventTaskRelationPeer::EVN_UID);
$criteria->addSelectColumn(MessageEventTaskRelationPeer::TAS_UID);
}
const COUNT = 'COUNT(MESSAGE_EVENT_TASK_RELATION.MSGETR_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_EVENT_TASK_RELATION.MSGETR_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(MessageEventTaskRelationPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageEventTaskRelationPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageEventTaskRelationPeer::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 MessageEventTaskRelation
* @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 = MessageEventTaskRelationPeer::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 MessageEventTaskRelationPeer::populateObjects(MessageEventTaskRelationPeer::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;
MessageEventTaskRelationPeer::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 = MessageEventTaskRelationPeer::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 MessageEventTaskRelationPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageEventTaskRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventTaskRelation 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 MessageEventTaskRelation 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 MessageEventTaskRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventTaskRelation 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(MessageEventTaskRelationPeer::MSGETR_UID);
$selectCriteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $criteria->remove(MessageEventTaskRelationPeer::MSGETR_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 MESSAGE_EVENT_TASK_RELATION 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(MessageEventTaskRelationPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageEventTaskRelation or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageEventTaskRelation 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(MessageEventTaskRelationPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageEventTaskRelation) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageEventTaskRelationPeer::MSGETR_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 MessageEventTaskRelation 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 MessageEventTaskRelation $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(MessageEventTaskRelation $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageEventTaskRelationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageEventTaskRelationPeer::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(MessageEventTaskRelationPeer::DATABASE_NAME, MessageEventTaskRelationPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageEventTaskRelation
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $pk);
$v = MessageEventTaskRelationPeer::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(MessageEventTaskRelationPeer::MSGETR_UID, $pks, Criteria::IN);
$objs = MessageEventTaskRelationPeer::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 {
BaseMessageEventTaskRelationPeer::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/MessageEventTaskRelationMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageEventTaskRelationMapBuilder');
}