Merge branch 'master' of bitbucket.org:colosa/processmaker into LISTS

This commit is contained in:
Brayan Pereyra
2015-02-06 15:48:38 -04:00
59 changed files with 3085 additions and 1157 deletions

2
workflow/engine/classes/model/BpmnFlow.php Normal file → Executable file
View File

@@ -72,7 +72,7 @@ class BpmnFlow extends BaseBpmnFlow
if (! is_null($prjUid)) {
$c->add(BpmnFlowPeer::PRJ_UID, $prjUid, Criteria::EQUAL);
}
$c->addAscendingOrderByColumn(BpmnFlowPeer::FLO_POSITION);
$rs = BpmnFlowPeer::doSelectRS($c);
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);

View File

@@ -1,19 +0,0 @@
<?php
require_once 'classes/model/om/BaseMessage.php';
/**
* Skeleton subclass for representing a row from the 'MESSAGE' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class Message extends BaseMessage {
} // Message

View File

@@ -1,19 +0,0 @@
<?php
require_once 'classes/model/om/BaseMessageDetail.php';
/**
* Skeleton subclass for representing a row from the 'MESSAGE_DETAIL' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class MessageDetail extends BaseMessageDetail {
} // MessageDetail

View File

@@ -1,23 +0,0 @@
<?php
// include base peer class
require_once 'classes/model/om/BaseMessageDetailPeer.php';
// include object class
include_once 'classes/model/MessageDetail.php';
/**
* Skeleton subclass for performing query and update operations on the 'MESSAGE_DETAIL' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class MessageDetailPeer extends BaseMessageDetailPeer {
} // MessageDetailPeer

View File

@@ -1,23 +0,0 @@
<?php
// include base peer class
require_once 'classes/model/om/BaseMessagePeer.php';
// include object class
include_once 'classes/model/Message.php';
/**
* Skeleton subclass for performing query and update operations on the 'MESSAGE' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class MessagePeer extends BaseMessagePeer {
} // MessagePeer

View File

@@ -0,0 +1,5 @@
<?php
class MessageType extends BaseMessageType
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageTypePeer extends BaseMessageTypePeer
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageTypeVariable extends BaseMessageTypeVariable
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageTypeVariablePeer extends BaseMessageTypeVariablePeer
{
}

View File

@@ -568,7 +568,7 @@ class Process extends BaseProcess
return (is_object( $oPro ) && get_class( $oPro ) == 'Process');
}
public static function existsByProTitle ($PRO_TITLE)
public static function existsByProTitle ($proTitle)
{
$oCriteria = new Criteria("workflow");
@@ -576,7 +576,7 @@ class Process extends BaseProcess
$oCriteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
$oCriteria->add( ContentPeer::CON_VALUE, $PRO_TITLE );
$oCriteria->add( ContentPeer::CON_VALUE, $proTitle );
$oDataset = ContentPeer::doSelectRS( $oCriteria, Propel::getDbConnection('workflow_ro') );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
@@ -586,6 +586,51 @@ class Process extends BaseProcess
return ((int)($aRow["NUM_REC"]) > 0)? true : false;
}
public static function getByProTitle($proTitle) {
$oCriteria = new Criteria("workflow");
$oCriteria->addSelectColumn(ContentPeer::CON_ID);
$oCriteria->add(ContentPeer::CON_CATEGORY, 'PRO_TITLE');
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
$oCriteria->add(ContentPeer::CON_VALUE, $proTitle);
$oDataset = ContentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$oProcess = new Process();
return isset($aRow["CON_ID"]) ? $oProcess->load($aRow["CON_ID"]) : null;
}
public static function getNextTitle($proTitle) {
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
$oCriteria->add(ContentPeer::CON_CATEGORY, 'PRO_TITLE');
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
$oCriteria->add(ContentPeer::CON_VALUE, $proTitle . '-%', Criteria::LIKE);
$oCriteria->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
$oDataset = ContentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$data = array();
$may = 0;
while ($oDataset->next()) {
$row = $oDataset->getRow();
$number = explode("-", $row["CON_VALUE"]);
$number = $number[count($number) - 1] + 0;
if ($number > $may) {
$may = $number;
}
$row["CON_VALUE"] = $number;
$data[] = $row;
}
return $proTitle . "-" . ($may + 1);
}
public function getAllProcessesCount ()
{
$c = $this->tmpCriteria;

View File

@@ -101,6 +101,8 @@ class BpmnFlowMapBuilder
$tMap->addColumn('FLO_STATE', 'FloState', 'string', CreoleTypes::LONGVARCHAR, false, null);
$tMap->addColumn('FLO_POSITION', 'FloPosition', 'int', CreoleTypes::INTEGER, true, null);
} // doBuild()
} // BpmnFlowMapBuilder

View File

@@ -5,7 +5,7 @@ include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE' table to 'workflow' DatabaseMap object.
* This class adds structure of 'MESSAGE_TYPE' table to 'workflow' DatabaseMap object.
*
*
*
@@ -16,13 +16,13 @@ include_once 'creole/CreoleTypes.php';
*
* @package workflow.classes.model.map
*/
class MessageMapBuilder
class MessageTypeMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageMapBuilder';
const CLASS_NAME = 'classes.model.map.MessageTypeMapBuilder';
/**
* The database map.
@@ -60,19 +60,17 @@ class MessageMapBuilder
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('MESSAGE');
$tMap->setPhpName('Message');
$tMap = $this->dbMap->addTable('MESSAGE_TYPE');
$tMap->setPhpName('MessageType');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MES_UID', 'MesUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addPrimaryKey('MSGT_UID', 'MsgtUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MES_NAME', 'MesName', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('MES_CONDITION', 'MesCondition', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('MSGT_NAME', 'MsgtName', 'string', CreoleTypes::VARCHAR, false, 512);
} // doBuild()
} // MessageMapBuilder
} // MessageTypeMapBuilder

View File

@@ -5,7 +5,7 @@ include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_DETAIL' table to 'workflow' DatabaseMap object.
* This class adds structure of 'MESSAGE_TYPE_VARIABLE' table to 'workflow' DatabaseMap object.
*
*
*
@@ -16,13 +16,13 @@ include_once 'creole/CreoleTypes.php';
*
* @package workflow.classes.model.map
*/
class MessageDetailMapBuilder
class MessageTypeVariableMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageDetailMapBuilder';
const CLASS_NAME = 'classes.model.map.MessageTypeVariableMapBuilder';
/**
* The database map.
@@ -60,19 +60,19 @@ class MessageDetailMapBuilder
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('MESSAGE_DETAIL');
$tMap->setPhpName('MessageDetail');
$tMap = $this->dbMap->addTable('MESSAGE_TYPE_VARIABLE');
$tMap->setPhpName('MessageTypeVariable');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MD_UID', 'MdUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addPrimaryKey('MSGTV_UID', 'MsgtvUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MES_UID', 'MesUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGT_UID', 'MsgtUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MD_TYPE', 'MdType', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('MSGTV_NAME', 'MsgtvName', 'string', CreoleTypes::VARCHAR, false, 512);
$tMap->addColumn('MD_NAME', 'MdName', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('MSGTV_DEFAULT_VALUE', 'MsgtvDefaultValue', 'string', CreoleTypes::VARCHAR, false, 512);
} // doBuild()
} // MessageDetailMapBuilder
} // MessageTypeVariableMapBuilder

60
workflow/engine/classes/model/om/BaseBpmnFlow.php Normal file → Executable file
View File

@@ -136,6 +136,12 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
protected $flo_state;
/**
* The value for the flo_position field.
* @var int
*/
protected $flo_position = 0;
/**
* @var BpmnProject
*/
protected $aBpmnProject;
@@ -358,6 +364,17 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
}
/**
* Get the [flo_position] column value.
*
* @return int
*/
public function getFloPosition()
{
return $this->flo_position;
}
/*
* Set the value of [flo_uid] column.
*
* @param string $v new value
@@ -761,6 +778,28 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
} // setFloState()
/**
* Set the value of [flo_position] column.
*
* @param int $v new value
* @return void
*/
public function setFloPosition($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->flo_position !== $v || $v === 0) {
$this->flo_position = $v;
$this->modifiedColumns[] = BpmnFlowPeer::FLO_POSITION;
}
} // setFloPosition()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -814,12 +853,14 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
$this->flo_state = $rs->getString($startcol + 17);
$this->flo_position = $rs->getInt($startcol + 18);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 18; // 18 = BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 19; // 19 = BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating BpmnFlow object", $e);
@@ -1115,6 +1156,9 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
case 17:
return $this->getFloState();
break;
case 18:
return $this->getFloPosition();
break;
default:
return null;
break;
@@ -1153,6 +1197,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
$keys[15] => $this->getFloX2(),
$keys[16] => $this->getFloY2(),
$keys[17] => $this->getFloState(),
$keys[18] => $this->getFloPosition(),
);
return $result;
}
@@ -1238,6 +1283,9 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
case 17:
$this->setFloState($value);
break;
case 18:
$this->setFloPosition($value);
break;
} // switch()
}
@@ -1333,6 +1381,10 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
$this->setFloState($arr[$keys[17]]);
}
if (array_key_exists($keys[18], $arr)) {
$this->setFloPosition($arr[$keys[18]]);
}
}
/**
@@ -1416,6 +1468,10 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
$criteria->add(BpmnFlowPeer::FLO_STATE, $this->flo_state);
}
if ($this->isColumnModified(BpmnFlowPeer::FLO_POSITION)) {
$criteria->add(BpmnFlowPeer::FLO_POSITION, $this->flo_position);
}
return $criteria;
}
@@ -1504,6 +1560,8 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
$copyObj->setFloState($this->flo_state);
$copyObj->setFloPosition($this->flo_position);
$copyObj->setNew(true);

23
workflow/engine/classes/model/om/BaseBpmnFlowPeer.php Normal file → Executable file
View File

@@ -25,7 +25,7 @@ abstract class BaseBpmnFlowPeer
const CLASS_DEFAULT = 'classes.model.BpmnFlow';
/** The total number of columns. */
const NUM_COLUMNS = 18;
const NUM_COLUMNS = 19;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -85,6 +85,9 @@ abstract class BaseBpmnFlowPeer
/** the column name for the FLO_STATE field */
const FLO_STATE = 'BPMN_FLOW.FLO_STATE';
/** the column name for the FLO_POSITION field */
const FLO_POSITION = 'BPMN_FLOW.FLO_POSITION';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -96,10 +99,10 @@ abstract class BaseBpmnFlowPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('FloUid', 'PrjUid', 'DiaUid', 'FloType', 'FloName', 'FloElementOrigin', 'FloElementOriginType', 'FloElementOriginPort', 'FloElementDest', 'FloElementDestType', 'FloElementDestPort', 'FloIsInmediate', 'FloCondition', 'FloX1', 'FloY1', 'FloX2', 'FloY2', 'FloState', ),
BasePeer::TYPE_COLNAME => array (BpmnFlowPeer::FLO_UID, BpmnFlowPeer::PRJ_UID, BpmnFlowPeer::DIA_UID, BpmnFlowPeer::FLO_TYPE, BpmnFlowPeer::FLO_NAME, BpmnFlowPeer::FLO_ELEMENT_ORIGIN, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT, BpmnFlowPeer::FLO_ELEMENT_DEST, BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE, BpmnFlowPeer::FLO_ELEMENT_DEST_PORT, BpmnFlowPeer::FLO_IS_INMEDIATE, BpmnFlowPeer::FLO_CONDITION, BpmnFlowPeer::FLO_X1, BpmnFlowPeer::FLO_Y1, BpmnFlowPeer::FLO_X2, BpmnFlowPeer::FLO_Y2, BpmnFlowPeer::FLO_STATE, ),
BasePeer::TYPE_FIELDNAME => array ('FLO_UID', 'PRJ_UID', 'DIA_UID', 'FLO_TYPE', 'FLO_NAME', 'FLO_ELEMENT_ORIGIN', 'FLO_ELEMENT_ORIGIN_TYPE', 'FLO_ELEMENT_ORIGIN_PORT', 'FLO_ELEMENT_DEST', 'FLO_ELEMENT_DEST_TYPE', 'FLO_ELEMENT_DEST_PORT', 'FLO_IS_INMEDIATE', 'FLO_CONDITION', 'FLO_X1', 'FLO_Y1', 'FLO_X2', 'FLO_Y2', 'FLO_STATE', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
BasePeer::TYPE_PHPNAME => array ('FloUid', 'PrjUid', 'DiaUid', 'FloType', 'FloName', 'FloElementOrigin', 'FloElementOriginType', 'FloElementOriginPort', 'FloElementDest', 'FloElementDestType', 'FloElementDestPort', 'FloIsInmediate', 'FloCondition', 'FloX1', 'FloY1', 'FloX2', 'FloY2', 'FloState', 'FloPosition', ),
BasePeer::TYPE_COLNAME => array (BpmnFlowPeer::FLO_UID, BpmnFlowPeer::PRJ_UID, BpmnFlowPeer::DIA_UID, BpmnFlowPeer::FLO_TYPE, BpmnFlowPeer::FLO_NAME, BpmnFlowPeer::FLO_ELEMENT_ORIGIN, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT, BpmnFlowPeer::FLO_ELEMENT_DEST, BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE, BpmnFlowPeer::FLO_ELEMENT_DEST_PORT, BpmnFlowPeer::FLO_IS_INMEDIATE, BpmnFlowPeer::FLO_CONDITION, BpmnFlowPeer::FLO_X1, BpmnFlowPeer::FLO_Y1, BpmnFlowPeer::FLO_X2, BpmnFlowPeer::FLO_Y2, BpmnFlowPeer::FLO_STATE, BpmnFlowPeer::FLO_POSITION, ),
BasePeer::TYPE_FIELDNAME => array ('FLO_UID', 'PRJ_UID', 'DIA_UID', 'FLO_TYPE', 'FLO_NAME', 'FLO_ELEMENT_ORIGIN', 'FLO_ELEMENT_ORIGIN_TYPE', 'FLO_ELEMENT_ORIGIN_PORT', 'FLO_ELEMENT_DEST', 'FLO_ELEMENT_DEST_TYPE', 'FLO_ELEMENT_DEST_PORT', 'FLO_IS_INMEDIATE', 'FLO_CONDITION', 'FLO_X1', 'FLO_Y1', 'FLO_X2', 'FLO_Y2', 'FLO_STATE', 'FLO_POSITION', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
);
/**
@@ -109,10 +112,10 @@ abstract class BaseBpmnFlowPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('FloUid' => 0, 'PrjUid' => 1, 'DiaUid' => 2, 'FloType' => 3, 'FloName' => 4, 'FloElementOrigin' => 5, 'FloElementOriginType' => 6, 'FloElementOriginPort' => 7, 'FloElementDest' => 8, 'FloElementDestType' => 9, 'FloElementDestPort' => 10, 'FloIsInmediate' => 11, 'FloCondition' => 12, 'FloX1' => 13, 'FloY1' => 14, 'FloX2' => 15, 'FloY2' => 16, 'FloState' => 17, ),
BasePeer::TYPE_COLNAME => array (BpmnFlowPeer::FLO_UID => 0, BpmnFlowPeer::PRJ_UID => 1, BpmnFlowPeer::DIA_UID => 2, BpmnFlowPeer::FLO_TYPE => 3, BpmnFlowPeer::FLO_NAME => 4, BpmnFlowPeer::FLO_ELEMENT_ORIGIN => 5, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => 6, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT => 7, BpmnFlowPeer::FLO_ELEMENT_DEST => 8, BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE => 9, BpmnFlowPeer::FLO_ELEMENT_DEST_PORT => 10, BpmnFlowPeer::FLO_IS_INMEDIATE => 11, BpmnFlowPeer::FLO_CONDITION => 12, BpmnFlowPeer::FLO_X1 => 13, BpmnFlowPeer::FLO_Y1 => 14, BpmnFlowPeer::FLO_X2 => 15, BpmnFlowPeer::FLO_Y2 => 16, BpmnFlowPeer::FLO_STATE => 17, ),
BasePeer::TYPE_FIELDNAME => array ('FLO_UID' => 0, 'PRJ_UID' => 1, 'DIA_UID' => 2, 'FLO_TYPE' => 3, 'FLO_NAME' => 4, 'FLO_ELEMENT_ORIGIN' => 5, 'FLO_ELEMENT_ORIGIN_TYPE' => 6, 'FLO_ELEMENT_ORIGIN_PORT' => 7, 'FLO_ELEMENT_DEST' => 8, 'FLO_ELEMENT_DEST_TYPE' => 9, 'FLO_ELEMENT_DEST_PORT' => 10, 'FLO_IS_INMEDIATE' => 11, 'FLO_CONDITION' => 12, 'FLO_X1' => 13, 'FLO_Y1' => 14, 'FLO_X2' => 15, 'FLO_Y2' => 16, 'FLO_STATE' => 17, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
BasePeer::TYPE_PHPNAME => array ('FloUid' => 0, 'PrjUid' => 1, 'DiaUid' => 2, 'FloType' => 3, 'FloName' => 4, 'FloElementOrigin' => 5, 'FloElementOriginType' => 6, 'FloElementOriginPort' => 7, 'FloElementDest' => 8, 'FloElementDestType' => 9, 'FloElementDestPort' => 10, 'FloIsInmediate' => 11, 'FloCondition' => 12, 'FloX1' => 13, 'FloY1' => 14, 'FloX2' => 15, 'FloY2' => 16, 'FloState' => 17, 'FloPosition' => 18, ),
BasePeer::TYPE_COLNAME => array (BpmnFlowPeer::FLO_UID => 0, BpmnFlowPeer::PRJ_UID => 1, BpmnFlowPeer::DIA_UID => 2, BpmnFlowPeer::FLO_TYPE => 3, BpmnFlowPeer::FLO_NAME => 4, BpmnFlowPeer::FLO_ELEMENT_ORIGIN => 5, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => 6, BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT => 7, BpmnFlowPeer::FLO_ELEMENT_DEST => 8, BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE => 9, BpmnFlowPeer::FLO_ELEMENT_DEST_PORT => 10, BpmnFlowPeer::FLO_IS_INMEDIATE => 11, BpmnFlowPeer::FLO_CONDITION => 12, BpmnFlowPeer::FLO_X1 => 13, BpmnFlowPeer::FLO_Y1 => 14, BpmnFlowPeer::FLO_X2 => 15, BpmnFlowPeer::FLO_Y2 => 16, BpmnFlowPeer::FLO_STATE => 17, BpmnFlowPeer::FLO_POSITION => 18, ),
BasePeer::TYPE_FIELDNAME => array ('FLO_UID' => 0, 'PRJ_UID' => 1, 'DIA_UID' => 2, 'FLO_TYPE' => 3, 'FLO_NAME' => 4, 'FLO_ELEMENT_ORIGIN' => 5, 'FLO_ELEMENT_ORIGIN_TYPE' => 6, 'FLO_ELEMENT_ORIGIN_PORT' => 7, 'FLO_ELEMENT_DEST' => 8, 'FLO_ELEMENT_DEST_TYPE' => 9, 'FLO_ELEMENT_DEST_PORT' => 10, 'FLO_IS_INMEDIATE' => 11, 'FLO_CONDITION' => 12, 'FLO_X1' => 13, 'FLO_Y1' => 14, 'FLO_X2' => 15, 'FLO_Y2' => 16, 'FLO_STATE' => 17, 'FLO_POSITION' => 18, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
);
/**
@@ -249,6 +252,8 @@ abstract class BaseBpmnFlowPeer
$criteria->addSelectColumn(BpmnFlowPeer::FLO_STATE);
$criteria->addSelectColumn(BpmnFlowPeer::FLO_POSITION);
}
const COUNT = 'COUNT(BPMN_FLOW.FLO_UID)';

View File

@@ -7,31 +7,31 @@ require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessagePeer.php';
include_once 'classes/model/MessageTypePeer.php';
/**
* Base class that represents a row from the 'MESSAGE' table.
* Base class that represents a row from the 'MESSAGE_TYPE' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessage extends BaseObject implements Persistent
abstract class BaseMessageType 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 MessagePeer
* @var MessageTypePeer
*/
protected static $peer;
/**
* The value for the mes_uid field.
* The value for the msgt_uid field.
* @var string
*/
protected $mes_uid;
protected $msgt_uid;
/**
* The value for the prj_uid field.
@@ -40,16 +40,10 @@ abstract class BaseMessage extends BaseObject implements Persistent
protected $prj_uid;
/**
* The value for the mes_name field.
* The value for the msgt_name field.
* @var string
*/
protected $mes_name = '';
/**
* The value for the mes_condition field.
* @var string
*/
protected $mes_condition = '';
protected $msgt_name = '';
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -66,14 +60,14 @@ abstract class BaseMessage extends BaseObject implements Persistent
protected $alreadyInValidation = false;
/**
* Get the [mes_uid] column value.
* Get the [msgt_uid] column value.
*
* @return string
*/
public function getMesUid()
public function getMsgtUid()
{
return $this->mes_uid;
return $this->msgt_uid;
}
/**
@@ -88,34 +82,23 @@ abstract class BaseMessage extends BaseObject implements Persistent
}
/**
* Get the [mes_name] column value.
* Get the [msgt_name] column value.
*
* @return string
*/
public function getMesName()
public function getMsgtName()
{
return $this->mes_name;
return $this->msgt_name;
}
/**
* Get the [mes_condition] column value.
*
* @return string
*/
public function getMesCondition()
{
return $this->mes_condition;
}
/**
* Set the value of [mes_uid] column.
* Set the value of [msgt_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMesUid($v)
public function setMsgtUid($v)
{
// Since the native PHP type for this column is string,
@@ -124,12 +107,12 @@ abstract class BaseMessage extends BaseObject implements Persistent
$v = (string) $v;
}
if ($this->mes_uid !== $v) {
$this->mes_uid = $v;
$this->modifiedColumns[] = MessagePeer::MES_UID;
if ($this->msgt_uid !== $v) {
$this->msgt_uid = $v;
$this->modifiedColumns[] = MessageTypePeer::MSGT_UID;
}
} // setMesUid()
} // setMsgtUid()
/**
* Set the value of [prj_uid] column.
@@ -148,18 +131,18 @@ abstract class BaseMessage extends BaseObject implements Persistent
if ($this->prj_uid !== $v) {
$this->prj_uid = $v;
$this->modifiedColumns[] = MessagePeer::PRJ_UID;
$this->modifiedColumns[] = MessageTypePeer::PRJ_UID;
}
} // setPrjUid()
/**
* Set the value of [mes_name] column.
* Set the value of [msgt_name] column.
*
* @param string $v new value
* @return void
*/
public function setMesName($v)
public function setMsgtName($v)
{
// Since the native PHP type for this column is string,
@@ -168,34 +151,12 @@ abstract class BaseMessage extends BaseObject implements Persistent
$v = (string) $v;
}
if ($this->mes_name !== $v || $v === '') {
$this->mes_name = $v;
$this->modifiedColumns[] = MessagePeer::MES_NAME;
if ($this->msgt_name !== $v || $v === '') {
$this->msgt_name = $v;
$this->modifiedColumns[] = MessageTypePeer::MSGT_NAME;
}
} // setMesName()
/**
* Set the value of [mes_condition] column.
*
* @param string $v new value
* @return void
*/
public function setMesCondition($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->mes_condition !== $v || $v === '') {
$this->mes_condition = $v;
$this->modifiedColumns[] = MessagePeer::MES_CONDITION;
}
} // setMesCondition()
} // setMsgtName()
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -214,23 +175,21 @@ abstract class BaseMessage extends BaseObject implements Persistent
{
try {
$this->mes_uid = $rs->getString($startcol + 0);
$this->msgt_uid = $rs->getString($startcol + 0);
$this->prj_uid = $rs->getString($startcol + 1);
$this->mes_name = $rs->getString($startcol + 2);
$this->mes_condition = $rs->getString($startcol + 3);
$this->msgt_name = $rs->getString($startcol + 2);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 4; // 4 = MessagePeer::NUM_COLUMNS - MessagePeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 3; // 3 = MessageTypePeer::NUM_COLUMNS - MessageTypePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating Message object", $e);
throw new PropelException("Error populating MessageType object", $e);
}
}
@@ -250,12 +209,12 @@ abstract class BaseMessage extends BaseObject implements Persistent
}
if ($con === null) {
$con = Propel::getConnection(MessagePeer::DATABASE_NAME);
$con = Propel::getConnection(MessageTypePeer::DATABASE_NAME);
}
try {
$con->begin();
MessagePeer::doDelete($this, $con);
MessageTypePeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
@@ -281,7 +240,7 @@ abstract class BaseMessage extends BaseObject implements Persistent
}
if ($con === null) {
$con = Propel::getConnection(MessagePeer::DATABASE_NAME);
$con = Propel::getConnection(MessageTypePeer::DATABASE_NAME);
}
try {
@@ -316,14 +275,14 @@ abstract class BaseMessage extends BaseObject implements Persistent
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessagePeer::doInsert($this, $con);
$pk = MessageTypePeer::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 += MessagePeer::doUpdate($this, $con);
$affectedRows += MessageTypePeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
@@ -394,7 +353,7 @@ abstract class BaseMessage extends BaseObject implements Persistent
$failureMap = array();
if (($retval = MessagePeer::doValidate($this, $columns)) !== true) {
if (($retval = MessageTypePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -417,7 +376,7 @@ abstract class BaseMessage extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessagePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$pos = MessageTypePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
@@ -432,16 +391,13 @@ abstract class BaseMessage extends BaseObject implements Persistent
{
switch($pos) {
case 0:
return $this->getMesUid();
return $this->getMsgtUid();
break;
case 1:
return $this->getPrjUid();
break;
case 2:
return $this->getMesName();
break;
case 3:
return $this->getMesCondition();
return $this->getMsgtName();
break;
default:
return null;
@@ -461,12 +417,11 @@ abstract class BaseMessage extends BaseObject implements Persistent
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessagePeer::getFieldNames($keyType);
$keys = MessageTypePeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMesUid(),
$keys[0] => $this->getMsgtUid(),
$keys[1] => $this->getPrjUid(),
$keys[2] => $this->getMesName(),
$keys[3] => $this->getMesCondition(),
$keys[2] => $this->getMsgtName(),
);
return $result;
}
@@ -483,7 +438,7 @@ abstract class BaseMessage extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessagePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$pos = MessageTypePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -499,16 +454,13 @@ abstract class BaseMessage extends BaseObject implements Persistent
{
switch($pos) {
case 0:
$this->setMesUid($value);
$this->setMsgtUid($value);
break;
case 1:
$this->setPrjUid($value);
break;
case 2:
$this->setMesName($value);
break;
case 3:
$this->setMesCondition($value);
$this->setMsgtName($value);
break;
} // switch()
}
@@ -531,10 +483,10 @@ abstract class BaseMessage extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessagePeer::getFieldNames($keyType);
$keys = MessageTypePeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMesUid($arr[$keys[0]]);
$this->setMsgtUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
@@ -542,11 +494,7 @@ abstract class BaseMessage extends BaseObject implements Persistent
}
if (array_key_exists($keys[2], $arr)) {
$this->setMesName($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setMesCondition($arr[$keys[3]]);
$this->setMsgtName($arr[$keys[2]]);
}
}
@@ -558,22 +506,18 @@ abstract class BaseMessage extends BaseObject implements Persistent
*/
public function buildCriteria()
{
$criteria = new Criteria(MessagePeer::DATABASE_NAME);
$criteria = new Criteria(MessageTypePeer::DATABASE_NAME);
if ($this->isColumnModified(MessagePeer::MES_UID)) {
$criteria->add(MessagePeer::MES_UID, $this->mes_uid);
if ($this->isColumnModified(MessageTypePeer::MSGT_UID)) {
$criteria->add(MessageTypePeer::MSGT_UID, $this->msgt_uid);
}
if ($this->isColumnModified(MessagePeer::PRJ_UID)) {
$criteria->add(MessagePeer::PRJ_UID, $this->prj_uid);
if ($this->isColumnModified(MessageTypePeer::PRJ_UID)) {
$criteria->add(MessageTypePeer::PRJ_UID, $this->prj_uid);
}
if ($this->isColumnModified(MessagePeer::MES_NAME)) {
$criteria->add(MessagePeer::MES_NAME, $this->mes_name);
}
if ($this->isColumnModified(MessagePeer::MES_CONDITION)) {
$criteria->add(MessagePeer::MES_CONDITION, $this->mes_condition);
if ($this->isColumnModified(MessageTypePeer::MSGT_NAME)) {
$criteria->add(MessageTypePeer::MSGT_NAME, $this->msgt_name);
}
@@ -590,9 +534,9 @@ abstract class BaseMessage extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessagePeer::DATABASE_NAME);
$criteria = new Criteria(MessageTypePeer::DATABASE_NAME);
$criteria->add(MessagePeer::MES_UID, $this->mes_uid);
$criteria->add(MessageTypePeer::MSGT_UID, $this->msgt_uid);
return $criteria;
}
@@ -603,18 +547,18 @@ abstract class BaseMessage extends BaseObject implements Persistent
*/
public function getPrimaryKey()
{
return $this->getMesUid();
return $this->getMsgtUid();
}
/**
* Generic method to set the primary key (mes_uid column).
* Generic method to set the primary key (msgt_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMesUid($key);
$this->setMsgtUid($key);
}
/**
@@ -623,7 +567,7 @@ abstract class BaseMessage extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of Message (or compatible) type.
* @param object $copyObj An object of MessageType (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
@@ -632,14 +576,12 @@ abstract class BaseMessage extends BaseObject implements Persistent
$copyObj->setPrjUid($this->prj_uid);
$copyObj->setMesName($this->mes_name);
$copyObj->setMesCondition($this->mes_condition);
$copyObj->setMsgtName($this->msgt_name);
$copyObj->setNew(true);
$copyObj->setMesUid(NULL); // this is a pkey column, so set to default value
$copyObj->setMsgtUid(NULL); // this is a pkey column, so set to default value
}
@@ -652,7 +594,7 @@ abstract class BaseMessage extends BaseObject implements Persistent
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return Message Clone of current object.
* @return MessageType Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
@@ -671,12 +613,12 @@ abstract class BaseMessage extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessagePeer
* @return MessageTypePeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessagePeer();
self::$peer = new MessageTypePeer();
}
return self::$peer;
}

View File

@@ -2,46 +2,43 @@
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 MessagePeer::getOMClass()
include_once 'classes/model/Message.php';
// actual class may be a subclass -- as returned by MessageTypePeer::getOMClass()
include_once 'classes/model/MessageType.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE' table.
* Base static class for performing query and update operations on the 'MESSAGE_TYPE' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessagePeer
abstract class BaseMessageTypePeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE';
const TABLE_NAME = 'MESSAGE_TYPE';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.Message';
const CLASS_DEFAULT = 'classes.model.MessageType';
/** The total number of columns. */
const NUM_COLUMNS = 4;
const NUM_COLUMNS = 3;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MES_UID field */
const MES_UID = 'MESSAGE.MES_UID';
/** the column name for the MSGT_UID field */
const MSGT_UID = 'MESSAGE_TYPE.MSGT_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE.PRJ_UID';
const PRJ_UID = 'MESSAGE_TYPE.PRJ_UID';
/** the column name for the MES_NAME field */
const MES_NAME = 'MESSAGE.MES_NAME';
/** the column name for the MES_CONDITION field */
const MES_CONDITION = 'MESSAGE.MES_CONDITION';
/** the column name for the MSGT_NAME field */
const MSGT_NAME = 'MESSAGE_TYPE.MSGT_NAME';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -54,10 +51,10 @@ abstract class BaseMessagePeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('MesUid', 'PrjUid', 'MesName', 'MesCondition', ),
BasePeer::TYPE_COLNAME => array (MessagePeer::MES_UID, MessagePeer::PRJ_UID, MessagePeer::MES_NAME, MessagePeer::MES_CONDITION, ),
BasePeer::TYPE_FIELDNAME => array ('MES_UID', 'PRJ_UID', 'MES_NAME', 'MES_CONDITION', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
BasePeer::TYPE_PHPNAME => array ('MsgtUid', 'PrjUid', 'MsgtName', ),
BasePeer::TYPE_COLNAME => array (MessageTypePeer::MSGT_UID, MessageTypePeer::PRJ_UID, MessageTypePeer::MSGT_NAME, ),
BasePeer::TYPE_FIELDNAME => array ('MSGT_UID', 'PRJ_UID', 'MSGT_NAME', ),
BasePeer::TYPE_NUM => array (0, 1, 2, )
);
/**
@@ -67,10 +64,10 @@ abstract class BaseMessagePeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('MesUid' => 0, 'PrjUid' => 1, 'MesName' => 2, 'MesCondition' => 3, ),
BasePeer::TYPE_COLNAME => array (MessagePeer::MES_UID => 0, MessagePeer::PRJ_UID => 1, MessagePeer::MES_NAME => 2, MessagePeer::MES_CONDITION => 3, ),
BasePeer::TYPE_FIELDNAME => array ('MES_UID' => 0, 'PRJ_UID' => 1, 'MES_NAME' => 2, 'MES_CONDITION' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
BasePeer::TYPE_PHPNAME => array ('MsgtUid' => 0, 'PrjUid' => 1, 'MsgtName' => 2, ),
BasePeer::TYPE_COLNAME => array (MessageTypePeer::MSGT_UID => 0, MessageTypePeer::PRJ_UID => 1, MessageTypePeer::MSGT_NAME => 2, ),
BasePeer::TYPE_FIELDNAME => array ('MSGT_UID' => 0, 'PRJ_UID' => 1, 'MSGT_NAME' => 2, ),
BasePeer::TYPE_NUM => array (0, 1, 2, )
);
/**
@@ -80,8 +77,8 @@ abstract class BaseMessagePeer
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/MessageMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageMapBuilder');
include_once 'classes/model/map/MessageTypeMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageTypeMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
@@ -94,7 +91,7 @@ abstract class BaseMessagePeer
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = MessagePeer::getTableMap();
$map = MessageTypePeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
@@ -149,12 +146,12 @@ abstract class BaseMessagePeer
* $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. MessagePeer::COLUMN_NAME).
* @param string $column The column name for current table. (i.e. MessageTypePeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessagePeer::TABLE_NAME.'.', $alias.'.', $column);
return str_replace(MessageTypePeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -171,18 +168,16 @@ abstract class BaseMessagePeer
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(MessagePeer::MES_UID);
$criteria->addSelectColumn(MessageTypePeer::MSGT_UID);
$criteria->addSelectColumn(MessagePeer::PRJ_UID);
$criteria->addSelectColumn(MessageTypePeer::PRJ_UID);
$criteria->addSelectColumn(MessagePeer::MES_NAME);
$criteria->addSelectColumn(MessagePeer::MES_CONDITION);
$criteria->addSelectColumn(MessageTypePeer::MSGT_NAME);
}
const COUNT = 'COUNT(MESSAGE.MES_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE.MES_UID)';
const COUNT = 'COUNT(MESSAGE_TYPE.MSGT_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_TYPE.MSGT_UID)';
/**
* Returns the number of rows matching criteria.
@@ -200,9 +195,9 @@ abstract class BaseMessagePeer
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(MessagePeer::COUNT_DISTINCT);
$criteria->addSelectColumn(MessageTypePeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessagePeer::COUNT);
$criteria->addSelectColumn(MessageTypePeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
@@ -210,7 +205,7 @@ abstract class BaseMessagePeer
$criteria->addSelectColumn($column);
}
$rs = MessagePeer::doSelectRS($criteria, $con);
$rs = MessageTypePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
@@ -223,7 +218,7 @@ abstract class BaseMessagePeer
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return Message
* @return MessageType
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -231,7 +226,7 @@ abstract class BaseMessagePeer
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = MessagePeer::doSelect($critcopy, $con);
$objects = MessageTypePeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -248,7 +243,7 @@ abstract class BaseMessagePeer
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return MessagePeer::populateObjects(MessagePeer::doSelectRS($criteria, $con));
return MessageTypePeer::populateObjects(MessageTypePeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
@@ -272,7 +267,7 @@ abstract class BaseMessagePeer
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
MessagePeer::addSelectColumns($criteria);
MessageTypePeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -294,7 +289,7 @@ abstract class BaseMessagePeer
$results = array();
// set the class once to avoid overhead in the loop
$cls = MessagePeer::getOMClass();
$cls = MessageTypePeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
@@ -329,13 +324,13 @@ abstract class BaseMessagePeer
*/
public static function getOMClass()
{
return MessagePeer::CLASS_DEFAULT;
return MessageTypePeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a Message or Criteria object.
* Method perform an INSERT on the database, given a MessageType or Criteria object.
*
* @param mixed $values Criteria or Message object containing data that is used to create the INSERT statement.
* @param mixed $values Criteria or MessageType 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
@@ -350,7 +345,7 @@ abstract class BaseMessagePeer
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from Message object
$criteria = $values->buildCriteria(); // build Criteria from MessageType object
}
@@ -372,9 +367,9 @@ abstract class BaseMessagePeer
}
/**
* Method perform an UPDATE on the database, given a Message or Criteria object.
* Method perform an UPDATE on the database, given a MessageType or Criteria object.
*
* @param mixed $values Criteria or Message object containing data create the UPDATE statement.
* @param mixed $values Criteria or MessageType 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
@@ -391,8 +386,8 @@ abstract class BaseMessagePeer
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(MessagePeer::MES_UID);
$selectCriteria->add(MessagePeer::MES_UID, $criteria->remove(MessagePeer::MES_UID), $comparison);
$comparison = $criteria->getComparison(MessageTypePeer::MSGT_UID);
$selectCriteria->add(MessageTypePeer::MSGT_UID, $criteria->remove(MessageTypePeer::MSGT_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
@@ -406,7 +401,7 @@ abstract class BaseMessagePeer
}
/**
* Method to DELETE all rows from the MESSAGE table.
* Method to DELETE all rows from the MESSAGE_TYPE table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
@@ -420,7 +415,7 @@ abstract class BaseMessagePeer
// 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(MessagePeer::TABLE_NAME, $con);
$affectedRows += BasePeer::doDeleteAll(MessageTypePeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -430,9 +425,9 @@ abstract class BaseMessagePeer
}
/**
* Method perform a DELETE on the database, given a Message or Criteria object OR a primary key value.
* Method perform a DELETE on the database, given a MessageType or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or Message object or primary key or array of primary keys
* @param mixed $values Criteria or MessageType 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).
@@ -444,18 +439,18 @@ abstract class BaseMessagePeer
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(MessagePeer::DATABASE_NAME);
$con = Propel::getConnection(MessageTypePeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof Message) {
} elseif ($values instanceof MessageType) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessagePeer::MES_UID, (array) $values, Criteria::IN);
$criteria->add(MessageTypePeer::MSGT_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
@@ -478,24 +473,24 @@ abstract class BaseMessagePeer
}
/**
* Validates all modified columns of given Message object.
* Validates all modified columns of given MessageType 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 Message $obj The object to validate.
* @param MessageType $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(Message $obj, $cols = null)
public static function doValidate(MessageType $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessagePeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessagePeer::TABLE_NAME);
$dbMap = Propel::getDatabaseMap(MessageTypePeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageTypePeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -511,7 +506,7 @@ abstract class BaseMessagePeer
}
return BasePeer::doValidate(MessagePeer::DATABASE_NAME, MessagePeer::TABLE_NAME, $columns);
return BasePeer::doValidate(MessageTypePeer::DATABASE_NAME, MessageTypePeer::TABLE_NAME, $columns);
}
/**
@@ -519,7 +514,7 @@ abstract class BaseMessagePeer
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return Message
* @return MessageType
*/
public static function retrieveByPK($pk, $con = null)
{
@@ -527,12 +522,12 @@ abstract class BaseMessagePeer
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessagePeer::DATABASE_NAME);
$criteria = new Criteria(MessageTypePeer::DATABASE_NAME);
$criteria->add(MessagePeer::MES_UID, $pk);
$criteria->add(MessageTypePeer::MSGT_UID, $pk);
$v = MessagePeer::doSelect($criteria, $con);
$v = MessageTypePeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -556,8 +551,8 @@ abstract class BaseMessagePeer
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(MessagePeer::MES_UID, $pks, Criteria::IN);
$objs = MessagePeer::doSelect($criteria, $con);
$criteria->add(MessageTypePeer::MSGT_UID, $pks, Criteria::IN);
$objs = MessageTypePeer::doSelect($criteria, $con);
}
return $objs;
}
@@ -569,14 +564,14 @@ if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseMessagePeer::getMapBuilder();
BaseMessageTypePeer::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/MessageMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageMapBuilder');
require_once 'classes/model/map/MessageTypeMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageTypeMapBuilder');
}

View File

@@ -7,49 +7,49 @@ require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessageDetailPeer.php';
include_once 'classes/model/MessageTypeVariablePeer.php';
/**
* Base class that represents a row from the 'MESSAGE_DETAIL' table.
* Base class that represents a row from the 'MESSAGE_TYPE_VARIABLE' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageDetail extends BaseObject implements Persistent
abstract class BaseMessageTypeVariable 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 MessageDetailPeer
* @var MessageTypeVariablePeer
*/
protected static $peer;
/**
* The value for the md_uid field.
* The value for the msgtv_uid field.
* @var string
*/
protected $md_uid;
protected $msgtv_uid;
/**
* The value for the mes_uid field.
* The value for the msgt_uid field.
* @var string
*/
protected $mes_uid;
protected $msgt_uid;
/**
* The value for the md_type field.
* The value for the msgtv_name field.
* @var string
*/
protected $md_type = '';
protected $msgtv_name = '';
/**
* The value for the md_name field.
* The value for the msgtv_default_value field.
* @var string
*/
protected $md_name = '';
protected $msgtv_default_value = '';
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -66,56 +66,56 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
protected $alreadyInValidation = false;
/**
* Get the [md_uid] column value.
* Get the [msgtv_uid] column value.
*
* @return string
*/
public function getMdUid()
public function getMsgtvUid()
{
return $this->md_uid;
return $this->msgtv_uid;
}
/**
* Get the [mes_uid] column value.
* Get the [msgt_uid] column value.
*
* @return string
*/
public function getMesUid()
public function getMsgtUid()
{
return $this->mes_uid;
return $this->msgt_uid;
}
/**
* Get the [md_type] column value.
* Get the [msgtv_name] column value.
*
* @return string
*/
public function getMdType()
public function getMsgtvName()
{
return $this->md_type;
return $this->msgtv_name;
}
/**
* Get the [md_name] column value.
* Get the [msgtv_default_value] column value.
*
* @return string
*/
public function getMdName()
public function getMsgtvDefaultValue()
{
return $this->md_name;
return $this->msgtv_default_value;
}
/**
* Set the value of [md_uid] column.
* Set the value of [msgtv_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMdUid($v)
public function setMsgtvUid($v)
{
// Since the native PHP type for this column is string,
@@ -124,20 +124,20 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
$v = (string) $v;
}
if ($this->md_uid !== $v) {
$this->md_uid = $v;
$this->modifiedColumns[] = MessageDetailPeer::MD_UID;
if ($this->msgtv_uid !== $v) {
$this->msgtv_uid = $v;
$this->modifiedColumns[] = MessageTypeVariablePeer::MSGTV_UID;
}
} // setMdUid()
} // setMsgtvUid()
/**
* Set the value of [mes_uid] column.
* Set the value of [msgt_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMesUid($v)
public function setMsgtUid($v)
{
// Since the native PHP type for this column is string,
@@ -146,20 +146,20 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
$v = (string) $v;
}
if ($this->mes_uid !== $v) {
$this->mes_uid = $v;
$this->modifiedColumns[] = MessageDetailPeer::MES_UID;
if ($this->msgt_uid !== $v) {
$this->msgt_uid = $v;
$this->modifiedColumns[] = MessageTypeVariablePeer::MSGT_UID;
}
} // setMesUid()
} // setMsgtUid()
/**
* Set the value of [md_type] column.
* Set the value of [msgtv_name] column.
*
* @param string $v new value
* @return void
*/
public function setMdType($v)
public function setMsgtvName($v)
{
// Since the native PHP type for this column is string,
@@ -168,20 +168,20 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
$v = (string) $v;
}
if ($this->md_type !== $v || $v === '') {
$this->md_type = $v;
$this->modifiedColumns[] = MessageDetailPeer::MD_TYPE;
if ($this->msgtv_name !== $v || $v === '') {
$this->msgtv_name = $v;
$this->modifiedColumns[] = MessageTypeVariablePeer::MSGTV_NAME;
}
} // setMdType()
} // setMsgtvName()
/**
* Set the value of [md_name] column.
* Set the value of [msgtv_default_value] column.
*
* @param string $v new value
* @return void
*/
public function setMdName($v)
public function setMsgtvDefaultValue($v)
{
// Since the native PHP type for this column is string,
@@ -190,12 +190,12 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
$v = (string) $v;
}
if ($this->md_name !== $v || $v === '') {
$this->md_name = $v;
$this->modifiedColumns[] = MessageDetailPeer::MD_NAME;
if ($this->msgtv_default_value !== $v || $v === '') {
$this->msgtv_default_value = $v;
$this->modifiedColumns[] = MessageTypeVariablePeer::MSGTV_DEFAULT_VALUE;
}
} // setMdName()
} // setMsgtvDefaultValue()
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -214,23 +214,23 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
{
try {
$this->md_uid = $rs->getString($startcol + 0);
$this->msgtv_uid = $rs->getString($startcol + 0);
$this->mes_uid = $rs->getString($startcol + 1);
$this->msgt_uid = $rs->getString($startcol + 1);
$this->md_type = $rs->getString($startcol + 2);
$this->msgtv_name = $rs->getString($startcol + 2);
$this->md_name = $rs->getString($startcol + 3);
$this->msgtv_default_value = $rs->getString($startcol + 3);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 4; // 4 = MessageDetailPeer::NUM_COLUMNS - MessageDetailPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 4; // 4 = MessageTypeVariablePeer::NUM_COLUMNS - MessageTypeVariablePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating MessageDetail object", $e);
throw new PropelException("Error populating MessageTypeVariable object", $e);
}
}
@@ -250,12 +250,12 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
}
if ($con === null) {
$con = Propel::getConnection(MessageDetailPeer::DATABASE_NAME);
$con = Propel::getConnection(MessageTypeVariablePeer::DATABASE_NAME);
}
try {
$con->begin();
MessageDetailPeer::doDelete($this, $con);
MessageTypeVariablePeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
@@ -281,7 +281,7 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
}
if ($con === null) {
$con = Propel::getConnection(MessageDetailPeer::DATABASE_NAME);
$con = Propel::getConnection(MessageTypeVariablePeer::DATABASE_NAME);
}
try {
@@ -316,14 +316,14 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessageDetailPeer::doInsert($this, $con);
$pk = MessageTypeVariablePeer::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 += MessageDetailPeer::doUpdate($this, $con);
$affectedRows += MessageTypeVariablePeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
@@ -394,7 +394,7 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
$failureMap = array();
if (($retval = MessageDetailPeer::doValidate($this, $columns)) !== true) {
if (($retval = MessageTypeVariablePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -417,7 +417,7 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageDetailPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$pos = MessageTypeVariablePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
@@ -432,16 +432,16 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
{
switch($pos) {
case 0:
return $this->getMdUid();
return $this->getMsgtvUid();
break;
case 1:
return $this->getMesUid();
return $this->getMsgtUid();
break;
case 2:
return $this->getMdType();
return $this->getMsgtvName();
break;
case 3:
return $this->getMdName();
return $this->getMsgtvDefaultValue();
break;
default:
return null;
@@ -461,12 +461,12 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageDetailPeer::getFieldNames($keyType);
$keys = MessageTypeVariablePeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMdUid(),
$keys[1] => $this->getMesUid(),
$keys[2] => $this->getMdType(),
$keys[3] => $this->getMdName(),
$keys[0] => $this->getMsgtvUid(),
$keys[1] => $this->getMsgtUid(),
$keys[2] => $this->getMsgtvName(),
$keys[3] => $this->getMsgtvDefaultValue(),
);
return $result;
}
@@ -483,7 +483,7 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageDetailPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
$pos = MessageTypeVariablePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -499,16 +499,16 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
{
switch($pos) {
case 0:
$this->setMdUid($value);
$this->setMsgtvUid($value);
break;
case 1:
$this->setMesUid($value);
$this->setMsgtUid($value);
break;
case 2:
$this->setMdType($value);
$this->setMsgtvName($value);
break;
case 3:
$this->setMdName($value);
$this->setMsgtvDefaultValue($value);
break;
} // switch()
}
@@ -531,22 +531,22 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageDetailPeer::getFieldNames($keyType);
$keys = MessageTypeVariablePeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMdUid($arr[$keys[0]]);
$this->setMsgtvUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setMesUid($arr[$keys[1]]);
$this->setMsgtUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setMdType($arr[$keys[2]]);
$this->setMsgtvName($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setMdName($arr[$keys[3]]);
$this->setMsgtvDefaultValue($arr[$keys[3]]);
}
}
@@ -558,22 +558,22 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
*/
public function buildCriteria()
{
$criteria = new Criteria(MessageDetailPeer::DATABASE_NAME);
$criteria = new Criteria(MessageTypeVariablePeer::DATABASE_NAME);
if ($this->isColumnModified(MessageDetailPeer::MD_UID)) {
$criteria->add(MessageDetailPeer::MD_UID, $this->md_uid);
if ($this->isColumnModified(MessageTypeVariablePeer::MSGTV_UID)) {
$criteria->add(MessageTypeVariablePeer::MSGTV_UID, $this->msgtv_uid);
}
if ($this->isColumnModified(MessageDetailPeer::MES_UID)) {
$criteria->add(MessageDetailPeer::MES_UID, $this->mes_uid);
if ($this->isColumnModified(MessageTypeVariablePeer::MSGT_UID)) {
$criteria->add(MessageTypeVariablePeer::MSGT_UID, $this->msgt_uid);
}
if ($this->isColumnModified(MessageDetailPeer::MD_TYPE)) {
$criteria->add(MessageDetailPeer::MD_TYPE, $this->md_type);
if ($this->isColumnModified(MessageTypeVariablePeer::MSGTV_NAME)) {
$criteria->add(MessageTypeVariablePeer::MSGTV_NAME, $this->msgtv_name);
}
if ($this->isColumnModified(MessageDetailPeer::MD_NAME)) {
$criteria->add(MessageDetailPeer::MD_NAME, $this->md_name);
if ($this->isColumnModified(MessageTypeVariablePeer::MSGTV_DEFAULT_VALUE)) {
$criteria->add(MessageTypeVariablePeer::MSGTV_DEFAULT_VALUE, $this->msgtv_default_value);
}
@@ -590,9 +590,9 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessageDetailPeer::DATABASE_NAME);
$criteria = new Criteria(MessageTypeVariablePeer::DATABASE_NAME);
$criteria->add(MessageDetailPeer::MD_UID, $this->md_uid);
$criteria->add(MessageTypeVariablePeer::MSGTV_UID, $this->msgtv_uid);
return $criteria;
}
@@ -603,18 +603,18 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
*/
public function getPrimaryKey()
{
return $this->getMdUid();
return $this->getMsgtvUid();
}
/**
* Generic method to set the primary key (md_uid column).
* Generic method to set the primary key (msgtv_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMdUid($key);
$this->setMsgtvUid($key);
}
/**
@@ -623,23 +623,23 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of MessageDetail (or compatible) type.
* @param object $copyObj An object of MessageTypeVariable (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->setMesUid($this->mes_uid);
$copyObj->setMsgtUid($this->msgt_uid);
$copyObj->setMdType($this->md_type);
$copyObj->setMsgtvName($this->msgtv_name);
$copyObj->setMdName($this->md_name);
$copyObj->setMsgtvDefaultValue($this->msgtv_default_value);
$copyObj->setNew(true);
$copyObj->setMdUid(NULL); // this is a pkey column, so set to default value
$copyObj->setMsgtvUid(NULL); // this is a pkey column, so set to default value
}
@@ -652,7 +652,7 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return MessageDetail Clone of current object.
* @return MessageTypeVariable Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
@@ -671,12 +671,12 @@ abstract class BaseMessageDetail extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessageDetailPeer
* @return MessageTypeVariablePeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessageDetailPeer();
self::$peer = new MessageTypeVariablePeer();
}
return self::$peer;
}

View File

@@ -2,27 +2,27 @@
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 MessageDetailPeer::getOMClass()
include_once 'classes/model/MessageDetail.php';
// actual class may be a subclass -- as returned by MessageTypeVariablePeer::getOMClass()
include_once 'classes/model/MessageTypeVariable.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_DETAIL' table.
* Base static class for performing query and update operations on the 'MESSAGE_TYPE_VARIABLE' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageDetailPeer
abstract class BaseMessageTypeVariablePeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_DETAIL';
const TABLE_NAME = 'MESSAGE_TYPE_VARIABLE';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageDetail';
const CLASS_DEFAULT = 'classes.model.MessageTypeVariable';
/** The total number of columns. */
const NUM_COLUMNS = 4;
@@ -31,17 +31,17 @@ abstract class BaseMessageDetailPeer
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MD_UID field */
const MD_UID = 'MESSAGE_DETAIL.MD_UID';
/** the column name for the MSGTV_UID field */
const MSGTV_UID = 'MESSAGE_TYPE_VARIABLE.MSGTV_UID';
/** the column name for the MES_UID field */
const MES_UID = 'MESSAGE_DETAIL.MES_UID';
/** the column name for the MSGT_UID field */
const MSGT_UID = 'MESSAGE_TYPE_VARIABLE.MSGT_UID';
/** the column name for the MD_TYPE field */
const MD_TYPE = 'MESSAGE_DETAIL.MD_TYPE';
/** the column name for the MSGTV_NAME field */
const MSGTV_NAME = 'MESSAGE_TYPE_VARIABLE.MSGTV_NAME';
/** the column name for the MD_NAME field */
const MD_NAME = 'MESSAGE_DETAIL.MD_NAME';
/** the column name for the MSGTV_DEFAULT_VALUE field */
const MSGTV_DEFAULT_VALUE = 'MESSAGE_TYPE_VARIABLE.MSGTV_DEFAULT_VALUE';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -54,9 +54,9 @@ abstract class BaseMessageDetailPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('MdUid', 'MesUid', 'MdType', 'MdName', ),
BasePeer::TYPE_COLNAME => array (MessageDetailPeer::MD_UID, MessageDetailPeer::MES_UID, MessageDetailPeer::MD_TYPE, MessageDetailPeer::MD_NAME, ),
BasePeer::TYPE_FIELDNAME => array ('MD_UID', 'MES_UID', 'MD_TYPE', 'MD_NAME', ),
BasePeer::TYPE_PHPNAME => array ('MsgtvUid', 'MsgtUid', 'MsgtvName', 'MsgtvDefaultValue', ),
BasePeer::TYPE_COLNAME => array (MessageTypeVariablePeer::MSGTV_UID, MessageTypeVariablePeer::MSGT_UID, MessageTypeVariablePeer::MSGTV_NAME, MessageTypeVariablePeer::MSGTV_DEFAULT_VALUE, ),
BasePeer::TYPE_FIELDNAME => array ('MSGTV_UID', 'MSGT_UID', 'MSGTV_NAME', 'MSGTV_DEFAULT_VALUE', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
@@ -67,9 +67,9 @@ abstract class BaseMessageDetailPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('MdUid' => 0, 'MesUid' => 1, 'MdType' => 2, 'MdName' => 3, ),
BasePeer::TYPE_COLNAME => array (MessageDetailPeer::MD_UID => 0, MessageDetailPeer::MES_UID => 1, MessageDetailPeer::MD_TYPE => 2, MessageDetailPeer::MD_NAME => 3, ),
BasePeer::TYPE_FIELDNAME => array ('MD_UID' => 0, 'MES_UID' => 1, 'MD_TYPE' => 2, 'MD_NAME' => 3, ),
BasePeer::TYPE_PHPNAME => array ('MsgtvUid' => 0, 'MsgtUid' => 1, 'MsgtvName' => 2, 'MsgtvDefaultValue' => 3, ),
BasePeer::TYPE_COLNAME => array (MessageTypeVariablePeer::MSGTV_UID => 0, MessageTypeVariablePeer::MSGT_UID => 1, MessageTypeVariablePeer::MSGTV_NAME => 2, MessageTypeVariablePeer::MSGTV_DEFAULT_VALUE => 3, ),
BasePeer::TYPE_FIELDNAME => array ('MSGTV_UID' => 0, 'MSGT_UID' => 1, 'MSGTV_NAME' => 2, 'MSGTV_DEFAULT_VALUE' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
@@ -80,8 +80,8 @@ abstract class BaseMessageDetailPeer
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/MessageDetailMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageDetailMapBuilder');
include_once 'classes/model/map/MessageTypeVariableMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageTypeVariableMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
@@ -94,7 +94,7 @@ abstract class BaseMessageDetailPeer
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = MessageDetailPeer::getTableMap();
$map = MessageTypeVariablePeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
@@ -149,12 +149,12 @@ abstract class BaseMessageDetailPeer
* $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. MessageDetailPeer::COLUMN_NAME).
* @param string $column The column name for current table. (i.e. MessageTypeVariablePeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageDetailPeer::TABLE_NAME.'.', $alias.'.', $column);
return str_replace(MessageTypeVariablePeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -171,18 +171,18 @@ abstract class BaseMessageDetailPeer
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(MessageDetailPeer::MD_UID);
$criteria->addSelectColumn(MessageTypeVariablePeer::MSGTV_UID);
$criteria->addSelectColumn(MessageDetailPeer::MES_UID);
$criteria->addSelectColumn(MessageTypeVariablePeer::MSGT_UID);
$criteria->addSelectColumn(MessageDetailPeer::MD_TYPE);
$criteria->addSelectColumn(MessageTypeVariablePeer::MSGTV_NAME);
$criteria->addSelectColumn(MessageDetailPeer::MD_NAME);
$criteria->addSelectColumn(MessageTypeVariablePeer::MSGTV_DEFAULT_VALUE);
}
const COUNT = 'COUNT(MESSAGE_DETAIL.MD_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_DETAIL.MD_UID)';
const COUNT = 'COUNT(MESSAGE_TYPE_VARIABLE.MSGTV_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_TYPE_VARIABLE.MSGTV_UID)';
/**
* Returns the number of rows matching criteria.
@@ -200,9 +200,9 @@ abstract class BaseMessageDetailPeer
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(MessageDetailPeer::COUNT_DISTINCT);
$criteria->addSelectColumn(MessageTypeVariablePeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageDetailPeer::COUNT);
$criteria->addSelectColumn(MessageTypeVariablePeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
@@ -210,7 +210,7 @@ abstract class BaseMessageDetailPeer
$criteria->addSelectColumn($column);
}
$rs = MessageDetailPeer::doSelectRS($criteria, $con);
$rs = MessageTypeVariablePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
@@ -223,7 +223,7 @@ abstract class BaseMessageDetailPeer
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return MessageDetail
* @return MessageTypeVariable
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
@@ -231,7 +231,7 @@ abstract class BaseMessageDetailPeer
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = MessageDetailPeer::doSelect($critcopy, $con);
$objects = MessageTypeVariablePeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -248,7 +248,7 @@ abstract class BaseMessageDetailPeer
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return MessageDetailPeer::populateObjects(MessageDetailPeer::doSelectRS($criteria, $con));
return MessageTypeVariablePeer::populateObjects(MessageTypeVariablePeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
@@ -272,7 +272,7 @@ abstract class BaseMessageDetailPeer
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
MessageDetailPeer::addSelectColumns($criteria);
MessageTypeVariablePeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -294,7 +294,7 @@ abstract class BaseMessageDetailPeer
$results = array();
// set the class once to avoid overhead in the loop
$cls = MessageDetailPeer::getOMClass();
$cls = MessageTypeVariablePeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
@@ -329,13 +329,13 @@ abstract class BaseMessageDetailPeer
*/
public static function getOMClass()
{
return MessageDetailPeer::CLASS_DEFAULT;
return MessageTypeVariablePeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageDetail or Criteria object.
* Method perform an INSERT on the database, given a MessageTypeVariable or Criteria object.
*
* @param mixed $values Criteria or MessageDetail object containing data that is used to create the INSERT statement.
* @param mixed $values Criteria or MessageTypeVariable 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
@@ -350,7 +350,7 @@ abstract class BaseMessageDetailPeer
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from MessageDetail object
$criteria = $values->buildCriteria(); // build Criteria from MessageTypeVariable object
}
@@ -372,9 +372,9 @@ abstract class BaseMessageDetailPeer
}
/**
* Method perform an UPDATE on the database, given a MessageDetail or Criteria object.
* Method perform an UPDATE on the database, given a MessageTypeVariable or Criteria object.
*
* @param mixed $values Criteria or MessageDetail object containing data create the UPDATE statement.
* @param mixed $values Criteria or MessageTypeVariable 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
@@ -391,8 +391,8 @@ abstract class BaseMessageDetailPeer
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(MessageDetailPeer::MD_UID);
$selectCriteria->add(MessageDetailPeer::MD_UID, $criteria->remove(MessageDetailPeer::MD_UID), $comparison);
$comparison = $criteria->getComparison(MessageTypeVariablePeer::MSGTV_UID);
$selectCriteria->add(MessageTypeVariablePeer::MSGTV_UID, $criteria->remove(MessageTypeVariablePeer::MSGTV_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
@@ -406,7 +406,7 @@ abstract class BaseMessageDetailPeer
}
/**
* Method to DELETE all rows from the MESSAGE_DETAIL table.
* Method to DELETE all rows from the MESSAGE_TYPE_VARIABLE table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
@@ -420,7 +420,7 @@ abstract class BaseMessageDetailPeer
// 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(MessageDetailPeer::TABLE_NAME, $con);
$affectedRows += BasePeer::doDeleteAll(MessageTypeVariablePeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -430,9 +430,9 @@ abstract class BaseMessageDetailPeer
}
/**
* Method perform a DELETE on the database, given a MessageDetail or Criteria object OR a primary key value.
* Method perform a DELETE on the database, given a MessageTypeVariable or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageDetail object or primary key or array of primary keys
* @param mixed $values Criteria or MessageTypeVariable 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).
@@ -444,18 +444,18 @@ abstract class BaseMessageDetailPeer
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(MessageDetailPeer::DATABASE_NAME);
$con = Propel::getConnection(MessageTypeVariablePeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageDetail) {
} elseif ($values instanceof MessageTypeVariable) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageDetailPeer::MD_UID, (array) $values, Criteria::IN);
$criteria->add(MessageTypeVariablePeer::MSGTV_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
@@ -478,24 +478,24 @@ abstract class BaseMessageDetailPeer
}
/**
* Validates all modified columns of given MessageDetail object.
* Validates all modified columns of given MessageTypeVariable 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 MessageDetail $obj The object to validate.
* @param MessageTypeVariable $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(MessageDetail $obj, $cols = null)
public static function doValidate(MessageTypeVariable $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageDetailPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageDetailPeer::TABLE_NAME);
$dbMap = Propel::getDatabaseMap(MessageTypeVariablePeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageTypeVariablePeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -511,7 +511,7 @@ abstract class BaseMessageDetailPeer
}
return BasePeer::doValidate(MessageDetailPeer::DATABASE_NAME, MessageDetailPeer::TABLE_NAME, $columns);
return BasePeer::doValidate(MessageTypeVariablePeer::DATABASE_NAME, MessageTypeVariablePeer::TABLE_NAME, $columns);
}
/**
@@ -519,7 +519,7 @@ abstract class BaseMessageDetailPeer
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageDetail
* @return MessageTypeVariable
*/
public static function retrieveByPK($pk, $con = null)
{
@@ -527,12 +527,12 @@ abstract class BaseMessageDetailPeer
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageDetailPeer::DATABASE_NAME);
$criteria = new Criteria(MessageTypeVariablePeer::DATABASE_NAME);
$criteria->add(MessageDetailPeer::MD_UID, $pk);
$criteria->add(MessageTypeVariablePeer::MSGTV_UID, $pk);
$v = MessageDetailPeer::doSelect($criteria, $con);
$v = MessageTypeVariablePeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -556,8 +556,8 @@ abstract class BaseMessageDetailPeer
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(MessageDetailPeer::MD_UID, $pks, Criteria::IN);
$objs = MessageDetailPeer::doSelect($criteria, $con);
$criteria->add(MessageTypeVariablePeer::MSGTV_UID, $pks, Criteria::IN);
$objs = MessageTypeVariablePeer::doSelect($criteria, $con);
}
return $objs;
}
@@ -569,14 +569,14 @@ if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseMessageDetailPeer::getMapBuilder();
BaseMessageTypeVariablePeer::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/MessageDetailMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageDetailMapBuilder');
require_once 'classes/model/map/MessageTypeVariableMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageTypeVariableMapBuilder');
}