diff --git a/workflow/engine/classes/model/BpmnActivity.php b/workflow/engine/classes/model/BpmnActivity.php
new file mode 100644
index 000000000..1c1d085ff
--- /dev/null
+++ b/workflow/engine/classes/model/BpmnActivity.php
@@ -0,0 +1,19 @@
+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('BPMN_ACTIVITY');
+ $tMap->setPhpName('BpmnActivity');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('ACT_UID', 'ActUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROCESS', 'PRO_UID', false, 32);
+
+ $tMap->addColumn('ACT_NAME', 'ActName', 'string', CreoleTypes::VARCHAR, true, 255);
+
+ $tMap->addColumn('ACT_TYPE', 'ActType', 'string', CreoleTypes::VARCHAR, true, 30);
+
+ $tMap->addColumn('ACT_IS_FOR_COMPENSATION', 'ActIsForCompensation', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('ACT_START_QUANTITY', 'ActStartQuantity', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('ACT_COMPLETION_QUANTITY', 'ActCompletionQuantity', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('ACT_TASK_TYPE', 'ActTaskType', 'string', CreoleTypes::VARCHAR, true, 20);
+
+ $tMap->addColumn('ACT_IMPLEMENTATION', 'ActImplementation', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('ACT_INSTANTIATE', 'ActInstantiate', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('ACT_SCRIPT_TYPE', 'ActScriptType', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('ACT_SCRIPT', 'ActScript', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('ACT_LOOP_TYPE', 'ActLoopType', 'string', CreoleTypes::VARCHAR, true, 20);
+
+ $tMap->addColumn('ACT_TEST_BEFORE', 'ActTestBefore', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('ACT_LOOP_MAXIMUM', 'ActLoopMaximum', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('ACT_LOOP_CONDITION', 'ActLoopCondition', 'string', CreoleTypes::VARCHAR, false, 100);
+
+ $tMap->addColumn('ACT_LOOP_CARDINALITY', 'ActLoopCardinality', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('ACT_LOOP_BEHAVIOR', 'ActLoopBehavior', 'string', CreoleTypes::VARCHAR, false, 20);
+
+ $tMap->addColumn('ACT_IS_ADHOC', 'ActIsAdhoc', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('ACT_IS_COLLAPSED', 'ActIsCollapsed', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('ACT_COMPLETION_CONDITION', 'ActCompletionCondition', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('ACT_ORDERING', 'ActOrdering', 'string', CreoleTypes::VARCHAR, false, 20);
+
+ $tMap->addColumn('ACT_CANCEL_REMAINING_INSTANCES', 'ActCancelRemainingInstances', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('ACT_PROTOCOL', 'ActProtocol', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('ACT_METHOD', 'ActMethod', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('ACT_IS_GLOBAL', 'ActIsGlobal', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('ACT_REFERER', 'ActReferer', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('ACT_DEFAULT_FLOW', 'ActDefaultFlow', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('ACT_MASTER_DIAGRAM', 'ActMasterDiagram', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ } // doBuild()
+
+} // BpmnActivityMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnArtifactMapBuilder.php b/workflow/engine/classes/model/map/BpmnArtifactMapBuilder.php
new file mode 100644
index 000000000..52432ef92
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnArtifactMapBuilder.php
@@ -0,0 +1,82 @@
+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('BPMN_ARTIFACT');
+ $tMap->setPhpName('BpmnArtifact');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('ART_UID', 'ArtUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROCESS', 'PRO_UID', false, 32);
+
+ $tMap->addColumn('ART_TYPE', 'ArtType', 'string', CreoleTypes::VARCHAR, true, 15);
+
+ $tMap->addColumn('ART_NAME', 'ArtName', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('ART_CATEGORY_REF', 'ArtCategoryRef', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ } // doBuild()
+
+} // BpmnArtifactMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnBoundMapBuilder.php b/workflow/engine/classes/model/map/BpmnBoundMapBuilder.php
new file mode 100644
index 000000000..021fb925e
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnBoundMapBuilder.php
@@ -0,0 +1,96 @@
+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('BPMN_BOUND');
+ $tMap->setPhpName('BpmnBound');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('BOU_UID', 'BouUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('DIA_UID', 'DiaUid', 'string', CreoleTypes::VARCHAR, 'BPMN_DIAGRAM', 'DIA_UID', true, 32);
+
+ $tMap->addColumn('ELEMENT_UID', 'ElementUid', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('BOU_ELEMENT', 'BouElement', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('BOU_ELEMENT_TYPE', 'BouElementType', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('BOU_X', 'BouX', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('BOU_Y', 'BouY', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('BOU_WIDTH', 'BouWidth', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('BOU_HEIGHT', 'BouHeight', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('BOU_REL_POSITION', 'BouRelPosition', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('BOU_SIZE_IDENTICAL', 'BouSizeIdentical', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('BOU_CONTAINER', 'BouContainer', 'string', CreoleTypes::VARCHAR, false, 30);
+
+ } // doBuild()
+
+} // BpmnBoundMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnDataMapBuilder.php b/workflow/engine/classes/model/map/BpmnDataMapBuilder.php
new file mode 100644
index 000000000..54eaad006
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnDataMapBuilder.php
@@ -0,0 +1,94 @@
+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('BPMN_DATA');
+ $tMap->setPhpName('BpmnData');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('DAT_UID', 'DatUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROCESS', 'PRO_UID', false, 32);
+
+ $tMap->addColumn('DAT_NAME', 'DatName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('DAT_TYPE', 'DatType', 'string', CreoleTypes::VARCHAR, true, 20);
+
+ $tMap->addColumn('DAT_IS_COLLECTION', 'DatIsCollection', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('DAT_ITEM_KIND', 'DatItemKind', 'string', CreoleTypes::VARCHAR, true, 20);
+
+ $tMap->addColumn('DAT_CAPACITY', 'DatCapacity', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('DAT_IS_UNLIMITED', 'DatIsUnlimited', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('DAT_STATE', 'DatState', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('DAT_IS_GLOBAL', 'DatIsGlobal', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('DAT_OBJECT_REF', 'DatObjectRef', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ } // doBuild()
+
+} // BpmnDataMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnDiagramMapBuilder.php b/workflow/engine/classes/model/map/BpmnDiagramMapBuilder.php
new file mode 100644
index 000000000..b065e450e
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnDiagramMapBuilder.php
@@ -0,0 +1,78 @@
+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('BPMN_DIAGRAM');
+ $tMap->setPhpName('BpmnDiagram');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('DIA_UID', 'DiaUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addColumn('DIA_NAME', 'DiaName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('DIA_IS_CLOSABLE', 'DiaIsClosable', 'int', CreoleTypes::TINYINT, false, null);
+
+ } // doBuild()
+
+} // BpmnDiagramMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnDocumentationMapBuilder.php b/workflow/engine/classes/model/map/BpmnDocumentationMapBuilder.php
new file mode 100644
index 000000000..eed1b2524
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnDocumentationMapBuilder.php
@@ -0,0 +1,80 @@
+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('BPMN_DOCUMENTATION');
+ $tMap->setPhpName('BpmnDocumentation');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('DOC_UID', 'DocUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addColumn('DOC_ELEMENT', 'DocElement', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('DOC_ELEMENT_TYPE', 'DocElementType', 'string', CreoleTypes::VARCHAR, true, 45);
+
+ $tMap->addColumn('DOC_DOCUMENTATION', 'DocDocumentation', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ } // doBuild()
+
+} // BpmnDocumentationMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnEventMapBuilder.php b/workflow/engine/classes/model/map/BpmnEventMapBuilder.php
new file mode 100644
index 000000000..16f9787e9
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnEventMapBuilder.php
@@ -0,0 +1,116 @@
+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('BPMN_EVENT');
+ $tMap->setPhpName('BpmnEvent');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROCESS', 'PRO_UID', false, 32);
+
+ $tMap->addColumn('EVN_NAME', 'EvnName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_TYPE', 'EvnType', 'string', CreoleTypes::VARCHAR, true, 30);
+
+ $tMap->addColumn('EVN_MARKER', 'EvnMarker', 'string', CreoleTypes::VARCHAR, true, 30);
+
+ $tMap->addColumn('EVN_IS_INTERRUPTING', 'EvnIsInterrupting', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('EVN_ATTACHED_TO', 'EvnAttachedTo', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('EVN_CANCEL_ACTIVITY', 'EvnCancelActivity', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('EVN_ACTIVITY REF', 'EvnActivity ref', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('EVN_WAIT_FOR COMPLETION', 'EvnWaitFor completion', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('EVN_ERROR_NAME', 'EvnErrorName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_ERROR_CODE', 'EvnErrorCode', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_ESCALATION_NAME', 'EvnEscalationName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_ESCALATION_CODE', 'EvnEscalationCode', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_CONDITION', 'EvnCondition', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_MESSAGE', 'EvnMessage', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('EVN_OPRERATION_NAME', 'EvnOprerationName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_OPERATION_IMPLEMENTATION_REF', 'EvnOperationImplementationRef', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_TIME_DATE', 'EvnTimeDate', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_TIME_CYCLE', 'EvnTimeCycle', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_TIME_DURATION', 'EvnTimeDuration', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('EVN_BEHAVIOR', 'EvnBehavior', 'string', CreoleTypes::VARCHAR, true, 20);
+
+ } // doBuild()
+
+} // BpmnEventMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnExtensionMapBuilder.php b/workflow/engine/classes/model/map/BpmnExtensionMapBuilder.php
new file mode 100644
index 000000000..0dac87975
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnExtensionMapBuilder.php
@@ -0,0 +1,80 @@
+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('BPMN_EXTENSION');
+ $tMap->setPhpName('BpmnExtension');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('EXT_UID', 'ExtUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addColumn('EXT_ELEMENT', 'ExtElement', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('EXT_ELEMENT_TYPE', 'ExtElementType', 'string', CreoleTypes::VARCHAR, true, 45);
+
+ $tMap->addColumn('EXT_EXTENSION', 'ExtExtension', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ } // doBuild()
+
+} // BpmnExtensionMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnFlowMapBuilder.php b/workflow/engine/classes/model/map/BpmnFlowMapBuilder.php
new file mode 100644
index 000000000..b9af3d256
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnFlowMapBuilder.php
@@ -0,0 +1,106 @@
+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('BPMN_FLOW');
+ $tMap->setPhpName('BpmnFlow');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('FLO_UID', 'FloUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('DIA_UID', 'DiaUid', 'string', CreoleTypes::VARCHAR, 'BPMN_DIAGRAM', 'DIA_UID', true, 32);
+
+ $tMap->addColumn('FLO_TYPE', 'FloType', 'string', CreoleTypes::VARCHAR, true, 20);
+
+ $tMap->addColumn('FLO_NAME', 'FloName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('FLO_ELEMENT_ORIGIN', 'FloElementOrigin', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('FLO_ELEMENT_ORIGIN_TYPE', 'FloElementOriginType', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('FLO_ELEMENT_ORIGIN_PORT', 'FloElementOriginPort', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('FLO_ELEMENT_DEST', 'FloElementDest', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('FLO_ELEMENT_DEST_TYPE', 'FloElementDestType', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('FLO_ELEMENT_DEST_PORT', 'FloElementDestPort', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('FLO_IS_INMEDIATE', 'FloIsInmediate', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('FLO_CONDITION', 'FloCondition', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('FLO_X1', 'FloX1', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('FLO_Y1', 'FloY1', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('FLO_X2', 'FloX2', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('FLO_Y2', 'FloY2', 'int', CreoleTypes::INTEGER, true, null);
+
+ $tMap->addColumn('FLO_STATE', 'FloState', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ } // doBuild()
+
+} // BpmnFlowMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnGatewayMapBuilder.php b/workflow/engine/classes/model/map/BpmnGatewayMapBuilder.php
new file mode 100644
index 000000000..901669158
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnGatewayMapBuilder.php
@@ -0,0 +1,92 @@
+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('BPMN_GATEWAY');
+ $tMap->setPhpName('BpmnGateway');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('GAT_UID', 'GatUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROCESS', 'PRO_UID', false, 32);
+
+ $tMap->addColumn('GAT_NAME', 'GatName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('GAT_TYPE', 'GatType', 'string', CreoleTypes::VARCHAR, true, 30);
+
+ $tMap->addColumn('GAT_DIRECTION', 'GatDirection', 'string', CreoleTypes::VARCHAR, true, 30);
+
+ $tMap->addColumn('GAT_INSTANTIATE', 'GatInstantiate', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('GAT_EVENT_GATEWAT_TYPE', 'GatEventGatewatType', 'string', CreoleTypes::VARCHAR, false, 20);
+
+ $tMap->addColumn('GAT_ACTIVATION_COUNT', 'GatActivationCount', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('GAT_WAITING_FOR_START', 'GatWaitingForStart', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('GAT_DEFAULT_FLOW', 'GatDefaultFlow', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ } // doBuild()
+
+} // BpmnGatewayMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnLaneMapBuilder.php b/workflow/engine/classes/model/map/BpmnLaneMapBuilder.php
new file mode 100644
index 000000000..fc6689ac9
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnLaneMapBuilder.php
@@ -0,0 +1,82 @@
+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('BPMN_LANE');
+ $tMap->setPhpName('BpmnLane');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('LAN_UID', 'LanUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('LNS_UID', 'LnsUid', 'string', CreoleTypes::VARCHAR, 'BPMN_LANESET', 'LNS_UID', true, 32);
+
+ $tMap->addColumn('LAN_NAME', 'LanName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('LAN_CHILD_LANESET', 'LanChildLaneset', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('LAN_IS_HORIZONTAL', 'LanIsHorizontal', 'int', CreoleTypes::TINYINT, false, null);
+
+ } // doBuild()
+
+} // BpmnLaneMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnLanesetMapBuilder.php b/workflow/engine/classes/model/map/BpmnLanesetMapBuilder.php
new file mode 100644
index 000000000..147f73c3f
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnLanesetMapBuilder.php
@@ -0,0 +1,84 @@
+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('BPMN_LANESET');
+ $tMap->setPhpName('BpmnLaneset');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('LNS_UID', 'LnsUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addForeignKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROCESS', 'PRO_UID', false, 32);
+
+ $tMap->addColumn('LNS_NAME', 'LnsName', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('LNS_PARENT_LANE', 'LnsParentLane', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('LNS_IS_HORIZONTAL', 'LnsIsHorizontal', 'int', CreoleTypes::TINYINT, false, null);
+
+ $tMap->addColumn('LNS_STATE', 'LnsState', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ } // doBuild()
+
+} // BpmnLanesetMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnParticipantMapBuilder.php b/workflow/engine/classes/model/map/BpmnParticipantMapBuilder.php
new file mode 100644
index 000000000..3543e5079
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnParticipantMapBuilder.php
@@ -0,0 +1,88 @@
+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('BPMN_PARTICIPANT');
+ $tMap->setPhpName('BpmnParticipant');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('PAR_UID', 'ParUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('LNS_UID', 'LnsUid', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('PAR_NAME', 'ParName', 'string', CreoleTypes::VARCHAR, true, 255);
+
+ $tMap->addColumn('PAR_MINIMUM', 'ParMinimum', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('PAR_MAXIMUM', 'ParMaximum', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('PAR_NUM_PARTICIPANTS', 'ParNumParticipants', 'int', CreoleTypes::INTEGER, false, null);
+
+ $tMap->addColumn('PAR_IS_HORIZONTAL', 'ParIsHorizontal', 'int', CreoleTypes::TINYINT, true, null);
+
+ } // doBuild()
+
+} // BpmnParticipantMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnProcessMapBuilder.php b/workflow/engine/classes/model/map/BpmnProcessMapBuilder.php
new file mode 100644
index 000000000..978380bb2
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnProcessMapBuilder.php
@@ -0,0 +1,86 @@
+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('BPMN_PROCESS');
+ $tMap->setPhpName('BpmnProcess');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
+
+ $tMap->addColumn('DIA_UID', 'DiaUid', 'string', CreoleTypes::VARCHAR, false, 32);
+
+ $tMap->addColumn('PRO_NAME', 'ProName', 'string', CreoleTypes::VARCHAR, true, 255);
+
+ $tMap->addColumn('PRO_TYPE', 'ProType', 'string', CreoleTypes::VARCHAR, true, 10);
+
+ $tMap->addColumn('PRO_IS_EXECUTABLE', 'ProIsExecutable', 'int', CreoleTypes::TINYINT, true, null);
+
+ $tMap->addColumn('PRO_IS_CLOSED', 'ProIsClosed', 'int', CreoleTypes::TINYINT, true, null);
+
+ $tMap->addColumn('PRO_IS_SUBPROCESS', 'ProIsSubprocess', 'int', CreoleTypes::TINYINT, true, null);
+
+ } // doBuild()
+
+} // BpmnProcessMapBuilder
diff --git a/workflow/engine/classes/model/map/BpmnProjectMapBuilder.php b/workflow/engine/classes/model/map/BpmnProjectMapBuilder.php
new file mode 100644
index 000000000..003aa9c7c
--- /dev/null
+++ b/workflow/engine/classes/model/map/BpmnProjectMapBuilder.php
@@ -0,0 +1,94 @@
+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('BPMN_PROJECT');
+ $tMap->setPhpName('BpmnProject');
+
+ $tMap->setUseIdGenerator(false);
+
+ $tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
+
+ $tMap->addColumn('PRJ_NAME', 'PrjName', 'string', CreoleTypes::VARCHAR, true, 255);
+
+ $tMap->addColumn('PRJ_TARGET_NAMESPACE', 'PrjTargetNamespace', 'string', CreoleTypes::LONGVARCHAR, true, null);
+
+ $tMap->addColumn('PRJ_EXPRESION_LANGUAGE', 'PrjExpresionLanguage', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('PRJ_TYPE_LANGUAGE', 'PrjTypeLanguage', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('PRJ_EXPORTER', 'PrjExporter', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('PRJ_EXPORTER_VERSION', 'PrjExporterVersion', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('PRJ_CREATE_DATE', 'PrjCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
+
+ $tMap->addColumn('PRJ_UPDATE_DATE', 'PrjUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
+
+ $tMap->addColumn('PRJ_AUTHOR', 'PrjAuthor', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('PRJ_AUTHOR_VERSION', 'PrjAuthorVersion', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ $tMap->addColumn('PRJ_ORIGINAL_SOURCE', 'PrjOriginalSource', 'string', CreoleTypes::LONGVARCHAR, false, null);
+
+ } // doBuild()
+
+} // BpmnProjectMapBuilder
diff --git a/workflow/engine/classes/model/om/BaseBpmnActivity.php b/workflow/engine/classes/model/om/BaseBpmnActivity.php
new file mode 100644
index 000000000..0b60169bd
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnActivity.php
@@ -0,0 +1,2353 @@
+act_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [act_name] column value.
+ *
+ * @return string
+ */
+ public function getActName()
+ {
+
+ return $this->act_name;
+ }
+
+ /**
+ * Get the [act_type] column value.
+ *
+ * @return string
+ */
+ public function getActType()
+ {
+
+ return $this->act_type;
+ }
+
+ /**
+ * Get the [act_is_for_compensation] column value.
+ *
+ * @return int
+ */
+ public function getActIsForCompensation()
+ {
+
+ return $this->act_is_for_compensation;
+ }
+
+ /**
+ * Get the [act_start_quantity] column value.
+ *
+ * @return int
+ */
+ public function getActStartQuantity()
+ {
+
+ return $this->act_start_quantity;
+ }
+
+ /**
+ * Get the [act_completion_quantity] column value.
+ *
+ * @return int
+ */
+ public function getActCompletionQuantity()
+ {
+
+ return $this->act_completion_quantity;
+ }
+
+ /**
+ * Get the [act_task_type] column value.
+ *
+ * @return string
+ */
+ public function getActTaskType()
+ {
+
+ return $this->act_task_type;
+ }
+
+ /**
+ * Get the [act_implementation] column value.
+ *
+ * @return string
+ */
+ public function getActImplementation()
+ {
+
+ return $this->act_implementation;
+ }
+
+ /**
+ * Get the [act_instantiate] column value.
+ *
+ * @return int
+ */
+ public function getActInstantiate()
+ {
+
+ return $this->act_instantiate;
+ }
+
+ /**
+ * Get the [act_script_type] column value.
+ *
+ * @return string
+ */
+ public function getActScriptType()
+ {
+
+ return $this->act_script_type;
+ }
+
+ /**
+ * Get the [act_script] column value.
+ *
+ * @return string
+ */
+ public function getActScript()
+ {
+
+ return $this->act_script;
+ }
+
+ /**
+ * Get the [act_loop_type] column value.
+ *
+ * @return string
+ */
+ public function getActLoopType()
+ {
+
+ return $this->act_loop_type;
+ }
+
+ /**
+ * Get the [act_test_before] column value.
+ *
+ * @return int
+ */
+ public function getActTestBefore()
+ {
+
+ return $this->act_test_before;
+ }
+
+ /**
+ * Get the [act_loop_maximum] column value.
+ *
+ * @return int
+ */
+ public function getActLoopMaximum()
+ {
+
+ return $this->act_loop_maximum;
+ }
+
+ /**
+ * Get the [act_loop_condition] column value.
+ *
+ * @return string
+ */
+ public function getActLoopCondition()
+ {
+
+ return $this->act_loop_condition;
+ }
+
+ /**
+ * Get the [act_loop_cardinality] column value.
+ *
+ * @return int
+ */
+ public function getActLoopCardinality()
+ {
+
+ return $this->act_loop_cardinality;
+ }
+
+ /**
+ * Get the [act_loop_behavior] column value.
+ *
+ * @return string
+ */
+ public function getActLoopBehavior()
+ {
+
+ return $this->act_loop_behavior;
+ }
+
+ /**
+ * Get the [act_is_adhoc] column value.
+ *
+ * @return int
+ */
+ public function getActIsAdhoc()
+ {
+
+ return $this->act_is_adhoc;
+ }
+
+ /**
+ * Get the [act_is_collapsed] column value.
+ *
+ * @return int
+ */
+ public function getActIsCollapsed()
+ {
+
+ return $this->act_is_collapsed;
+ }
+
+ /**
+ * Get the [act_completion_condition] column value.
+ *
+ * @return string
+ */
+ public function getActCompletionCondition()
+ {
+
+ return $this->act_completion_condition;
+ }
+
+ /**
+ * Get the [act_ordering] column value.
+ *
+ * @return string
+ */
+ public function getActOrdering()
+ {
+
+ return $this->act_ordering;
+ }
+
+ /**
+ * Get the [act_cancel_remaining_instances] column value.
+ *
+ * @return int
+ */
+ public function getActCancelRemainingInstances()
+ {
+
+ return $this->act_cancel_remaining_instances;
+ }
+
+ /**
+ * Get the [act_protocol] column value.
+ *
+ * @return string
+ */
+ public function getActProtocol()
+ {
+
+ return $this->act_protocol;
+ }
+
+ /**
+ * Get the [act_method] column value.
+ *
+ * @return string
+ */
+ public function getActMethod()
+ {
+
+ return $this->act_method;
+ }
+
+ /**
+ * Get the [act_is_global] column value.
+ *
+ * @return int
+ */
+ public function getActIsGlobal()
+ {
+
+ return $this->act_is_global;
+ }
+
+ /**
+ * Get the [act_referer] column value.
+ *
+ * @return string
+ */
+ public function getActReferer()
+ {
+
+ return $this->act_referer;
+ }
+
+ /**
+ * Get the [act_default_flow] column value.
+ *
+ * @return string
+ */
+ public function getActDefaultFlow()
+ {
+
+ return $this->act_default_flow;
+ }
+
+ /**
+ * Get the [act_master_diagram] column value.
+ *
+ * @return string
+ */
+ public function getActMasterDiagram()
+ {
+
+ return $this->act_master_diagram;
+ }
+
+ /**
+ * Set the value of [act_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActUid($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->act_uid !== $v || $v === '') {
+ $this->act_uid = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_UID;
+ }
+
+ } // setActUid()
+
+ /**
+ * 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 || $v === '') {
+ $this->prj_uid = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::PRO_UID;
+ }
+
+ if ($this->aBpmnProcess !== null && $this->aBpmnProcess->getProUid() !== $v) {
+ $this->aBpmnProcess = null;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [act_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActName($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->act_name !== $v) {
+ $this->act_name = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_NAME;
+ }
+
+ } // setActName()
+
+ /**
+ * Set the value of [act_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActType($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->act_type !== $v || $v === 'TASK') {
+ $this->act_type = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_TYPE;
+ }
+
+ } // setActType()
+
+ /**
+ * Set the value of [act_is_for_compensation] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActIsForCompensation($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->act_is_for_compensation !== $v || $v === 0) {
+ $this->act_is_for_compensation = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_IS_FOR_COMPENSATION;
+ }
+
+ } // setActIsForCompensation()
+
+ /**
+ * Set the value of [act_start_quantity] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActStartQuantity($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->act_start_quantity !== $v || $v === 1) {
+ $this->act_start_quantity = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_START_QUANTITY;
+ }
+
+ } // setActStartQuantity()
+
+ /**
+ * Set the value of [act_completion_quantity] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActCompletionQuantity($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->act_completion_quantity !== $v || $v === 1) {
+ $this->act_completion_quantity = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_COMPLETION_QUANTITY;
+ }
+
+ } // setActCompletionQuantity()
+
+ /**
+ * Set the value of [act_task_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActTaskType($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->act_task_type !== $v || $v === 'EMPTY') {
+ $this->act_task_type = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_TASK_TYPE;
+ }
+
+ } // setActTaskType()
+
+ /**
+ * Set the value of [act_implementation] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActImplementation($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->act_implementation !== $v) {
+ $this->act_implementation = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_IMPLEMENTATION;
+ }
+
+ } // setActImplementation()
+
+ /**
+ * Set the value of [act_instantiate] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActInstantiate($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->act_instantiate !== $v || $v === 0) {
+ $this->act_instantiate = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_INSTANTIATE;
+ }
+
+ } // setActInstantiate()
+
+ /**
+ * Set the value of [act_script_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActScriptType($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->act_script_type !== $v) {
+ $this->act_script_type = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_SCRIPT_TYPE;
+ }
+
+ } // setActScriptType()
+
+ /**
+ * Set the value of [act_script] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActScript($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->act_script !== $v) {
+ $this->act_script = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_SCRIPT;
+ }
+
+ } // setActScript()
+
+ /**
+ * Set the value of [act_loop_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActLoopType($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->act_loop_type !== $v || $v === 'NONE') {
+ $this->act_loop_type = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_LOOP_TYPE;
+ }
+
+ } // setActLoopType()
+
+ /**
+ * Set the value of [act_test_before] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActTestBefore($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->act_test_before !== $v || $v === 0) {
+ $this->act_test_before = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_TEST_BEFORE;
+ }
+
+ } // setActTestBefore()
+
+ /**
+ * Set the value of [act_loop_maximum] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActLoopMaximum($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->act_loop_maximum !== $v || $v === 0) {
+ $this->act_loop_maximum = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_LOOP_MAXIMUM;
+ }
+
+ } // setActLoopMaximum()
+
+ /**
+ * Set the value of [act_loop_condition] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActLoopCondition($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->act_loop_condition !== $v) {
+ $this->act_loop_condition = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_LOOP_CONDITION;
+ }
+
+ } // setActLoopCondition()
+
+ /**
+ * Set the value of [act_loop_cardinality] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActLoopCardinality($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->act_loop_cardinality !== $v || $v === 0) {
+ $this->act_loop_cardinality = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_LOOP_CARDINALITY;
+ }
+
+ } // setActLoopCardinality()
+
+ /**
+ * Set the value of [act_loop_behavior] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActLoopBehavior($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->act_loop_behavior !== $v || $v === 'NONE') {
+ $this->act_loop_behavior = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_LOOP_BEHAVIOR;
+ }
+
+ } // setActLoopBehavior()
+
+ /**
+ * Set the value of [act_is_adhoc] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActIsAdhoc($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->act_is_adhoc !== $v || $v === 0) {
+ $this->act_is_adhoc = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_IS_ADHOC;
+ }
+
+ } // setActIsAdhoc()
+
+ /**
+ * Set the value of [act_is_collapsed] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActIsCollapsed($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->act_is_collapsed !== $v || $v === 1) {
+ $this->act_is_collapsed = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_IS_COLLAPSED;
+ }
+
+ } // setActIsCollapsed()
+
+ /**
+ * Set the value of [act_completion_condition] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActCompletionCondition($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->act_completion_condition !== $v) {
+ $this->act_completion_condition = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_COMPLETION_CONDITION;
+ }
+
+ } // setActCompletionCondition()
+
+ /**
+ * Set the value of [act_ordering] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActOrdering($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->act_ordering !== $v || $v === 'PARALLEL') {
+ $this->act_ordering = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_ORDERING;
+ }
+
+ } // setActOrdering()
+
+ /**
+ * Set the value of [act_cancel_remaining_instances] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActCancelRemainingInstances($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->act_cancel_remaining_instances !== $v || $v === 1) {
+ $this->act_cancel_remaining_instances = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_CANCEL_REMAINING_INSTANCES;
+ }
+
+ } // setActCancelRemainingInstances()
+
+ /**
+ * Set the value of [act_protocol] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActProtocol($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->act_protocol !== $v) {
+ $this->act_protocol = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_PROTOCOL;
+ }
+
+ } // setActProtocol()
+
+ /**
+ * Set the value of [act_method] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActMethod($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->act_method !== $v) {
+ $this->act_method = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_METHOD;
+ }
+
+ } // setActMethod()
+
+ /**
+ * Set the value of [act_is_global] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setActIsGlobal($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->act_is_global !== $v || $v === 0) {
+ $this->act_is_global = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_IS_GLOBAL;
+ }
+
+ } // setActIsGlobal()
+
+ /**
+ * Set the value of [act_referer] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActReferer($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->act_referer !== $v || $v === '') {
+ $this->act_referer = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_REFERER;
+ }
+
+ } // setActReferer()
+
+ /**
+ * Set the value of [act_default_flow] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActDefaultFlow($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->act_default_flow !== $v || $v === '') {
+ $this->act_default_flow = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_DEFAULT_FLOW;
+ }
+
+ } // setActDefaultFlow()
+
+ /**
+ * Set the value of [act_master_diagram] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setActMasterDiagram($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->act_master_diagram !== $v || $v === '') {
+ $this->act_master_diagram = $v;
+ $this->modifiedColumns[] = BpmnActivityPeer::ACT_MASTER_DIAGRAM;
+ }
+
+ } // setActMasterDiagram()
+
+ /**
+ * 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->act_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->pro_uid = $rs->getString($startcol + 2);
+
+ $this->act_name = $rs->getString($startcol + 3);
+
+ $this->act_type = $rs->getString($startcol + 4);
+
+ $this->act_is_for_compensation = $rs->getInt($startcol + 5);
+
+ $this->act_start_quantity = $rs->getInt($startcol + 6);
+
+ $this->act_completion_quantity = $rs->getInt($startcol + 7);
+
+ $this->act_task_type = $rs->getString($startcol + 8);
+
+ $this->act_implementation = $rs->getString($startcol + 9);
+
+ $this->act_instantiate = $rs->getInt($startcol + 10);
+
+ $this->act_script_type = $rs->getString($startcol + 11);
+
+ $this->act_script = $rs->getString($startcol + 12);
+
+ $this->act_loop_type = $rs->getString($startcol + 13);
+
+ $this->act_test_before = $rs->getInt($startcol + 14);
+
+ $this->act_loop_maximum = $rs->getInt($startcol + 15);
+
+ $this->act_loop_condition = $rs->getString($startcol + 16);
+
+ $this->act_loop_cardinality = $rs->getInt($startcol + 17);
+
+ $this->act_loop_behavior = $rs->getString($startcol + 18);
+
+ $this->act_is_adhoc = $rs->getInt($startcol + 19);
+
+ $this->act_is_collapsed = $rs->getInt($startcol + 20);
+
+ $this->act_completion_condition = $rs->getString($startcol + 21);
+
+ $this->act_ordering = $rs->getString($startcol + 22);
+
+ $this->act_cancel_remaining_instances = $rs->getInt($startcol + 23);
+
+ $this->act_protocol = $rs->getString($startcol + 24);
+
+ $this->act_method = $rs->getString($startcol + 25);
+
+ $this->act_is_global = $rs->getInt($startcol + 26);
+
+ $this->act_referer = $rs->getString($startcol + 27);
+
+ $this->act_default_flow = $rs->getString($startcol + 28);
+
+ $this->act_master_diagram = $rs->getString($startcol + 29);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 30; // 30 = BpmnActivityPeer::NUM_COLUMNS - BpmnActivityPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnActivity 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(BpmnActivityPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnActivityPeer::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(BpmnActivityPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if ($this->aBpmnProcess->isModified()) {
+ $affectedRows += $this->aBpmnProcess->save($con);
+ }
+ $this->setBpmnProcess($this->aBpmnProcess);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnActivityPeer::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 += BpmnActivityPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if (!$this->aBpmnProcess->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProcess->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnActivityPeer::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 = BpmnActivityPeer::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->getActUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getProUid();
+ break;
+ case 3:
+ return $this->getActName();
+ break;
+ case 4:
+ return $this->getActType();
+ break;
+ case 5:
+ return $this->getActIsForCompensation();
+ break;
+ case 6:
+ return $this->getActStartQuantity();
+ break;
+ case 7:
+ return $this->getActCompletionQuantity();
+ break;
+ case 8:
+ return $this->getActTaskType();
+ break;
+ case 9:
+ return $this->getActImplementation();
+ break;
+ case 10:
+ return $this->getActInstantiate();
+ break;
+ case 11:
+ return $this->getActScriptType();
+ break;
+ case 12:
+ return $this->getActScript();
+ break;
+ case 13:
+ return $this->getActLoopType();
+ break;
+ case 14:
+ return $this->getActTestBefore();
+ break;
+ case 15:
+ return $this->getActLoopMaximum();
+ break;
+ case 16:
+ return $this->getActLoopCondition();
+ break;
+ case 17:
+ return $this->getActLoopCardinality();
+ break;
+ case 18:
+ return $this->getActLoopBehavior();
+ break;
+ case 19:
+ return $this->getActIsAdhoc();
+ break;
+ case 20:
+ return $this->getActIsCollapsed();
+ break;
+ case 21:
+ return $this->getActCompletionCondition();
+ break;
+ case 22:
+ return $this->getActOrdering();
+ break;
+ case 23:
+ return $this->getActCancelRemainingInstances();
+ break;
+ case 24:
+ return $this->getActProtocol();
+ break;
+ case 25:
+ return $this->getActMethod();
+ break;
+ case 26:
+ return $this->getActIsGlobal();
+ break;
+ case 27:
+ return $this->getActReferer();
+ break;
+ case 28:
+ return $this->getActDefaultFlow();
+ break;
+ case 29:
+ return $this->getActMasterDiagram();
+ 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 = BpmnActivityPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getActUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getProUid(),
+ $keys[3] => $this->getActName(),
+ $keys[4] => $this->getActType(),
+ $keys[5] => $this->getActIsForCompensation(),
+ $keys[6] => $this->getActStartQuantity(),
+ $keys[7] => $this->getActCompletionQuantity(),
+ $keys[8] => $this->getActTaskType(),
+ $keys[9] => $this->getActImplementation(),
+ $keys[10] => $this->getActInstantiate(),
+ $keys[11] => $this->getActScriptType(),
+ $keys[12] => $this->getActScript(),
+ $keys[13] => $this->getActLoopType(),
+ $keys[14] => $this->getActTestBefore(),
+ $keys[15] => $this->getActLoopMaximum(),
+ $keys[16] => $this->getActLoopCondition(),
+ $keys[17] => $this->getActLoopCardinality(),
+ $keys[18] => $this->getActLoopBehavior(),
+ $keys[19] => $this->getActIsAdhoc(),
+ $keys[20] => $this->getActIsCollapsed(),
+ $keys[21] => $this->getActCompletionCondition(),
+ $keys[22] => $this->getActOrdering(),
+ $keys[23] => $this->getActCancelRemainingInstances(),
+ $keys[24] => $this->getActProtocol(),
+ $keys[25] => $this->getActMethod(),
+ $keys[26] => $this->getActIsGlobal(),
+ $keys[27] => $this->getActReferer(),
+ $keys[28] => $this->getActDefaultFlow(),
+ $keys[29] => $this->getActMasterDiagram(),
+ );
+ 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 = BpmnActivityPeer::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->setActUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setProUid($value);
+ break;
+ case 3:
+ $this->setActName($value);
+ break;
+ case 4:
+ $this->setActType($value);
+ break;
+ case 5:
+ $this->setActIsForCompensation($value);
+ break;
+ case 6:
+ $this->setActStartQuantity($value);
+ break;
+ case 7:
+ $this->setActCompletionQuantity($value);
+ break;
+ case 8:
+ $this->setActTaskType($value);
+ break;
+ case 9:
+ $this->setActImplementation($value);
+ break;
+ case 10:
+ $this->setActInstantiate($value);
+ break;
+ case 11:
+ $this->setActScriptType($value);
+ break;
+ case 12:
+ $this->setActScript($value);
+ break;
+ case 13:
+ $this->setActLoopType($value);
+ break;
+ case 14:
+ $this->setActTestBefore($value);
+ break;
+ case 15:
+ $this->setActLoopMaximum($value);
+ break;
+ case 16:
+ $this->setActLoopCondition($value);
+ break;
+ case 17:
+ $this->setActLoopCardinality($value);
+ break;
+ case 18:
+ $this->setActLoopBehavior($value);
+ break;
+ case 19:
+ $this->setActIsAdhoc($value);
+ break;
+ case 20:
+ $this->setActIsCollapsed($value);
+ break;
+ case 21:
+ $this->setActCompletionCondition($value);
+ break;
+ case 22:
+ $this->setActOrdering($value);
+ break;
+ case 23:
+ $this->setActCancelRemainingInstances($value);
+ break;
+ case 24:
+ $this->setActProtocol($value);
+ break;
+ case 25:
+ $this->setActMethod($value);
+ break;
+ case 26:
+ $this->setActIsGlobal($value);
+ break;
+ case 27:
+ $this->setActReferer($value);
+ break;
+ case 28:
+ $this->setActDefaultFlow($value);
+ break;
+ case 29:
+ $this->setActMasterDiagram($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 = BpmnActivityPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setActUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setProUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setActName($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setActType($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setActIsForCompensation($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setActStartQuantity($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setActCompletionQuantity($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setActTaskType($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setActImplementation($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setActInstantiate($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setActScriptType($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setActScript($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setActLoopType($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setActTestBefore($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setActLoopMaximum($arr[$keys[15]]);
+ }
+
+ if (array_key_exists($keys[16], $arr)) {
+ $this->setActLoopCondition($arr[$keys[16]]);
+ }
+
+ if (array_key_exists($keys[17], $arr)) {
+ $this->setActLoopCardinality($arr[$keys[17]]);
+ }
+
+ if (array_key_exists($keys[18], $arr)) {
+ $this->setActLoopBehavior($arr[$keys[18]]);
+ }
+
+ if (array_key_exists($keys[19], $arr)) {
+ $this->setActIsAdhoc($arr[$keys[19]]);
+ }
+
+ if (array_key_exists($keys[20], $arr)) {
+ $this->setActIsCollapsed($arr[$keys[20]]);
+ }
+
+ if (array_key_exists($keys[21], $arr)) {
+ $this->setActCompletionCondition($arr[$keys[21]]);
+ }
+
+ if (array_key_exists($keys[22], $arr)) {
+ $this->setActOrdering($arr[$keys[22]]);
+ }
+
+ if (array_key_exists($keys[23], $arr)) {
+ $this->setActCancelRemainingInstances($arr[$keys[23]]);
+ }
+
+ if (array_key_exists($keys[24], $arr)) {
+ $this->setActProtocol($arr[$keys[24]]);
+ }
+
+ if (array_key_exists($keys[25], $arr)) {
+ $this->setActMethod($arr[$keys[25]]);
+ }
+
+ if (array_key_exists($keys[26], $arr)) {
+ $this->setActIsGlobal($arr[$keys[26]]);
+ }
+
+ if (array_key_exists($keys[27], $arr)) {
+ $this->setActReferer($arr[$keys[27]]);
+ }
+
+ if (array_key_exists($keys[28], $arr)) {
+ $this->setActDefaultFlow($arr[$keys[28]]);
+ }
+
+ if (array_key_exists($keys[29], $arr)) {
+ $this->setActMasterDiagram($arr[$keys[29]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnActivityPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_UID)) {
+ $criteria->add(BpmnActivityPeer::ACT_UID, $this->act_uid);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::PRJ_UID)) {
+ $criteria->add(BpmnActivityPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::PRO_UID)) {
+ $criteria->add(BpmnActivityPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_NAME)) {
+ $criteria->add(BpmnActivityPeer::ACT_NAME, $this->act_name);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_TYPE)) {
+ $criteria->add(BpmnActivityPeer::ACT_TYPE, $this->act_type);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_IS_FOR_COMPENSATION)) {
+ $criteria->add(BpmnActivityPeer::ACT_IS_FOR_COMPENSATION, $this->act_is_for_compensation);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_START_QUANTITY)) {
+ $criteria->add(BpmnActivityPeer::ACT_START_QUANTITY, $this->act_start_quantity);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_COMPLETION_QUANTITY)) {
+ $criteria->add(BpmnActivityPeer::ACT_COMPLETION_QUANTITY, $this->act_completion_quantity);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_TASK_TYPE)) {
+ $criteria->add(BpmnActivityPeer::ACT_TASK_TYPE, $this->act_task_type);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_IMPLEMENTATION)) {
+ $criteria->add(BpmnActivityPeer::ACT_IMPLEMENTATION, $this->act_implementation);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_INSTANTIATE)) {
+ $criteria->add(BpmnActivityPeer::ACT_INSTANTIATE, $this->act_instantiate);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_SCRIPT_TYPE)) {
+ $criteria->add(BpmnActivityPeer::ACT_SCRIPT_TYPE, $this->act_script_type);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_SCRIPT)) {
+ $criteria->add(BpmnActivityPeer::ACT_SCRIPT, $this->act_script);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_LOOP_TYPE)) {
+ $criteria->add(BpmnActivityPeer::ACT_LOOP_TYPE, $this->act_loop_type);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_TEST_BEFORE)) {
+ $criteria->add(BpmnActivityPeer::ACT_TEST_BEFORE, $this->act_test_before);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_LOOP_MAXIMUM)) {
+ $criteria->add(BpmnActivityPeer::ACT_LOOP_MAXIMUM, $this->act_loop_maximum);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_LOOP_CONDITION)) {
+ $criteria->add(BpmnActivityPeer::ACT_LOOP_CONDITION, $this->act_loop_condition);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_LOOP_CARDINALITY)) {
+ $criteria->add(BpmnActivityPeer::ACT_LOOP_CARDINALITY, $this->act_loop_cardinality);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_LOOP_BEHAVIOR)) {
+ $criteria->add(BpmnActivityPeer::ACT_LOOP_BEHAVIOR, $this->act_loop_behavior);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_IS_ADHOC)) {
+ $criteria->add(BpmnActivityPeer::ACT_IS_ADHOC, $this->act_is_adhoc);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_IS_COLLAPSED)) {
+ $criteria->add(BpmnActivityPeer::ACT_IS_COLLAPSED, $this->act_is_collapsed);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_COMPLETION_CONDITION)) {
+ $criteria->add(BpmnActivityPeer::ACT_COMPLETION_CONDITION, $this->act_completion_condition);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_ORDERING)) {
+ $criteria->add(BpmnActivityPeer::ACT_ORDERING, $this->act_ordering);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_CANCEL_REMAINING_INSTANCES)) {
+ $criteria->add(BpmnActivityPeer::ACT_CANCEL_REMAINING_INSTANCES, $this->act_cancel_remaining_instances);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_PROTOCOL)) {
+ $criteria->add(BpmnActivityPeer::ACT_PROTOCOL, $this->act_protocol);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_METHOD)) {
+ $criteria->add(BpmnActivityPeer::ACT_METHOD, $this->act_method);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_IS_GLOBAL)) {
+ $criteria->add(BpmnActivityPeer::ACT_IS_GLOBAL, $this->act_is_global);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_REFERER)) {
+ $criteria->add(BpmnActivityPeer::ACT_REFERER, $this->act_referer);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_DEFAULT_FLOW)) {
+ $criteria->add(BpmnActivityPeer::ACT_DEFAULT_FLOW, $this->act_default_flow);
+ }
+
+ if ($this->isColumnModified(BpmnActivityPeer::ACT_MASTER_DIAGRAM)) {
+ $criteria->add(BpmnActivityPeer::ACT_MASTER_DIAGRAM, $this->act_master_diagram);
+ }
+
+
+ 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(BpmnActivityPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnActivity (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->setActUid($this->act_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setActName($this->act_name);
+
+ $copyObj->setActType($this->act_type);
+
+ $copyObj->setActIsForCompensation($this->act_is_for_compensation);
+
+ $copyObj->setActStartQuantity($this->act_start_quantity);
+
+ $copyObj->setActCompletionQuantity($this->act_completion_quantity);
+
+ $copyObj->setActTaskType($this->act_task_type);
+
+ $copyObj->setActImplementation($this->act_implementation);
+
+ $copyObj->setActInstantiate($this->act_instantiate);
+
+ $copyObj->setActScriptType($this->act_script_type);
+
+ $copyObj->setActScript($this->act_script);
+
+ $copyObj->setActLoopType($this->act_loop_type);
+
+ $copyObj->setActTestBefore($this->act_test_before);
+
+ $copyObj->setActLoopMaximum($this->act_loop_maximum);
+
+ $copyObj->setActLoopCondition($this->act_loop_condition);
+
+ $copyObj->setActLoopCardinality($this->act_loop_cardinality);
+
+ $copyObj->setActLoopBehavior($this->act_loop_behavior);
+
+ $copyObj->setActIsAdhoc($this->act_is_adhoc);
+
+ $copyObj->setActIsCollapsed($this->act_is_collapsed);
+
+ $copyObj->setActCompletionCondition($this->act_completion_condition);
+
+ $copyObj->setActOrdering($this->act_ordering);
+
+ $copyObj->setActCancelRemainingInstances($this->act_cancel_remaining_instances);
+
+ $copyObj->setActProtocol($this->act_protocol);
+
+ $copyObj->setActMethod($this->act_method);
+
+ $copyObj->setActIsGlobal($this->act_is_global);
+
+ $copyObj->setActReferer($this->act_referer);
+
+ $copyObj->setActDefaultFlow($this->act_default_flow);
+
+ $copyObj->setActMasterDiagram($this->act_master_diagram);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnActivity 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 BpmnActivityPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnActivityPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid('');
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProcess object.
+ *
+ * @param BpmnProcess $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProcess($v)
+ {
+
+
+ if ($v === null) {
+ $this->setProUid('');
+ } else {
+ $this->setProUid($v->getProUid());
+ }
+
+
+ $this->aBpmnProcess = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProcess object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProcess The associated BpmnProcess object.
+ * @throws PropelException
+ */
+ public function getBpmnProcess($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+
+ if ($this->aBpmnProcess === null && (($this->pro_uid !== "" && $this->pro_uid !== null))) {
+
+ $this->aBpmnProcess = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+ $obj->addBpmnProcesss($this);
+ */
+ }
+ return $this->aBpmnProcess;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnActivityPeer.php b/workflow/engine/classes/model/om/BaseBpmnActivityPeer.php
new file mode 100644
index 000000000..412be2c29
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnActivityPeer.php
@@ -0,0 +1,1217 @@
+ array ('ActUid', 'PrjUid', 'ProUid', 'ActName', 'ActType', 'ActIsForCompensation', 'ActStartQuantity', 'ActCompletionQuantity', 'ActTaskType', 'ActImplementation', 'ActInstantiate', 'ActScriptType', 'ActScript', 'ActLoopType', 'ActTestBefore', 'ActLoopMaximum', 'ActLoopCondition', 'ActLoopCardinality', 'ActLoopBehavior', 'ActIsAdhoc', 'ActIsCollapsed', 'ActCompletionCondition', 'ActOrdering', 'ActCancelRemainingInstances', 'ActProtocol', 'ActMethod', 'ActIsGlobal', 'ActReferer', 'ActDefaultFlow', 'ActMasterDiagram', ),
+ BasePeer::TYPE_COLNAME => array (BpmnActivityPeer::ACT_UID, BpmnActivityPeer::PRJ_UID, BpmnActivityPeer::PRO_UID, BpmnActivityPeer::ACT_NAME, BpmnActivityPeer::ACT_TYPE, BpmnActivityPeer::ACT_IS_FOR_COMPENSATION, BpmnActivityPeer::ACT_START_QUANTITY, BpmnActivityPeer::ACT_COMPLETION_QUANTITY, BpmnActivityPeer::ACT_TASK_TYPE, BpmnActivityPeer::ACT_IMPLEMENTATION, BpmnActivityPeer::ACT_INSTANTIATE, BpmnActivityPeer::ACT_SCRIPT_TYPE, BpmnActivityPeer::ACT_SCRIPT, BpmnActivityPeer::ACT_LOOP_TYPE, BpmnActivityPeer::ACT_TEST_BEFORE, BpmnActivityPeer::ACT_LOOP_MAXIMUM, BpmnActivityPeer::ACT_LOOP_CONDITION, BpmnActivityPeer::ACT_LOOP_CARDINALITY, BpmnActivityPeer::ACT_LOOP_BEHAVIOR, BpmnActivityPeer::ACT_IS_ADHOC, BpmnActivityPeer::ACT_IS_COLLAPSED, BpmnActivityPeer::ACT_COMPLETION_CONDITION, BpmnActivityPeer::ACT_ORDERING, BpmnActivityPeer::ACT_CANCEL_REMAINING_INSTANCES, BpmnActivityPeer::ACT_PROTOCOL, BpmnActivityPeer::ACT_METHOD, BpmnActivityPeer::ACT_IS_GLOBAL, BpmnActivityPeer::ACT_REFERER, BpmnActivityPeer::ACT_DEFAULT_FLOW, BpmnActivityPeer::ACT_MASTER_DIAGRAM, ),
+ BasePeer::TYPE_FIELDNAME => array ('ACT_UID', 'PRJ_UID', 'PRO_UID', 'ACT_NAME', 'ACT_TYPE', 'ACT_IS_FOR_COMPENSATION', 'ACT_START_QUANTITY', 'ACT_COMPLETION_QUANTITY', 'ACT_TASK_TYPE', 'ACT_IMPLEMENTATION', 'ACT_INSTANTIATE', 'ACT_SCRIPT_TYPE', 'ACT_SCRIPT', 'ACT_LOOP_TYPE', 'ACT_TEST_BEFORE', 'ACT_LOOP_MAXIMUM', 'ACT_LOOP_CONDITION', 'ACT_LOOP_CARDINALITY', 'ACT_LOOP_BEHAVIOR', 'ACT_IS_ADHOC', 'ACT_IS_COLLAPSED', 'ACT_COMPLETION_CONDITION', 'ACT_ORDERING', 'ACT_CANCEL_REMAINING_INSTANCES', 'ACT_PROTOCOL', 'ACT_METHOD', 'ACT_IS_GLOBAL', 'ACT_REFERER', 'ACT_DEFAULT_FLOW', 'ACT_MASTER_DIAGRAM', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, )
+ );
+
+ /**
+ * 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 ('ActUid' => 0, 'PrjUid' => 1, 'ProUid' => 2, 'ActName' => 3, 'ActType' => 4, 'ActIsForCompensation' => 5, 'ActStartQuantity' => 6, 'ActCompletionQuantity' => 7, 'ActTaskType' => 8, 'ActImplementation' => 9, 'ActInstantiate' => 10, 'ActScriptType' => 11, 'ActScript' => 12, 'ActLoopType' => 13, 'ActTestBefore' => 14, 'ActLoopMaximum' => 15, 'ActLoopCondition' => 16, 'ActLoopCardinality' => 17, 'ActLoopBehavior' => 18, 'ActIsAdhoc' => 19, 'ActIsCollapsed' => 20, 'ActCompletionCondition' => 21, 'ActOrdering' => 22, 'ActCancelRemainingInstances' => 23, 'ActProtocol' => 24, 'ActMethod' => 25, 'ActIsGlobal' => 26, 'ActReferer' => 27, 'ActDefaultFlow' => 28, 'ActMasterDiagram' => 29, ),
+ BasePeer::TYPE_COLNAME => array (BpmnActivityPeer::ACT_UID => 0, BpmnActivityPeer::PRJ_UID => 1, BpmnActivityPeer::PRO_UID => 2, BpmnActivityPeer::ACT_NAME => 3, BpmnActivityPeer::ACT_TYPE => 4, BpmnActivityPeer::ACT_IS_FOR_COMPENSATION => 5, BpmnActivityPeer::ACT_START_QUANTITY => 6, BpmnActivityPeer::ACT_COMPLETION_QUANTITY => 7, BpmnActivityPeer::ACT_TASK_TYPE => 8, BpmnActivityPeer::ACT_IMPLEMENTATION => 9, BpmnActivityPeer::ACT_INSTANTIATE => 10, BpmnActivityPeer::ACT_SCRIPT_TYPE => 11, BpmnActivityPeer::ACT_SCRIPT => 12, BpmnActivityPeer::ACT_LOOP_TYPE => 13, BpmnActivityPeer::ACT_TEST_BEFORE => 14, BpmnActivityPeer::ACT_LOOP_MAXIMUM => 15, BpmnActivityPeer::ACT_LOOP_CONDITION => 16, BpmnActivityPeer::ACT_LOOP_CARDINALITY => 17, BpmnActivityPeer::ACT_LOOP_BEHAVIOR => 18, BpmnActivityPeer::ACT_IS_ADHOC => 19, BpmnActivityPeer::ACT_IS_COLLAPSED => 20, BpmnActivityPeer::ACT_COMPLETION_CONDITION => 21, BpmnActivityPeer::ACT_ORDERING => 22, BpmnActivityPeer::ACT_CANCEL_REMAINING_INSTANCES => 23, BpmnActivityPeer::ACT_PROTOCOL => 24, BpmnActivityPeer::ACT_METHOD => 25, BpmnActivityPeer::ACT_IS_GLOBAL => 26, BpmnActivityPeer::ACT_REFERER => 27, BpmnActivityPeer::ACT_DEFAULT_FLOW => 28, BpmnActivityPeer::ACT_MASTER_DIAGRAM => 29, ),
+ BasePeer::TYPE_FIELDNAME => array ('ACT_UID' => 0, 'PRJ_UID' => 1, 'PRO_UID' => 2, 'ACT_NAME' => 3, 'ACT_TYPE' => 4, 'ACT_IS_FOR_COMPENSATION' => 5, 'ACT_START_QUANTITY' => 6, 'ACT_COMPLETION_QUANTITY' => 7, 'ACT_TASK_TYPE' => 8, 'ACT_IMPLEMENTATION' => 9, 'ACT_INSTANTIATE' => 10, 'ACT_SCRIPT_TYPE' => 11, 'ACT_SCRIPT' => 12, 'ACT_LOOP_TYPE' => 13, 'ACT_TEST_BEFORE' => 14, 'ACT_LOOP_MAXIMUM' => 15, 'ACT_LOOP_CONDITION' => 16, 'ACT_LOOP_CARDINALITY' => 17, 'ACT_LOOP_BEHAVIOR' => 18, 'ACT_IS_ADHOC' => 19, 'ACT_IS_COLLAPSED' => 20, 'ACT_COMPLETION_CONDITION' => 21, 'ACT_ORDERING' => 22, 'ACT_CANCEL_REMAINING_INSTANCES' => 23, 'ACT_PROTOCOL' => 24, 'ACT_METHOD' => 25, 'ACT_IS_GLOBAL' => 26, 'ACT_REFERER' => 27, 'ACT_DEFAULT_FLOW' => 28, 'ACT_MASTER_DIAGRAM' => 29, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, )
+ );
+
+ /**
+ * @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/BpmnActivityMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnActivityMapBuilder');
+ }
+ /**
+ * 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 = BpmnActivityPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnActivityPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnActivityPeer::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(BpmnActivityPeer::ACT_UID);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_NAME);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_TYPE);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_IS_FOR_COMPENSATION);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_START_QUANTITY);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_COMPLETION_QUANTITY);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_TASK_TYPE);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_IMPLEMENTATION);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_INSTANTIATE);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_SCRIPT_TYPE);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_SCRIPT);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_LOOP_TYPE);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_TEST_BEFORE);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_LOOP_MAXIMUM);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_LOOP_CONDITION);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_LOOP_CARDINALITY);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_LOOP_BEHAVIOR);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_IS_ADHOC);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_IS_COLLAPSED);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_COMPLETION_CONDITION);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_ORDERING);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_CANCEL_REMAINING_INSTANCES);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_PROTOCOL);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_METHOD);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_IS_GLOBAL);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_REFERER);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_DEFAULT_FLOW);
+
+ $criteria->addSelectColumn(BpmnActivityPeer::ACT_MASTER_DIAGRAM);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnActivityPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnActivityPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnActivityPeer::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 BpmnActivity
+ * @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 = BpmnActivityPeer::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 BpmnActivityPeer::populateObjects(BpmnActivityPeer::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;
+ BpmnActivityPeer::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 = BpmnActivityPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnActivityPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnActivityPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnActivityPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnActivityPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProcess(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(BpmnActivityPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnActivityPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnActivityPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnActivityPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnActivity objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnActivity objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnActivityPeer::addSelectColumns($c);
+ $startcol = (BpmnActivityPeer::NUM_COLUMNS - BpmnActivityPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnActivityPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnActivityPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnActivity($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnActivitys();
+ $obj2->addBpmnActivity($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnActivity objects pre-filled with their BpmnProcess objects.
+ *
+ * @return array Array of BpmnActivity objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnActivityPeer::addSelectColumns($c);
+ $startcol = (BpmnActivityPeer::NUM_COLUMNS - BpmnActivityPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProcessPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnActivityPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnActivityPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnActivity($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnActivitys();
+ $obj2->addBpmnActivity($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnActivityPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnActivityPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnActivityPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnActivityPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnActivityPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnActivity objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnActivity objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnActivityPeer::addSelectColumns($c);
+ $startcol2 = (BpmnActivityPeer::NUM_COLUMNS - BpmnActivityPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnActivityPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnActivityPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnActivityPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnActivity($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnActivitys();
+ $obj2->addBpmnActivity($obj1);
+ }
+
+
+ // Add objects for joined BpmnProcess rows
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnProcess(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnActivity($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnActivitys();
+ $obj3->addBpmnActivity($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnActivityPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnActivityPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnActivityPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnActivityPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProcess(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(BpmnActivityPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnActivityPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnActivityPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnActivityPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnActivity objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnActivity objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnActivityPeer::addSelectColumns($c);
+ $startcol2 = (BpmnActivityPeer::NUM_COLUMNS - BpmnActivityPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnActivityPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnActivityPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnActivity($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnActivitys();
+ $obj2->addBpmnActivity($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnActivity objects pre-filled with all related objects except BpmnProcess.
+ *
+ * @return array Array of BpmnActivity objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnActivityPeer::addSelectColumns($c);
+ $startcol2 = (BpmnActivityPeer::NUM_COLUMNS - BpmnActivityPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnActivityPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnActivityPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnActivity($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnActivitys();
+ $obj2->addBpmnActivity($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnActivityPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnActivity or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnActivity 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 BpmnActivity 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 BpmnActivity or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnActivity 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
+
+ } 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 BPMN_ACTIVITY 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(BpmnActivityPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnActivity or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnActivity 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(BpmnActivityPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnActivity) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnActivity 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 BpmnActivity $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(BpmnActivity $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnActivityPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnActivityPeer::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(BpmnActivityPeer::DATABASE_NAME, BpmnActivityPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnActivityPeer::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/BpmnActivityMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnActivityMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnArtifact.php b/workflow/engine/classes/model/om/BaseBpmnArtifact.php
new file mode 100644
index 000000000..2679df62a
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnArtifact.php
@@ -0,0 +1,961 @@
+art_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [art_type] column value.
+ *
+ * @return string
+ */
+ public function getArtType()
+ {
+
+ return $this->art_type;
+ }
+
+ /**
+ * Get the [art_name] column value.
+ *
+ * @return string
+ */
+ public function getArtName()
+ {
+
+ return $this->art_name;
+ }
+
+ /**
+ * Get the [art_category_ref] column value.
+ *
+ * @return string
+ */
+ public function getArtCategoryRef()
+ {
+
+ return $this->art_category_ref;
+ }
+
+ /**
+ * Set the value of [art_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setArtUid($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->art_uid !== $v || $v === '') {
+ $this->art_uid = $v;
+ $this->modifiedColumns[] = BpmnArtifactPeer::ART_UID;
+ }
+
+ } // setArtUid()
+
+ /**
+ * 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[] = BpmnArtifactPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnArtifactPeer::PRO_UID;
+ }
+
+ if ($this->aBpmnProcess !== null && $this->aBpmnProcess->getProUid() !== $v) {
+ $this->aBpmnProcess = null;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [art_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setArtType($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->art_type !== $v) {
+ $this->art_type = $v;
+ $this->modifiedColumns[] = BpmnArtifactPeer::ART_TYPE;
+ }
+
+ } // setArtType()
+
+ /**
+ * Set the value of [art_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setArtName($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->art_name !== $v) {
+ $this->art_name = $v;
+ $this->modifiedColumns[] = BpmnArtifactPeer::ART_NAME;
+ }
+
+ } // setArtName()
+
+ /**
+ * Set the value of [art_category_ref] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setArtCategoryRef($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->art_category_ref !== $v) {
+ $this->art_category_ref = $v;
+ $this->modifiedColumns[] = BpmnArtifactPeer::ART_CATEGORY_REF;
+ }
+
+ } // setArtCategoryRef()
+
+ /**
+ * 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->art_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->pro_uid = $rs->getString($startcol + 2);
+
+ $this->art_type = $rs->getString($startcol + 3);
+
+ $this->art_name = $rs->getString($startcol + 4);
+
+ $this->art_category_ref = $rs->getString($startcol + 5);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 6; // 6 = BpmnArtifactPeer::NUM_COLUMNS - BpmnArtifactPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnArtifact 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(BpmnArtifactPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnArtifactPeer::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(BpmnArtifactPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if ($this->aBpmnProcess->isModified()) {
+ $affectedRows += $this->aBpmnProcess->save($con);
+ }
+ $this->setBpmnProcess($this->aBpmnProcess);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnArtifactPeer::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 += BpmnArtifactPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if (!$this->aBpmnProcess->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProcess->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnArtifactPeer::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 = BpmnArtifactPeer::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->getArtUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getProUid();
+ break;
+ case 3:
+ return $this->getArtType();
+ break;
+ case 4:
+ return $this->getArtName();
+ break;
+ case 5:
+ return $this->getArtCategoryRef();
+ 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 = BpmnArtifactPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getArtUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getProUid(),
+ $keys[3] => $this->getArtType(),
+ $keys[4] => $this->getArtName(),
+ $keys[5] => $this->getArtCategoryRef(),
+ );
+ 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 = BpmnArtifactPeer::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->setArtUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setProUid($value);
+ break;
+ case 3:
+ $this->setArtType($value);
+ break;
+ case 4:
+ $this->setArtName($value);
+ break;
+ case 5:
+ $this->setArtCategoryRef($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 = BpmnArtifactPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setArtUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setProUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setArtType($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setArtName($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setArtCategoryRef($arr[$keys[5]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnArtifactPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnArtifactPeer::ART_UID)) {
+ $criteria->add(BpmnArtifactPeer::ART_UID, $this->art_uid);
+ }
+
+ if ($this->isColumnModified(BpmnArtifactPeer::PRJ_UID)) {
+ $criteria->add(BpmnArtifactPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnArtifactPeer::PRO_UID)) {
+ $criteria->add(BpmnArtifactPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnArtifactPeer::ART_TYPE)) {
+ $criteria->add(BpmnArtifactPeer::ART_TYPE, $this->art_type);
+ }
+
+ if ($this->isColumnModified(BpmnArtifactPeer::ART_NAME)) {
+ $criteria->add(BpmnArtifactPeer::ART_NAME, $this->art_name);
+ }
+
+ if ($this->isColumnModified(BpmnArtifactPeer::ART_CATEGORY_REF)) {
+ $criteria->add(BpmnArtifactPeer::ART_CATEGORY_REF, $this->art_category_ref);
+ }
+
+
+ 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(BpmnArtifactPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnArtifact (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->setArtUid($this->art_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setArtType($this->art_type);
+
+ $copyObj->setArtName($this->art_name);
+
+ $copyObj->setArtCategoryRef($this->art_category_ref);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnArtifact 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 BpmnArtifactPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnArtifactPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProcess object.
+ *
+ * @param BpmnProcess $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProcess($v)
+ {
+
+
+ if ($v === null) {
+ $this->setProUid('');
+ } else {
+ $this->setProUid($v->getProUid());
+ }
+
+
+ $this->aBpmnProcess = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProcess object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProcess The associated BpmnProcess object.
+ * @throws PropelException
+ */
+ public function getBpmnProcess($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+
+ if ($this->aBpmnProcess === null && (($this->pro_uid !== "" && $this->pro_uid !== null))) {
+
+ $this->aBpmnProcess = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+ $obj->addBpmnProcesss($this);
+ */
+ }
+ return $this->aBpmnProcess;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnArtifactPeer.php b/workflow/engine/classes/model/om/BaseBpmnArtifactPeer.php
new file mode 100644
index 000000000..9d49515c1
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnArtifactPeer.php
@@ -0,0 +1,1097 @@
+ array ('ArtUid', 'PrjUid', 'ProUid', 'ArtType', 'ArtName', 'ArtCategoryRef', ),
+ BasePeer::TYPE_COLNAME => array (BpmnArtifactPeer::ART_UID, BpmnArtifactPeer::PRJ_UID, BpmnArtifactPeer::PRO_UID, BpmnArtifactPeer::ART_TYPE, BpmnArtifactPeer::ART_NAME, BpmnArtifactPeer::ART_CATEGORY_REF, ),
+ BasePeer::TYPE_FIELDNAME => array ('ART_UID', 'PRJ_UID', 'PRO_UID', 'ART_TYPE', 'ART_NAME', 'ART_CATEGORY_REF', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
+ );
+
+ /**
+ * 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 ('ArtUid' => 0, 'PrjUid' => 1, 'ProUid' => 2, 'ArtType' => 3, 'ArtName' => 4, 'ArtCategoryRef' => 5, ),
+ BasePeer::TYPE_COLNAME => array (BpmnArtifactPeer::ART_UID => 0, BpmnArtifactPeer::PRJ_UID => 1, BpmnArtifactPeer::PRO_UID => 2, BpmnArtifactPeer::ART_TYPE => 3, BpmnArtifactPeer::ART_NAME => 4, BpmnArtifactPeer::ART_CATEGORY_REF => 5, ),
+ BasePeer::TYPE_FIELDNAME => array ('ART_UID' => 0, 'PRJ_UID' => 1, 'PRO_UID' => 2, 'ART_TYPE' => 3, 'ART_NAME' => 4, 'ART_CATEGORY_REF' => 5, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
+ );
+
+ /**
+ * @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/BpmnArtifactMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnArtifactMapBuilder');
+ }
+ /**
+ * 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 = BpmnArtifactPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnArtifactPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnArtifactPeer::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(BpmnArtifactPeer::ART_UID);
+
+ $criteria->addSelectColumn(BpmnArtifactPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnArtifactPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnArtifactPeer::ART_TYPE);
+
+ $criteria->addSelectColumn(BpmnArtifactPeer::ART_NAME);
+
+ $criteria->addSelectColumn(BpmnArtifactPeer::ART_CATEGORY_REF);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnArtifactPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnArtifactPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnArtifactPeer::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 BpmnArtifact
+ * @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 = BpmnArtifactPeer::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 BpmnArtifactPeer::populateObjects(BpmnArtifactPeer::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;
+ BpmnArtifactPeer::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 = BpmnArtifactPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnArtifactPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnArtifactPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnArtifactPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnArtifactPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProcess(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(BpmnArtifactPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnArtifactPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnArtifactPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnArtifactPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnArtifact objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnArtifact objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnArtifactPeer::addSelectColumns($c);
+ $startcol = (BpmnArtifactPeer::NUM_COLUMNS - BpmnArtifactPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnArtifactPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnArtifactPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnArtifact($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnArtifacts();
+ $obj2->addBpmnArtifact($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnArtifact objects pre-filled with their BpmnProcess objects.
+ *
+ * @return array Array of BpmnArtifact objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnArtifactPeer::addSelectColumns($c);
+ $startcol = (BpmnArtifactPeer::NUM_COLUMNS - BpmnArtifactPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProcessPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnArtifactPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnArtifactPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnArtifact($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnArtifacts();
+ $obj2->addBpmnArtifact($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnArtifactPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnArtifactPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnArtifactPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnArtifactPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnArtifactPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnArtifact objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnArtifact objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnArtifactPeer::addSelectColumns($c);
+ $startcol2 = (BpmnArtifactPeer::NUM_COLUMNS - BpmnArtifactPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnArtifactPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnArtifactPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnArtifactPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnArtifact($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnArtifacts();
+ $obj2->addBpmnArtifact($obj1);
+ }
+
+
+ // Add objects for joined BpmnProcess rows
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnProcess(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnArtifact($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnArtifacts();
+ $obj3->addBpmnArtifact($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnArtifactPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnArtifactPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnArtifactPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnArtifactPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProcess(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(BpmnArtifactPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnArtifactPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnArtifactPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnArtifactPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnArtifact objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnArtifact objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnArtifactPeer::addSelectColumns($c);
+ $startcol2 = (BpmnArtifactPeer::NUM_COLUMNS - BpmnArtifactPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnArtifactPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnArtifactPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnArtifact($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnArtifacts();
+ $obj2->addBpmnArtifact($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnArtifact objects pre-filled with all related objects except BpmnProcess.
+ *
+ * @return array Array of BpmnArtifact objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnArtifactPeer::addSelectColumns($c);
+ $startcol2 = (BpmnArtifactPeer::NUM_COLUMNS - BpmnArtifactPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnArtifactPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnArtifactPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnArtifact($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnArtifacts();
+ $obj2->addBpmnArtifact($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnArtifactPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnArtifact or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnArtifact 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 BpmnArtifact 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 BpmnArtifact or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnArtifact 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
+
+ } 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 BPMN_ARTIFACT 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(BpmnArtifactPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnArtifact or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnArtifact 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(BpmnArtifactPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnArtifact) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnArtifact 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 BpmnArtifact $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(BpmnArtifact $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnArtifactPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnArtifactPeer::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(BpmnArtifactPeer::DATABASE_NAME, BpmnArtifactPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnArtifactPeer::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/BpmnArtifactMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnArtifactMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnBound.php b/workflow/engine/classes/model/om/BaseBpmnBound.php
new file mode 100644
index 000000000..f98a192d8
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnBound.php
@@ -0,0 +1,1367 @@
+bou_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [dia_uid] column value.
+ *
+ * @return string
+ */
+ public function getDiaUid()
+ {
+
+ return $this->dia_uid;
+ }
+
+ /**
+ * Get the [element_uid] column value.
+ *
+ * @return string
+ */
+ public function getElementUid()
+ {
+
+ return $this->element_uid;
+ }
+
+ /**
+ * Get the [bou_element] column value.
+ *
+ * @return string
+ */
+ public function getBouElement()
+ {
+
+ return $this->bou_element;
+ }
+
+ /**
+ * Get the [bou_element_type] column value.
+ *
+ * @return string
+ */
+ public function getBouElementType()
+ {
+
+ return $this->bou_element_type;
+ }
+
+ /**
+ * Get the [bou_x] column value.
+ *
+ * @return int
+ */
+ public function getBouX()
+ {
+
+ return $this->bou_x;
+ }
+
+ /**
+ * Get the [bou_y] column value.
+ *
+ * @return int
+ */
+ public function getBouY()
+ {
+
+ return $this->bou_y;
+ }
+
+ /**
+ * Get the [bou_width] column value.
+ *
+ * @return int
+ */
+ public function getBouWidth()
+ {
+
+ return $this->bou_width;
+ }
+
+ /**
+ * Get the [bou_height] column value.
+ *
+ * @return int
+ */
+ public function getBouHeight()
+ {
+
+ return $this->bou_height;
+ }
+
+ /**
+ * Get the [bou_rel_position] column value.
+ *
+ * @return int
+ */
+ public function getBouRelPosition()
+ {
+
+ return $this->bou_rel_position;
+ }
+
+ /**
+ * Get the [bou_size_identical] column value.
+ *
+ * @return int
+ */
+ public function getBouSizeIdentical()
+ {
+
+ return $this->bou_size_identical;
+ }
+
+ /**
+ * Get the [bou_container] column value.
+ *
+ * @return string
+ */
+ public function getBouContainer()
+ {
+
+ return $this->bou_container;
+ }
+
+ /**
+ * Set the value of [bou_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setBouUid($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->bou_uid !== $v || $v === '') {
+ $this->bou_uid = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_UID;
+ }
+
+ } // setBouUid()
+
+ /**
+ * 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 || $v === '') {
+ $this->prj_uid = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [dia_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDiaUid($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->dia_uid !== $v || $v === '') {
+ $this->dia_uid = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::DIA_UID;
+ }
+
+ if ($this->aBpmnDiagram !== null && $this->aBpmnDiagram->getDiaUid() !== $v) {
+ $this->aBpmnDiagram = null;
+ }
+
+ } // setDiaUid()
+
+ /**
+ * Set the value of [element_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setElementUid($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->element_uid !== $v || $v === '') {
+ $this->element_uid = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::ELEMENT_UID;
+ }
+
+ } // setElementUid()
+
+ /**
+ * Set the value of [bou_element] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setBouElement($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->bou_element !== $v || $v === '') {
+ $this->bou_element = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_ELEMENT;
+ }
+
+ } // setBouElement()
+
+ /**
+ * Set the value of [bou_element_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setBouElementType($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->bou_element_type !== $v || $v === '') {
+ $this->bou_element_type = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_ELEMENT_TYPE;
+ }
+
+ } // setBouElementType()
+
+ /**
+ * Set the value of [bou_x] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setBouX($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->bou_x !== $v || $v === 0) {
+ $this->bou_x = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_X;
+ }
+
+ } // setBouX()
+
+ /**
+ * Set the value of [bou_y] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setBouY($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->bou_y !== $v || $v === 0) {
+ $this->bou_y = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_Y;
+ }
+
+ } // setBouY()
+
+ /**
+ * Set the value of [bou_width] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setBouWidth($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->bou_width !== $v || $v === 0) {
+ $this->bou_width = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_WIDTH;
+ }
+
+ } // setBouWidth()
+
+ /**
+ * Set the value of [bou_height] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setBouHeight($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->bou_height !== $v || $v === 0) {
+ $this->bou_height = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_HEIGHT;
+ }
+
+ } // setBouHeight()
+
+ /**
+ * Set the value of [bou_rel_position] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setBouRelPosition($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->bou_rel_position !== $v || $v === 0) {
+ $this->bou_rel_position = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_REL_POSITION;
+ }
+
+ } // setBouRelPosition()
+
+ /**
+ * Set the value of [bou_size_identical] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setBouSizeIdentical($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->bou_size_identical !== $v || $v === 0) {
+ $this->bou_size_identical = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_SIZE_IDENTICAL;
+ }
+
+ } // setBouSizeIdentical()
+
+ /**
+ * Set the value of [bou_container] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setBouContainer($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->bou_container !== $v || $v === '') {
+ $this->bou_container = $v;
+ $this->modifiedColumns[] = BpmnBoundPeer::BOU_CONTAINER;
+ }
+
+ } // setBouContainer()
+
+ /**
+ * 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->bou_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->dia_uid = $rs->getString($startcol + 2);
+
+ $this->element_uid = $rs->getString($startcol + 3);
+
+ $this->bou_element = $rs->getString($startcol + 4);
+
+ $this->bou_element_type = $rs->getString($startcol + 5);
+
+ $this->bou_x = $rs->getInt($startcol + 6);
+
+ $this->bou_y = $rs->getInt($startcol + 7);
+
+ $this->bou_width = $rs->getInt($startcol + 8);
+
+ $this->bou_height = $rs->getInt($startcol + 9);
+
+ $this->bou_rel_position = $rs->getInt($startcol + 10);
+
+ $this->bou_size_identical = $rs->getInt($startcol + 11);
+
+ $this->bou_container = $rs->getString($startcol + 12);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 13; // 13 = BpmnBoundPeer::NUM_COLUMNS - BpmnBoundPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnBound 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(BpmnBoundPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnBoundPeer::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(BpmnBoundPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnDiagram !== null) {
+ if ($this->aBpmnDiagram->isModified()) {
+ $affectedRows += $this->aBpmnDiagram->save($con);
+ }
+ $this->setBpmnDiagram($this->aBpmnDiagram);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnBoundPeer::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 += BpmnBoundPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnDiagram !== null) {
+ if (!$this->aBpmnDiagram->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnDiagram->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnBoundPeer::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 = BpmnBoundPeer::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->getBouUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getDiaUid();
+ break;
+ case 3:
+ return $this->getElementUid();
+ break;
+ case 4:
+ return $this->getBouElement();
+ break;
+ case 5:
+ return $this->getBouElementType();
+ break;
+ case 6:
+ return $this->getBouX();
+ break;
+ case 7:
+ return $this->getBouY();
+ break;
+ case 8:
+ return $this->getBouWidth();
+ break;
+ case 9:
+ return $this->getBouHeight();
+ break;
+ case 10:
+ return $this->getBouRelPosition();
+ break;
+ case 11:
+ return $this->getBouSizeIdentical();
+ break;
+ case 12:
+ return $this->getBouContainer();
+ 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 = BpmnBoundPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getBouUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getDiaUid(),
+ $keys[3] => $this->getElementUid(),
+ $keys[4] => $this->getBouElement(),
+ $keys[5] => $this->getBouElementType(),
+ $keys[6] => $this->getBouX(),
+ $keys[7] => $this->getBouY(),
+ $keys[8] => $this->getBouWidth(),
+ $keys[9] => $this->getBouHeight(),
+ $keys[10] => $this->getBouRelPosition(),
+ $keys[11] => $this->getBouSizeIdentical(),
+ $keys[12] => $this->getBouContainer(),
+ );
+ 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 = BpmnBoundPeer::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->setBouUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setDiaUid($value);
+ break;
+ case 3:
+ $this->setElementUid($value);
+ break;
+ case 4:
+ $this->setBouElement($value);
+ break;
+ case 5:
+ $this->setBouElementType($value);
+ break;
+ case 6:
+ $this->setBouX($value);
+ break;
+ case 7:
+ $this->setBouY($value);
+ break;
+ case 8:
+ $this->setBouWidth($value);
+ break;
+ case 9:
+ $this->setBouHeight($value);
+ break;
+ case 10:
+ $this->setBouRelPosition($value);
+ break;
+ case 11:
+ $this->setBouSizeIdentical($value);
+ break;
+ case 12:
+ $this->setBouContainer($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 = BpmnBoundPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setBouUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setDiaUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setElementUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setBouElement($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setBouElementType($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setBouX($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setBouY($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setBouWidth($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setBouHeight($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setBouRelPosition($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setBouSizeIdentical($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setBouContainer($arr[$keys[12]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnBoundPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_UID)) {
+ $criteria->add(BpmnBoundPeer::BOU_UID, $this->bou_uid);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::PRJ_UID)) {
+ $criteria->add(BpmnBoundPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::DIA_UID)) {
+ $criteria->add(BpmnBoundPeer::DIA_UID, $this->dia_uid);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::ELEMENT_UID)) {
+ $criteria->add(BpmnBoundPeer::ELEMENT_UID, $this->element_uid);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_ELEMENT)) {
+ $criteria->add(BpmnBoundPeer::BOU_ELEMENT, $this->bou_element);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_ELEMENT_TYPE)) {
+ $criteria->add(BpmnBoundPeer::BOU_ELEMENT_TYPE, $this->bou_element_type);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_X)) {
+ $criteria->add(BpmnBoundPeer::BOU_X, $this->bou_x);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_Y)) {
+ $criteria->add(BpmnBoundPeer::BOU_Y, $this->bou_y);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_WIDTH)) {
+ $criteria->add(BpmnBoundPeer::BOU_WIDTH, $this->bou_width);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_HEIGHT)) {
+ $criteria->add(BpmnBoundPeer::BOU_HEIGHT, $this->bou_height);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_REL_POSITION)) {
+ $criteria->add(BpmnBoundPeer::BOU_REL_POSITION, $this->bou_rel_position);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_SIZE_IDENTICAL)) {
+ $criteria->add(BpmnBoundPeer::BOU_SIZE_IDENTICAL, $this->bou_size_identical);
+ }
+
+ if ($this->isColumnModified(BpmnBoundPeer::BOU_CONTAINER)) {
+ $criteria->add(BpmnBoundPeer::BOU_CONTAINER, $this->bou_container);
+ }
+
+
+ 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(BpmnBoundPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnBound (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->setBouUid($this->bou_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setDiaUid($this->dia_uid);
+
+ $copyObj->setElementUid($this->element_uid);
+
+ $copyObj->setBouElement($this->bou_element);
+
+ $copyObj->setBouElementType($this->bou_element_type);
+
+ $copyObj->setBouX($this->bou_x);
+
+ $copyObj->setBouY($this->bou_y);
+
+ $copyObj->setBouWidth($this->bou_width);
+
+ $copyObj->setBouHeight($this->bou_height);
+
+ $copyObj->setBouRelPosition($this->bou_rel_position);
+
+ $copyObj->setBouSizeIdentical($this->bou_size_identical);
+
+ $copyObj->setBouContainer($this->bou_container);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnBound 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 BpmnBoundPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnBoundPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid('');
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnDiagram object.
+ *
+ * @param BpmnDiagram $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnDiagram($v)
+ {
+
+
+ if ($v === null) {
+ $this->setDiaUid('');
+ } else {
+ $this->setDiaUid($v->getDiaUid());
+ }
+
+
+ $this->aBpmnDiagram = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnDiagram object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnDiagram The associated BpmnDiagram object.
+ * @throws PropelException
+ */
+ public function getBpmnDiagram($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnDiagramPeer.php';
+
+ if ($this->aBpmnDiagram === null && (($this->dia_uid !== "" && $this->dia_uid !== null))) {
+
+ $this->aBpmnDiagram = BpmnDiagramPeer::retrieveByPK($this->dia_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnDiagramPeer::retrieveByPK($this->dia_uid, $con);
+ $obj->addBpmnDiagrams($this);
+ */
+ }
+ return $this->aBpmnDiagram;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnBoundPeer.php b/workflow/engine/classes/model/om/BaseBpmnBoundPeer.php
new file mode 100644
index 000000000..ca9e381b1
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnBoundPeer.php
@@ -0,0 +1,1132 @@
+ array ('BouUid', 'PrjUid', 'DiaUid', 'ElementUid', 'BouElement', 'BouElementType', 'BouX', 'BouY', 'BouWidth', 'BouHeight', 'BouRelPosition', 'BouSizeIdentical', 'BouContainer', ),
+ BasePeer::TYPE_COLNAME => array (BpmnBoundPeer::BOU_UID, BpmnBoundPeer::PRJ_UID, BpmnBoundPeer::DIA_UID, BpmnBoundPeer::ELEMENT_UID, BpmnBoundPeer::BOU_ELEMENT, BpmnBoundPeer::BOU_ELEMENT_TYPE, BpmnBoundPeer::BOU_X, BpmnBoundPeer::BOU_Y, BpmnBoundPeer::BOU_WIDTH, BpmnBoundPeer::BOU_HEIGHT, BpmnBoundPeer::BOU_REL_POSITION, BpmnBoundPeer::BOU_SIZE_IDENTICAL, BpmnBoundPeer::BOU_CONTAINER, ),
+ BasePeer::TYPE_FIELDNAME => array ('BOU_UID', 'PRJ_UID', 'DIA_UID', 'ELEMENT_UID', 'BOU_ELEMENT', 'BOU_ELEMENT_TYPE', 'BOU_X', 'BOU_Y', 'BOU_WIDTH', 'BOU_HEIGHT', 'BOU_REL_POSITION', 'BOU_SIZE_IDENTICAL', 'BOU_CONTAINER', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ );
+
+ /**
+ * 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 ('BouUid' => 0, 'PrjUid' => 1, 'DiaUid' => 2, 'ElementUid' => 3, 'BouElement' => 4, 'BouElementType' => 5, 'BouX' => 6, 'BouY' => 7, 'BouWidth' => 8, 'BouHeight' => 9, 'BouRelPosition' => 10, 'BouSizeIdentical' => 11, 'BouContainer' => 12, ),
+ BasePeer::TYPE_COLNAME => array (BpmnBoundPeer::BOU_UID => 0, BpmnBoundPeer::PRJ_UID => 1, BpmnBoundPeer::DIA_UID => 2, BpmnBoundPeer::ELEMENT_UID => 3, BpmnBoundPeer::BOU_ELEMENT => 4, BpmnBoundPeer::BOU_ELEMENT_TYPE => 5, BpmnBoundPeer::BOU_X => 6, BpmnBoundPeer::BOU_Y => 7, BpmnBoundPeer::BOU_WIDTH => 8, BpmnBoundPeer::BOU_HEIGHT => 9, BpmnBoundPeer::BOU_REL_POSITION => 10, BpmnBoundPeer::BOU_SIZE_IDENTICAL => 11, BpmnBoundPeer::BOU_CONTAINER => 12, ),
+ BasePeer::TYPE_FIELDNAME => array ('BOU_UID' => 0, 'PRJ_UID' => 1, 'DIA_UID' => 2, 'ELEMENT_UID' => 3, 'BOU_ELEMENT' => 4, 'BOU_ELEMENT_TYPE' => 5, 'BOU_X' => 6, 'BOU_Y' => 7, 'BOU_WIDTH' => 8, 'BOU_HEIGHT' => 9, 'BOU_REL_POSITION' => 10, 'BOU_SIZE_IDENTICAL' => 11, 'BOU_CONTAINER' => 12, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
+ );
+
+ /**
+ * @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/BpmnBoundMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnBoundMapBuilder');
+ }
+ /**
+ * 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 = BpmnBoundPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnBoundPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnBoundPeer::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(BpmnBoundPeer::BOU_UID);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::DIA_UID);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::ELEMENT_UID);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_ELEMENT);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_ELEMENT_TYPE);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_X);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_Y);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_WIDTH);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_HEIGHT);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_REL_POSITION);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_SIZE_IDENTICAL);
+
+ $criteria->addSelectColumn(BpmnBoundPeer::BOU_CONTAINER);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnBoundPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnBoundPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnBoundPeer::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 BpmnBound
+ * @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 = BpmnBoundPeer::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 BpmnBoundPeer::populateObjects(BpmnBoundPeer::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;
+ BpmnBoundPeer::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 = BpmnBoundPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnBoundPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnBoundPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnBoundPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnBoundPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnDiagram table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnDiagram(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(BpmnBoundPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnBoundPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnBoundPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BpmnBoundPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnBound objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnBound objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnBoundPeer::addSelectColumns($c);
+ $startcol = (BpmnBoundPeer::NUM_COLUMNS - BpmnBoundPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnBoundPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnBoundPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnBound($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnBounds();
+ $obj2->addBpmnBound($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnBound objects pre-filled with their BpmnDiagram objects.
+ *
+ * @return array Array of BpmnBound objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnDiagram(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnBoundPeer::addSelectColumns($c);
+ $startcol = (BpmnBoundPeer::NUM_COLUMNS - BpmnBoundPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnDiagramPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnBoundPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnBoundPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnDiagram(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnBound($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnBounds();
+ $obj2->addBpmnBound($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnBoundPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnBoundPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnBoundPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnBoundPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BpmnBoundPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnBound objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnBound objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnBoundPeer::addSelectColumns($c);
+ $startcol2 = (BpmnBoundPeer::NUM_COLUMNS - BpmnBoundPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnDiagramPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnDiagramPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnBoundPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnBoundPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnBoundPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnBound($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnBounds();
+ $obj2->addBpmnBound($obj1);
+ }
+
+
+ // Add objects for joined BpmnDiagram rows
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnDiagram(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnBound($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnBounds();
+ $obj3->addBpmnBound($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnBoundPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnBoundPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnBoundPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BpmnBoundPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnDiagram table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnDiagram(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(BpmnBoundPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnBoundPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnBoundPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnBoundPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnBound objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnBound objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnBoundPeer::addSelectColumns($c);
+ $startcol2 = (BpmnBoundPeer::NUM_COLUMNS - BpmnBoundPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnDiagramPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnDiagramPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnBoundPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnBoundPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnDiagram(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnBound($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnBounds();
+ $obj2->addBpmnBound($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnBound objects pre-filled with all related objects except BpmnDiagram.
+ *
+ * @return array Array of BpmnBound objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnDiagram(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnBoundPeer::addSelectColumns($c);
+ $startcol2 = (BpmnBoundPeer::NUM_COLUMNS - BpmnBoundPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnBoundPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnBoundPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnBound($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnBounds();
+ $obj2->addBpmnBound($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnBoundPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnBound or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnBound 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 BpmnBound 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 BpmnBound or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnBound 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
+
+ } 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 BPMN_BOUND 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(BpmnBoundPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnBound or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnBound 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(BpmnBoundPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnBound) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnBound 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 BpmnBound $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(BpmnBound $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnBoundPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnBoundPeer::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(BpmnBoundPeer::DATABASE_NAME, BpmnBoundPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnBoundPeer::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/BpmnBoundMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnBoundMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnData.php b/workflow/engine/classes/model/om/BaseBpmnData.php
new file mode 100644
index 000000000..2a97a3168
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnData.php
@@ -0,0 +1,1309 @@
+dat_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [dat_name] column value.
+ *
+ * @return string
+ */
+ public function getDatName()
+ {
+
+ return $this->dat_name;
+ }
+
+ /**
+ * Get the [dat_type] column value.
+ *
+ * @return string
+ */
+ public function getDatType()
+ {
+
+ return $this->dat_type;
+ }
+
+ /**
+ * Get the [dat_is_collection] column value.
+ *
+ * @return int
+ */
+ public function getDatIsCollection()
+ {
+
+ return $this->dat_is_collection;
+ }
+
+ /**
+ * Get the [dat_item_kind] column value.
+ *
+ * @return string
+ */
+ public function getDatItemKind()
+ {
+
+ return $this->dat_item_kind;
+ }
+
+ /**
+ * Get the [dat_capacity] column value.
+ *
+ * @return int
+ */
+ public function getDatCapacity()
+ {
+
+ return $this->dat_capacity;
+ }
+
+ /**
+ * Get the [dat_is_unlimited] column value.
+ *
+ * @return int
+ */
+ public function getDatIsUnlimited()
+ {
+
+ return $this->dat_is_unlimited;
+ }
+
+ /**
+ * Get the [dat_state] column value.
+ *
+ * @return string
+ */
+ public function getDatState()
+ {
+
+ return $this->dat_state;
+ }
+
+ /**
+ * Get the [dat_is_global] column value.
+ *
+ * @return int
+ */
+ public function getDatIsGlobal()
+ {
+
+ return $this->dat_is_global;
+ }
+
+ /**
+ * Get the [dat_object_ref] column value.
+ *
+ * @return string
+ */
+ public function getDatObjectRef()
+ {
+
+ return $this->dat_object_ref;
+ }
+
+ /**
+ * Set the value of [dat_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDatUid($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->dat_uid !== $v || $v === '') {
+ $this->dat_uid = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_UID;
+ }
+
+ } // setDatUid()
+
+ /**
+ * 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[] = BpmnDataPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::PRO_UID;
+ }
+
+ if ($this->aBpmnProcess !== null && $this->aBpmnProcess->getProUid() !== $v) {
+ $this->aBpmnProcess = null;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [dat_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDatName($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->dat_name !== $v) {
+ $this->dat_name = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_NAME;
+ }
+
+ } // setDatName()
+
+ /**
+ * Set the value of [dat_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDatType($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->dat_type !== $v) {
+ $this->dat_type = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_TYPE;
+ }
+
+ } // setDatType()
+
+ /**
+ * Set the value of [dat_is_collection] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDatIsCollection($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->dat_is_collection !== $v || $v === 0) {
+ $this->dat_is_collection = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_IS_COLLECTION;
+ }
+
+ } // setDatIsCollection()
+
+ /**
+ * Set the value of [dat_item_kind] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDatItemKind($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->dat_item_kind !== $v || $v === 'INFORMATION') {
+ $this->dat_item_kind = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_ITEM_KIND;
+ }
+
+ } // setDatItemKind()
+
+ /**
+ * Set the value of [dat_capacity] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDatCapacity($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->dat_capacity !== $v || $v === 0) {
+ $this->dat_capacity = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_CAPACITY;
+ }
+
+ } // setDatCapacity()
+
+ /**
+ * Set the value of [dat_is_unlimited] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDatIsUnlimited($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->dat_is_unlimited !== $v || $v === 0) {
+ $this->dat_is_unlimited = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_IS_UNLIMITED;
+ }
+
+ } // setDatIsUnlimited()
+
+ /**
+ * Set the value of [dat_state] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDatState($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->dat_state !== $v || $v === '') {
+ $this->dat_state = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_STATE;
+ }
+
+ } // setDatState()
+
+ /**
+ * Set the value of [dat_is_global] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDatIsGlobal($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->dat_is_global !== $v || $v === 0) {
+ $this->dat_is_global = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_IS_GLOBAL;
+ }
+
+ } // setDatIsGlobal()
+
+ /**
+ * Set the value of [dat_object_ref] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDatObjectRef($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->dat_object_ref !== $v || $v === '') {
+ $this->dat_object_ref = $v;
+ $this->modifiedColumns[] = BpmnDataPeer::DAT_OBJECT_REF;
+ }
+
+ } // setDatObjectRef()
+
+ /**
+ * 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->dat_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->pro_uid = $rs->getString($startcol + 2);
+
+ $this->dat_name = $rs->getString($startcol + 3);
+
+ $this->dat_type = $rs->getString($startcol + 4);
+
+ $this->dat_is_collection = $rs->getInt($startcol + 5);
+
+ $this->dat_item_kind = $rs->getString($startcol + 6);
+
+ $this->dat_capacity = $rs->getInt($startcol + 7);
+
+ $this->dat_is_unlimited = $rs->getInt($startcol + 8);
+
+ $this->dat_state = $rs->getString($startcol + 9);
+
+ $this->dat_is_global = $rs->getInt($startcol + 10);
+
+ $this->dat_object_ref = $rs->getString($startcol + 11);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 12; // 12 = BpmnDataPeer::NUM_COLUMNS - BpmnDataPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnData 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(BpmnDataPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnDataPeer::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(BpmnDataPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProcess !== null) {
+ if ($this->aBpmnProcess->isModified()) {
+ $affectedRows += $this->aBpmnProcess->save($con);
+ }
+ $this->setBpmnProcess($this->aBpmnProcess);
+ }
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnDataPeer::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 += BpmnDataPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProcess !== null) {
+ if (!$this->aBpmnProcess->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProcess->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnDataPeer::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 = BpmnDataPeer::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->getDatUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getProUid();
+ break;
+ case 3:
+ return $this->getDatName();
+ break;
+ case 4:
+ return $this->getDatType();
+ break;
+ case 5:
+ return $this->getDatIsCollection();
+ break;
+ case 6:
+ return $this->getDatItemKind();
+ break;
+ case 7:
+ return $this->getDatCapacity();
+ break;
+ case 8:
+ return $this->getDatIsUnlimited();
+ break;
+ case 9:
+ return $this->getDatState();
+ break;
+ case 10:
+ return $this->getDatIsGlobal();
+ break;
+ case 11:
+ return $this->getDatObjectRef();
+ 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 = BpmnDataPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getDatUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getProUid(),
+ $keys[3] => $this->getDatName(),
+ $keys[4] => $this->getDatType(),
+ $keys[5] => $this->getDatIsCollection(),
+ $keys[6] => $this->getDatItemKind(),
+ $keys[7] => $this->getDatCapacity(),
+ $keys[8] => $this->getDatIsUnlimited(),
+ $keys[9] => $this->getDatState(),
+ $keys[10] => $this->getDatIsGlobal(),
+ $keys[11] => $this->getDatObjectRef(),
+ );
+ 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 = BpmnDataPeer::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->setDatUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setProUid($value);
+ break;
+ case 3:
+ $this->setDatName($value);
+ break;
+ case 4:
+ $this->setDatType($value);
+ break;
+ case 5:
+ $this->setDatIsCollection($value);
+ break;
+ case 6:
+ $this->setDatItemKind($value);
+ break;
+ case 7:
+ $this->setDatCapacity($value);
+ break;
+ case 8:
+ $this->setDatIsUnlimited($value);
+ break;
+ case 9:
+ $this->setDatState($value);
+ break;
+ case 10:
+ $this->setDatIsGlobal($value);
+ break;
+ case 11:
+ $this->setDatObjectRef($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 = BpmnDataPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setDatUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setProUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setDatName($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setDatType($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setDatIsCollection($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setDatItemKind($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setDatCapacity($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setDatIsUnlimited($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setDatState($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setDatIsGlobal($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setDatObjectRef($arr[$keys[11]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnDataPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_UID)) {
+ $criteria->add(BpmnDataPeer::DAT_UID, $this->dat_uid);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::PRJ_UID)) {
+ $criteria->add(BpmnDataPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::PRO_UID)) {
+ $criteria->add(BpmnDataPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_NAME)) {
+ $criteria->add(BpmnDataPeer::DAT_NAME, $this->dat_name);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_TYPE)) {
+ $criteria->add(BpmnDataPeer::DAT_TYPE, $this->dat_type);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_IS_COLLECTION)) {
+ $criteria->add(BpmnDataPeer::DAT_IS_COLLECTION, $this->dat_is_collection);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_ITEM_KIND)) {
+ $criteria->add(BpmnDataPeer::DAT_ITEM_KIND, $this->dat_item_kind);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_CAPACITY)) {
+ $criteria->add(BpmnDataPeer::DAT_CAPACITY, $this->dat_capacity);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_IS_UNLIMITED)) {
+ $criteria->add(BpmnDataPeer::DAT_IS_UNLIMITED, $this->dat_is_unlimited);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_STATE)) {
+ $criteria->add(BpmnDataPeer::DAT_STATE, $this->dat_state);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_IS_GLOBAL)) {
+ $criteria->add(BpmnDataPeer::DAT_IS_GLOBAL, $this->dat_is_global);
+ }
+
+ if ($this->isColumnModified(BpmnDataPeer::DAT_OBJECT_REF)) {
+ $criteria->add(BpmnDataPeer::DAT_OBJECT_REF, $this->dat_object_ref);
+ }
+
+
+ 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(BpmnDataPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnData (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->setDatUid($this->dat_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setDatName($this->dat_name);
+
+ $copyObj->setDatType($this->dat_type);
+
+ $copyObj->setDatIsCollection($this->dat_is_collection);
+
+ $copyObj->setDatItemKind($this->dat_item_kind);
+
+ $copyObj->setDatCapacity($this->dat_capacity);
+
+ $copyObj->setDatIsUnlimited($this->dat_is_unlimited);
+
+ $copyObj->setDatState($this->dat_state);
+
+ $copyObj->setDatIsGlobal($this->dat_is_global);
+
+ $copyObj->setDatObjectRef($this->dat_object_ref);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnData 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 BpmnDataPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnDataPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProcess object.
+ *
+ * @param BpmnProcess $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProcess($v)
+ {
+
+
+ if ($v === null) {
+ $this->setProUid('');
+ } else {
+ $this->setProUid($v->getProUid());
+ }
+
+
+ $this->aBpmnProcess = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProcess object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProcess The associated BpmnProcess object.
+ * @throws PropelException
+ */
+ public function getBpmnProcess($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+
+ if ($this->aBpmnProcess === null && (($this->pro_uid !== "" && $this->pro_uid !== null))) {
+
+ $this->aBpmnProcess = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+ $obj->addBpmnProcesss($this);
+ */
+ }
+ return $this->aBpmnProcess;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnDataPeer.php b/workflow/engine/classes/model/om/BaseBpmnDataPeer.php
new file mode 100644
index 000000000..2ac1dfd84
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnDataPeer.php
@@ -0,0 +1,1127 @@
+ array ('DatUid', 'PrjUid', 'ProUid', 'DatName', 'DatType', 'DatIsCollection', 'DatItemKind', 'DatCapacity', 'DatIsUnlimited', 'DatState', 'DatIsGlobal', 'DatObjectRef', ),
+ BasePeer::TYPE_COLNAME => array (BpmnDataPeer::DAT_UID, BpmnDataPeer::PRJ_UID, BpmnDataPeer::PRO_UID, BpmnDataPeer::DAT_NAME, BpmnDataPeer::DAT_TYPE, BpmnDataPeer::DAT_IS_COLLECTION, BpmnDataPeer::DAT_ITEM_KIND, BpmnDataPeer::DAT_CAPACITY, BpmnDataPeer::DAT_IS_UNLIMITED, BpmnDataPeer::DAT_STATE, BpmnDataPeer::DAT_IS_GLOBAL, BpmnDataPeer::DAT_OBJECT_REF, ),
+ BasePeer::TYPE_FIELDNAME => array ('DAT_UID', 'PRJ_UID', 'PRO_UID', 'DAT_NAME', 'DAT_TYPE', 'DAT_IS_COLLECTION', 'DAT_ITEM_KIND', 'DAT_CAPACITY', 'DAT_IS_UNLIMITED', 'DAT_STATE', 'DAT_IS_GLOBAL', 'DAT_OBJECT_REF', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
+ );
+
+ /**
+ * 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 ('DatUid' => 0, 'PrjUid' => 1, 'ProUid' => 2, 'DatName' => 3, 'DatType' => 4, 'DatIsCollection' => 5, 'DatItemKind' => 6, 'DatCapacity' => 7, 'DatIsUnlimited' => 8, 'DatState' => 9, 'DatIsGlobal' => 10, 'DatObjectRef' => 11, ),
+ BasePeer::TYPE_COLNAME => array (BpmnDataPeer::DAT_UID => 0, BpmnDataPeer::PRJ_UID => 1, BpmnDataPeer::PRO_UID => 2, BpmnDataPeer::DAT_NAME => 3, BpmnDataPeer::DAT_TYPE => 4, BpmnDataPeer::DAT_IS_COLLECTION => 5, BpmnDataPeer::DAT_ITEM_KIND => 6, BpmnDataPeer::DAT_CAPACITY => 7, BpmnDataPeer::DAT_IS_UNLIMITED => 8, BpmnDataPeer::DAT_STATE => 9, BpmnDataPeer::DAT_IS_GLOBAL => 10, BpmnDataPeer::DAT_OBJECT_REF => 11, ),
+ BasePeer::TYPE_FIELDNAME => array ('DAT_UID' => 0, 'PRJ_UID' => 1, 'PRO_UID' => 2, 'DAT_NAME' => 3, 'DAT_TYPE' => 4, 'DAT_IS_COLLECTION' => 5, 'DAT_ITEM_KIND' => 6, 'DAT_CAPACITY' => 7, 'DAT_IS_UNLIMITED' => 8, 'DAT_STATE' => 9, 'DAT_IS_GLOBAL' => 10, 'DAT_OBJECT_REF' => 11, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
+ );
+
+ /**
+ * @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/BpmnDataMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnDataMapBuilder');
+ }
+ /**
+ * 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 = BpmnDataPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnDataPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnDataPeer::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(BpmnDataPeer::DAT_UID);
+
+ $criteria->addSelectColumn(BpmnDataPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnDataPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_NAME);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_TYPE);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_IS_COLLECTION);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_ITEM_KIND);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_CAPACITY);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_IS_UNLIMITED);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_STATE);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_IS_GLOBAL);
+
+ $criteria->addSelectColumn(BpmnDataPeer::DAT_OBJECT_REF);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnDataPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDataPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnDataPeer::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 BpmnData
+ * @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 = BpmnDataPeer::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 BpmnDataPeer::populateObjects(BpmnDataPeer::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;
+ BpmnDataPeer::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 = BpmnDataPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProcess(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(BpmnDataPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDataPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDataPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnDataPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnDataPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDataPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDataPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnDataPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnData objects pre-filled with their BpmnProcess objects.
+ *
+ * @return array Array of BpmnData objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDataPeer::addSelectColumns($c);
+ $startcol = (BpmnDataPeer::NUM_COLUMNS - BpmnDataPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProcessPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnDataPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDataPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnData($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnDatas();
+ $obj2->addBpmnData($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnData objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnData objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDataPeer::addSelectColumns($c);
+ $startcol = (BpmnDataPeer::NUM_COLUMNS - BpmnDataPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnDataPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDataPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnData($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnDatas();
+ $obj2->addBpmnData($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnDataPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDataPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDataPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $criteria->addJoin(BpmnDataPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnDataPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnData objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnData objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDataPeer::addSelectColumns($c);
+ $startcol2 = (BpmnDataPeer::NUM_COLUMNS - BpmnDataPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProcessPeer::NUM_COLUMNS;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnDataPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $c->addJoin(BpmnDataPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDataPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProcess rows
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnData($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnDatas();
+ $obj2->addBpmnData($obj1);
+ }
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnData($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnDatas();
+ $obj3->addBpmnData($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProcess(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(BpmnDataPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDataPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDataPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnDataPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnDataPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDataPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDataPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnDataPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnData objects pre-filled with all related objects except BpmnProcess.
+ *
+ * @return array Array of BpmnData objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDataPeer::addSelectColumns($c);
+ $startcol2 = (BpmnDataPeer::NUM_COLUMNS - BpmnDataPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnDataPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDataPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnData($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnDatas();
+ $obj2->addBpmnData($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnData objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnData objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDataPeer::addSelectColumns($c);
+ $startcol2 = (BpmnDataPeer::NUM_COLUMNS - BpmnDataPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnDataPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDataPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnData($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnDatas();
+ $obj2->addBpmnData($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnDataPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnData or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnData 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 BpmnData 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 BpmnData or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnData 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
+
+ } 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 BPMN_DATA 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(BpmnDataPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnData or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnData 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(BpmnDataPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnData) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnData 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 BpmnData $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(BpmnData $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnDataPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnDataPeer::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(BpmnDataPeer::DATABASE_NAME, BpmnDataPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnDataPeer::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/BpmnDataMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnDataMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnDiagram.php b/workflow/engine/classes/model/om/BaseBpmnDiagram.php
new file mode 100644
index 000000000..6d42d01d5
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnDiagram.php
@@ -0,0 +1,1156 @@
+dia_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [dia_name] column value.
+ *
+ * @return string
+ */
+ public function getDiaName()
+ {
+
+ return $this->dia_name;
+ }
+
+ /**
+ * Get the [dia_is_closable] column value.
+ *
+ * @return int
+ */
+ public function getDiaIsClosable()
+ {
+
+ return $this->dia_is_closable;
+ }
+
+ /**
+ * Set the value of [dia_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDiaUid($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->dia_uid !== $v || $v === '') {
+ $this->dia_uid = $v;
+ $this->modifiedColumns[] = BpmnDiagramPeer::DIA_UID;
+ }
+
+ } // setDiaUid()
+
+ /**
+ * 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[] = BpmnDiagramPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [dia_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDiaName($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->dia_name !== $v) {
+ $this->dia_name = $v;
+ $this->modifiedColumns[] = BpmnDiagramPeer::DIA_NAME;
+ }
+
+ } // setDiaName()
+
+ /**
+ * Set the value of [dia_is_closable] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDiaIsClosable($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->dia_is_closable !== $v || $v === 0) {
+ $this->dia_is_closable = $v;
+ $this->modifiedColumns[] = BpmnDiagramPeer::DIA_IS_CLOSABLE;
+ }
+
+ } // setDiaIsClosable()
+
+ /**
+ * 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->dia_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->dia_name = $rs->getString($startcol + 2);
+
+ $this->dia_is_closable = $rs->getInt($startcol + 3);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 4; // 4 = BpmnDiagramPeer::NUM_COLUMNS - BpmnDiagramPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnDiagram 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(BpmnDiagramPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnDiagramPeer::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(BpmnDiagramPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnDiagramPeer::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 += BpmnDiagramPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ if ($this->collBpmnBounds !== null) {
+ foreach($this->collBpmnBounds as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnFlows !== null) {
+ foreach($this->collBpmnFlows as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ $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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnDiagramPeer::doValidate($this, $columns)) !== true) {
+ $failureMap = array_merge($failureMap, $retval);
+ }
+
+
+ if ($this->collBpmnBounds !== null) {
+ foreach($this->collBpmnBounds as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnFlows !== null) {
+ foreach($this->collBpmnFlows as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+
+ $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 = BpmnDiagramPeer::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->getDiaUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getDiaName();
+ break;
+ case 3:
+ return $this->getDiaIsClosable();
+ 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 = BpmnDiagramPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getDiaUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getDiaName(),
+ $keys[3] => $this->getDiaIsClosable(),
+ );
+ 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 = BpmnDiagramPeer::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->setDiaUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setDiaName($value);
+ break;
+ case 3:
+ $this->setDiaIsClosable($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 = BpmnDiagramPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setDiaUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setDiaName($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setDiaIsClosable($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(BpmnDiagramPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnDiagramPeer::DIA_UID)) {
+ $criteria->add(BpmnDiagramPeer::DIA_UID, $this->dia_uid);
+ }
+
+ if ($this->isColumnModified(BpmnDiagramPeer::PRJ_UID)) {
+ $criteria->add(BpmnDiagramPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnDiagramPeer::DIA_NAME)) {
+ $criteria->add(BpmnDiagramPeer::DIA_NAME, $this->dia_name);
+ }
+
+ if ($this->isColumnModified(BpmnDiagramPeer::DIA_IS_CLOSABLE)) {
+ $criteria->add(BpmnDiagramPeer::DIA_IS_CLOSABLE, $this->dia_is_closable);
+ }
+
+
+ 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(BpmnDiagramPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnDiagram (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->setDiaUid($this->dia_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setDiaName($this->dia_name);
+
+ $copyObj->setDiaIsClosable($this->dia_is_closable);
+
+
+ if ($deepCopy) {
+ // important: temporarily setNew(false) because this affects the behavior of
+ // the getter/setter methods for fkey referrer objects.
+ $copyObj->setNew(false);
+
+ foreach($this->getBpmnBounds() as $relObj) {
+ $copyObj->addBpmnBound($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnFlows() as $relObj) {
+ $copyObj->addBpmnFlow($relObj->copy($deepCopy));
+ }
+
+ } // if ($deepCopy)
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnDiagram 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 BpmnDiagramPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnDiagramPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Temporary storage of collBpmnBounds to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnBounds()
+ {
+ if ($this->collBpmnBounds === null) {
+ $this->collBpmnBounds = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnDiagram has previously
+ * been saved, it will retrieve related BpmnBounds from storage.
+ * If this BpmnDiagram is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnBounds($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnBoundPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnBounds === null) {
+ if ($this->isNew()) {
+ $this->collBpmnBounds = array();
+ } else {
+
+ $criteria->add(BpmnBoundPeer::DIA_UID, $this->getDiaUid());
+
+ BpmnBoundPeer::addSelectColumns($criteria);
+ $this->collBpmnBounds = BpmnBoundPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnBoundPeer::DIA_UID, $this->getDiaUid());
+
+ BpmnBoundPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnBoundCriteria) || !$this->lastBpmnBoundCriteria->equals($criteria)) {
+ $this->collBpmnBounds = BpmnBoundPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnBoundCriteria = $criteria;
+ return $this->collBpmnBounds;
+ }
+
+ /**
+ * Returns the number of related BpmnBounds.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnBounds($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnBoundPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnBoundPeer::DIA_UID, $this->getDiaUid());
+
+ return BpmnBoundPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnBound object to this object
+ * through the BpmnBound foreign key attribute
+ *
+ * @param BpmnBound $l BpmnBound
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnBound(BpmnBound $l)
+ {
+ $this->collBpmnBounds[] = $l;
+ $l->setBpmnDiagram($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnDiagram is new, it will return
+ * an empty collection; or if this BpmnDiagram has previously
+ * been saved, it will retrieve related BpmnBounds from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnDiagram.
+ */
+ public function getBpmnBoundsJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnBoundPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnBounds === null) {
+ if ($this->isNew()) {
+ $this->collBpmnBounds = array();
+ } else {
+
+ $criteria->add(BpmnBoundPeer::DIA_UID, $this->getDiaUid());
+
+ $this->collBpmnBounds = BpmnBoundPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnBoundPeer::DIA_UID, $this->getDiaUid());
+
+ if (!isset($this->lastBpmnBoundCriteria) || !$this->lastBpmnBoundCriteria->equals($criteria)) {
+ $this->collBpmnBounds = BpmnBoundPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnBoundCriteria = $criteria;
+
+ return $this->collBpmnBounds;
+ }
+
+ /**
+ * Temporary storage of collBpmnFlows to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnFlows()
+ {
+ if ($this->collBpmnFlows === null) {
+ $this->collBpmnFlows = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnDiagram has previously
+ * been saved, it will retrieve related BpmnFlows from storage.
+ * If this BpmnDiagram is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnFlows($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnFlowPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnFlows === null) {
+ if ($this->isNew()) {
+ $this->collBpmnFlows = array();
+ } else {
+
+ $criteria->add(BpmnFlowPeer::DIA_UID, $this->getDiaUid());
+
+ BpmnFlowPeer::addSelectColumns($criteria);
+ $this->collBpmnFlows = BpmnFlowPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnFlowPeer::DIA_UID, $this->getDiaUid());
+
+ BpmnFlowPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnFlowCriteria) || !$this->lastBpmnFlowCriteria->equals($criteria)) {
+ $this->collBpmnFlows = BpmnFlowPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnFlowCriteria = $criteria;
+ return $this->collBpmnFlows;
+ }
+
+ /**
+ * Returns the number of related BpmnFlows.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnFlows($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnFlowPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnFlowPeer::DIA_UID, $this->getDiaUid());
+
+ return BpmnFlowPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnFlow object to this object
+ * through the BpmnFlow foreign key attribute
+ *
+ * @param BpmnFlow $l BpmnFlow
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnFlow(BpmnFlow $l)
+ {
+ $this->collBpmnFlows[] = $l;
+ $l->setBpmnDiagram($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnDiagram is new, it will return
+ * an empty collection; or if this BpmnDiagram has previously
+ * been saved, it will retrieve related BpmnFlows from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnDiagram.
+ */
+ public function getBpmnFlowsJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnFlowPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnFlows === null) {
+ if ($this->isNew()) {
+ $this->collBpmnFlows = array();
+ } else {
+
+ $criteria->add(BpmnFlowPeer::DIA_UID, $this->getDiaUid());
+
+ $this->collBpmnFlows = BpmnFlowPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnFlowPeer::DIA_UID, $this->getDiaUid());
+
+ if (!isset($this->lastBpmnFlowCriteria) || !$this->lastBpmnFlowCriteria->equals($criteria)) {
+ $this->collBpmnFlows = BpmnFlowPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnFlowCriteria = $criteria;
+
+ return $this->collBpmnFlows;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnDiagramPeer.php b/workflow/engine/classes/model/om/BaseBpmnDiagramPeer.php
new file mode 100644
index 000000000..37183df7a
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnDiagramPeer.php
@@ -0,0 +1,745 @@
+ array ('DiaUid', 'PrjUid', 'DiaName', 'DiaIsClosable', ),
+ BasePeer::TYPE_COLNAME => array (BpmnDiagramPeer::DIA_UID, BpmnDiagramPeer::PRJ_UID, BpmnDiagramPeer::DIA_NAME, BpmnDiagramPeer::DIA_IS_CLOSABLE, ),
+ BasePeer::TYPE_FIELDNAME => array ('DIA_UID', 'PRJ_UID', 'DIA_NAME', 'DIA_IS_CLOSABLE', ),
+ 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 ('DiaUid' => 0, 'PrjUid' => 1, 'DiaName' => 2, 'DiaIsClosable' => 3, ),
+ BasePeer::TYPE_COLNAME => array (BpmnDiagramPeer::DIA_UID => 0, BpmnDiagramPeer::PRJ_UID => 1, BpmnDiagramPeer::DIA_NAME => 2, BpmnDiagramPeer::DIA_IS_CLOSABLE => 3, ),
+ BasePeer::TYPE_FIELDNAME => array ('DIA_UID' => 0, 'PRJ_UID' => 1, 'DIA_NAME' => 2, 'DIA_IS_CLOSABLE' => 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/BpmnDiagramMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnDiagramMapBuilder');
+ }
+ /**
+ * 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 = BpmnDiagramPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnDiagramPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnDiagramPeer::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(BpmnDiagramPeer::DIA_UID);
+
+ $criteria->addSelectColumn(BpmnDiagramPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnDiagramPeer::DIA_NAME);
+
+ $criteria->addSelectColumn(BpmnDiagramPeer::DIA_IS_CLOSABLE);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnDiagramPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDiagramPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnDiagramPeer::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 BpmnDiagram
+ * @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 = BpmnDiagramPeer::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 BpmnDiagramPeer::populateObjects(BpmnDiagramPeer::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;
+ BpmnDiagramPeer::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 = BpmnDiagramPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnDiagramPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDiagramPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDiagramPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnDiagramPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnDiagram objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnDiagram objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDiagramPeer::addSelectColumns($c);
+ $startcol = (BpmnDiagramPeer::NUM_COLUMNS - BpmnDiagramPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnDiagramPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnDiagram($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnDiagrams();
+ $obj2->addBpmnDiagram($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnDiagramPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDiagramPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDiagramPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnDiagramPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnDiagram objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnDiagram objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDiagramPeer::addSelectColumns($c);
+ $startcol2 = (BpmnDiagramPeer::NUM_COLUMNS - BpmnDiagramPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnDiagramPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnDiagram($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnDiagrams();
+ $obj2->addBpmnDiagram($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnDiagramPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnDiagram or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnDiagram 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 BpmnDiagram 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 BpmnDiagram or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnDiagram 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
+
+ } 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 BPMN_DIAGRAM 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(BpmnDiagramPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnDiagram or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnDiagram 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(BpmnDiagramPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnDiagram) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnDiagram 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 BpmnDiagram $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(BpmnDiagram $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnDiagramPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnDiagramPeer::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(BpmnDiagramPeer::DATABASE_NAME, BpmnDiagramPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnDiagramPeer::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/BpmnDiagramMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnDiagramMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnDocumentation.php b/workflow/engine/classes/model/om/BaseBpmnDocumentation.php
new file mode 100644
index 000000000..960c35a73
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnDocumentation.php
@@ -0,0 +1,830 @@
+doc_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [doc_element] column value.
+ *
+ * @return string
+ */
+ public function getDocElement()
+ {
+
+ return $this->doc_element;
+ }
+
+ /**
+ * Get the [doc_element_type] column value.
+ *
+ * @return string
+ */
+ public function getDocElementType()
+ {
+
+ return $this->doc_element_type;
+ }
+
+ /**
+ * Get the [doc_documentation] column value.
+ *
+ * @return string
+ */
+ public function getDocDocumentation()
+ {
+
+ return $this->doc_documentation;
+ }
+
+ /**
+ * Set the value of [doc_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDocUid($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->doc_uid !== $v) {
+ $this->doc_uid = $v;
+ $this->modifiedColumns[] = BpmnDocumentationPeer::DOC_UID;
+ }
+
+ } // setDocUid()
+
+ /**
+ * 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[] = BpmnDocumentationPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [doc_element] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDocElement($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->doc_element !== $v) {
+ $this->doc_element = $v;
+ $this->modifiedColumns[] = BpmnDocumentationPeer::DOC_ELEMENT;
+ }
+
+ } // setDocElement()
+
+ /**
+ * Set the value of [doc_element_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDocElementType($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->doc_element_type !== $v) {
+ $this->doc_element_type = $v;
+ $this->modifiedColumns[] = BpmnDocumentationPeer::DOC_ELEMENT_TYPE;
+ }
+
+ } // setDocElementType()
+
+ /**
+ * Set the value of [doc_documentation] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDocDocumentation($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->doc_documentation !== $v) {
+ $this->doc_documentation = $v;
+ $this->modifiedColumns[] = BpmnDocumentationPeer::DOC_DOCUMENTATION;
+ }
+
+ } // setDocDocumentation()
+
+ /**
+ * 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->doc_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->doc_element = $rs->getString($startcol + 2);
+
+ $this->doc_element_type = $rs->getString($startcol + 3);
+
+ $this->doc_documentation = $rs->getString($startcol + 4);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 5; // 5 = BpmnDocumentationPeer::NUM_COLUMNS - BpmnDocumentationPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnDocumentation 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(BpmnDocumentationPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnDocumentationPeer::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(BpmnDocumentationPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnDocumentationPeer::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 += BpmnDocumentationPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnDocumentationPeer::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 = BpmnDocumentationPeer::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->getDocUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getDocElement();
+ break;
+ case 3:
+ return $this->getDocElementType();
+ break;
+ case 4:
+ return $this->getDocDocumentation();
+ 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 = BpmnDocumentationPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getDocUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getDocElement(),
+ $keys[3] => $this->getDocElementType(),
+ $keys[4] => $this->getDocDocumentation(),
+ );
+ 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 = BpmnDocumentationPeer::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->setDocUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setDocElement($value);
+ break;
+ case 3:
+ $this->setDocElementType($value);
+ break;
+ case 4:
+ $this->setDocDocumentation($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 = BpmnDocumentationPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setDocUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setDocElement($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setDocElementType($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setDocDocumentation($arr[$keys[4]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnDocumentationPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnDocumentationPeer::DOC_UID)) {
+ $criteria->add(BpmnDocumentationPeer::DOC_UID, $this->doc_uid);
+ }
+
+ if ($this->isColumnModified(BpmnDocumentationPeer::PRJ_UID)) {
+ $criteria->add(BpmnDocumentationPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnDocumentationPeer::DOC_ELEMENT)) {
+ $criteria->add(BpmnDocumentationPeer::DOC_ELEMENT, $this->doc_element);
+ }
+
+ if ($this->isColumnModified(BpmnDocumentationPeer::DOC_ELEMENT_TYPE)) {
+ $criteria->add(BpmnDocumentationPeer::DOC_ELEMENT_TYPE, $this->doc_element_type);
+ }
+
+ if ($this->isColumnModified(BpmnDocumentationPeer::DOC_DOCUMENTATION)) {
+ $criteria->add(BpmnDocumentationPeer::DOC_DOCUMENTATION, $this->doc_documentation);
+ }
+
+
+ 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(BpmnDocumentationPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnDocumentation (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->setDocUid($this->doc_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setDocElement($this->doc_element);
+
+ $copyObj->setDocElementType($this->doc_element_type);
+
+ $copyObj->setDocDocumentation($this->doc_documentation);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnDocumentation 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 BpmnDocumentationPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnDocumentationPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnDocumentationPeer.php b/workflow/engine/classes/model/om/BaseBpmnDocumentationPeer.php
new file mode 100644
index 000000000..c5f87dadc
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnDocumentationPeer.php
@@ -0,0 +1,750 @@
+ array ('DocUid', 'PrjUid', 'DocElement', 'DocElementType', 'DocDocumentation', ),
+ BasePeer::TYPE_COLNAME => array (BpmnDocumentationPeer::DOC_UID, BpmnDocumentationPeer::PRJ_UID, BpmnDocumentationPeer::DOC_ELEMENT, BpmnDocumentationPeer::DOC_ELEMENT_TYPE, BpmnDocumentationPeer::DOC_DOCUMENTATION, ),
+ BasePeer::TYPE_FIELDNAME => array ('DOC_UID', 'PRJ_UID', 'DOC_ELEMENT', 'DOC_ELEMENT_TYPE', 'DOC_DOCUMENTATION', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
+ );
+
+ /**
+ * 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 ('DocUid' => 0, 'PrjUid' => 1, 'DocElement' => 2, 'DocElementType' => 3, 'DocDocumentation' => 4, ),
+ BasePeer::TYPE_COLNAME => array (BpmnDocumentationPeer::DOC_UID => 0, BpmnDocumentationPeer::PRJ_UID => 1, BpmnDocumentationPeer::DOC_ELEMENT => 2, BpmnDocumentationPeer::DOC_ELEMENT_TYPE => 3, BpmnDocumentationPeer::DOC_DOCUMENTATION => 4, ),
+ BasePeer::TYPE_FIELDNAME => array ('DOC_UID' => 0, 'PRJ_UID' => 1, 'DOC_ELEMENT' => 2, 'DOC_ELEMENT_TYPE' => 3, 'DOC_DOCUMENTATION' => 4, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
+ );
+
+ /**
+ * @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/BpmnDocumentationMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnDocumentationMapBuilder');
+ }
+ /**
+ * 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 = BpmnDocumentationPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnDocumentationPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnDocumentationPeer::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(BpmnDocumentationPeer::DOC_UID);
+
+ $criteria->addSelectColumn(BpmnDocumentationPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnDocumentationPeer::DOC_ELEMENT);
+
+ $criteria->addSelectColumn(BpmnDocumentationPeer::DOC_ELEMENT_TYPE);
+
+ $criteria->addSelectColumn(BpmnDocumentationPeer::DOC_DOCUMENTATION);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnDocumentationPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDocumentationPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnDocumentationPeer::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 BpmnDocumentation
+ * @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 = BpmnDocumentationPeer::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 BpmnDocumentationPeer::populateObjects(BpmnDocumentationPeer::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;
+ BpmnDocumentationPeer::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 = BpmnDocumentationPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnDocumentationPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDocumentationPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDocumentationPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnDocumentationPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnDocumentation objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnDocumentation objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDocumentationPeer::addSelectColumns($c);
+ $startcol = (BpmnDocumentationPeer::NUM_COLUMNS - BpmnDocumentationPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnDocumentationPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDocumentationPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnDocumentation($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnDocumentations();
+ $obj2->addBpmnDocumentation($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnDocumentationPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnDocumentationPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnDocumentationPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnDocumentationPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnDocumentation objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnDocumentation objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnDocumentationPeer::addSelectColumns($c);
+ $startcol2 = (BpmnDocumentationPeer::NUM_COLUMNS - BpmnDocumentationPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnDocumentationPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnDocumentationPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnDocumentation($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnDocumentations();
+ $obj2->addBpmnDocumentation($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnDocumentationPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnDocumentation or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnDocumentation 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 BpmnDocumentation 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 BpmnDocumentation or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnDocumentation 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
+
+ } 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 BPMN_DOCUMENTATION 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(BpmnDocumentationPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnDocumentation or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnDocumentation 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(BpmnDocumentationPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnDocumentation) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnDocumentation 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 BpmnDocumentation $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(BpmnDocumentation $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnDocumentationPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnDocumentationPeer::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(BpmnDocumentationPeer::DATABASE_NAME, BpmnDocumentationPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnDocumentationPeer::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/BpmnDocumentationMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnDocumentationMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnEvent.php b/workflow/engine/classes/model/om/BaseBpmnEvent.php
new file mode 100644
index 000000000..be9ccdee2
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnEvent.php
@@ -0,0 +1,1947 @@
+evn_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [evn_name] column value.
+ *
+ * @return string
+ */
+ public function getEvnName()
+ {
+
+ return $this->evn_name;
+ }
+
+ /**
+ * Get the [evn_type] column value.
+ *
+ * @return string
+ */
+ public function getEvnType()
+ {
+
+ return $this->evn_type;
+ }
+
+ /**
+ * Get the [evn_marker] column value.
+ *
+ * @return string
+ */
+ public function getEvnMarker()
+ {
+
+ return $this->evn_marker;
+ }
+
+ /**
+ * Get the [evn_is_interrupting] column value.
+ *
+ * @return int
+ */
+ public function getEvnIsInterrupting()
+ {
+
+ return $this->evn_is_interrupting;
+ }
+
+ /**
+ * Get the [evn_attached_to] column value.
+ *
+ * @return string
+ */
+ public function getEvnAttachedTo()
+ {
+
+ return $this->evn_attached_to;
+ }
+
+ /**
+ * Get the [evn_cancel_activity] column value.
+ *
+ * @return int
+ */
+ public function getEvnCancelActivity()
+ {
+
+ return $this->evn_cancel_activity;
+ }
+
+ /**
+ * Get the [evn_activity ref] column value.
+ *
+ * @return string
+ */
+ public function getEvnActivity ref()
+ {
+
+ return $this->evn_activity ref;
+ }
+
+ /**
+ * Get the [evn_wait_for completion] column value.
+ *
+ * @return int
+ */
+ public function getEvnWaitFor completion()
+ {
+
+ return $this->evn_wait_for completion;
+ }
+
+ /**
+ * Get the [evn_error_name] column value.
+ *
+ * @return string
+ */
+ public function getEvnErrorName()
+ {
+
+ return $this->evn_error_name;
+ }
+
+ /**
+ * Get the [evn_error_code] column value.
+ *
+ * @return string
+ */
+ public function getEvnErrorCode()
+ {
+
+ return $this->evn_error_code;
+ }
+
+ /**
+ * Get the [evn_escalation_name] column value.
+ *
+ * @return string
+ */
+ public function getEvnEscalationName()
+ {
+
+ return $this->evn_escalation_name;
+ }
+
+ /**
+ * Get the [evn_escalation_code] column value.
+ *
+ * @return string
+ */
+ public function getEvnEscalationCode()
+ {
+
+ return $this->evn_escalation_code;
+ }
+
+ /**
+ * Get the [evn_condition] column value.
+ *
+ * @return string
+ */
+ public function getEvnCondition()
+ {
+
+ return $this->evn_condition;
+ }
+
+ /**
+ * Get the [evn_message] column value.
+ *
+ * @return string
+ */
+ public function getEvnMessage()
+ {
+
+ return $this->evn_message;
+ }
+
+ /**
+ * Get the [evn_opreration_name] column value.
+ *
+ * @return string
+ */
+ public function getEvnOprerationName()
+ {
+
+ return $this->evn_opreration_name;
+ }
+
+ /**
+ * Get the [evn_operation_implementation_ref] column value.
+ *
+ * @return string
+ */
+ public function getEvnOperationImplementationRef()
+ {
+
+ return $this->evn_operation_implementation_ref;
+ }
+
+ /**
+ * Get the [evn_time_date] column value.
+ *
+ * @return string
+ */
+ public function getEvnTimeDate()
+ {
+
+ return $this->evn_time_date;
+ }
+
+ /**
+ * Get the [evn_time_cycle] column value.
+ *
+ * @return string
+ */
+ public function getEvnTimeCycle()
+ {
+
+ return $this->evn_time_cycle;
+ }
+
+ /**
+ * Get the [evn_time_duration] column value.
+ *
+ * @return string
+ */
+ public function getEvnTimeDuration()
+ {
+
+ return $this->evn_time_duration;
+ }
+
+ /**
+ * Get the [evn_behavior] column value.
+ *
+ * @return string
+ */
+ public function getEvnBehavior()
+ {
+
+ return $this->evn_behavior;
+ }
+
+ /**
+ * 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 || $v === '') {
+ $this->evn_uid = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_UID;
+ }
+
+ } // setEvnUid()
+
+ /**
+ * 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 || $v === '') {
+ $this->prj_uid = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::PRO_UID;
+ }
+
+ if ($this->aBpmnProcess !== null && $this->aBpmnProcess->getProUid() !== $v) {
+ $this->aBpmnProcess = null;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [evn_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnName($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_name !== $v) {
+ $this->evn_name = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_NAME;
+ }
+
+ } // setEvnName()
+
+ /**
+ * Set the value of [evn_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnType($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_type !== $v || $v === '') {
+ $this->evn_type = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_TYPE;
+ }
+
+ } // setEvnType()
+
+ /**
+ * Set the value of [evn_marker] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnMarker($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_marker !== $v || $v === 'EMPTY') {
+ $this->evn_marker = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_MARKER;
+ }
+
+ } // setEvnMarker()
+
+ /**
+ * Set the value of [evn_is_interrupting] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setEvnIsInterrupting($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->evn_is_interrupting !== $v || $v === 1) {
+ $this->evn_is_interrupting = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_IS_INTERRUPTING;
+ }
+
+ } // setEvnIsInterrupting()
+
+ /**
+ * Set the value of [evn_attached_to] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnAttachedTo($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_attached_to !== $v || $v === '') {
+ $this->evn_attached_to = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_ATTACHED_TO;
+ }
+
+ } // setEvnAttachedTo()
+
+ /**
+ * Set the value of [evn_cancel_activity] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setEvnCancelActivity($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->evn_cancel_activity !== $v || $v === 0) {
+ $this->evn_cancel_activity = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_CANCEL_ACTIVITY;
+ }
+
+ } // setEvnCancelActivity()
+
+ /**
+ * Set the value of [evn_activity ref] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnActivity ref($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_activity ref !== $v || $v === '') {
+ $this->evn_activity ref = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_ACTIVITY REF;
+ }
+
+ } // setEvnActivity ref()
+
+ /**
+ * Set the value of [evn_wait_for completion] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setEvnWaitFor completion($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->evn_wait_for completion !== $v || $v === 1) {
+ $this->evn_wait_for completion = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_WAIT_FOR COMPLETION;
+ }
+
+ } // setEvnWaitFor completion()
+
+ /**
+ * Set the value of [evn_error_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnErrorName($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_error_name !== $v) {
+ $this->evn_error_name = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_ERROR_NAME;
+ }
+
+ } // setEvnErrorName()
+
+ /**
+ * Set the value of [evn_error_code] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnErrorCode($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_error_code !== $v) {
+ $this->evn_error_code = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_ERROR_CODE;
+ }
+
+ } // setEvnErrorCode()
+
+ /**
+ * Set the value of [evn_escalation_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnEscalationName($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_escalation_name !== $v) {
+ $this->evn_escalation_name = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_ESCALATION_NAME;
+ }
+
+ } // setEvnEscalationName()
+
+ /**
+ * Set the value of [evn_escalation_code] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnEscalationCode($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_escalation_code !== $v) {
+ $this->evn_escalation_code = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_ESCALATION_CODE;
+ }
+
+ } // setEvnEscalationCode()
+
+ /**
+ * Set the value of [evn_condition] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnCondition($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_condition !== $v) {
+ $this->evn_condition = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_CONDITION;
+ }
+
+ } // setEvnCondition()
+
+ /**
+ * Set the value of [evn_message] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnMessage($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_message !== $v) {
+ $this->evn_message = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_MESSAGE;
+ }
+
+ } // setEvnMessage()
+
+ /**
+ * Set the value of [evn_opreration_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnOprerationName($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_opreration_name !== $v) {
+ $this->evn_opreration_name = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_OPRERATION_NAME;
+ }
+
+ } // setEvnOprerationName()
+
+ /**
+ * Set the value of [evn_operation_implementation_ref] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnOperationImplementationRef($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_operation_implementation_ref !== $v) {
+ $this->evn_operation_implementation_ref = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_OPERATION_IMPLEMENTATION_REF;
+ }
+
+ } // setEvnOperationImplementationRef()
+
+ /**
+ * Set the value of [evn_time_date] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnTimeDate($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_time_date !== $v) {
+ $this->evn_time_date = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_TIME_DATE;
+ }
+
+ } // setEvnTimeDate()
+
+ /**
+ * Set the value of [evn_time_cycle] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnTimeCycle($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_time_cycle !== $v) {
+ $this->evn_time_cycle = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_TIME_CYCLE;
+ }
+
+ } // setEvnTimeCycle()
+
+ /**
+ * Set the value of [evn_time_duration] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnTimeDuration($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_time_duration !== $v) {
+ $this->evn_time_duration = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_TIME_DURATION;
+ }
+
+ } // setEvnTimeDuration()
+
+ /**
+ * Set the value of [evn_behavior] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setEvnBehavior($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_behavior !== $v || $v === 'CATCH') {
+ $this->evn_behavior = $v;
+ $this->modifiedColumns[] = BpmnEventPeer::EVN_BEHAVIOR;
+ }
+
+ } // setEvnBehavior()
+
+ /**
+ * 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->evn_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->pro_uid = $rs->getString($startcol + 2);
+
+ $this->evn_name = $rs->getString($startcol + 3);
+
+ $this->evn_type = $rs->getString($startcol + 4);
+
+ $this->evn_marker = $rs->getString($startcol + 5);
+
+ $this->evn_is_interrupting = $rs->getInt($startcol + 6);
+
+ $this->evn_attached_to = $rs->getString($startcol + 7);
+
+ $this->evn_cancel_activity = $rs->getInt($startcol + 8);
+
+ $this->evn_activity ref = $rs->getString($startcol + 9);
+
+ $this->evn_wait_for completion = $rs->getInt($startcol + 10);
+
+ $this->evn_error_name = $rs->getString($startcol + 11);
+
+ $this->evn_error_code = $rs->getString($startcol + 12);
+
+ $this->evn_escalation_name = $rs->getString($startcol + 13);
+
+ $this->evn_escalation_code = $rs->getString($startcol + 14);
+
+ $this->evn_condition = $rs->getString($startcol + 15);
+
+ $this->evn_message = $rs->getString($startcol + 16);
+
+ $this->evn_opreration_name = $rs->getString($startcol + 17);
+
+ $this->evn_operation_implementation_ref = $rs->getString($startcol + 18);
+
+ $this->evn_time_date = $rs->getString($startcol + 19);
+
+ $this->evn_time_cycle = $rs->getString($startcol + 20);
+
+ $this->evn_time_duration = $rs->getString($startcol + 21);
+
+ $this->evn_behavior = $rs->getString($startcol + 22);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 23; // 23 = BpmnEventPeer::NUM_COLUMNS - BpmnEventPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnEvent 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(BpmnEventPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnEventPeer::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(BpmnEventPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if ($this->aBpmnProcess->isModified()) {
+ $affectedRows += $this->aBpmnProcess->save($con);
+ }
+ $this->setBpmnProcess($this->aBpmnProcess);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnEventPeer::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 += BpmnEventPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if (!$this->aBpmnProcess->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProcess->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnEventPeer::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 = BpmnEventPeer::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->getEvnUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getProUid();
+ break;
+ case 3:
+ return $this->getEvnName();
+ break;
+ case 4:
+ return $this->getEvnType();
+ break;
+ case 5:
+ return $this->getEvnMarker();
+ break;
+ case 6:
+ return $this->getEvnIsInterrupting();
+ break;
+ case 7:
+ return $this->getEvnAttachedTo();
+ break;
+ case 8:
+ return $this->getEvnCancelActivity();
+ break;
+ case 9:
+ return $this->getEvnActivity ref();
+ break;
+ case 10:
+ return $this->getEvnWaitFor completion();
+ break;
+ case 11:
+ return $this->getEvnErrorName();
+ break;
+ case 12:
+ return $this->getEvnErrorCode();
+ break;
+ case 13:
+ return $this->getEvnEscalationName();
+ break;
+ case 14:
+ return $this->getEvnEscalationCode();
+ break;
+ case 15:
+ return $this->getEvnCondition();
+ break;
+ case 16:
+ return $this->getEvnMessage();
+ break;
+ case 17:
+ return $this->getEvnOprerationName();
+ break;
+ case 18:
+ return $this->getEvnOperationImplementationRef();
+ break;
+ case 19:
+ return $this->getEvnTimeDate();
+ break;
+ case 20:
+ return $this->getEvnTimeCycle();
+ break;
+ case 21:
+ return $this->getEvnTimeDuration();
+ break;
+ case 22:
+ return $this->getEvnBehavior();
+ 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 = BpmnEventPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getEvnUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getProUid(),
+ $keys[3] => $this->getEvnName(),
+ $keys[4] => $this->getEvnType(),
+ $keys[5] => $this->getEvnMarker(),
+ $keys[6] => $this->getEvnIsInterrupting(),
+ $keys[7] => $this->getEvnAttachedTo(),
+ $keys[8] => $this->getEvnCancelActivity(),
+ $keys[9] => $this->getEvnActivity ref(),
+ $keys[10] => $this->getEvnWaitFor completion(),
+ $keys[11] => $this->getEvnErrorName(),
+ $keys[12] => $this->getEvnErrorCode(),
+ $keys[13] => $this->getEvnEscalationName(),
+ $keys[14] => $this->getEvnEscalationCode(),
+ $keys[15] => $this->getEvnCondition(),
+ $keys[16] => $this->getEvnMessage(),
+ $keys[17] => $this->getEvnOprerationName(),
+ $keys[18] => $this->getEvnOperationImplementationRef(),
+ $keys[19] => $this->getEvnTimeDate(),
+ $keys[20] => $this->getEvnTimeCycle(),
+ $keys[21] => $this->getEvnTimeDuration(),
+ $keys[22] => $this->getEvnBehavior(),
+ );
+ 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 = BpmnEventPeer::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->setEvnUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setProUid($value);
+ break;
+ case 3:
+ $this->setEvnName($value);
+ break;
+ case 4:
+ $this->setEvnType($value);
+ break;
+ case 5:
+ $this->setEvnMarker($value);
+ break;
+ case 6:
+ $this->setEvnIsInterrupting($value);
+ break;
+ case 7:
+ $this->setEvnAttachedTo($value);
+ break;
+ case 8:
+ $this->setEvnCancelActivity($value);
+ break;
+ case 9:
+ $this->setEvnActivity ref($value);
+ break;
+ case 10:
+ $this->setEvnWaitFor completion($value);
+ break;
+ case 11:
+ $this->setEvnErrorName($value);
+ break;
+ case 12:
+ $this->setEvnErrorCode($value);
+ break;
+ case 13:
+ $this->setEvnEscalationName($value);
+ break;
+ case 14:
+ $this->setEvnEscalationCode($value);
+ break;
+ case 15:
+ $this->setEvnCondition($value);
+ break;
+ case 16:
+ $this->setEvnMessage($value);
+ break;
+ case 17:
+ $this->setEvnOprerationName($value);
+ break;
+ case 18:
+ $this->setEvnOperationImplementationRef($value);
+ break;
+ case 19:
+ $this->setEvnTimeDate($value);
+ break;
+ case 20:
+ $this->setEvnTimeCycle($value);
+ break;
+ case 21:
+ $this->setEvnTimeDuration($value);
+ break;
+ case 22:
+ $this->setEvnBehavior($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 = BpmnEventPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setEvnUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setProUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setEvnName($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setEvnType($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setEvnMarker($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setEvnIsInterrupting($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setEvnAttachedTo($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setEvnCancelActivity($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setEvnActivity ref($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setEvnWaitFor completion($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setEvnErrorName($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setEvnErrorCode($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setEvnEscalationName($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setEvnEscalationCode($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setEvnCondition($arr[$keys[15]]);
+ }
+
+ if (array_key_exists($keys[16], $arr)) {
+ $this->setEvnMessage($arr[$keys[16]]);
+ }
+
+ if (array_key_exists($keys[17], $arr)) {
+ $this->setEvnOprerationName($arr[$keys[17]]);
+ }
+
+ if (array_key_exists($keys[18], $arr)) {
+ $this->setEvnOperationImplementationRef($arr[$keys[18]]);
+ }
+
+ if (array_key_exists($keys[19], $arr)) {
+ $this->setEvnTimeDate($arr[$keys[19]]);
+ }
+
+ if (array_key_exists($keys[20], $arr)) {
+ $this->setEvnTimeCycle($arr[$keys[20]]);
+ }
+
+ if (array_key_exists($keys[21], $arr)) {
+ $this->setEvnTimeDuration($arr[$keys[21]]);
+ }
+
+ if (array_key_exists($keys[22], $arr)) {
+ $this->setEvnBehavior($arr[$keys[22]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnEventPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_UID)) {
+ $criteria->add(BpmnEventPeer::EVN_UID, $this->evn_uid);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::PRJ_UID)) {
+ $criteria->add(BpmnEventPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::PRO_UID)) {
+ $criteria->add(BpmnEventPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_NAME)) {
+ $criteria->add(BpmnEventPeer::EVN_NAME, $this->evn_name);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_TYPE)) {
+ $criteria->add(BpmnEventPeer::EVN_TYPE, $this->evn_type);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_MARKER)) {
+ $criteria->add(BpmnEventPeer::EVN_MARKER, $this->evn_marker);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_IS_INTERRUPTING)) {
+ $criteria->add(BpmnEventPeer::EVN_IS_INTERRUPTING, $this->evn_is_interrupting);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_ATTACHED_TO)) {
+ $criteria->add(BpmnEventPeer::EVN_ATTACHED_TO, $this->evn_attached_to);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_CANCEL_ACTIVITY)) {
+ $criteria->add(BpmnEventPeer::EVN_CANCEL_ACTIVITY, $this->evn_cancel_activity);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_ACTIVITY REF)) {
+ $criteria->add(BpmnEventPeer::EVN_ACTIVITY REF, $this->evn_activity ref);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_WAIT_FOR COMPLETION)) {
+ $criteria->add(BpmnEventPeer::EVN_WAIT_FOR COMPLETION, $this->evn_wait_for completion);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_ERROR_NAME)) {
+ $criteria->add(BpmnEventPeer::EVN_ERROR_NAME, $this->evn_error_name);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_ERROR_CODE)) {
+ $criteria->add(BpmnEventPeer::EVN_ERROR_CODE, $this->evn_error_code);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_ESCALATION_NAME)) {
+ $criteria->add(BpmnEventPeer::EVN_ESCALATION_NAME, $this->evn_escalation_name);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_ESCALATION_CODE)) {
+ $criteria->add(BpmnEventPeer::EVN_ESCALATION_CODE, $this->evn_escalation_code);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_CONDITION)) {
+ $criteria->add(BpmnEventPeer::EVN_CONDITION, $this->evn_condition);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_MESSAGE)) {
+ $criteria->add(BpmnEventPeer::EVN_MESSAGE, $this->evn_message);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_OPRERATION_NAME)) {
+ $criteria->add(BpmnEventPeer::EVN_OPRERATION_NAME, $this->evn_opreration_name);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_OPERATION_IMPLEMENTATION_REF)) {
+ $criteria->add(BpmnEventPeer::EVN_OPERATION_IMPLEMENTATION_REF, $this->evn_operation_implementation_ref);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_TIME_DATE)) {
+ $criteria->add(BpmnEventPeer::EVN_TIME_DATE, $this->evn_time_date);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_TIME_CYCLE)) {
+ $criteria->add(BpmnEventPeer::EVN_TIME_CYCLE, $this->evn_time_cycle);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_TIME_DURATION)) {
+ $criteria->add(BpmnEventPeer::EVN_TIME_DURATION, $this->evn_time_duration);
+ }
+
+ if ($this->isColumnModified(BpmnEventPeer::EVN_BEHAVIOR)) {
+ $criteria->add(BpmnEventPeer::EVN_BEHAVIOR, $this->evn_behavior);
+ }
+
+
+ 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(BpmnEventPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnEvent (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->setEvnUid($this->evn_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setEvnName($this->evn_name);
+
+ $copyObj->setEvnType($this->evn_type);
+
+ $copyObj->setEvnMarker($this->evn_marker);
+
+ $copyObj->setEvnIsInterrupting($this->evn_is_interrupting);
+
+ $copyObj->setEvnAttachedTo($this->evn_attached_to);
+
+ $copyObj->setEvnCancelActivity($this->evn_cancel_activity);
+
+ $copyObj->setEvnActivity ref($this->evn_activity ref);
+
+ $copyObj->setEvnWaitFor completion($this->evn_wait_for completion);
+
+ $copyObj->setEvnErrorName($this->evn_error_name);
+
+ $copyObj->setEvnErrorCode($this->evn_error_code);
+
+ $copyObj->setEvnEscalationName($this->evn_escalation_name);
+
+ $copyObj->setEvnEscalationCode($this->evn_escalation_code);
+
+ $copyObj->setEvnCondition($this->evn_condition);
+
+ $copyObj->setEvnMessage($this->evn_message);
+
+ $copyObj->setEvnOprerationName($this->evn_opreration_name);
+
+ $copyObj->setEvnOperationImplementationRef($this->evn_operation_implementation_ref);
+
+ $copyObj->setEvnTimeDate($this->evn_time_date);
+
+ $copyObj->setEvnTimeCycle($this->evn_time_cycle);
+
+ $copyObj->setEvnTimeDuration($this->evn_time_duration);
+
+ $copyObj->setEvnBehavior($this->evn_behavior);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnEvent 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 BpmnEventPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnEventPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid('');
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProcess object.
+ *
+ * @param BpmnProcess $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProcess($v)
+ {
+
+
+ if ($v === null) {
+ $this->setProUid('');
+ } else {
+ $this->setProUid($v->getProUid());
+ }
+
+
+ $this->aBpmnProcess = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProcess object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProcess The associated BpmnProcess object.
+ * @throws PropelException
+ */
+ public function getBpmnProcess($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+
+ if ($this->aBpmnProcess === null && (($this->pro_uid !== "" && $this->pro_uid !== null))) {
+
+ $this->aBpmnProcess = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+ $obj->addBpmnProcesss($this);
+ */
+ }
+ return $this->aBpmnProcess;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnEventPeer.php b/workflow/engine/classes/model/om/BaseBpmnEventPeer.php
new file mode 100644
index 000000000..ec7856da4
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnEventPeer.php
@@ -0,0 +1,1182 @@
+ array ('EvnUid', 'PrjUid', 'ProUid', 'EvnName', 'EvnType', 'EvnMarker', 'EvnIsInterrupting', 'EvnAttachedTo', 'EvnCancelActivity', 'EvnActivity ref', 'EvnWaitFor completion', 'EvnErrorName', 'EvnErrorCode', 'EvnEscalationName', 'EvnEscalationCode', 'EvnCondition', 'EvnMessage', 'EvnOprerationName', 'EvnOperationImplementationRef', 'EvnTimeDate', 'EvnTimeCycle', 'EvnTimeDuration', 'EvnBehavior', ),
+ BasePeer::TYPE_COLNAME => array (BpmnEventPeer::EVN_UID, BpmnEventPeer::PRJ_UID, BpmnEventPeer::PRO_UID, BpmnEventPeer::EVN_NAME, BpmnEventPeer::EVN_TYPE, BpmnEventPeer::EVN_MARKER, BpmnEventPeer::EVN_IS_INTERRUPTING, BpmnEventPeer::EVN_ATTACHED_TO, BpmnEventPeer::EVN_CANCEL_ACTIVITY, BpmnEventPeer::EVN_ACTIVITY REF, BpmnEventPeer::EVN_WAIT_FOR COMPLETION, BpmnEventPeer::EVN_ERROR_NAME, BpmnEventPeer::EVN_ERROR_CODE, BpmnEventPeer::EVN_ESCALATION_NAME, BpmnEventPeer::EVN_ESCALATION_CODE, BpmnEventPeer::EVN_CONDITION, BpmnEventPeer::EVN_MESSAGE, BpmnEventPeer::EVN_OPRERATION_NAME, BpmnEventPeer::EVN_OPERATION_IMPLEMENTATION_REF, BpmnEventPeer::EVN_TIME_DATE, BpmnEventPeer::EVN_TIME_CYCLE, BpmnEventPeer::EVN_TIME_DURATION, BpmnEventPeer::EVN_BEHAVIOR, ),
+ BasePeer::TYPE_FIELDNAME => array ('EVN_UID', 'PRJ_UID', 'PRO_UID', 'EVN_NAME', 'EVN_TYPE', 'EVN_MARKER', 'EVN_IS_INTERRUPTING', 'EVN_ATTACHED_TO', 'EVN_CANCEL_ACTIVITY', 'EVN_ACTIVITY REF', 'EVN_WAIT_FOR COMPLETION', 'EVN_ERROR_NAME', 'EVN_ERROR_CODE', 'EVN_ESCALATION_NAME', 'EVN_ESCALATION_CODE', 'EVN_CONDITION', 'EVN_MESSAGE', 'EVN_OPRERATION_NAME', 'EVN_OPERATION_IMPLEMENTATION_REF', 'EVN_TIME_DATE', 'EVN_TIME_CYCLE', 'EVN_TIME_DURATION', 'EVN_BEHAVIOR', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, )
+ );
+
+ /**
+ * 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 ('EvnUid' => 0, 'PrjUid' => 1, 'ProUid' => 2, 'EvnName' => 3, 'EvnType' => 4, 'EvnMarker' => 5, 'EvnIsInterrupting' => 6, 'EvnAttachedTo' => 7, 'EvnCancelActivity' => 8, 'EvnActivity ref' => 9, 'EvnWaitFor completion' => 10, 'EvnErrorName' => 11, 'EvnErrorCode' => 12, 'EvnEscalationName' => 13, 'EvnEscalationCode' => 14, 'EvnCondition' => 15, 'EvnMessage' => 16, 'EvnOprerationName' => 17, 'EvnOperationImplementationRef' => 18, 'EvnTimeDate' => 19, 'EvnTimeCycle' => 20, 'EvnTimeDuration' => 21, 'EvnBehavior' => 22, ),
+ BasePeer::TYPE_COLNAME => array (BpmnEventPeer::EVN_UID => 0, BpmnEventPeer::PRJ_UID => 1, BpmnEventPeer::PRO_UID => 2, BpmnEventPeer::EVN_NAME => 3, BpmnEventPeer::EVN_TYPE => 4, BpmnEventPeer::EVN_MARKER => 5, BpmnEventPeer::EVN_IS_INTERRUPTING => 6, BpmnEventPeer::EVN_ATTACHED_TO => 7, BpmnEventPeer::EVN_CANCEL_ACTIVITY => 8, BpmnEventPeer::EVN_ACTIVITY REF => 9, BpmnEventPeer::EVN_WAIT_FOR COMPLETION => 10, BpmnEventPeer::EVN_ERROR_NAME => 11, BpmnEventPeer::EVN_ERROR_CODE => 12, BpmnEventPeer::EVN_ESCALATION_NAME => 13, BpmnEventPeer::EVN_ESCALATION_CODE => 14, BpmnEventPeer::EVN_CONDITION => 15, BpmnEventPeer::EVN_MESSAGE => 16, BpmnEventPeer::EVN_OPRERATION_NAME => 17, BpmnEventPeer::EVN_OPERATION_IMPLEMENTATION_REF => 18, BpmnEventPeer::EVN_TIME_DATE => 19, BpmnEventPeer::EVN_TIME_CYCLE => 20, BpmnEventPeer::EVN_TIME_DURATION => 21, BpmnEventPeer::EVN_BEHAVIOR => 22, ),
+ BasePeer::TYPE_FIELDNAME => array ('EVN_UID' => 0, 'PRJ_UID' => 1, 'PRO_UID' => 2, 'EVN_NAME' => 3, 'EVN_TYPE' => 4, 'EVN_MARKER' => 5, 'EVN_IS_INTERRUPTING' => 6, 'EVN_ATTACHED_TO' => 7, 'EVN_CANCEL_ACTIVITY' => 8, 'EVN_ACTIVITY REF' => 9, 'EVN_WAIT_FOR COMPLETION' => 10, 'EVN_ERROR_NAME' => 11, 'EVN_ERROR_CODE' => 12, 'EVN_ESCALATION_NAME' => 13, 'EVN_ESCALATION_CODE' => 14, 'EVN_CONDITION' => 15, 'EVN_MESSAGE' => 16, 'EVN_OPRERATION_NAME' => 17, 'EVN_OPERATION_IMPLEMENTATION_REF' => 18, 'EVN_TIME_DATE' => 19, 'EVN_TIME_CYCLE' => 20, 'EVN_TIME_DURATION' => 21, 'EVN_BEHAVIOR' => 22, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, )
+ );
+
+ /**
+ * @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/BpmnEventMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnEventMapBuilder');
+ }
+ /**
+ * 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 = BpmnEventPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnEventPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnEventPeer::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(BpmnEventPeer::EVN_UID);
+
+ $criteria->addSelectColumn(BpmnEventPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnEventPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_NAME);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_TYPE);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_MARKER);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_IS_INTERRUPTING);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_ATTACHED_TO);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_CANCEL_ACTIVITY);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_ACTIVITY REF);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_WAIT_FOR COMPLETION);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_ERROR_NAME);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_ERROR_CODE);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_ESCALATION_NAME);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_ESCALATION_CODE);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_CONDITION);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_MESSAGE);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_OPRERATION_NAME);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_OPERATION_IMPLEMENTATION_REF);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_TIME_DATE);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_TIME_CYCLE);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_TIME_DURATION);
+
+ $criteria->addSelectColumn(BpmnEventPeer::EVN_BEHAVIOR);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnEventPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnEventPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnEventPeer::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 BpmnEvent
+ * @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 = BpmnEventPeer::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 BpmnEventPeer::populateObjects(BpmnEventPeer::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;
+ BpmnEventPeer::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 = BpmnEventPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnEventPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnEventPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnEventPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnEventPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProcess(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(BpmnEventPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnEventPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnEventPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnEventPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnEvent objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnEvent objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnEventPeer::addSelectColumns($c);
+ $startcol = (BpmnEventPeer::NUM_COLUMNS - BpmnEventPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnEventPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnEventPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnEvent($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnEvents();
+ $obj2->addBpmnEvent($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnEvent objects pre-filled with their BpmnProcess objects.
+ *
+ * @return array Array of BpmnEvent objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnEventPeer::addSelectColumns($c);
+ $startcol = (BpmnEventPeer::NUM_COLUMNS - BpmnEventPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProcessPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnEventPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnEventPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnEvent($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnEvents();
+ $obj2->addBpmnEvent($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnEventPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnEventPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnEventPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnEventPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnEventPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnEvent objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnEvent objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnEventPeer::addSelectColumns($c);
+ $startcol2 = (BpmnEventPeer::NUM_COLUMNS - BpmnEventPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnEventPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnEventPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnEventPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnEvent($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnEvents();
+ $obj2->addBpmnEvent($obj1);
+ }
+
+
+ // Add objects for joined BpmnProcess rows
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnProcess(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnEvent($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnEvents();
+ $obj3->addBpmnEvent($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnEventPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnEventPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnEventPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnEventPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProcess(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(BpmnEventPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnEventPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnEventPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnEventPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnEvent objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnEvent objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnEventPeer::addSelectColumns($c);
+ $startcol2 = (BpmnEventPeer::NUM_COLUMNS - BpmnEventPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnEventPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnEventPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnEvent($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnEvents();
+ $obj2->addBpmnEvent($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnEvent objects pre-filled with all related objects except BpmnProcess.
+ *
+ * @return array Array of BpmnEvent objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnEventPeer::addSelectColumns($c);
+ $startcol2 = (BpmnEventPeer::NUM_COLUMNS - BpmnEventPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnEventPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnEventPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnEvent($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnEvents();
+ $obj2->addBpmnEvent($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnEventPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnEvent or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnEvent 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 BpmnEvent 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 BpmnEvent or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnEvent 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
+
+ } 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 BPMN_EVENT 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(BpmnEventPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnEvent or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnEvent 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(BpmnEventPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnEvent) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnEvent 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 BpmnEvent $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(BpmnEvent $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnEventPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnEventPeer::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(BpmnEventPeer::DATABASE_NAME, BpmnEventPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnEventPeer::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/BpmnEventMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnEventMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnExtension.php b/workflow/engine/classes/model/om/BaseBpmnExtension.php
new file mode 100644
index 000000000..bebac2642
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnExtension.php
@@ -0,0 +1,830 @@
+ext_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [ext_element] column value.
+ *
+ * @return string
+ */
+ public function getExtElement()
+ {
+
+ return $this->ext_element;
+ }
+
+ /**
+ * Get the [ext_element_type] column value.
+ *
+ * @return string
+ */
+ public function getExtElementType()
+ {
+
+ return $this->ext_element_type;
+ }
+
+ /**
+ * Get the [ext_extension] column value.
+ *
+ * @return string
+ */
+ public function getExtExtension()
+ {
+
+ return $this->ext_extension;
+ }
+
+ /**
+ * Set the value of [ext_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setExtUid($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->ext_uid !== $v) {
+ $this->ext_uid = $v;
+ $this->modifiedColumns[] = BpmnExtensionPeer::EXT_UID;
+ }
+
+ } // setExtUid()
+
+ /**
+ * 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[] = BpmnExtensionPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [ext_element] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setExtElement($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->ext_element !== $v) {
+ $this->ext_element = $v;
+ $this->modifiedColumns[] = BpmnExtensionPeer::EXT_ELEMENT;
+ }
+
+ } // setExtElement()
+
+ /**
+ * Set the value of [ext_element_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setExtElementType($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->ext_element_type !== $v) {
+ $this->ext_element_type = $v;
+ $this->modifiedColumns[] = BpmnExtensionPeer::EXT_ELEMENT_TYPE;
+ }
+
+ } // setExtElementType()
+
+ /**
+ * Set the value of [ext_extension] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setExtExtension($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->ext_extension !== $v) {
+ $this->ext_extension = $v;
+ $this->modifiedColumns[] = BpmnExtensionPeer::EXT_EXTENSION;
+ }
+
+ } // setExtExtension()
+
+ /**
+ * 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->ext_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->ext_element = $rs->getString($startcol + 2);
+
+ $this->ext_element_type = $rs->getString($startcol + 3);
+
+ $this->ext_extension = $rs->getString($startcol + 4);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 5; // 5 = BpmnExtensionPeer::NUM_COLUMNS - BpmnExtensionPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnExtension 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(BpmnExtensionPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnExtensionPeer::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(BpmnExtensionPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnExtensionPeer::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 += BpmnExtensionPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnExtensionPeer::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 = BpmnExtensionPeer::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->getExtUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getExtElement();
+ break;
+ case 3:
+ return $this->getExtElementType();
+ break;
+ case 4:
+ return $this->getExtExtension();
+ 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 = BpmnExtensionPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getExtUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getExtElement(),
+ $keys[3] => $this->getExtElementType(),
+ $keys[4] => $this->getExtExtension(),
+ );
+ 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 = BpmnExtensionPeer::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->setExtUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setExtElement($value);
+ break;
+ case 3:
+ $this->setExtElementType($value);
+ break;
+ case 4:
+ $this->setExtExtension($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 = BpmnExtensionPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setExtUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setExtElement($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setExtElementType($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setExtExtension($arr[$keys[4]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnExtensionPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnExtensionPeer::EXT_UID)) {
+ $criteria->add(BpmnExtensionPeer::EXT_UID, $this->ext_uid);
+ }
+
+ if ($this->isColumnModified(BpmnExtensionPeer::PRJ_UID)) {
+ $criteria->add(BpmnExtensionPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnExtensionPeer::EXT_ELEMENT)) {
+ $criteria->add(BpmnExtensionPeer::EXT_ELEMENT, $this->ext_element);
+ }
+
+ if ($this->isColumnModified(BpmnExtensionPeer::EXT_ELEMENT_TYPE)) {
+ $criteria->add(BpmnExtensionPeer::EXT_ELEMENT_TYPE, $this->ext_element_type);
+ }
+
+ if ($this->isColumnModified(BpmnExtensionPeer::EXT_EXTENSION)) {
+ $criteria->add(BpmnExtensionPeer::EXT_EXTENSION, $this->ext_extension);
+ }
+
+
+ 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(BpmnExtensionPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnExtension (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->setExtUid($this->ext_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setExtElement($this->ext_element);
+
+ $copyObj->setExtElementType($this->ext_element_type);
+
+ $copyObj->setExtExtension($this->ext_extension);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnExtension 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 BpmnExtensionPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnExtensionPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnExtensionPeer.php b/workflow/engine/classes/model/om/BaseBpmnExtensionPeer.php
new file mode 100644
index 000000000..ff29650eb
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnExtensionPeer.php
@@ -0,0 +1,750 @@
+ array ('ExtUid', 'PrjUid', 'ExtElement', 'ExtElementType', 'ExtExtension', ),
+ BasePeer::TYPE_COLNAME => array (BpmnExtensionPeer::EXT_UID, BpmnExtensionPeer::PRJ_UID, BpmnExtensionPeer::EXT_ELEMENT, BpmnExtensionPeer::EXT_ELEMENT_TYPE, BpmnExtensionPeer::EXT_EXTENSION, ),
+ BasePeer::TYPE_FIELDNAME => array ('EXT_UID', 'PRJ_UID', 'EXT_ELEMENT', 'EXT_ELEMENT_TYPE', 'EXT_EXTENSION', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
+ );
+
+ /**
+ * 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 ('ExtUid' => 0, 'PrjUid' => 1, 'ExtElement' => 2, 'ExtElementType' => 3, 'ExtExtension' => 4, ),
+ BasePeer::TYPE_COLNAME => array (BpmnExtensionPeer::EXT_UID => 0, BpmnExtensionPeer::PRJ_UID => 1, BpmnExtensionPeer::EXT_ELEMENT => 2, BpmnExtensionPeer::EXT_ELEMENT_TYPE => 3, BpmnExtensionPeer::EXT_EXTENSION => 4, ),
+ BasePeer::TYPE_FIELDNAME => array ('EXT_UID' => 0, 'PRJ_UID' => 1, 'EXT_ELEMENT' => 2, 'EXT_ELEMENT_TYPE' => 3, 'EXT_EXTENSION' => 4, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
+ );
+
+ /**
+ * @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/BpmnExtensionMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnExtensionMapBuilder');
+ }
+ /**
+ * 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 = BpmnExtensionPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnExtensionPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnExtensionPeer::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(BpmnExtensionPeer::EXT_UID);
+
+ $criteria->addSelectColumn(BpmnExtensionPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnExtensionPeer::EXT_ELEMENT);
+
+ $criteria->addSelectColumn(BpmnExtensionPeer::EXT_ELEMENT_TYPE);
+
+ $criteria->addSelectColumn(BpmnExtensionPeer::EXT_EXTENSION);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnExtensionPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnExtensionPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnExtensionPeer::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 BpmnExtension
+ * @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 = BpmnExtensionPeer::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 BpmnExtensionPeer::populateObjects(BpmnExtensionPeer::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;
+ BpmnExtensionPeer::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 = BpmnExtensionPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnExtensionPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnExtensionPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnExtensionPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnExtensionPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnExtension objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnExtension objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnExtensionPeer::addSelectColumns($c);
+ $startcol = (BpmnExtensionPeer::NUM_COLUMNS - BpmnExtensionPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnExtensionPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnExtensionPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnExtension($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnExtensions();
+ $obj2->addBpmnExtension($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnExtensionPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnExtensionPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnExtensionPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnExtensionPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnExtension objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnExtension objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnExtensionPeer::addSelectColumns($c);
+ $startcol2 = (BpmnExtensionPeer::NUM_COLUMNS - BpmnExtensionPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnExtensionPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnExtensionPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnExtension($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnExtensions();
+ $obj2->addBpmnExtension($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnExtensionPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnExtension or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnExtension 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 BpmnExtension 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 BpmnExtension or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnExtension 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
+
+ } 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 BPMN_EXTENSION 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(BpmnExtensionPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnExtension or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnExtension 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(BpmnExtensionPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnExtension) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnExtension 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 BpmnExtension $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(BpmnExtension $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnExtensionPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnExtensionPeer::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(BpmnExtensionPeer::DATABASE_NAME, BpmnExtensionPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnExtensionPeer::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/BpmnExtensionMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnExtensionMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnFlow.php b/workflow/engine/classes/model/om/BaseBpmnFlow.php
new file mode 100644
index 000000000..93fd92d7f
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnFlow.php
@@ -0,0 +1,1657 @@
+flo_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [dia_uid] column value.
+ *
+ * @return string
+ */
+ public function getDiaUid()
+ {
+
+ return $this->dia_uid;
+ }
+
+ /**
+ * Get the [flo_type] column value.
+ *
+ * @return string
+ */
+ public function getFloType()
+ {
+
+ return $this->flo_type;
+ }
+
+ /**
+ * Get the [flo_name] column value.
+ *
+ * @return string
+ */
+ public function getFloName()
+ {
+
+ return $this->flo_name;
+ }
+
+ /**
+ * Get the [flo_element_origin] column value.
+ *
+ * @return string
+ */
+ public function getFloElementOrigin()
+ {
+
+ return $this->flo_element_origin;
+ }
+
+ /**
+ * Get the [flo_element_origin_type] column value.
+ *
+ * @return string
+ */
+ public function getFloElementOriginType()
+ {
+
+ return $this->flo_element_origin_type;
+ }
+
+ /**
+ * Get the [flo_element_origin_port] column value.
+ *
+ * @return int
+ */
+ public function getFloElementOriginPort()
+ {
+
+ return $this->flo_element_origin_port;
+ }
+
+ /**
+ * Get the [flo_element_dest] column value.
+ *
+ * @return string
+ */
+ public function getFloElementDest()
+ {
+
+ return $this->flo_element_dest;
+ }
+
+ /**
+ * Get the [flo_element_dest_type] column value.
+ *
+ * @return string
+ */
+ public function getFloElementDestType()
+ {
+
+ return $this->flo_element_dest_type;
+ }
+
+ /**
+ * Get the [flo_element_dest_port] column value.
+ *
+ * @return int
+ */
+ public function getFloElementDestPort()
+ {
+
+ return $this->flo_element_dest_port;
+ }
+
+ /**
+ * Get the [flo_is_inmediate] column value.
+ *
+ * @return int
+ */
+ public function getFloIsInmediate()
+ {
+
+ return $this->flo_is_inmediate;
+ }
+
+ /**
+ * Get the [flo_condition] column value.
+ *
+ * @return string
+ */
+ public function getFloCondition()
+ {
+
+ return $this->flo_condition;
+ }
+
+ /**
+ * Get the [flo_x1] column value.
+ *
+ * @return int
+ */
+ public function getFloX1()
+ {
+
+ return $this->flo_x1;
+ }
+
+ /**
+ * Get the [flo_y1] column value.
+ *
+ * @return int
+ */
+ public function getFloY1()
+ {
+
+ return $this->flo_y1;
+ }
+
+ /**
+ * Get the [flo_x2] column value.
+ *
+ * @return int
+ */
+ public function getFloX2()
+ {
+
+ return $this->flo_x2;
+ }
+
+ /**
+ * Get the [flo_y2] column value.
+ *
+ * @return int
+ */
+ public function getFloY2()
+ {
+
+ return $this->flo_y2;
+ }
+
+ /**
+ * Get the [flo_state] column value.
+ *
+ * @return string
+ */
+ public function getFloState()
+ {
+
+ return $this->flo_state;
+ }
+
+ /**
+ * Set the value of [flo_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloUid($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->flo_uid !== $v || $v === '') {
+ $this->flo_uid = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_UID;
+ }
+
+ } // setFloUid()
+
+ /**
+ * 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 || $v === '') {
+ $this->prj_uid = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [dia_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDiaUid($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->dia_uid !== $v || $v === '') {
+ $this->dia_uid = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::DIA_UID;
+ }
+
+ if ($this->aBpmnDiagram !== null && $this->aBpmnDiagram->getDiaUid() !== $v) {
+ $this->aBpmnDiagram = null;
+ }
+
+ } // setDiaUid()
+
+ /**
+ * Set the value of [flo_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloType($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->flo_type !== $v || $v === '') {
+ $this->flo_type = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_TYPE;
+ }
+
+ } // setFloType()
+
+ /**
+ * Set the value of [flo_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloName($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->flo_name !== $v || $v === '') {
+ $this->flo_name = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_NAME;
+ }
+
+ } // setFloName()
+
+ /**
+ * Set the value of [flo_element_origin] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloElementOrigin($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->flo_element_origin !== $v || $v === '') {
+ $this->flo_element_origin = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_ELEMENT_ORIGIN;
+ }
+
+ } // setFloElementOrigin()
+
+ /**
+ * Set the value of [flo_element_origin_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloElementOriginType($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->flo_element_origin_type !== $v || $v === '') {
+ $this->flo_element_origin_type = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE;
+ }
+
+ } // setFloElementOriginType()
+
+ /**
+ * Set the value of [flo_element_origin_port] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setFloElementOriginPort($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_element_origin_port !== $v || $v === 0) {
+ $this->flo_element_origin_port = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT;
+ }
+
+ } // setFloElementOriginPort()
+
+ /**
+ * Set the value of [flo_element_dest] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloElementDest($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->flo_element_dest !== $v || $v === '') {
+ $this->flo_element_dest = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_ELEMENT_DEST;
+ }
+
+ } // setFloElementDest()
+
+ /**
+ * Set the value of [flo_element_dest_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloElementDestType($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->flo_element_dest_type !== $v || $v === '') {
+ $this->flo_element_dest_type = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE;
+ }
+
+ } // setFloElementDestType()
+
+ /**
+ * Set the value of [flo_element_dest_port] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setFloElementDestPort($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_element_dest_port !== $v || $v === 0) {
+ $this->flo_element_dest_port = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_ELEMENT_DEST_PORT;
+ }
+
+ } // setFloElementDestPort()
+
+ /**
+ * Set the value of [flo_is_inmediate] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setFloIsInmediate($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_is_inmediate !== $v) {
+ $this->flo_is_inmediate = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_IS_INMEDIATE;
+ }
+
+ } // setFloIsInmediate()
+
+ /**
+ * Set the value of [flo_condition] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloCondition($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->flo_condition !== $v) {
+ $this->flo_condition = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_CONDITION;
+ }
+
+ } // setFloCondition()
+
+ /**
+ * Set the value of [flo_x1] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setFloX1($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_x1 !== $v || $v === 0) {
+ $this->flo_x1 = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_X1;
+ }
+
+ } // setFloX1()
+
+ /**
+ * Set the value of [flo_y1] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setFloY1($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_y1 !== $v || $v === 0) {
+ $this->flo_y1 = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_Y1;
+ }
+
+ } // setFloY1()
+
+ /**
+ * Set the value of [flo_x2] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setFloX2($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_x2 !== $v || $v === 0) {
+ $this->flo_x2 = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_X2;
+ }
+
+ } // setFloX2()
+
+ /**
+ * Set the value of [flo_y2] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setFloY2($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_y2 !== $v || $v === 0) {
+ $this->flo_y2 = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_Y2;
+ }
+
+ } // setFloY2()
+
+ /**
+ * Set the value of [flo_state] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setFloState($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->flo_state !== $v) {
+ $this->flo_state = $v;
+ $this->modifiedColumns[] = BpmnFlowPeer::FLO_STATE;
+ }
+
+ } // setFloState()
+
+ /**
+ * 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->flo_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->dia_uid = $rs->getString($startcol + 2);
+
+ $this->flo_type = $rs->getString($startcol + 3);
+
+ $this->flo_name = $rs->getString($startcol + 4);
+
+ $this->flo_element_origin = $rs->getString($startcol + 5);
+
+ $this->flo_element_origin_type = $rs->getString($startcol + 6);
+
+ $this->flo_element_origin_port = $rs->getInt($startcol + 7);
+
+ $this->flo_element_dest = $rs->getString($startcol + 8);
+
+ $this->flo_element_dest_type = $rs->getString($startcol + 9);
+
+ $this->flo_element_dest_port = $rs->getInt($startcol + 10);
+
+ $this->flo_is_inmediate = $rs->getInt($startcol + 11);
+
+ $this->flo_condition = $rs->getString($startcol + 12);
+
+ $this->flo_x1 = $rs->getInt($startcol + 13);
+
+ $this->flo_y1 = $rs->getInt($startcol + 14);
+
+ $this->flo_x2 = $rs->getInt($startcol + 15);
+
+ $this->flo_y2 = $rs->getInt($startcol + 16);
+
+ $this->flo_state = $rs->getString($startcol + 17);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 18; // 18 = BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnFlow 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(BpmnFlowPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnFlowPeer::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(BpmnFlowPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnDiagram !== null) {
+ if ($this->aBpmnDiagram->isModified()) {
+ $affectedRows += $this->aBpmnDiagram->save($con);
+ }
+ $this->setBpmnDiagram($this->aBpmnDiagram);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnFlowPeer::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 += BpmnFlowPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnDiagram !== null) {
+ if (!$this->aBpmnDiagram->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnDiagram->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnFlowPeer::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 = BpmnFlowPeer::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->getFloUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getDiaUid();
+ break;
+ case 3:
+ return $this->getFloType();
+ break;
+ case 4:
+ return $this->getFloName();
+ break;
+ case 5:
+ return $this->getFloElementOrigin();
+ break;
+ case 6:
+ return $this->getFloElementOriginType();
+ break;
+ case 7:
+ return $this->getFloElementOriginPort();
+ break;
+ case 8:
+ return $this->getFloElementDest();
+ break;
+ case 9:
+ return $this->getFloElementDestType();
+ break;
+ case 10:
+ return $this->getFloElementDestPort();
+ break;
+ case 11:
+ return $this->getFloIsInmediate();
+ break;
+ case 12:
+ return $this->getFloCondition();
+ break;
+ case 13:
+ return $this->getFloX1();
+ break;
+ case 14:
+ return $this->getFloY1();
+ break;
+ case 15:
+ return $this->getFloX2();
+ break;
+ case 16:
+ return $this->getFloY2();
+ break;
+ case 17:
+ return $this->getFloState();
+ 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 = BpmnFlowPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getFloUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getDiaUid(),
+ $keys[3] => $this->getFloType(),
+ $keys[4] => $this->getFloName(),
+ $keys[5] => $this->getFloElementOrigin(),
+ $keys[6] => $this->getFloElementOriginType(),
+ $keys[7] => $this->getFloElementOriginPort(),
+ $keys[8] => $this->getFloElementDest(),
+ $keys[9] => $this->getFloElementDestType(),
+ $keys[10] => $this->getFloElementDestPort(),
+ $keys[11] => $this->getFloIsInmediate(),
+ $keys[12] => $this->getFloCondition(),
+ $keys[13] => $this->getFloX1(),
+ $keys[14] => $this->getFloY1(),
+ $keys[15] => $this->getFloX2(),
+ $keys[16] => $this->getFloY2(),
+ $keys[17] => $this->getFloState(),
+ );
+ 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 = BpmnFlowPeer::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->setFloUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setDiaUid($value);
+ break;
+ case 3:
+ $this->setFloType($value);
+ break;
+ case 4:
+ $this->setFloName($value);
+ break;
+ case 5:
+ $this->setFloElementOrigin($value);
+ break;
+ case 6:
+ $this->setFloElementOriginType($value);
+ break;
+ case 7:
+ $this->setFloElementOriginPort($value);
+ break;
+ case 8:
+ $this->setFloElementDest($value);
+ break;
+ case 9:
+ $this->setFloElementDestType($value);
+ break;
+ case 10:
+ $this->setFloElementDestPort($value);
+ break;
+ case 11:
+ $this->setFloIsInmediate($value);
+ break;
+ case 12:
+ $this->setFloCondition($value);
+ break;
+ case 13:
+ $this->setFloX1($value);
+ break;
+ case 14:
+ $this->setFloY1($value);
+ break;
+ case 15:
+ $this->setFloX2($value);
+ break;
+ case 16:
+ $this->setFloY2($value);
+ break;
+ case 17:
+ $this->setFloState($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 = BpmnFlowPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setFloUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setDiaUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setFloType($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setFloName($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setFloElementOrigin($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setFloElementOriginType($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setFloElementOriginPort($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setFloElementDest($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setFloElementDestType($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setFloElementDestPort($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setFloIsInmediate($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setFloCondition($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setFloX1($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setFloY1($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setFloX2($arr[$keys[15]]);
+ }
+
+ if (array_key_exists($keys[16], $arr)) {
+ $this->setFloY2($arr[$keys[16]]);
+ }
+
+ if (array_key_exists($keys[17], $arr)) {
+ $this->setFloState($arr[$keys[17]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnFlowPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_UID)) {
+ $criteria->add(BpmnFlowPeer::FLO_UID, $this->flo_uid);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::PRJ_UID)) {
+ $criteria->add(BpmnFlowPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::DIA_UID)) {
+ $criteria->add(BpmnFlowPeer::DIA_UID, $this->dia_uid);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_TYPE)) {
+ $criteria->add(BpmnFlowPeer::FLO_TYPE, $this->flo_type);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_NAME)) {
+ $criteria->add(BpmnFlowPeer::FLO_NAME, $this->flo_name);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_ELEMENT_ORIGIN)) {
+ $criteria->add(BpmnFlowPeer::FLO_ELEMENT_ORIGIN, $this->flo_element_origin);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE)) {
+ $criteria->add(BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE, $this->flo_element_origin_type);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT)) {
+ $criteria->add(BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT, $this->flo_element_origin_port);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_ELEMENT_DEST)) {
+ $criteria->add(BpmnFlowPeer::FLO_ELEMENT_DEST, $this->flo_element_dest);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE)) {
+ $criteria->add(BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE, $this->flo_element_dest_type);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_ELEMENT_DEST_PORT)) {
+ $criteria->add(BpmnFlowPeer::FLO_ELEMENT_DEST_PORT, $this->flo_element_dest_port);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_IS_INMEDIATE)) {
+ $criteria->add(BpmnFlowPeer::FLO_IS_INMEDIATE, $this->flo_is_inmediate);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_CONDITION)) {
+ $criteria->add(BpmnFlowPeer::FLO_CONDITION, $this->flo_condition);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_X1)) {
+ $criteria->add(BpmnFlowPeer::FLO_X1, $this->flo_x1);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_Y1)) {
+ $criteria->add(BpmnFlowPeer::FLO_Y1, $this->flo_y1);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_X2)) {
+ $criteria->add(BpmnFlowPeer::FLO_X2, $this->flo_x2);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_Y2)) {
+ $criteria->add(BpmnFlowPeer::FLO_Y2, $this->flo_y2);
+ }
+
+ if ($this->isColumnModified(BpmnFlowPeer::FLO_STATE)) {
+ $criteria->add(BpmnFlowPeer::FLO_STATE, $this->flo_state);
+ }
+
+
+ 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(BpmnFlowPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnFlow (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->setFloUid($this->flo_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setDiaUid($this->dia_uid);
+
+ $copyObj->setFloType($this->flo_type);
+
+ $copyObj->setFloName($this->flo_name);
+
+ $copyObj->setFloElementOrigin($this->flo_element_origin);
+
+ $copyObj->setFloElementOriginType($this->flo_element_origin_type);
+
+ $copyObj->setFloElementOriginPort($this->flo_element_origin_port);
+
+ $copyObj->setFloElementDest($this->flo_element_dest);
+
+ $copyObj->setFloElementDestType($this->flo_element_dest_type);
+
+ $copyObj->setFloElementDestPort($this->flo_element_dest_port);
+
+ $copyObj->setFloIsInmediate($this->flo_is_inmediate);
+
+ $copyObj->setFloCondition($this->flo_condition);
+
+ $copyObj->setFloX1($this->flo_x1);
+
+ $copyObj->setFloY1($this->flo_y1);
+
+ $copyObj->setFloX2($this->flo_x2);
+
+ $copyObj->setFloY2($this->flo_y2);
+
+ $copyObj->setFloState($this->flo_state);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnFlow 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 BpmnFlowPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnFlowPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid('');
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnDiagram object.
+ *
+ * @param BpmnDiagram $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnDiagram($v)
+ {
+
+
+ if ($v === null) {
+ $this->setDiaUid('');
+ } else {
+ $this->setDiaUid($v->getDiaUid());
+ }
+
+
+ $this->aBpmnDiagram = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnDiagram object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnDiagram The associated BpmnDiagram object.
+ * @throws PropelException
+ */
+ public function getBpmnDiagram($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnDiagramPeer.php';
+
+ if ($this->aBpmnDiagram === null && (($this->dia_uid !== "" && $this->dia_uid !== null))) {
+
+ $this->aBpmnDiagram = BpmnDiagramPeer::retrieveByPK($this->dia_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnDiagramPeer::retrieveByPK($this->dia_uid, $con);
+ $obj->addBpmnDiagrams($this);
+ */
+ }
+ return $this->aBpmnDiagram;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnFlowPeer.php b/workflow/engine/classes/model/om/BaseBpmnFlowPeer.php
new file mode 100644
index 000000000..b96ed4266
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnFlowPeer.php
@@ -0,0 +1,1157 @@
+ 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, )
+ );
+
+ /**
+ * 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 ('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, )
+ );
+
+ /**
+ * @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/BpmnFlowMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnFlowMapBuilder');
+ }
+ /**
+ * 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 = BpmnFlowPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnFlowPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnFlowPeer::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(BpmnFlowPeer::FLO_UID);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::DIA_UID);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_TYPE);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_NAME);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_ELEMENT_ORIGIN);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_ELEMENT_ORIGIN_PORT);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_ELEMENT_DEST);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_ELEMENT_DEST_TYPE);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_ELEMENT_DEST_PORT);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_IS_INMEDIATE);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_CONDITION);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_X1);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_Y1);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_X2);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_Y2);
+
+ $criteria->addSelectColumn(BpmnFlowPeer::FLO_STATE);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnFlowPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnFlowPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnFlowPeer::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 BpmnFlow
+ * @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 = BpmnFlowPeer::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 BpmnFlowPeer::populateObjects(BpmnFlowPeer::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;
+ BpmnFlowPeer::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 = BpmnFlowPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnFlowPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnFlowPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnFlowPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnFlowPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnDiagram table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnDiagram(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(BpmnFlowPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnFlowPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnFlowPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BpmnFlowPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnFlow objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnFlow objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnFlowPeer::addSelectColumns($c);
+ $startcol = (BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnFlowPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnFlowPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnFlow($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnFlows();
+ $obj2->addBpmnFlow($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnFlow objects pre-filled with their BpmnDiagram objects.
+ *
+ * @return array Array of BpmnFlow objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnDiagram(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnFlowPeer::addSelectColumns($c);
+ $startcol = (BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnDiagramPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnFlowPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnFlowPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnDiagram(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnFlow($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnFlows();
+ $obj2->addBpmnFlow($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnFlowPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnFlowPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnFlowPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnFlowPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BpmnFlowPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnFlow objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnFlow objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnFlowPeer::addSelectColumns($c);
+ $startcol2 = (BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnDiagramPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnDiagramPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnFlowPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnFlowPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnFlowPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnFlow($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnFlows();
+ $obj2->addBpmnFlow($obj1);
+ }
+
+
+ // Add objects for joined BpmnDiagram rows
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnDiagram(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnFlow($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnFlows();
+ $obj3->addBpmnFlow($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnFlowPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnFlowPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnFlowPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+ $rs = BpmnFlowPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnDiagram table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnDiagram(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(BpmnFlowPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnFlowPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnFlowPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnFlowPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnFlow objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnFlow objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnFlowPeer::addSelectColumns($c);
+ $startcol2 = (BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnDiagramPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnDiagramPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnFlowPeer::DIA_UID, BpmnDiagramPeer::DIA_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnFlowPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnDiagramPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnDiagram(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnFlow($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnFlows();
+ $obj2->addBpmnFlow($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnFlow objects pre-filled with all related objects except BpmnDiagram.
+ *
+ * @return array Array of BpmnFlow objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnDiagram(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnFlowPeer::addSelectColumns($c);
+ $startcol2 = (BpmnFlowPeer::NUM_COLUMNS - BpmnFlowPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnFlowPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnFlowPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnFlow($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnFlows();
+ $obj2->addBpmnFlow($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnFlowPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnFlow or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnFlow 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 BpmnFlow 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 BpmnFlow or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnFlow 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
+
+ } 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 BPMN_FLOW 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(BpmnFlowPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnFlow or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnFlow 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(BpmnFlowPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnFlow) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnFlow 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 BpmnFlow $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(BpmnFlow $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnFlowPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnFlowPeer::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(BpmnFlowPeer::DATABASE_NAME, BpmnFlowPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnFlowPeer::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/BpmnFlowMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnFlowMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnGateway.php b/workflow/engine/classes/model/om/BaseBpmnGateway.php
new file mode 100644
index 000000000..925649407
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnGateway.php
@@ -0,0 +1,1251 @@
+gat_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [gat_name] column value.
+ *
+ * @return string
+ */
+ public function getGatName()
+ {
+
+ return $this->gat_name;
+ }
+
+ /**
+ * Get the [gat_type] column value.
+ *
+ * @return string
+ */
+ public function getGatType()
+ {
+
+ return $this->gat_type;
+ }
+
+ /**
+ * Get the [gat_direction] column value.
+ *
+ * @return string
+ */
+ public function getGatDirection()
+ {
+
+ return $this->gat_direction;
+ }
+
+ /**
+ * Get the [gat_instantiate] column value.
+ *
+ * @return int
+ */
+ public function getGatInstantiate()
+ {
+
+ return $this->gat_instantiate;
+ }
+
+ /**
+ * Get the [gat_event_gatewat_type] column value.
+ *
+ * @return string
+ */
+ public function getGatEventGatewatType()
+ {
+
+ return $this->gat_event_gatewat_type;
+ }
+
+ /**
+ * Get the [gat_activation_count] column value.
+ *
+ * @return int
+ */
+ public function getGatActivationCount()
+ {
+
+ return $this->gat_activation_count;
+ }
+
+ /**
+ * Get the [gat_waiting_for_start] column value.
+ *
+ * @return int
+ */
+ public function getGatWaitingForStart()
+ {
+
+ return $this->gat_waiting_for_start;
+ }
+
+ /**
+ * Get the [gat_default_flow] column value.
+ *
+ * @return string
+ */
+ public function getGatDefaultFlow()
+ {
+
+ return $this->gat_default_flow;
+ }
+
+ /**
+ * Set the value of [gat_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setGatUid($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->gat_uid !== $v || $v === '') {
+ $this->gat_uid = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_UID;
+ }
+
+ } // setGatUid()
+
+ /**
+ * 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 || $v === '') {
+ $this->prj_uid = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::PRO_UID;
+ }
+
+ if ($this->aBpmnProcess !== null && $this->aBpmnProcess->getProUid() !== $v) {
+ $this->aBpmnProcess = null;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [gat_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setGatName($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->gat_name !== $v) {
+ $this->gat_name = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_NAME;
+ }
+
+ } // setGatName()
+
+ /**
+ * Set the value of [gat_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setGatType($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->gat_type !== $v || $v === '') {
+ $this->gat_type = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_TYPE;
+ }
+
+ } // setGatType()
+
+ /**
+ * Set the value of [gat_direction] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setGatDirection($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->gat_direction !== $v || $v === 'UNSPECIFIED') {
+ $this->gat_direction = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_DIRECTION;
+ }
+
+ } // setGatDirection()
+
+ /**
+ * Set the value of [gat_instantiate] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setGatInstantiate($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->gat_instantiate !== $v || $v === 0) {
+ $this->gat_instantiate = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_INSTANTIATE;
+ }
+
+ } // setGatInstantiate()
+
+ /**
+ * Set the value of [gat_event_gatewat_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setGatEventGatewatType($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->gat_event_gatewat_type !== $v || $v === 'NONE') {
+ $this->gat_event_gatewat_type = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_EVENT_GATEWAT_TYPE;
+ }
+
+ } // setGatEventGatewatType()
+
+ /**
+ * Set the value of [gat_activation_count] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setGatActivationCount($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->gat_activation_count !== $v || $v === 0) {
+ $this->gat_activation_count = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_ACTIVATION_COUNT;
+ }
+
+ } // setGatActivationCount()
+
+ /**
+ * Set the value of [gat_waiting_for_start] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setGatWaitingForStart($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->gat_waiting_for_start !== $v || $v === 1) {
+ $this->gat_waiting_for_start = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_WAITING_FOR_START;
+ }
+
+ } // setGatWaitingForStart()
+
+ /**
+ * Set the value of [gat_default_flow] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setGatDefaultFlow($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->gat_default_flow !== $v || $v === '') {
+ $this->gat_default_flow = $v;
+ $this->modifiedColumns[] = BpmnGatewayPeer::GAT_DEFAULT_FLOW;
+ }
+
+ } // setGatDefaultFlow()
+
+ /**
+ * 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->gat_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->pro_uid = $rs->getString($startcol + 2);
+
+ $this->gat_name = $rs->getString($startcol + 3);
+
+ $this->gat_type = $rs->getString($startcol + 4);
+
+ $this->gat_direction = $rs->getString($startcol + 5);
+
+ $this->gat_instantiate = $rs->getInt($startcol + 6);
+
+ $this->gat_event_gatewat_type = $rs->getString($startcol + 7);
+
+ $this->gat_activation_count = $rs->getInt($startcol + 8);
+
+ $this->gat_waiting_for_start = $rs->getInt($startcol + 9);
+
+ $this->gat_default_flow = $rs->getString($startcol + 10);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 11; // 11 = BpmnGatewayPeer::NUM_COLUMNS - BpmnGatewayPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnGateway 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(BpmnGatewayPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnGatewayPeer::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(BpmnGatewayPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if ($this->aBpmnProcess->isModified()) {
+ $affectedRows += $this->aBpmnProcess->save($con);
+ }
+ $this->setBpmnProcess($this->aBpmnProcess);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnGatewayPeer::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 += BpmnGatewayPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if (!$this->aBpmnProcess->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProcess->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnGatewayPeer::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 = BpmnGatewayPeer::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->getGatUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getProUid();
+ break;
+ case 3:
+ return $this->getGatName();
+ break;
+ case 4:
+ return $this->getGatType();
+ break;
+ case 5:
+ return $this->getGatDirection();
+ break;
+ case 6:
+ return $this->getGatInstantiate();
+ break;
+ case 7:
+ return $this->getGatEventGatewatType();
+ break;
+ case 8:
+ return $this->getGatActivationCount();
+ break;
+ case 9:
+ return $this->getGatWaitingForStart();
+ break;
+ case 10:
+ return $this->getGatDefaultFlow();
+ 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 = BpmnGatewayPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getGatUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getProUid(),
+ $keys[3] => $this->getGatName(),
+ $keys[4] => $this->getGatType(),
+ $keys[5] => $this->getGatDirection(),
+ $keys[6] => $this->getGatInstantiate(),
+ $keys[7] => $this->getGatEventGatewatType(),
+ $keys[8] => $this->getGatActivationCount(),
+ $keys[9] => $this->getGatWaitingForStart(),
+ $keys[10] => $this->getGatDefaultFlow(),
+ );
+ 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 = BpmnGatewayPeer::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->setGatUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setProUid($value);
+ break;
+ case 3:
+ $this->setGatName($value);
+ break;
+ case 4:
+ $this->setGatType($value);
+ break;
+ case 5:
+ $this->setGatDirection($value);
+ break;
+ case 6:
+ $this->setGatInstantiate($value);
+ break;
+ case 7:
+ $this->setGatEventGatewatType($value);
+ break;
+ case 8:
+ $this->setGatActivationCount($value);
+ break;
+ case 9:
+ $this->setGatWaitingForStart($value);
+ break;
+ case 10:
+ $this->setGatDefaultFlow($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 = BpmnGatewayPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setGatUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setProUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setGatName($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setGatType($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setGatDirection($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setGatInstantiate($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setGatEventGatewatType($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setGatActivationCount($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setGatWaitingForStart($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setGatDefaultFlow($arr[$keys[10]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnGatewayPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_UID)) {
+ $criteria->add(BpmnGatewayPeer::GAT_UID, $this->gat_uid);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::PRJ_UID)) {
+ $criteria->add(BpmnGatewayPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::PRO_UID)) {
+ $criteria->add(BpmnGatewayPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_NAME)) {
+ $criteria->add(BpmnGatewayPeer::GAT_NAME, $this->gat_name);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_TYPE)) {
+ $criteria->add(BpmnGatewayPeer::GAT_TYPE, $this->gat_type);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_DIRECTION)) {
+ $criteria->add(BpmnGatewayPeer::GAT_DIRECTION, $this->gat_direction);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_INSTANTIATE)) {
+ $criteria->add(BpmnGatewayPeer::GAT_INSTANTIATE, $this->gat_instantiate);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_EVENT_GATEWAT_TYPE)) {
+ $criteria->add(BpmnGatewayPeer::GAT_EVENT_GATEWAT_TYPE, $this->gat_event_gatewat_type);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_ACTIVATION_COUNT)) {
+ $criteria->add(BpmnGatewayPeer::GAT_ACTIVATION_COUNT, $this->gat_activation_count);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_WAITING_FOR_START)) {
+ $criteria->add(BpmnGatewayPeer::GAT_WAITING_FOR_START, $this->gat_waiting_for_start);
+ }
+
+ if ($this->isColumnModified(BpmnGatewayPeer::GAT_DEFAULT_FLOW)) {
+ $criteria->add(BpmnGatewayPeer::GAT_DEFAULT_FLOW, $this->gat_default_flow);
+ }
+
+
+ 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(BpmnGatewayPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnGateway (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->setGatUid($this->gat_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setGatName($this->gat_name);
+
+ $copyObj->setGatType($this->gat_type);
+
+ $copyObj->setGatDirection($this->gat_direction);
+
+ $copyObj->setGatInstantiate($this->gat_instantiate);
+
+ $copyObj->setGatEventGatewatType($this->gat_event_gatewat_type);
+
+ $copyObj->setGatActivationCount($this->gat_activation_count);
+
+ $copyObj->setGatWaitingForStart($this->gat_waiting_for_start);
+
+ $copyObj->setGatDefaultFlow($this->gat_default_flow);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnGateway 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 BpmnGatewayPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnGatewayPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid('');
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProcess object.
+ *
+ * @param BpmnProcess $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProcess($v)
+ {
+
+
+ if ($v === null) {
+ $this->setProUid('');
+ } else {
+ $this->setProUid($v->getProUid());
+ }
+
+
+ $this->aBpmnProcess = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProcess object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProcess The associated BpmnProcess object.
+ * @throws PropelException
+ */
+ public function getBpmnProcess($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+
+ if ($this->aBpmnProcess === null && (($this->pro_uid !== "" && $this->pro_uid !== null))) {
+
+ $this->aBpmnProcess = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+ $obj->addBpmnProcesss($this);
+ */
+ }
+ return $this->aBpmnProcess;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnGatewayPeer.php b/workflow/engine/classes/model/om/BaseBpmnGatewayPeer.php
new file mode 100644
index 000000000..c9fb8f00c
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnGatewayPeer.php
@@ -0,0 +1,1122 @@
+ array ('GatUid', 'PrjUid', 'ProUid', 'GatName', 'GatType', 'GatDirection', 'GatInstantiate', 'GatEventGatewatType', 'GatActivationCount', 'GatWaitingForStart', 'GatDefaultFlow', ),
+ BasePeer::TYPE_COLNAME => array (BpmnGatewayPeer::GAT_UID, BpmnGatewayPeer::PRJ_UID, BpmnGatewayPeer::PRO_UID, BpmnGatewayPeer::GAT_NAME, BpmnGatewayPeer::GAT_TYPE, BpmnGatewayPeer::GAT_DIRECTION, BpmnGatewayPeer::GAT_INSTANTIATE, BpmnGatewayPeer::GAT_EVENT_GATEWAT_TYPE, BpmnGatewayPeer::GAT_ACTIVATION_COUNT, BpmnGatewayPeer::GAT_WAITING_FOR_START, BpmnGatewayPeer::GAT_DEFAULT_FLOW, ),
+ BasePeer::TYPE_FIELDNAME => array ('GAT_UID', 'PRJ_UID', 'PRO_UID', 'GAT_NAME', 'GAT_TYPE', 'GAT_DIRECTION', 'GAT_INSTANTIATE', 'GAT_EVENT_GATEWAT_TYPE', 'GAT_ACTIVATION_COUNT', 'GAT_WAITING_FOR_START', 'GAT_DEFAULT_FLOW', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
+ );
+
+ /**
+ * 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 ('GatUid' => 0, 'PrjUid' => 1, 'ProUid' => 2, 'GatName' => 3, 'GatType' => 4, 'GatDirection' => 5, 'GatInstantiate' => 6, 'GatEventGatewatType' => 7, 'GatActivationCount' => 8, 'GatWaitingForStart' => 9, 'GatDefaultFlow' => 10, ),
+ BasePeer::TYPE_COLNAME => array (BpmnGatewayPeer::GAT_UID => 0, BpmnGatewayPeer::PRJ_UID => 1, BpmnGatewayPeer::PRO_UID => 2, BpmnGatewayPeer::GAT_NAME => 3, BpmnGatewayPeer::GAT_TYPE => 4, BpmnGatewayPeer::GAT_DIRECTION => 5, BpmnGatewayPeer::GAT_INSTANTIATE => 6, BpmnGatewayPeer::GAT_EVENT_GATEWAT_TYPE => 7, BpmnGatewayPeer::GAT_ACTIVATION_COUNT => 8, BpmnGatewayPeer::GAT_WAITING_FOR_START => 9, BpmnGatewayPeer::GAT_DEFAULT_FLOW => 10, ),
+ BasePeer::TYPE_FIELDNAME => array ('GAT_UID' => 0, 'PRJ_UID' => 1, 'PRO_UID' => 2, 'GAT_NAME' => 3, 'GAT_TYPE' => 4, 'GAT_DIRECTION' => 5, 'GAT_INSTANTIATE' => 6, 'GAT_EVENT_GATEWAT_TYPE' => 7, 'GAT_ACTIVATION_COUNT' => 8, 'GAT_WAITING_FOR_START' => 9, 'GAT_DEFAULT_FLOW' => 10, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
+ );
+
+ /**
+ * @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/BpmnGatewayMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnGatewayMapBuilder');
+ }
+ /**
+ * 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 = BpmnGatewayPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnGatewayPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnGatewayPeer::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(BpmnGatewayPeer::GAT_UID);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_NAME);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_TYPE);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_DIRECTION);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_INSTANTIATE);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_EVENT_GATEWAT_TYPE);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_ACTIVATION_COUNT);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_WAITING_FOR_START);
+
+ $criteria->addSelectColumn(BpmnGatewayPeer::GAT_DEFAULT_FLOW);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnGatewayPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnGatewayPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnGatewayPeer::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 BpmnGateway
+ * @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 = BpmnGatewayPeer::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 BpmnGatewayPeer::populateObjects(BpmnGatewayPeer::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;
+ BpmnGatewayPeer::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 = BpmnGatewayPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnGatewayPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnGatewayPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnGatewayPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnGatewayPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProcess(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(BpmnGatewayPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnGatewayPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnGatewayPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnGatewayPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnGateway objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnGateway objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnGatewayPeer::addSelectColumns($c);
+ $startcol = (BpmnGatewayPeer::NUM_COLUMNS - BpmnGatewayPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnGatewayPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnGatewayPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnGateway($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnGateways();
+ $obj2->addBpmnGateway($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnGateway objects pre-filled with their BpmnProcess objects.
+ *
+ * @return array Array of BpmnGateway objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnGatewayPeer::addSelectColumns($c);
+ $startcol = (BpmnGatewayPeer::NUM_COLUMNS - BpmnGatewayPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProcessPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnGatewayPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnGatewayPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnGateway($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnGateways();
+ $obj2->addBpmnGateway($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnGatewayPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnGatewayPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnGatewayPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnGatewayPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnGatewayPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnGateway objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnGateway objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnGatewayPeer::addSelectColumns($c);
+ $startcol2 = (BpmnGatewayPeer::NUM_COLUMNS - BpmnGatewayPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnGatewayPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnGatewayPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnGatewayPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnGateway($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnGateways();
+ $obj2->addBpmnGateway($obj1);
+ }
+
+
+ // Add objects for joined BpmnProcess rows
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnProcess(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnGateway($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnGateways();
+ $obj3->addBpmnGateway($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnGatewayPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnGatewayPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnGatewayPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnGatewayPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProcess(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(BpmnGatewayPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnGatewayPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnGatewayPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnGatewayPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnGateway objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnGateway objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnGatewayPeer::addSelectColumns($c);
+ $startcol2 = (BpmnGatewayPeer::NUM_COLUMNS - BpmnGatewayPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnGatewayPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnGatewayPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnGateway($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnGateways();
+ $obj2->addBpmnGateway($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnGateway objects pre-filled with all related objects except BpmnProcess.
+ *
+ * @return array Array of BpmnGateway objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnGatewayPeer::addSelectColumns($c);
+ $startcol2 = (BpmnGatewayPeer::NUM_COLUMNS - BpmnGatewayPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnGatewayPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnGatewayPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnGateway($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnGateways();
+ $obj2->addBpmnGateway($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnGatewayPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnGateway or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnGateway 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 BpmnGateway 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 BpmnGateway or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnGateway 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
+
+ } 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 BPMN_GATEWAY 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(BpmnGatewayPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnGateway or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnGateway 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(BpmnGatewayPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnGateway) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnGateway 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 BpmnGateway $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(BpmnGateway $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnGatewayPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnGatewayPeer::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(BpmnGatewayPeer::DATABASE_NAME, BpmnGatewayPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnGatewayPeer::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/BpmnGatewayMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnGatewayMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnLane.php b/workflow/engine/classes/model/om/BaseBpmnLane.php
new file mode 100644
index 000000000..5c8a2641b
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnLane.php
@@ -0,0 +1,961 @@
+lan_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [lns_uid] column value.
+ *
+ * @return string
+ */
+ public function getLnsUid()
+ {
+
+ return $this->lns_uid;
+ }
+
+ /**
+ * Get the [lan_name] column value.
+ *
+ * @return string
+ */
+ public function getLanName()
+ {
+
+ return $this->lan_name;
+ }
+
+ /**
+ * Get the [lan_child_laneset] column value.
+ *
+ * @return string
+ */
+ public function getLanChildLaneset()
+ {
+
+ return $this->lan_child_laneset;
+ }
+
+ /**
+ * Get the [lan_is_horizontal] column value.
+ *
+ * @return int
+ */
+ public function getLanIsHorizontal()
+ {
+
+ return $this->lan_is_horizontal;
+ }
+
+ /**
+ * Set the value of [lan_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLanUid($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->lan_uid !== $v || $v === '') {
+ $this->lan_uid = $v;
+ $this->modifiedColumns[] = BpmnLanePeer::LAN_UID;
+ }
+
+ } // setLanUid()
+
+ /**
+ * 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[] = BpmnLanePeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [lns_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLnsUid($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->lns_uid !== $v) {
+ $this->lns_uid = $v;
+ $this->modifiedColumns[] = BpmnLanePeer::LNS_UID;
+ }
+
+ if ($this->aBpmnLaneset !== null && $this->aBpmnLaneset->getLnsUid() !== $v) {
+ $this->aBpmnLaneset = null;
+ }
+
+ } // setLnsUid()
+
+ /**
+ * Set the value of [lan_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLanName($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->lan_name !== $v) {
+ $this->lan_name = $v;
+ $this->modifiedColumns[] = BpmnLanePeer::LAN_NAME;
+ }
+
+ } // setLanName()
+
+ /**
+ * Set the value of [lan_child_laneset] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLanChildLaneset($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->lan_child_laneset !== $v) {
+ $this->lan_child_laneset = $v;
+ $this->modifiedColumns[] = BpmnLanePeer::LAN_CHILD_LANESET;
+ }
+
+ } // setLanChildLaneset()
+
+ /**
+ * Set the value of [lan_is_horizontal] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setLanIsHorizontal($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->lan_is_horizontal !== $v || $v === 1) {
+ $this->lan_is_horizontal = $v;
+ $this->modifiedColumns[] = BpmnLanePeer::LAN_IS_HORIZONTAL;
+ }
+
+ } // setLanIsHorizontal()
+
+ /**
+ * 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->lan_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->lns_uid = $rs->getString($startcol + 2);
+
+ $this->lan_name = $rs->getString($startcol + 3);
+
+ $this->lan_child_laneset = $rs->getString($startcol + 4);
+
+ $this->lan_is_horizontal = $rs->getInt($startcol + 5);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 6; // 6 = BpmnLanePeer::NUM_COLUMNS - BpmnLanePeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnLane 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(BpmnLanePeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnLanePeer::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(BpmnLanePeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnLaneset !== null) {
+ if ($this->aBpmnLaneset->isModified()) {
+ $affectedRows += $this->aBpmnLaneset->save($con);
+ }
+ $this->setBpmnLaneset($this->aBpmnLaneset);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnLanePeer::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 += BpmnLanePeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnLaneset !== null) {
+ if (!$this->aBpmnLaneset->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnLaneset->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnLanePeer::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 = BpmnLanePeer::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->getLanUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getLnsUid();
+ break;
+ case 3:
+ return $this->getLanName();
+ break;
+ case 4:
+ return $this->getLanChildLaneset();
+ break;
+ case 5:
+ return $this->getLanIsHorizontal();
+ 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 = BpmnLanePeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getLanUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getLnsUid(),
+ $keys[3] => $this->getLanName(),
+ $keys[4] => $this->getLanChildLaneset(),
+ $keys[5] => $this->getLanIsHorizontal(),
+ );
+ 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 = BpmnLanePeer::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->setLanUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setLnsUid($value);
+ break;
+ case 3:
+ $this->setLanName($value);
+ break;
+ case 4:
+ $this->setLanChildLaneset($value);
+ break;
+ case 5:
+ $this->setLanIsHorizontal($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 = BpmnLanePeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setLanUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setLnsUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setLanName($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setLanChildLaneset($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setLanIsHorizontal($arr[$keys[5]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnLanePeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnLanePeer::LAN_UID)) {
+ $criteria->add(BpmnLanePeer::LAN_UID, $this->lan_uid);
+ }
+
+ if ($this->isColumnModified(BpmnLanePeer::PRJ_UID)) {
+ $criteria->add(BpmnLanePeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnLanePeer::LNS_UID)) {
+ $criteria->add(BpmnLanePeer::LNS_UID, $this->lns_uid);
+ }
+
+ if ($this->isColumnModified(BpmnLanePeer::LAN_NAME)) {
+ $criteria->add(BpmnLanePeer::LAN_NAME, $this->lan_name);
+ }
+
+ if ($this->isColumnModified(BpmnLanePeer::LAN_CHILD_LANESET)) {
+ $criteria->add(BpmnLanePeer::LAN_CHILD_LANESET, $this->lan_child_laneset);
+ }
+
+ if ($this->isColumnModified(BpmnLanePeer::LAN_IS_HORIZONTAL)) {
+ $criteria->add(BpmnLanePeer::LAN_IS_HORIZONTAL, $this->lan_is_horizontal);
+ }
+
+
+ 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(BpmnLanePeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnLane (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->setLanUid($this->lan_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setLnsUid($this->lns_uid);
+
+ $copyObj->setLanName($this->lan_name);
+
+ $copyObj->setLanChildLaneset($this->lan_child_laneset);
+
+ $copyObj->setLanIsHorizontal($this->lan_is_horizontal);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnLane 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 BpmnLanePeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnLanePeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnLaneset object.
+ *
+ * @param BpmnLaneset $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnLaneset($v)
+ {
+
+
+ if ($v === null) {
+ $this->setLnsUid(NULL);
+ } else {
+ $this->setLnsUid($v->getLnsUid());
+ }
+
+
+ $this->aBpmnLaneset = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnLaneset object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnLaneset The associated BpmnLaneset object.
+ * @throws PropelException
+ */
+ public function getBpmnLaneset($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
+
+ if ($this->aBpmnLaneset === null && (($this->lns_uid !== "" && $this->lns_uid !== null))) {
+
+ $this->aBpmnLaneset = BpmnLanesetPeer::retrieveByPK($this->lns_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnLanesetPeer::retrieveByPK($this->lns_uid, $con);
+ $obj->addBpmnLanesets($this);
+ */
+ }
+ return $this->aBpmnLaneset;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnLanePeer.php b/workflow/engine/classes/model/om/BaseBpmnLanePeer.php
new file mode 100644
index 000000000..127bbb116
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnLanePeer.php
@@ -0,0 +1,1097 @@
+ array ('LanUid', 'PrjUid', 'LnsUid', 'LanName', 'LanChildLaneset', 'LanIsHorizontal', ),
+ BasePeer::TYPE_COLNAME => array (BpmnLanePeer::LAN_UID, BpmnLanePeer::PRJ_UID, BpmnLanePeer::LNS_UID, BpmnLanePeer::LAN_NAME, BpmnLanePeer::LAN_CHILD_LANESET, BpmnLanePeer::LAN_IS_HORIZONTAL, ),
+ BasePeer::TYPE_FIELDNAME => array ('LAN_UID', 'PRJ_UID', 'LNS_UID', 'LAN_NAME', 'LAN_CHILD_LANESET', 'LAN_IS_HORIZONTAL', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
+ );
+
+ /**
+ * 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 ('LanUid' => 0, 'PrjUid' => 1, 'LnsUid' => 2, 'LanName' => 3, 'LanChildLaneset' => 4, 'LanIsHorizontal' => 5, ),
+ BasePeer::TYPE_COLNAME => array (BpmnLanePeer::LAN_UID => 0, BpmnLanePeer::PRJ_UID => 1, BpmnLanePeer::LNS_UID => 2, BpmnLanePeer::LAN_NAME => 3, BpmnLanePeer::LAN_CHILD_LANESET => 4, BpmnLanePeer::LAN_IS_HORIZONTAL => 5, ),
+ BasePeer::TYPE_FIELDNAME => array ('LAN_UID' => 0, 'PRJ_UID' => 1, 'LNS_UID' => 2, 'LAN_NAME' => 3, 'LAN_CHILD_LANESET' => 4, 'LAN_IS_HORIZONTAL' => 5, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
+ );
+
+ /**
+ * @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/BpmnLaneMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnLaneMapBuilder');
+ }
+ /**
+ * 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 = BpmnLanePeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnLanePeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnLanePeer::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(BpmnLanePeer::LAN_UID);
+
+ $criteria->addSelectColumn(BpmnLanePeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnLanePeer::LNS_UID);
+
+ $criteria->addSelectColumn(BpmnLanePeer::LAN_NAME);
+
+ $criteria->addSelectColumn(BpmnLanePeer::LAN_CHILD_LANESET);
+
+ $criteria->addSelectColumn(BpmnLanePeer::LAN_IS_HORIZONTAL);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnLanePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanePeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnLanePeer::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 BpmnLane
+ * @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 = BpmnLanePeer::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 BpmnLanePeer::populateObjects(BpmnLanePeer::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;
+ BpmnLanePeer::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 = BpmnLanePeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnLanePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanePeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanePeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnLanePeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnLaneset table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnLaneset(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(BpmnLanePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanePeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanePeer::LNS_UID, BpmnLanesetPeer::LNS_UID);
+
+ $rs = BpmnLanePeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnLane objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnLane objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanePeer::addSelectColumns($c);
+ $startcol = (BpmnLanePeer::NUM_COLUMNS - BpmnLanePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnLanePeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanePeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnLane($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnLanes();
+ $obj2->addBpmnLane($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnLane objects pre-filled with their BpmnLaneset objects.
+ *
+ * @return array Array of BpmnLane objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnLaneset(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanePeer::addSelectColumns($c);
+ $startcol = (BpmnLanePeer::NUM_COLUMNS - BpmnLanePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnLanesetPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnLanePeer::LNS_UID, BpmnLanesetPeer::LNS_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanePeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnLaneset(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnLane($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnLanes();
+ $obj2->addBpmnLane($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnLanePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanePeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanePeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnLanePeer::LNS_UID, BpmnLanesetPeer::LNS_UID);
+
+ $rs = BpmnLanePeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnLane objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnLane objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanePeer::addSelectColumns($c);
+ $startcol2 = (BpmnLanePeer::NUM_COLUMNS - BpmnLanePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnLanesetPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnLanesetPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnLanePeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnLanePeer::LNS_UID, BpmnLanesetPeer::LNS_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanePeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnLane($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnLanes();
+ $obj2->addBpmnLane($obj1);
+ }
+
+
+ // Add objects for joined BpmnLaneset rows
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnLaneset(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnLane($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnLanes();
+ $obj3->addBpmnLane($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnLanePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanePeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanePeer::LNS_UID, BpmnLanesetPeer::LNS_UID);
+
+ $rs = BpmnLanePeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnLaneset table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnLaneset(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(BpmnLanePeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanePeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanePeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnLanePeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnLane objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnLane objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanePeer::addSelectColumns($c);
+ $startcol2 = (BpmnLanePeer::NUM_COLUMNS - BpmnLanePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnLanesetPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnLanesetPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnLanePeer::LNS_UID, BpmnLanesetPeer::LNS_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanePeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnLaneset(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnLane($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnLanes();
+ $obj2->addBpmnLane($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnLane objects pre-filled with all related objects except BpmnLaneset.
+ *
+ * @return array Array of BpmnLane objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnLaneset(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanePeer::addSelectColumns($c);
+ $startcol2 = (BpmnLanePeer::NUM_COLUMNS - BpmnLanePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnLanePeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanePeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnLane($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnLanes();
+ $obj2->addBpmnLane($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnLanePeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnLane or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnLane 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 BpmnLane 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 BpmnLane or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnLane 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
+
+ } 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 BPMN_LANE 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(BpmnLanePeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnLane or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnLane 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(BpmnLanePeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnLane) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnLane 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 BpmnLane $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(BpmnLane $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnLanePeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnLanePeer::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(BpmnLanePeer::DATABASE_NAME, BpmnLanePeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnLanePeer::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/BpmnLaneMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnLaneMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnLaneset.php b/workflow/engine/classes/model/om/BaseBpmnLaneset.php
new file mode 100644
index 000000000..4882ec04f
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnLaneset.php
@@ -0,0 +1,1215 @@
+lns_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [lns_name] column value.
+ *
+ * @return string
+ */
+ public function getLnsName()
+ {
+
+ return $this->lns_name;
+ }
+
+ /**
+ * Get the [lns_parent_lane] column value.
+ *
+ * @return string
+ */
+ public function getLnsParentLane()
+ {
+
+ return $this->lns_parent_lane;
+ }
+
+ /**
+ * Get the [lns_is_horizontal] column value.
+ *
+ * @return int
+ */
+ public function getLnsIsHorizontal()
+ {
+
+ return $this->lns_is_horizontal;
+ }
+
+ /**
+ * Get the [lns_state] column value.
+ *
+ * @return string
+ */
+ public function getLnsState()
+ {
+
+ return $this->lns_state;
+ }
+
+ /**
+ * Set the value of [lns_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLnsUid($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->lns_uid !== $v || $v === '') {
+ $this->lns_uid = $v;
+ $this->modifiedColumns[] = BpmnLanesetPeer::LNS_UID;
+ }
+
+ } // setLnsUid()
+
+ /**
+ * 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[] = BpmnLanesetPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v) {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnLanesetPeer::PRO_UID;
+ }
+
+ if ($this->aBpmnProcess !== null && $this->aBpmnProcess->getProUid() !== $v) {
+ $this->aBpmnProcess = null;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [lns_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLnsName($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->lns_name !== $v) {
+ $this->lns_name = $v;
+ $this->modifiedColumns[] = BpmnLanesetPeer::LNS_NAME;
+ }
+
+ } // setLnsName()
+
+ /**
+ * Set the value of [lns_parent_lane] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLnsParentLane($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->lns_parent_lane !== $v) {
+ $this->lns_parent_lane = $v;
+ $this->modifiedColumns[] = BpmnLanesetPeer::LNS_PARENT_LANE;
+ }
+
+ } // setLnsParentLane()
+
+ /**
+ * Set the value of [lns_is_horizontal] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setLnsIsHorizontal($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->lns_is_horizontal !== $v || $v === 1) {
+ $this->lns_is_horizontal = $v;
+ $this->modifiedColumns[] = BpmnLanesetPeer::LNS_IS_HORIZONTAL;
+ }
+
+ } // setLnsIsHorizontal()
+
+ /**
+ * Set the value of [lns_state] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLnsState($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->lns_state !== $v) {
+ $this->lns_state = $v;
+ $this->modifiedColumns[] = BpmnLanesetPeer::LNS_STATE;
+ }
+
+ } // setLnsState()
+
+ /**
+ * 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->lns_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->pro_uid = $rs->getString($startcol + 2);
+
+ $this->lns_name = $rs->getString($startcol + 3);
+
+ $this->lns_parent_lane = $rs->getString($startcol + 4);
+
+ $this->lns_is_horizontal = $rs->getInt($startcol + 5);
+
+ $this->lns_state = $rs->getString($startcol + 6);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 7; // 7 = BpmnLanesetPeer::NUM_COLUMNS - BpmnLanesetPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnLaneset 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(BpmnLanesetPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnLanesetPeer::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(BpmnLanesetPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if ($this->aBpmnProcess->isModified()) {
+ $affectedRows += $this->aBpmnProcess->save($con);
+ }
+ $this->setBpmnProcess($this->aBpmnProcess);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnLanesetPeer::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 += BpmnLanesetPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ if ($this->collBpmnLanes !== null) {
+ foreach($this->collBpmnLanes as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ $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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+ if ($this->aBpmnProcess !== null) {
+ if (!$this->aBpmnProcess->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProcess->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnLanesetPeer::doValidate($this, $columns)) !== true) {
+ $failureMap = array_merge($failureMap, $retval);
+ }
+
+
+ if ($this->collBpmnLanes !== null) {
+ foreach($this->collBpmnLanes as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+
+ $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 = BpmnLanesetPeer::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->getLnsUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getProUid();
+ break;
+ case 3:
+ return $this->getLnsName();
+ break;
+ case 4:
+ return $this->getLnsParentLane();
+ break;
+ case 5:
+ return $this->getLnsIsHorizontal();
+ break;
+ case 6:
+ return $this->getLnsState();
+ 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 = BpmnLanesetPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getLnsUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getProUid(),
+ $keys[3] => $this->getLnsName(),
+ $keys[4] => $this->getLnsParentLane(),
+ $keys[5] => $this->getLnsIsHorizontal(),
+ $keys[6] => $this->getLnsState(),
+ );
+ 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 = BpmnLanesetPeer::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->setLnsUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setProUid($value);
+ break;
+ case 3:
+ $this->setLnsName($value);
+ break;
+ case 4:
+ $this->setLnsParentLane($value);
+ break;
+ case 5:
+ $this->setLnsIsHorizontal($value);
+ break;
+ case 6:
+ $this->setLnsState($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 = BpmnLanesetPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setLnsUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setProUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setLnsName($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setLnsParentLane($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setLnsIsHorizontal($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setLnsState($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(BpmnLanesetPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnLanesetPeer::LNS_UID)) {
+ $criteria->add(BpmnLanesetPeer::LNS_UID, $this->lns_uid);
+ }
+
+ if ($this->isColumnModified(BpmnLanesetPeer::PRJ_UID)) {
+ $criteria->add(BpmnLanesetPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnLanesetPeer::PRO_UID)) {
+ $criteria->add(BpmnLanesetPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnLanesetPeer::LNS_NAME)) {
+ $criteria->add(BpmnLanesetPeer::LNS_NAME, $this->lns_name);
+ }
+
+ if ($this->isColumnModified(BpmnLanesetPeer::LNS_PARENT_LANE)) {
+ $criteria->add(BpmnLanesetPeer::LNS_PARENT_LANE, $this->lns_parent_lane);
+ }
+
+ if ($this->isColumnModified(BpmnLanesetPeer::LNS_IS_HORIZONTAL)) {
+ $criteria->add(BpmnLanesetPeer::LNS_IS_HORIZONTAL, $this->lns_is_horizontal);
+ }
+
+ if ($this->isColumnModified(BpmnLanesetPeer::LNS_STATE)) {
+ $criteria->add(BpmnLanesetPeer::LNS_STATE, $this->lns_state);
+ }
+
+
+ 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(BpmnLanesetPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnLaneset (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->setLnsUid($this->lns_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setLnsName($this->lns_name);
+
+ $copyObj->setLnsParentLane($this->lns_parent_lane);
+
+ $copyObj->setLnsIsHorizontal($this->lns_is_horizontal);
+
+ $copyObj->setLnsState($this->lns_state);
+
+
+ if ($deepCopy) {
+ // important: temporarily setNew(false) because this affects the behavior of
+ // the getter/setter methods for fkey referrer objects.
+ $copyObj->setNew(false);
+
+ foreach($this->getBpmnLanes() as $relObj) {
+ $copyObj->addBpmnLane($relObj->copy($deepCopy));
+ }
+
+ } // if ($deepCopy)
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnLaneset 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 BpmnLanesetPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnLanesetPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProcess object.
+ *
+ * @param BpmnProcess $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProcess($v)
+ {
+
+
+ if ($v === null) {
+ $this->setProUid(NULL);
+ } else {
+ $this->setProUid($v->getProUid());
+ }
+
+
+ $this->aBpmnProcess = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProcess object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProcess The associated BpmnProcess object.
+ * @throws PropelException
+ */
+ public function getBpmnProcess($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+
+ if ($this->aBpmnProcess === null && (($this->pro_uid !== "" && $this->pro_uid !== null))) {
+
+ $this->aBpmnProcess = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProcessPeer::retrieveByPK($this->pro_uid, $con);
+ $obj->addBpmnProcesss($this);
+ */
+ }
+ return $this->aBpmnProcess;
+ }
+
+ /**
+ * Temporary storage of collBpmnLanes to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnLanes()
+ {
+ if ($this->collBpmnLanes === null) {
+ $this->collBpmnLanes = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnLaneset has previously
+ * been saved, it will retrieve related BpmnLanes from storage.
+ * If this BpmnLaneset is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnLanes($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanes === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanes = array();
+ } else {
+
+ $criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
+
+ BpmnLanePeer::addSelectColumns($criteria);
+ $this->collBpmnLanes = BpmnLanePeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
+
+ BpmnLanePeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnLaneCriteria) || !$this->lastBpmnLaneCriteria->equals($criteria)) {
+ $this->collBpmnLanes = BpmnLanePeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnLaneCriteria = $criteria;
+ return $this->collBpmnLanes;
+ }
+
+ /**
+ * Returns the number of related BpmnLanes.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnLanes($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
+
+ return BpmnLanePeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnLane object to this object
+ * through the BpmnLane foreign key attribute
+ *
+ * @param BpmnLane $l BpmnLane
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnLane(BpmnLane $l)
+ {
+ $this->collBpmnLanes[] = $l;
+ $l->setBpmnLaneset($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnLaneset is new, it will return
+ * an empty collection; or if this BpmnLaneset has previously
+ * been saved, it will retrieve related BpmnLanes from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnLaneset.
+ */
+ public function getBpmnLanesJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanes === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanes = array();
+ } else {
+
+ $criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
+
+ $this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
+
+ if (!isset($this->lastBpmnLaneCriteria) || !$this->lastBpmnLaneCriteria->equals($criteria)) {
+ $this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnLaneCriteria = $criteria;
+
+ return $this->collBpmnLanes;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnLanesetPeer.php b/workflow/engine/classes/model/om/BaseBpmnLanesetPeer.php
new file mode 100644
index 000000000..ac7a1b60a
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnLanesetPeer.php
@@ -0,0 +1,1102 @@
+ array ('LnsUid', 'PrjUid', 'ProUid', 'LnsName', 'LnsParentLane', 'LnsIsHorizontal', 'LnsState', ),
+ BasePeer::TYPE_COLNAME => array (BpmnLanesetPeer::LNS_UID, BpmnLanesetPeer::PRJ_UID, BpmnLanesetPeer::PRO_UID, BpmnLanesetPeer::LNS_NAME, BpmnLanesetPeer::LNS_PARENT_LANE, BpmnLanesetPeer::LNS_IS_HORIZONTAL, BpmnLanesetPeer::LNS_STATE, ),
+ BasePeer::TYPE_FIELDNAME => array ('LNS_UID', 'PRJ_UID', 'PRO_UID', 'LNS_NAME', 'LNS_PARENT_LANE', 'LNS_IS_HORIZONTAL', 'LNS_STATE', ),
+ 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 ('LnsUid' => 0, 'PrjUid' => 1, 'ProUid' => 2, 'LnsName' => 3, 'LnsParentLane' => 4, 'LnsIsHorizontal' => 5, 'LnsState' => 6, ),
+ BasePeer::TYPE_COLNAME => array (BpmnLanesetPeer::LNS_UID => 0, BpmnLanesetPeer::PRJ_UID => 1, BpmnLanesetPeer::PRO_UID => 2, BpmnLanesetPeer::LNS_NAME => 3, BpmnLanesetPeer::LNS_PARENT_LANE => 4, BpmnLanesetPeer::LNS_IS_HORIZONTAL => 5, BpmnLanesetPeer::LNS_STATE => 6, ),
+ BasePeer::TYPE_FIELDNAME => array ('LNS_UID' => 0, 'PRJ_UID' => 1, 'PRO_UID' => 2, 'LNS_NAME' => 3, 'LNS_PARENT_LANE' => 4, 'LNS_IS_HORIZONTAL' => 5, 'LNS_STATE' => 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/BpmnLanesetMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnLanesetMapBuilder');
+ }
+ /**
+ * 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 = BpmnLanesetPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnLanesetPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnLanesetPeer::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(BpmnLanesetPeer::LNS_UID);
+
+ $criteria->addSelectColumn(BpmnLanesetPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnLanesetPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnLanesetPeer::LNS_NAME);
+
+ $criteria->addSelectColumn(BpmnLanesetPeer::LNS_PARENT_LANE);
+
+ $criteria->addSelectColumn(BpmnLanesetPeer::LNS_IS_HORIZONTAL);
+
+ $criteria->addSelectColumn(BpmnLanesetPeer::LNS_STATE);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnLanesetPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanesetPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnLanesetPeer::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 BpmnLaneset
+ * @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 = BpmnLanesetPeer::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 BpmnLanesetPeer::populateObjects(BpmnLanesetPeer::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;
+ BpmnLanesetPeer::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 = BpmnLanesetPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnLanesetPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanesetPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanesetPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnLanesetPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProcess(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(BpmnLanesetPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanesetPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanesetPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnLanesetPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnLaneset objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnLaneset objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanesetPeer::addSelectColumns($c);
+ $startcol = (BpmnLanesetPeer::NUM_COLUMNS - BpmnLanesetPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnLanesetPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnLaneset($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnLanesets();
+ $obj2->addBpmnLaneset($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnLaneset objects pre-filled with their BpmnProcess objects.
+ *
+ * @return array Array of BpmnLaneset objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanesetPeer::addSelectColumns($c);
+ $startcol = (BpmnLanesetPeer::NUM_COLUMNS - BpmnLanesetPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProcessPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnLanesetPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnLaneset($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnLanesets();
+ $obj2->addBpmnLaneset($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnLanesetPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanesetPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanesetPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addJoin(BpmnLanesetPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnLanesetPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnLaneset objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnLaneset objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanesetPeer::addSelectColumns($c);
+ $startcol2 = (BpmnLanesetPeer::NUM_COLUMNS - BpmnLanesetPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol4 = $startcol3 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnLanesetPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $c->addJoin(BpmnLanesetPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnLaneset($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnLanesets();
+ $obj2->addBpmnLaneset($obj1);
+ }
+
+
+ // Add objects for joined BpmnProcess rows
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj3 = new $cls();
+ $obj3->hydrate($rs, $startcol3);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj3 = $temp_obj1->getBpmnProcess(); // CHECKME
+ if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj3->addBpmnLaneset($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj3->initBpmnLanesets();
+ $obj3->addBpmnLaneset($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProject(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(BpmnLanesetPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanesetPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanesetPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+ $rs = BpmnLanesetPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProcess table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAllExceptBpmnProcess(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(BpmnLanesetPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnLanesetPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnLanesetPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnLanesetPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnLaneset objects pre-filled with all related objects except BpmnProject.
+ *
+ * @return array Array of BpmnLaneset objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanesetPeer::addSelectColumns($c);
+ $startcol2 = (BpmnLanesetPeer::NUM_COLUMNS - BpmnLanesetPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProcessPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnLanesetPeer::PRO_UID, BpmnProcessPeer::PRO_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProcess(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnLaneset($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnLanesets();
+ $obj2->addBpmnLaneset($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Selects a collection of BpmnLaneset objects pre-filled with all related objects except BpmnProcess.
+ *
+ * @return array Array of BpmnLaneset objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAllExceptBpmnProcess(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ // $c->getDbName() will return the same object if not set to another value
+ // so == check is okay and faster
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnLanesetPeer::addSelectColumns($c);
+ $startcol2 = (BpmnLanesetPeer::NUM_COLUMNS - BpmnLanesetPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnLanesetPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnLanesetPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnLaneset($obj1);
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnLanesets();
+ $obj2->addBpmnLaneset($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnLanesetPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnLaneset or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnLaneset 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 BpmnLaneset 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 BpmnLaneset or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnLaneset 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
+
+ } 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 BPMN_LANESET 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(BpmnLanesetPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnLaneset or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnLaneset 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(BpmnLanesetPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnLaneset) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnLaneset 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 BpmnLaneset $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(BpmnLaneset $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnLanesetPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnLanesetPeer::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(BpmnLanesetPeer::DATABASE_NAME, BpmnLanesetPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnLanesetPeer::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/BpmnLanesetMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnLanesetMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnParticipant.php b/workflow/engine/classes/model/om/BaseBpmnParticipant.php
new file mode 100644
index 000000000..881ba587c
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnParticipant.php
@@ -0,0 +1,1062 @@
+par_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [lns_uid] column value.
+ *
+ * @return string
+ */
+ public function getLnsUid()
+ {
+
+ return $this->lns_uid;
+ }
+
+ /**
+ * Get the [par_name] column value.
+ *
+ * @return string
+ */
+ public function getParName()
+ {
+
+ return $this->par_name;
+ }
+
+ /**
+ * Get the [par_minimum] column value.
+ *
+ * @return int
+ */
+ public function getParMinimum()
+ {
+
+ return $this->par_minimum;
+ }
+
+ /**
+ * Get the [par_maximum] column value.
+ *
+ * @return int
+ */
+ public function getParMaximum()
+ {
+
+ return $this->par_maximum;
+ }
+
+ /**
+ * Get the [par_num_participants] column value.
+ *
+ * @return int
+ */
+ public function getParNumParticipants()
+ {
+
+ return $this->par_num_participants;
+ }
+
+ /**
+ * Get the [par_is_horizontal] column value.
+ *
+ * @return int
+ */
+ public function getParIsHorizontal()
+ {
+
+ return $this->par_is_horizontal;
+ }
+
+ /**
+ * Set the value of [par_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setParUid($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->par_uid !== $v || $v === '') {
+ $this->par_uid = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PAR_UID;
+ }
+
+ } // setParUid()
+
+ /**
+ * 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 || $v === '') {
+ $this->prj_uid = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [lns_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setLnsUid($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->lns_uid !== $v || $v === '') {
+ $this->lns_uid = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::LNS_UID;
+ }
+
+ } // setLnsUid()
+
+ /**
+ * Set the value of [par_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setParName($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->par_name !== $v || $v === '') {
+ $this->par_name = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PAR_NAME;
+ }
+
+ } // setParName()
+
+ /**
+ * Set the value of [par_minimum] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setParMinimum($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->par_minimum !== $v || $v === 0) {
+ $this->par_minimum = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PAR_MINIMUM;
+ }
+
+ } // setParMinimum()
+
+ /**
+ * Set the value of [par_maximum] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setParMaximum($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->par_maximum !== $v || $v === 1) {
+ $this->par_maximum = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PAR_MAXIMUM;
+ }
+
+ } // setParMaximum()
+
+ /**
+ * Set the value of [par_num_participants] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setParNumParticipants($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->par_num_participants !== $v || $v === 1) {
+ $this->par_num_participants = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PAR_NUM_PARTICIPANTS;
+ }
+
+ } // setParNumParticipants()
+
+ /**
+ * Set the value of [par_is_horizontal] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setParIsHorizontal($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->par_is_horizontal !== $v || $v === 1) {
+ $this->par_is_horizontal = $v;
+ $this->modifiedColumns[] = BpmnParticipantPeer::PAR_IS_HORIZONTAL;
+ }
+
+ } // setParIsHorizontal()
+
+ /**
+ * 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->par_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->pro_uid = $rs->getString($startcol + 2);
+
+ $this->lns_uid = $rs->getString($startcol + 3);
+
+ $this->par_name = $rs->getString($startcol + 4);
+
+ $this->par_minimum = $rs->getInt($startcol + 5);
+
+ $this->par_maximum = $rs->getInt($startcol + 6);
+
+ $this->par_num_participants = $rs->getInt($startcol + 7);
+
+ $this->par_is_horizontal = $rs->getInt($startcol + 8);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 9; // 9 = BpmnParticipantPeer::NUM_COLUMNS - BpmnParticipantPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnParticipant 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(BpmnParticipantPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnParticipantPeer::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(BpmnParticipantPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnParticipantPeer::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 += BpmnParticipantPeer::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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnParticipantPeer::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 = BpmnParticipantPeer::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->getParUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getProUid();
+ break;
+ case 3:
+ return $this->getLnsUid();
+ break;
+ case 4:
+ return $this->getParName();
+ break;
+ case 5:
+ return $this->getParMinimum();
+ break;
+ case 6:
+ return $this->getParMaximum();
+ break;
+ case 7:
+ return $this->getParNumParticipants();
+ break;
+ case 8:
+ return $this->getParIsHorizontal();
+ 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 = BpmnParticipantPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getParUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getProUid(),
+ $keys[3] => $this->getLnsUid(),
+ $keys[4] => $this->getParName(),
+ $keys[5] => $this->getParMinimum(),
+ $keys[6] => $this->getParMaximum(),
+ $keys[7] => $this->getParNumParticipants(),
+ $keys[8] => $this->getParIsHorizontal(),
+ );
+ 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 = BpmnParticipantPeer::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->setParUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setProUid($value);
+ break;
+ case 3:
+ $this->setLnsUid($value);
+ break;
+ case 4:
+ $this->setParName($value);
+ break;
+ case 5:
+ $this->setParMinimum($value);
+ break;
+ case 6:
+ $this->setParMaximum($value);
+ break;
+ case 7:
+ $this->setParNumParticipants($value);
+ break;
+ case 8:
+ $this->setParIsHorizontal($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 = BpmnParticipantPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setParUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setProUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setLnsUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setParName($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setParMinimum($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setParMaximum($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setParNumParticipants($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setParIsHorizontal($arr[$keys[8]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnParticipantPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PAR_UID)) {
+ $criteria->add(BpmnParticipantPeer::PAR_UID, $this->par_uid);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PRJ_UID)) {
+ $criteria->add(BpmnParticipantPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PRO_UID)) {
+ $criteria->add(BpmnParticipantPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::LNS_UID)) {
+ $criteria->add(BpmnParticipantPeer::LNS_UID, $this->lns_uid);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PAR_NAME)) {
+ $criteria->add(BpmnParticipantPeer::PAR_NAME, $this->par_name);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PAR_MINIMUM)) {
+ $criteria->add(BpmnParticipantPeer::PAR_MINIMUM, $this->par_minimum);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PAR_MAXIMUM)) {
+ $criteria->add(BpmnParticipantPeer::PAR_MAXIMUM, $this->par_maximum);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PAR_NUM_PARTICIPANTS)) {
+ $criteria->add(BpmnParticipantPeer::PAR_NUM_PARTICIPANTS, $this->par_num_participants);
+ }
+
+ if ($this->isColumnModified(BpmnParticipantPeer::PAR_IS_HORIZONTAL)) {
+ $criteria->add(BpmnParticipantPeer::PAR_IS_HORIZONTAL, $this->par_is_horizontal);
+ }
+
+
+ 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(BpmnParticipantPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnParticipant (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->setParUid($this->par_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setLnsUid($this->lns_uid);
+
+ $copyObj->setParName($this->par_name);
+
+ $copyObj->setParMinimum($this->par_minimum);
+
+ $copyObj->setParMaximum($this->par_maximum);
+
+ $copyObj->setParNumParticipants($this->par_num_participants);
+
+ $copyObj->setParIsHorizontal($this->par_is_horizontal);
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnParticipant 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 BpmnParticipantPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnParticipantPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid('');
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnParticipantPeer.php b/workflow/engine/classes/model/om/BaseBpmnParticipantPeer.php
new file mode 100644
index 000000000..bdcbb9d6f
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnParticipantPeer.php
@@ -0,0 +1,770 @@
+ array ('ParUid', 'PrjUid', 'ProUid', 'LnsUid', 'ParName', 'ParMinimum', 'ParMaximum', 'ParNumParticipants', 'ParIsHorizontal', ),
+ BasePeer::TYPE_COLNAME => array (BpmnParticipantPeer::PAR_UID, BpmnParticipantPeer::PRJ_UID, BpmnParticipantPeer::PRO_UID, BpmnParticipantPeer::LNS_UID, BpmnParticipantPeer::PAR_NAME, BpmnParticipantPeer::PAR_MINIMUM, BpmnParticipantPeer::PAR_MAXIMUM, BpmnParticipantPeer::PAR_NUM_PARTICIPANTS, BpmnParticipantPeer::PAR_IS_HORIZONTAL, ),
+ BasePeer::TYPE_FIELDNAME => array ('PAR_UID', 'PRJ_UID', 'PRO_UID', 'LNS_UID', 'PAR_NAME', 'PAR_MINIMUM', 'PAR_MAXIMUM', 'PAR_NUM_PARTICIPANTS', 'PAR_IS_HORIZONTAL', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ );
+
+ /**
+ * 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 ('ParUid' => 0, 'PrjUid' => 1, 'ProUid' => 2, 'LnsUid' => 3, 'ParName' => 4, 'ParMinimum' => 5, 'ParMaximum' => 6, 'ParNumParticipants' => 7, 'ParIsHorizontal' => 8, ),
+ BasePeer::TYPE_COLNAME => array (BpmnParticipantPeer::PAR_UID => 0, BpmnParticipantPeer::PRJ_UID => 1, BpmnParticipantPeer::PRO_UID => 2, BpmnParticipantPeer::LNS_UID => 3, BpmnParticipantPeer::PAR_NAME => 4, BpmnParticipantPeer::PAR_MINIMUM => 5, BpmnParticipantPeer::PAR_MAXIMUM => 6, BpmnParticipantPeer::PAR_NUM_PARTICIPANTS => 7, BpmnParticipantPeer::PAR_IS_HORIZONTAL => 8, ),
+ BasePeer::TYPE_FIELDNAME => array ('PAR_UID' => 0, 'PRJ_UID' => 1, 'PRO_UID' => 2, 'LNS_UID' => 3, 'PAR_NAME' => 4, 'PAR_MINIMUM' => 5, 'PAR_MAXIMUM' => 6, 'PAR_NUM_PARTICIPANTS' => 7, 'PAR_IS_HORIZONTAL' => 8, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, )
+ );
+
+ /**
+ * @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/BpmnParticipantMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnParticipantMapBuilder');
+ }
+ /**
+ * 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 = BpmnParticipantPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnParticipantPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnParticipantPeer::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(BpmnParticipantPeer::PAR_UID);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::LNS_UID);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::PAR_NAME);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::PAR_MINIMUM);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::PAR_MAXIMUM);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::PAR_NUM_PARTICIPANTS);
+
+ $criteria->addSelectColumn(BpmnParticipantPeer::PAR_IS_HORIZONTAL);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnParticipantPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnParticipantPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnParticipantPeer::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 BpmnParticipant
+ * @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 = BpmnParticipantPeer::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 BpmnParticipantPeer::populateObjects(BpmnParticipantPeer::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;
+ BpmnParticipantPeer::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 = BpmnParticipantPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnParticipantPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnParticipantPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnParticipantPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnParticipantPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnParticipant objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnParticipant objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnParticipantPeer::addSelectColumns($c);
+ $startcol = (BpmnParticipantPeer::NUM_COLUMNS - BpmnParticipantPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnParticipantPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnParticipantPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnParticipant($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnParticipants();
+ $obj2->addBpmnParticipant($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnParticipantPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnParticipantPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnParticipantPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnParticipantPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnParticipant objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnParticipant objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnParticipantPeer::addSelectColumns($c);
+ $startcol2 = (BpmnParticipantPeer::NUM_COLUMNS - BpmnParticipantPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnParticipantPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnParticipantPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnParticipant($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnParticipants();
+ $obj2->addBpmnParticipant($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnParticipantPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnParticipant or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnParticipant 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 BpmnParticipant 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 BpmnParticipant or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnParticipant 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
+
+ } 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 BPMN_PARTICIPANT 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(BpmnParticipantPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnParticipant or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnParticipant 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(BpmnParticipantPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnParticipant) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnParticipant 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 BpmnParticipant $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(BpmnParticipant $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnParticipantPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnParticipantPeer::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(BpmnParticipantPeer::DATABASE_NAME, BpmnParticipantPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnParticipantPeer::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/BpmnParticipantMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnParticipantMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnProcess.php b/workflow/engine/classes/model/om/BaseBpmnProcess.php
new file mode 100644
index 000000000..6b2cb3ffb
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnProcess.php
@@ -0,0 +1,2140 @@
+pro_uid;
+ }
+
+ /**
+ * Get the [prj_uid] column value.
+ *
+ * @return string
+ */
+ public function getPrjUid()
+ {
+
+ return $this->prj_uid;
+ }
+
+ /**
+ * Get the [dia_uid] column value.
+ *
+ * @return string
+ */
+ public function getDiaUid()
+ {
+
+ return $this->dia_uid;
+ }
+
+ /**
+ * Get the [pro_name] column value.
+ *
+ * @return string
+ */
+ public function getProName()
+ {
+
+ return $this->pro_name;
+ }
+
+ /**
+ * Get the [pro_type] column value.
+ *
+ * @return string
+ */
+ public function getProType()
+ {
+
+ return $this->pro_type;
+ }
+
+ /**
+ * Get the [pro_is_executable] column value.
+ *
+ * @return int
+ */
+ public function getProIsExecutable()
+ {
+
+ return $this->pro_is_executable;
+ }
+
+ /**
+ * Get the [pro_is_closed] column value.
+ *
+ * @return int
+ */
+ public function getProIsClosed()
+ {
+
+ return $this->pro_is_closed;
+ }
+
+ /**
+ * Get the [pro_is_subprocess] column value.
+ *
+ * @return int
+ */
+ public function getProIsSubprocess()
+ {
+
+ return $this->pro_is_subprocess;
+ }
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($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->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = BpmnProcessPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * 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[] = BpmnProcessPeer::PRJ_UID;
+ }
+
+ if ($this->aBpmnProject !== null && $this->aBpmnProject->getPrjUid() !== $v) {
+ $this->aBpmnProject = null;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [dia_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDiaUid($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->dia_uid !== $v) {
+ $this->dia_uid = $v;
+ $this->modifiedColumns[] = BpmnProcessPeer::DIA_UID;
+ }
+
+ } // setDiaUid()
+
+ /**
+ * Set the value of [pro_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProName($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->pro_name !== $v) {
+ $this->pro_name = $v;
+ $this->modifiedColumns[] = BpmnProcessPeer::PRO_NAME;
+ }
+
+ } // setProName()
+
+ /**
+ * Set the value of [pro_type] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProType($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->pro_type !== $v || $v === 'NONE') {
+ $this->pro_type = $v;
+ $this->modifiedColumns[] = BpmnProcessPeer::PRO_TYPE;
+ }
+
+ } // setProType()
+
+ /**
+ * Set the value of [pro_is_executable] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setProIsExecutable($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->pro_is_executable !== $v || $v === 0) {
+ $this->pro_is_executable = $v;
+ $this->modifiedColumns[] = BpmnProcessPeer::PRO_IS_EXECUTABLE;
+ }
+
+ } // setProIsExecutable()
+
+ /**
+ * Set the value of [pro_is_closed] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setProIsClosed($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->pro_is_closed !== $v || $v === 0) {
+ $this->pro_is_closed = $v;
+ $this->modifiedColumns[] = BpmnProcessPeer::PRO_IS_CLOSED;
+ }
+
+ } // setProIsClosed()
+
+ /**
+ * Set the value of [pro_is_subprocess] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setProIsSubprocess($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->pro_is_subprocess !== $v || $v === 0) {
+ $this->pro_is_subprocess = $v;
+ $this->modifiedColumns[] = BpmnProcessPeer::PRO_IS_SUBPROCESS;
+ }
+
+ } // setProIsSubprocess()
+
+ /**
+ * 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->pro_uid = $rs->getString($startcol + 0);
+
+ $this->prj_uid = $rs->getString($startcol + 1);
+
+ $this->dia_uid = $rs->getString($startcol + 2);
+
+ $this->pro_name = $rs->getString($startcol + 3);
+
+ $this->pro_type = $rs->getString($startcol + 4);
+
+ $this->pro_is_executable = $rs->getInt($startcol + 5);
+
+ $this->pro_is_closed = $rs->getInt($startcol + 6);
+
+ $this->pro_is_subprocess = $rs->getInt($startcol + 7);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 8; // 8 = BpmnProcessPeer::NUM_COLUMNS - BpmnProcessPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnProcess 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(BpmnProcessPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnProcessPeer::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(BpmnProcessPeer::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;
+
+
+ // We call the save method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if ($this->aBpmnProject->isModified()) {
+ $affectedRows += $this->aBpmnProject->save($con);
+ }
+ $this->setBpmnProject($this->aBpmnProject);
+ }
+
+
+ // If this object has been modified, then save it to the database.
+ if ($this->isModified()) {
+ if ($this->isNew()) {
+ $pk = BpmnProcessPeer::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 += BpmnProcessPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ if ($this->collBpmnActivitys !== null) {
+ foreach($this->collBpmnActivitys as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnArtifacts !== null) {
+ foreach($this->collBpmnArtifacts as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnDatas !== null) {
+ foreach($this->collBpmnDatas as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnEvents !== null) {
+ foreach($this->collBpmnEvents as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnGateways !== null) {
+ foreach($this->collBpmnGateways as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnLanesets !== null) {
+ foreach($this->collBpmnLanesets as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ $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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ // We call the validate method on the following object(s) if they
+ // were passed to this object by their coresponding set
+ // method. This object relates to these object(s) by a
+ // foreign key reference.
+
+ if ($this->aBpmnProject !== null) {
+ if (!$this->aBpmnProject->validate($columns)) {
+ $failureMap = array_merge($failureMap, $this->aBpmnProject->getValidationFailures());
+ }
+ }
+
+
+ if (($retval = BpmnProcessPeer::doValidate($this, $columns)) !== true) {
+ $failureMap = array_merge($failureMap, $retval);
+ }
+
+
+ if ($this->collBpmnActivitys !== null) {
+ foreach($this->collBpmnActivitys as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnArtifacts !== null) {
+ foreach($this->collBpmnArtifacts as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnDatas !== null) {
+ foreach($this->collBpmnDatas as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnEvents !== null) {
+ foreach($this->collBpmnEvents as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnGateways !== null) {
+ foreach($this->collBpmnGateways as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnLanesets !== null) {
+ foreach($this->collBpmnLanesets as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+
+ $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 = BpmnProcessPeer::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->getProUid();
+ break;
+ case 1:
+ return $this->getPrjUid();
+ break;
+ case 2:
+ return $this->getDiaUid();
+ break;
+ case 3:
+ return $this->getProName();
+ break;
+ case 4:
+ return $this->getProType();
+ break;
+ case 5:
+ return $this->getProIsExecutable();
+ break;
+ case 6:
+ return $this->getProIsClosed();
+ break;
+ case 7:
+ return $this->getProIsSubprocess();
+ 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 = BpmnProcessPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getProUid(),
+ $keys[1] => $this->getPrjUid(),
+ $keys[2] => $this->getDiaUid(),
+ $keys[3] => $this->getProName(),
+ $keys[4] => $this->getProType(),
+ $keys[5] => $this->getProIsExecutable(),
+ $keys[6] => $this->getProIsClosed(),
+ $keys[7] => $this->getProIsSubprocess(),
+ );
+ 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 = BpmnProcessPeer::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->setProUid($value);
+ break;
+ case 1:
+ $this->setPrjUid($value);
+ break;
+ case 2:
+ $this->setDiaUid($value);
+ break;
+ case 3:
+ $this->setProName($value);
+ break;
+ case 4:
+ $this->setProType($value);
+ break;
+ case 5:
+ $this->setProIsExecutable($value);
+ break;
+ case 6:
+ $this->setProIsClosed($value);
+ break;
+ case 7:
+ $this->setProIsSubprocess($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 = BpmnProcessPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setProUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setDiaUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setProName($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setProType($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setProIsExecutable($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setProIsClosed($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setProIsSubprocess($arr[$keys[7]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnProcessPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnProcessPeer::PRO_UID)) {
+ $criteria->add(BpmnProcessPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(BpmnProcessPeer::PRJ_UID)) {
+ $criteria->add(BpmnProcessPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnProcessPeer::DIA_UID)) {
+ $criteria->add(BpmnProcessPeer::DIA_UID, $this->dia_uid);
+ }
+
+ if ($this->isColumnModified(BpmnProcessPeer::PRO_NAME)) {
+ $criteria->add(BpmnProcessPeer::PRO_NAME, $this->pro_name);
+ }
+
+ if ($this->isColumnModified(BpmnProcessPeer::PRO_TYPE)) {
+ $criteria->add(BpmnProcessPeer::PRO_TYPE, $this->pro_type);
+ }
+
+ if ($this->isColumnModified(BpmnProcessPeer::PRO_IS_EXECUTABLE)) {
+ $criteria->add(BpmnProcessPeer::PRO_IS_EXECUTABLE, $this->pro_is_executable);
+ }
+
+ if ($this->isColumnModified(BpmnProcessPeer::PRO_IS_CLOSED)) {
+ $criteria->add(BpmnProcessPeer::PRO_IS_CLOSED, $this->pro_is_closed);
+ }
+
+ if ($this->isColumnModified(BpmnProcessPeer::PRO_IS_SUBPROCESS)) {
+ $criteria->add(BpmnProcessPeer::PRO_IS_SUBPROCESS, $this->pro_is_subprocess);
+ }
+
+
+ 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(BpmnProcessPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnProcess (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->setProUid($this->pro_uid);
+
+ $copyObj->setPrjUid($this->prj_uid);
+
+ $copyObj->setDiaUid($this->dia_uid);
+
+ $copyObj->setProName($this->pro_name);
+
+ $copyObj->setProType($this->pro_type);
+
+ $copyObj->setProIsExecutable($this->pro_is_executable);
+
+ $copyObj->setProIsClosed($this->pro_is_closed);
+
+ $copyObj->setProIsSubprocess($this->pro_is_subprocess);
+
+
+ if ($deepCopy) {
+ // important: temporarily setNew(false) because this affects the behavior of
+ // the getter/setter methods for fkey referrer objects.
+ $copyObj->setNew(false);
+
+ foreach($this->getBpmnActivitys() as $relObj) {
+ $copyObj->addBpmnActivity($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnArtifacts() as $relObj) {
+ $copyObj->addBpmnArtifact($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnDatas() as $relObj) {
+ $copyObj->addBpmnData($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnEvents() as $relObj) {
+ $copyObj->addBpmnEvent($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnGateways() as $relObj) {
+ $copyObj->addBpmnGateway($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnLanesets() as $relObj) {
+ $copyObj->addBpmnLaneset($relObj->copy($deepCopy));
+ }
+
+ } // if ($deepCopy)
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnProcess 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 BpmnProcessPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnProcessPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Declares an association between this object and a BpmnProject object.
+ *
+ * @param BpmnProject $v
+ * @return void
+ * @throws PropelException
+ */
+ public function setBpmnProject($v)
+ {
+
+
+ if ($v === null) {
+ $this->setPrjUid(NULL);
+ } else {
+ $this->setPrjUid($v->getPrjUid());
+ }
+
+
+ $this->aBpmnProject = $v;
+ }
+
+
+ /**
+ * Get the associated BpmnProject object
+ *
+ * @param Connection Optional Connection object.
+ * @return BpmnProject The associated BpmnProject object.
+ * @throws PropelException
+ */
+ public function getBpmnProject($con = null)
+ {
+ // include the related Peer class
+ include_once 'classes/model/om/BaseBpmnProjectPeer.php';
+
+ if ($this->aBpmnProject === null && (($this->prj_uid !== "" && $this->prj_uid !== null))) {
+
+ $this->aBpmnProject = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+
+ /* The following can be used instead of the line above to
+ guarantee the related object contains a reference
+ to this object, but this level of coupling
+ may be undesirable in many circumstances.
+ As it can lead to a db query with many results that may
+ never be used.
+ $obj = BpmnProjectPeer::retrieveByPK($this->prj_uid, $con);
+ $obj->addBpmnProjects($this);
+ */
+ }
+ return $this->aBpmnProject;
+ }
+
+ /**
+ * Temporary storage of collBpmnActivitys to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnActivitys()
+ {
+ if ($this->collBpmnActivitys === null) {
+ $this->collBpmnActivitys = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnActivitys from storage.
+ * If this BpmnProcess is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnActivitys($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnActivityPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnActivitys === null) {
+ if ($this->isNew()) {
+ $this->collBpmnActivitys = array();
+ } else {
+
+ $criteria->add(BpmnActivityPeer::PRO_UID, $this->getProUid());
+
+ BpmnActivityPeer::addSelectColumns($criteria);
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnActivityPeer::PRO_UID, $this->getProUid());
+
+ BpmnActivityPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnActivityCriteria) || !$this->lastBpmnActivityCriteria->equals($criteria)) {
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnActivityCriteria = $criteria;
+ return $this->collBpmnActivitys;
+ }
+
+ /**
+ * Returns the number of related BpmnActivitys.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnActivitys($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnActivityPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnActivityPeer::PRO_UID, $this->getProUid());
+
+ return BpmnActivityPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnActivity object to this object
+ * through the BpmnActivity foreign key attribute
+ *
+ * @param BpmnActivity $l BpmnActivity
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnActivity(BpmnActivity $l)
+ {
+ $this->collBpmnActivitys[] = $l;
+ $l->setBpmnProcess($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess is new, it will return
+ * an empty collection; or if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnActivitys from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProcess.
+ */
+ public function getBpmnActivitysJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnActivityPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnActivitys === null) {
+ if ($this->isNew()) {
+ $this->collBpmnActivitys = array();
+ } else {
+
+ $criteria->add(BpmnActivityPeer::PRO_UID, $this->getProUid());
+
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnActivityPeer::PRO_UID, $this->getProUid());
+
+ if (!isset($this->lastBpmnActivityCriteria) || !$this->lastBpmnActivityCriteria->equals($criteria)) {
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnActivityCriteria = $criteria;
+
+ return $this->collBpmnActivitys;
+ }
+
+ /**
+ * Temporary storage of collBpmnArtifacts to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnArtifacts()
+ {
+ if ($this->collBpmnArtifacts === null) {
+ $this->collBpmnArtifacts = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnArtifacts from storage.
+ * If this BpmnProcess is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnArtifacts($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnArtifactPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnArtifacts === null) {
+ if ($this->isNew()) {
+ $this->collBpmnArtifacts = array();
+ } else {
+
+ $criteria->add(BpmnArtifactPeer::PRO_UID, $this->getProUid());
+
+ BpmnArtifactPeer::addSelectColumns($criteria);
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnArtifactPeer::PRO_UID, $this->getProUid());
+
+ BpmnArtifactPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnArtifactCriteria) || !$this->lastBpmnArtifactCriteria->equals($criteria)) {
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnArtifactCriteria = $criteria;
+ return $this->collBpmnArtifacts;
+ }
+
+ /**
+ * Returns the number of related BpmnArtifacts.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnArtifacts($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnArtifactPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnArtifactPeer::PRO_UID, $this->getProUid());
+
+ return BpmnArtifactPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnArtifact object to this object
+ * through the BpmnArtifact foreign key attribute
+ *
+ * @param BpmnArtifact $l BpmnArtifact
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnArtifact(BpmnArtifact $l)
+ {
+ $this->collBpmnArtifacts[] = $l;
+ $l->setBpmnProcess($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess is new, it will return
+ * an empty collection; or if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnArtifacts from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProcess.
+ */
+ public function getBpmnArtifactsJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnArtifactPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnArtifacts === null) {
+ if ($this->isNew()) {
+ $this->collBpmnArtifacts = array();
+ } else {
+
+ $criteria->add(BpmnArtifactPeer::PRO_UID, $this->getProUid());
+
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnArtifactPeer::PRO_UID, $this->getProUid());
+
+ if (!isset($this->lastBpmnArtifactCriteria) || !$this->lastBpmnArtifactCriteria->equals($criteria)) {
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnArtifactCriteria = $criteria;
+
+ return $this->collBpmnArtifacts;
+ }
+
+ /**
+ * Temporary storage of collBpmnDatas to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnDatas()
+ {
+ if ($this->collBpmnDatas === null) {
+ $this->collBpmnDatas = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnDatas from storage.
+ * If this BpmnProcess is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnDatas($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDataPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnDatas === null) {
+ if ($this->isNew()) {
+ $this->collBpmnDatas = array();
+ } else {
+
+ $criteria->add(BpmnDataPeer::PRO_UID, $this->getProUid());
+
+ BpmnDataPeer::addSelectColumns($criteria);
+ $this->collBpmnDatas = BpmnDataPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnDataPeer::PRO_UID, $this->getProUid());
+
+ BpmnDataPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnDataCriteria) || !$this->lastBpmnDataCriteria->equals($criteria)) {
+ $this->collBpmnDatas = BpmnDataPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnDataCriteria = $criteria;
+ return $this->collBpmnDatas;
+ }
+
+ /**
+ * Returns the number of related BpmnDatas.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnDatas($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDataPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnDataPeer::PRO_UID, $this->getProUid());
+
+ return BpmnDataPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnData object to this object
+ * through the BpmnData foreign key attribute
+ *
+ * @param BpmnData $l BpmnData
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnData(BpmnData $l)
+ {
+ $this->collBpmnDatas[] = $l;
+ $l->setBpmnProcess($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess is new, it will return
+ * an empty collection; or if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnDatas from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProcess.
+ */
+ public function getBpmnDatasJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDataPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnDatas === null) {
+ if ($this->isNew()) {
+ $this->collBpmnDatas = array();
+ } else {
+
+ $criteria->add(BpmnDataPeer::PRO_UID, $this->getProUid());
+
+ $this->collBpmnDatas = BpmnDataPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnDataPeer::PRO_UID, $this->getProUid());
+
+ if (!isset($this->lastBpmnDataCriteria) || !$this->lastBpmnDataCriteria->equals($criteria)) {
+ $this->collBpmnDatas = BpmnDataPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnDataCriteria = $criteria;
+
+ return $this->collBpmnDatas;
+ }
+
+ /**
+ * Temporary storage of collBpmnEvents to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnEvents()
+ {
+ if ($this->collBpmnEvents === null) {
+ $this->collBpmnEvents = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnEvents from storage.
+ * If this BpmnProcess is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnEvents($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnEventPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnEvents === null) {
+ if ($this->isNew()) {
+ $this->collBpmnEvents = array();
+ } else {
+
+ $criteria->add(BpmnEventPeer::PRO_UID, $this->getProUid());
+
+ BpmnEventPeer::addSelectColumns($criteria);
+ $this->collBpmnEvents = BpmnEventPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnEventPeer::PRO_UID, $this->getProUid());
+
+ BpmnEventPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnEventCriteria) || !$this->lastBpmnEventCriteria->equals($criteria)) {
+ $this->collBpmnEvents = BpmnEventPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnEventCriteria = $criteria;
+ return $this->collBpmnEvents;
+ }
+
+ /**
+ * Returns the number of related BpmnEvents.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnEvents($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnEventPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnEventPeer::PRO_UID, $this->getProUid());
+
+ return BpmnEventPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnEvent object to this object
+ * through the BpmnEvent foreign key attribute
+ *
+ * @param BpmnEvent $l BpmnEvent
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnEvent(BpmnEvent $l)
+ {
+ $this->collBpmnEvents[] = $l;
+ $l->setBpmnProcess($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess is new, it will return
+ * an empty collection; or if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnEvents from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProcess.
+ */
+ public function getBpmnEventsJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnEventPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnEvents === null) {
+ if ($this->isNew()) {
+ $this->collBpmnEvents = array();
+ } else {
+
+ $criteria->add(BpmnEventPeer::PRO_UID, $this->getProUid());
+
+ $this->collBpmnEvents = BpmnEventPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnEventPeer::PRO_UID, $this->getProUid());
+
+ if (!isset($this->lastBpmnEventCriteria) || !$this->lastBpmnEventCriteria->equals($criteria)) {
+ $this->collBpmnEvents = BpmnEventPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnEventCriteria = $criteria;
+
+ return $this->collBpmnEvents;
+ }
+
+ /**
+ * Temporary storage of collBpmnGateways to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnGateways()
+ {
+ if ($this->collBpmnGateways === null) {
+ $this->collBpmnGateways = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnGateways from storage.
+ * If this BpmnProcess is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnGateways($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnGatewayPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnGateways === null) {
+ if ($this->isNew()) {
+ $this->collBpmnGateways = array();
+ } else {
+
+ $criteria->add(BpmnGatewayPeer::PRO_UID, $this->getProUid());
+
+ BpmnGatewayPeer::addSelectColumns($criteria);
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnGatewayPeer::PRO_UID, $this->getProUid());
+
+ BpmnGatewayPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnGatewayCriteria) || !$this->lastBpmnGatewayCriteria->equals($criteria)) {
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnGatewayCriteria = $criteria;
+ return $this->collBpmnGateways;
+ }
+
+ /**
+ * Returns the number of related BpmnGateways.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnGateways($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnGatewayPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnGatewayPeer::PRO_UID, $this->getProUid());
+
+ return BpmnGatewayPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnGateway object to this object
+ * through the BpmnGateway foreign key attribute
+ *
+ * @param BpmnGateway $l BpmnGateway
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnGateway(BpmnGateway $l)
+ {
+ $this->collBpmnGateways[] = $l;
+ $l->setBpmnProcess($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess is new, it will return
+ * an empty collection; or if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnGateways from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProcess.
+ */
+ public function getBpmnGatewaysJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnGatewayPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnGateways === null) {
+ if ($this->isNew()) {
+ $this->collBpmnGateways = array();
+ } else {
+
+ $criteria->add(BpmnGatewayPeer::PRO_UID, $this->getProUid());
+
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnGatewayPeer::PRO_UID, $this->getProUid());
+
+ if (!isset($this->lastBpmnGatewayCriteria) || !$this->lastBpmnGatewayCriteria->equals($criteria)) {
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnGatewayCriteria = $criteria;
+
+ return $this->collBpmnGateways;
+ }
+
+ /**
+ * Temporary storage of collBpmnLanesets to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnLanesets()
+ {
+ if ($this->collBpmnLanesets === null) {
+ $this->collBpmnLanesets = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnLanesets from storage.
+ * If this BpmnProcess is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnLanesets($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanesets === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanesets = array();
+ } else {
+
+ $criteria->add(BpmnLanesetPeer::PRO_UID, $this->getProUid());
+
+ BpmnLanesetPeer::addSelectColumns($criteria);
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnLanesetPeer::PRO_UID, $this->getProUid());
+
+ BpmnLanesetPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnLanesetCriteria) || !$this->lastBpmnLanesetCriteria->equals($criteria)) {
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnLanesetCriteria = $criteria;
+ return $this->collBpmnLanesets;
+ }
+
+ /**
+ * Returns the number of related BpmnLanesets.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnLanesets($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnLanesetPeer::PRO_UID, $this->getProUid());
+
+ return BpmnLanesetPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnLaneset object to this object
+ * through the BpmnLaneset foreign key attribute
+ *
+ * @param BpmnLaneset $l BpmnLaneset
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnLaneset(BpmnLaneset $l)
+ {
+ $this->collBpmnLanesets[] = $l;
+ $l->setBpmnProcess($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProcess is new, it will return
+ * an empty collection; or if this BpmnProcess has previously
+ * been saved, it will retrieve related BpmnLanesets from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProcess.
+ */
+ public function getBpmnLanesetsJoinBpmnProject($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanesets === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanesets = array();
+ } else {
+
+ $criteria->add(BpmnLanesetPeer::PRO_UID, $this->getProUid());
+
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnLanesetPeer::PRO_UID, $this->getProUid());
+
+ if (!isset($this->lastBpmnLanesetCriteria) || !$this->lastBpmnLanesetCriteria->equals($criteria)) {
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelectJoinBpmnProject($criteria, $con);
+ }
+ }
+ $this->lastBpmnLanesetCriteria = $criteria;
+
+ return $this->collBpmnLanesets;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnProcessPeer.php b/workflow/engine/classes/model/om/BaseBpmnProcessPeer.php
new file mode 100644
index 000000000..c1f4d3039
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnProcessPeer.php
@@ -0,0 +1,765 @@
+ array ('ProUid', 'PrjUid', 'DiaUid', 'ProName', 'ProType', 'ProIsExecutable', 'ProIsClosed', 'ProIsSubprocess', ),
+ BasePeer::TYPE_COLNAME => array (BpmnProcessPeer::PRO_UID, BpmnProcessPeer::PRJ_UID, BpmnProcessPeer::DIA_UID, BpmnProcessPeer::PRO_NAME, BpmnProcessPeer::PRO_TYPE, BpmnProcessPeer::PRO_IS_EXECUTABLE, BpmnProcessPeer::PRO_IS_CLOSED, BpmnProcessPeer::PRO_IS_SUBPROCESS, ),
+ BasePeer::TYPE_FIELDNAME => array ('PRO_UID', 'PRJ_UID', 'DIA_UID', 'PRO_NAME', 'PRO_TYPE', 'PRO_IS_EXECUTABLE', 'PRO_IS_CLOSED', 'PRO_IS_SUBPROCESS', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ );
+
+ /**
+ * 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 ('ProUid' => 0, 'PrjUid' => 1, 'DiaUid' => 2, 'ProName' => 3, 'ProType' => 4, 'ProIsExecutable' => 5, 'ProIsClosed' => 6, 'ProIsSubprocess' => 7, ),
+ BasePeer::TYPE_COLNAME => array (BpmnProcessPeer::PRO_UID => 0, BpmnProcessPeer::PRJ_UID => 1, BpmnProcessPeer::DIA_UID => 2, BpmnProcessPeer::PRO_NAME => 3, BpmnProcessPeer::PRO_TYPE => 4, BpmnProcessPeer::PRO_IS_EXECUTABLE => 5, BpmnProcessPeer::PRO_IS_CLOSED => 6, BpmnProcessPeer::PRO_IS_SUBPROCESS => 7, ),
+ BasePeer::TYPE_FIELDNAME => array ('PRO_UID' => 0, 'PRJ_UID' => 1, 'DIA_UID' => 2, 'PRO_NAME' => 3, 'PRO_TYPE' => 4, 'PRO_IS_EXECUTABLE' => 5, 'PRO_IS_CLOSED' => 6, 'PRO_IS_SUBPROCESS' => 7, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
+ );
+
+ /**
+ * @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/BpmnProcessMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnProcessMapBuilder');
+ }
+ /**
+ * 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 = BpmnProcessPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnProcessPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnProcessPeer::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(BpmnProcessPeer::PRO_UID);
+
+ $criteria->addSelectColumn(BpmnProcessPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnProcessPeer::DIA_UID);
+
+ $criteria->addSelectColumn(BpmnProcessPeer::PRO_NAME);
+
+ $criteria->addSelectColumn(BpmnProcessPeer::PRO_TYPE);
+
+ $criteria->addSelectColumn(BpmnProcessPeer::PRO_IS_EXECUTABLE);
+
+ $criteria->addSelectColumn(BpmnProcessPeer::PRO_IS_CLOSED);
+
+ $criteria->addSelectColumn(BpmnProcessPeer::PRO_IS_SUBPROCESS);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnProcessPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnProcessPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnProcessPeer::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 BpmnProcess
+ * @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 = BpmnProcessPeer::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 BpmnProcessPeer::populateObjects(BpmnProcessPeer::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;
+ BpmnProcessPeer::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 = BpmnProcessPeer::getOMClass();
+ $cls = Propel::import($cls);
+ // populate the object(s)
+ while ($rs->next()) {
+
+ $obj = new $cls();
+ $obj->hydrate($rs);
+ $results[] = $obj;
+
+ }
+ return $results;
+ }
+
+ /**
+ * Returns the number of rows matching criteria, joining the related BpmnProject table
+ *
+ * @param Criteria $c
+ * @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 doCountJoinBpmnProject(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(BpmnProcessPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnProcessPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnProcessPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnProcessPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnProcess objects pre-filled with their BpmnProject objects.
+ *
+ * @return array Array of BpmnProcess objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinBpmnProject(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol = (BpmnProcessPeer::NUM_COLUMNS - BpmnProcessPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+ BpmnProjectPeer::addSelectColumns($c);
+
+ $c->addJoin(BpmnProcessPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol);
+
+ $newObject = true;
+ foreach($results as $temp_obj1) {
+ $temp_obj2 = $temp_obj1->getBpmnProject(); //CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ // e.g. $author->addBookRelatedByBookId()
+ $temp_obj2->addBpmnProcess($obj1); //CHECKME
+ break;
+ }
+ }
+ if ($newObject) {
+ $obj2->initBpmnProcesss();
+ $obj2->addBpmnProcess($obj1); //CHECKME
+ }
+ $results[] = $obj1;
+ }
+ return $results;
+ }
+
+
+ /**
+ * Returns the number of rows matching criteria, joining all related tables
+ *
+ * @param Criteria $c
+ * @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 doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+ {
+ $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(BpmnProcessPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnProcessPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach($criteria->getGroupByColumns() as $column)
+ {
+ $criteria->addSelectColumn($column);
+ }
+
+ $criteria->addJoin(BpmnProcessPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BpmnProcessPeer::doSelectRS($criteria, $con);
+ if ($rs->next()) {
+ return $rs->getInt(1);
+ } else {
+ // no rows returned; we infer that means 0 matches.
+ return 0;
+ }
+ }
+
+
+ /**
+ * Selects a collection of BpmnProcess objects pre-filled with all related objects.
+ *
+ * @return array Array of BpmnProcess objects.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ */
+ public static function doSelectJoinAll(Criteria $c, $con = null)
+ {
+ $c = clone $c;
+
+ // Set the correct dbName if it has not been overridden
+ if ($c->getDbName() == Propel::getDefaultDB()) {
+ $c->setDbName(self::DATABASE_NAME);
+ }
+
+ BpmnProcessPeer::addSelectColumns($c);
+ $startcol2 = (BpmnProcessPeer::NUM_COLUMNS - BpmnProcessPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+ BpmnProjectPeer::addSelectColumns($c);
+ $startcol3 = $startcol2 + BpmnProjectPeer::NUM_COLUMNS;
+
+ $c->addJoin(BpmnProcessPeer::PRJ_UID, BpmnProjectPeer::PRJ_UID);
+
+ $rs = BasePeer::doSelect($c, $con);
+ $results = array();
+
+ while($rs->next()) {
+
+ $omClass = BpmnProcessPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj1 = new $cls();
+ $obj1->hydrate($rs);
+
+
+ // Add objects for joined BpmnProject rows
+
+ $omClass = BpmnProjectPeer::getOMClass();
+
+
+ $cls = Propel::import($omClass);
+ $obj2 = new $cls();
+ $obj2->hydrate($rs, $startcol2);
+
+ $newObject = true;
+ for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+ $temp_obj1 = $results[$j];
+ $temp_obj2 = $temp_obj1->getBpmnProject(); // CHECKME
+ if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+ $newObject = false;
+ $temp_obj2->addBpmnProcess($obj1); // CHECKME
+ break;
+ }
+ }
+
+ if ($newObject) {
+ $obj2->initBpmnProcesss();
+ $obj2->addBpmnProcess($obj1);
+ }
+
+ $results[] = $obj1;
+ }
+ 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 BpmnProcessPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnProcess or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnProcess 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 BpmnProcess 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 BpmnProcess or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnProcess 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
+
+ } 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 BPMN_PROCESS 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(BpmnProcessPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnProcess or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnProcess 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(BpmnProcessPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnProcess) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnProcess 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 BpmnProcess $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(BpmnProcess $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnProcessPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnProcessPeer::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(BpmnProcessPeer::DATABASE_NAME, BpmnProcessPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnProcessPeer::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/BpmnProcessMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnProcessMapBuilder');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnProject.php b/workflow/engine/classes/model/om/BaseBpmnProject.php
new file mode 100644
index 000000000..af0ee46ba
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnProject.php
@@ -0,0 +1,3594 @@
+prj_uid;
+ }
+
+ /**
+ * Get the [prj_name] column value.
+ *
+ * @return string
+ */
+ public function getPrjName()
+ {
+
+ return $this->prj_name;
+ }
+
+ /**
+ * Get the [prj_target_namespace] column value.
+ *
+ * @return string
+ */
+ public function getPrjTargetNamespace()
+ {
+
+ return $this->prj_target_namespace;
+ }
+
+ /**
+ * Get the [prj_expresion_language] column value.
+ *
+ * @return string
+ */
+ public function getPrjExpresionLanguage()
+ {
+
+ return $this->prj_expresion_language;
+ }
+
+ /**
+ * Get the [prj_type_language] column value.
+ *
+ * @return string
+ */
+ public function getPrjTypeLanguage()
+ {
+
+ return $this->prj_type_language;
+ }
+
+ /**
+ * Get the [prj_exporter] column value.
+ *
+ * @return string
+ */
+ public function getPrjExporter()
+ {
+
+ return $this->prj_exporter;
+ }
+
+ /**
+ * Get the [prj_exporter_version] column value.
+ *
+ * @return string
+ */
+ public function getPrjExporterVersion()
+ {
+
+ return $this->prj_exporter_version;
+ }
+
+ /**
+ * Get the [optionally formatted] [prj_create_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getPrjCreateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->prj_create_date === null || $this->prj_create_date === '') {
+ return null;
+ } elseif (!is_int($this->prj_create_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->prj_create_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [prj_create_date] as date/time value: " .
+ var_export($this->prj_create_date, true));
+ }
+ } else {
+ $ts = $this->prj_create_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [prj_update_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getPrjUpdateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->prj_update_date === null || $this->prj_update_date === '') {
+ return null;
+ } elseif (!is_int($this->prj_update_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->prj_update_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [prj_update_date] as date/time value: " .
+ var_export($this->prj_update_date, true));
+ }
+ } else {
+ $ts = $this->prj_update_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [prj_author] column value.
+ *
+ * @return string
+ */
+ public function getPrjAuthor()
+ {
+
+ return $this->prj_author;
+ }
+
+ /**
+ * Get the [prj_author_version] column value.
+ *
+ * @return string
+ */
+ public function getPrjAuthorVersion()
+ {
+
+ return $this->prj_author_version;
+ }
+
+ /**
+ * Get the [prj_original_source] column value.
+ *
+ * @return string
+ */
+ public function getPrjOriginalSource()
+ {
+
+ return $this->prj_original_source;
+ }
+
+ /**
+ * 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 || $v === '') {
+ $this->prj_uid = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_UID;
+ }
+
+ } // setPrjUid()
+
+ /**
+ * Set the value of [prj_name] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjName($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_name !== $v || $v === '') {
+ $this->prj_name = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_NAME;
+ }
+
+ } // setPrjName()
+
+ /**
+ * Set the value of [prj_target_namespace] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjTargetNamespace($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_target_namespace !== $v) {
+ $this->prj_target_namespace = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_TARGET_NAMESPACE;
+ }
+
+ } // setPrjTargetNamespace()
+
+ /**
+ * Set the value of [prj_expresion_language] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjExpresionLanguage($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_expresion_language !== $v) {
+ $this->prj_expresion_language = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_EXPRESION_LANGUAGE;
+ }
+
+ } // setPrjExpresionLanguage()
+
+ /**
+ * Set the value of [prj_type_language] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjTypeLanguage($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_type_language !== $v) {
+ $this->prj_type_language = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_TYPE_LANGUAGE;
+ }
+
+ } // setPrjTypeLanguage()
+
+ /**
+ * Set the value of [prj_exporter] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjExporter($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_exporter !== $v) {
+ $this->prj_exporter = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_EXPORTER;
+ }
+
+ } // setPrjExporter()
+
+ /**
+ * Set the value of [prj_exporter_version] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjExporterVersion($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_exporter_version !== $v) {
+ $this->prj_exporter_version = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_EXPORTER_VERSION;
+ }
+
+ } // setPrjExporterVersion()
+
+ /**
+ * Set the value of [prj_create_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setPrjCreateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [prj_create_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->prj_create_date !== $ts) {
+ $this->prj_create_date = $ts;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_CREATE_DATE;
+ }
+
+ } // setPrjCreateDate()
+
+ /**
+ * Set the value of [prj_update_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setPrjUpdateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [prj_update_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->prj_update_date !== $ts) {
+ $this->prj_update_date = $ts;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_UPDATE_DATE;
+ }
+
+ } // setPrjUpdateDate()
+
+ /**
+ * Set the value of [prj_author] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjAuthor($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_author !== $v) {
+ $this->prj_author = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_AUTHOR;
+ }
+
+ } // setPrjAuthor()
+
+ /**
+ * Set the value of [prj_author_version] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjAuthorVersion($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_author_version !== $v) {
+ $this->prj_author_version = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_AUTHOR_VERSION;
+ }
+
+ } // setPrjAuthorVersion()
+
+ /**
+ * Set the value of [prj_original_source] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setPrjOriginalSource($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_original_source !== $v) {
+ $this->prj_original_source = $v;
+ $this->modifiedColumns[] = BpmnProjectPeer::PRJ_ORIGINAL_SOURCE;
+ }
+
+ } // setPrjOriginalSource()
+
+ /**
+ * 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->prj_uid = $rs->getString($startcol + 0);
+
+ $this->prj_name = $rs->getString($startcol + 1);
+
+ $this->prj_target_namespace = $rs->getString($startcol + 2);
+
+ $this->prj_expresion_language = $rs->getString($startcol + 3);
+
+ $this->prj_type_language = $rs->getString($startcol + 4);
+
+ $this->prj_exporter = $rs->getString($startcol + 5);
+
+ $this->prj_exporter_version = $rs->getString($startcol + 6);
+
+ $this->prj_create_date = $rs->getTimestamp($startcol + 7, null);
+
+ $this->prj_update_date = $rs->getTimestamp($startcol + 8, null);
+
+ $this->prj_author = $rs->getString($startcol + 9);
+
+ $this->prj_author_version = $rs->getString($startcol + 10);
+
+ $this->prj_original_source = $rs->getString($startcol + 11);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 12; // 12 = BpmnProjectPeer::NUM_COLUMNS - BpmnProjectPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating BpmnProject 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(BpmnProjectPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ BpmnProjectPeer::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(BpmnProjectPeer::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 = BpmnProjectPeer::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 += BpmnProjectPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ if ($this->collBpmnProcesss !== null) {
+ foreach($this->collBpmnProcesss as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnActivitys !== null) {
+ foreach($this->collBpmnActivitys as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnArtifacts !== null) {
+ foreach($this->collBpmnArtifacts as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnDiagrams !== null) {
+ foreach($this->collBpmnDiagrams as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnBounds !== null) {
+ foreach($this->collBpmnBounds as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnDatas !== null) {
+ foreach($this->collBpmnDatas as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnEvents !== null) {
+ foreach($this->collBpmnEvents as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnFlows !== null) {
+ foreach($this->collBpmnFlows as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnGateways !== null) {
+ foreach($this->collBpmnGateways as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnLanesets !== null) {
+ foreach($this->collBpmnLanesets as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnLanes !== null) {
+ foreach($this->collBpmnLanes as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnParticipants !== null) {
+ foreach($this->collBpmnParticipants as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnExtensions !== null) {
+ foreach($this->collBpmnExtensions as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ if ($this->collBpmnDocumentations !== null) {
+ foreach($this->collBpmnDocumentations as $referrerFK) {
+ if (!$referrerFK->isDeleted()) {
+ $affectedRows += $referrerFK->save($con);
+ }
+ }
+ }
+
+ $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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = BpmnProjectPeer::doValidate($this, $columns)) !== true) {
+ $failureMap = array_merge($failureMap, $retval);
+ }
+
+
+ if ($this->collBpmnProcesss !== null) {
+ foreach($this->collBpmnProcesss as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnActivitys !== null) {
+ foreach($this->collBpmnActivitys as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnArtifacts !== null) {
+ foreach($this->collBpmnArtifacts as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnDiagrams !== null) {
+ foreach($this->collBpmnDiagrams as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnBounds !== null) {
+ foreach($this->collBpmnBounds as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnDatas !== null) {
+ foreach($this->collBpmnDatas as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnEvents !== null) {
+ foreach($this->collBpmnEvents as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnFlows !== null) {
+ foreach($this->collBpmnFlows as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnGateways !== null) {
+ foreach($this->collBpmnGateways as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnLanesets !== null) {
+ foreach($this->collBpmnLanesets as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnLanes !== null) {
+ foreach($this->collBpmnLanes as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnParticipants !== null) {
+ foreach($this->collBpmnParticipants as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnExtensions !== null) {
+ foreach($this->collBpmnExtensions as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+ if ($this->collBpmnDocumentations !== null) {
+ foreach($this->collBpmnDocumentations as $referrerFK) {
+ if (!$referrerFK->validate($columns)) {
+ $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+ }
+ }
+ }
+
+
+ $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 = BpmnProjectPeer::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->getPrjUid();
+ break;
+ case 1:
+ return $this->getPrjName();
+ break;
+ case 2:
+ return $this->getPrjTargetNamespace();
+ break;
+ case 3:
+ return $this->getPrjExpresionLanguage();
+ break;
+ case 4:
+ return $this->getPrjTypeLanguage();
+ break;
+ case 5:
+ return $this->getPrjExporter();
+ break;
+ case 6:
+ return $this->getPrjExporterVersion();
+ break;
+ case 7:
+ return $this->getPrjCreateDate();
+ break;
+ case 8:
+ return $this->getPrjUpdateDate();
+ break;
+ case 9:
+ return $this->getPrjAuthor();
+ break;
+ case 10:
+ return $this->getPrjAuthorVersion();
+ break;
+ case 11:
+ return $this->getPrjOriginalSource();
+ 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 = BpmnProjectPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getPrjUid(),
+ $keys[1] => $this->getPrjName(),
+ $keys[2] => $this->getPrjTargetNamespace(),
+ $keys[3] => $this->getPrjExpresionLanguage(),
+ $keys[4] => $this->getPrjTypeLanguage(),
+ $keys[5] => $this->getPrjExporter(),
+ $keys[6] => $this->getPrjExporterVersion(),
+ $keys[7] => $this->getPrjCreateDate(),
+ $keys[8] => $this->getPrjUpdateDate(),
+ $keys[9] => $this->getPrjAuthor(),
+ $keys[10] => $this->getPrjAuthorVersion(),
+ $keys[11] => $this->getPrjOriginalSource(),
+ );
+ 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 = BpmnProjectPeer::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->setPrjUid($value);
+ break;
+ case 1:
+ $this->setPrjName($value);
+ break;
+ case 2:
+ $this->setPrjTargetNamespace($value);
+ break;
+ case 3:
+ $this->setPrjExpresionLanguage($value);
+ break;
+ case 4:
+ $this->setPrjTypeLanguage($value);
+ break;
+ case 5:
+ $this->setPrjExporter($value);
+ break;
+ case 6:
+ $this->setPrjExporterVersion($value);
+ break;
+ case 7:
+ $this->setPrjCreateDate($value);
+ break;
+ case 8:
+ $this->setPrjUpdateDate($value);
+ break;
+ case 9:
+ $this->setPrjAuthor($value);
+ break;
+ case 10:
+ $this->setPrjAuthorVersion($value);
+ break;
+ case 11:
+ $this->setPrjOriginalSource($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 = BpmnProjectPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setPrjUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setPrjName($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setPrjTargetNamespace($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setPrjExpresionLanguage($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setPrjTypeLanguage($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setPrjExporter($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setPrjExporterVersion($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setPrjCreateDate($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setPrjUpdateDate($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setPrjAuthor($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setPrjAuthorVersion($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setPrjOriginalSource($arr[$keys[11]]);
+ }
+
+ }
+
+ /**
+ * 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(BpmnProjectPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_UID)) {
+ $criteria->add(BpmnProjectPeer::PRJ_UID, $this->prj_uid);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_NAME)) {
+ $criteria->add(BpmnProjectPeer::PRJ_NAME, $this->prj_name);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_TARGET_NAMESPACE)) {
+ $criteria->add(BpmnProjectPeer::PRJ_TARGET_NAMESPACE, $this->prj_target_namespace);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_EXPRESION_LANGUAGE)) {
+ $criteria->add(BpmnProjectPeer::PRJ_EXPRESION_LANGUAGE, $this->prj_expresion_language);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_TYPE_LANGUAGE)) {
+ $criteria->add(BpmnProjectPeer::PRJ_TYPE_LANGUAGE, $this->prj_type_language);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_EXPORTER)) {
+ $criteria->add(BpmnProjectPeer::PRJ_EXPORTER, $this->prj_exporter);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_EXPORTER_VERSION)) {
+ $criteria->add(BpmnProjectPeer::PRJ_EXPORTER_VERSION, $this->prj_exporter_version);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_CREATE_DATE)) {
+ $criteria->add(BpmnProjectPeer::PRJ_CREATE_DATE, $this->prj_create_date);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_UPDATE_DATE)) {
+ $criteria->add(BpmnProjectPeer::PRJ_UPDATE_DATE, $this->prj_update_date);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_AUTHOR)) {
+ $criteria->add(BpmnProjectPeer::PRJ_AUTHOR, $this->prj_author);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_AUTHOR_VERSION)) {
+ $criteria->add(BpmnProjectPeer::PRJ_AUTHOR_VERSION, $this->prj_author_version);
+ }
+
+ if ($this->isColumnModified(BpmnProjectPeer::PRJ_ORIGINAL_SOURCE)) {
+ $criteria->add(BpmnProjectPeer::PRJ_ORIGINAL_SOURCE, $this->prj_original_source);
+ }
+
+
+ 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(BpmnProjectPeer::DATABASE_NAME);
+
+
+ return $criteria;
+ }
+
+ /**
+ * Returns NULL since this table doesn't have a primary key.
+ * This method exists only for BC and is deprecated!
+ * @return null
+ */
+ public function getPrimaryKey()
+ {
+ return null;
+ }
+
+ /**
+ * Dummy primary key setter.
+ *
+ * This function only exists to preserve backwards compatibility. It is no longer
+ * needed or required by the Persistent interface. It will be removed in next BC-breaking
+ * release of Propel.
+ *
+ * @deprecated
+ */
+ public function setPrimaryKey($pk)
+ {
+ // do nothing, because this object doesn't have any primary keys
+ }
+
+ /**
+ * 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 BpmnProject (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->setPrjName($this->prj_name);
+
+ $copyObj->setPrjTargetNamespace($this->prj_target_namespace);
+
+ $copyObj->setPrjExpresionLanguage($this->prj_expresion_language);
+
+ $copyObj->setPrjTypeLanguage($this->prj_type_language);
+
+ $copyObj->setPrjExporter($this->prj_exporter);
+
+ $copyObj->setPrjExporterVersion($this->prj_exporter_version);
+
+ $copyObj->setPrjCreateDate($this->prj_create_date);
+
+ $copyObj->setPrjUpdateDate($this->prj_update_date);
+
+ $copyObj->setPrjAuthor($this->prj_author);
+
+ $copyObj->setPrjAuthorVersion($this->prj_author_version);
+
+ $copyObj->setPrjOriginalSource($this->prj_original_source);
+
+
+ if ($deepCopy) {
+ // important: temporarily setNew(false) because this affects the behavior of
+ // the getter/setter methods for fkey referrer objects.
+ $copyObj->setNew(false);
+
+ foreach($this->getBpmnProcesss() as $relObj) {
+ $copyObj->addBpmnProcess($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnActivitys() as $relObj) {
+ $copyObj->addBpmnActivity($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnArtifacts() as $relObj) {
+ $copyObj->addBpmnArtifact($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnDiagrams() as $relObj) {
+ $copyObj->addBpmnDiagram($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnBounds() as $relObj) {
+ $copyObj->addBpmnBound($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnDatas() as $relObj) {
+ $copyObj->addBpmnData($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnEvents() as $relObj) {
+ $copyObj->addBpmnEvent($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnFlows() as $relObj) {
+ $copyObj->addBpmnFlow($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnGateways() as $relObj) {
+ $copyObj->addBpmnGateway($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnLanesets() as $relObj) {
+ $copyObj->addBpmnLaneset($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnLanes() as $relObj) {
+ $copyObj->addBpmnLane($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnParticipants() as $relObj) {
+ $copyObj->addBpmnParticipant($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnExtensions() as $relObj) {
+ $copyObj->addBpmnExtension($relObj->copy($deepCopy));
+ }
+
+ foreach($this->getBpmnDocumentations() as $relObj) {
+ $copyObj->addBpmnDocumentation($relObj->copy($deepCopy));
+ }
+
+ } // if ($deepCopy)
+
+
+ $copyObj->setNew(true);
+
+ }
+
+ /**
+ * 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 BpmnProject 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 BpmnProjectPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new BpmnProjectPeer();
+ }
+ return self::$peer;
+ }
+
+ /**
+ * Temporary storage of collBpmnProcesss to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnProcesss()
+ {
+ if ($this->collBpmnProcesss === null) {
+ $this->collBpmnProcesss = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnProcesss from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnProcesss($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnProcesss === null) {
+ if ($this->isNew()) {
+ $this->collBpmnProcesss = array();
+ } else {
+
+ $criteria->add(BpmnProcessPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnProcessPeer::addSelectColumns($criteria);
+ $this->collBpmnProcesss = BpmnProcessPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnProcessPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnProcessPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnProcessCriteria) || !$this->lastBpmnProcessCriteria->equals($criteria)) {
+ $this->collBpmnProcesss = BpmnProcessPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnProcessCriteria = $criteria;
+ return $this->collBpmnProcesss;
+ }
+
+ /**
+ * Returns the number of related BpmnProcesss.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnProcesss($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnProcessPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnProcessPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnProcessPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnProcess object to this object
+ * through the BpmnProcess foreign key attribute
+ *
+ * @param BpmnProcess $l BpmnProcess
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnProcess(BpmnProcess $l)
+ {
+ $this->collBpmnProcesss[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+ /**
+ * Temporary storage of collBpmnActivitys to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnActivitys()
+ {
+ if ($this->collBpmnActivitys === null) {
+ $this->collBpmnActivitys = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnActivitys from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnActivitys($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnActivityPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnActivitys === null) {
+ if ($this->isNew()) {
+ $this->collBpmnActivitys = array();
+ } else {
+
+ $criteria->add(BpmnActivityPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnActivityPeer::addSelectColumns($criteria);
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnActivityPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnActivityPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnActivityCriteria) || !$this->lastBpmnActivityCriteria->equals($criteria)) {
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnActivityCriteria = $criteria;
+ return $this->collBpmnActivitys;
+ }
+
+ /**
+ * Returns the number of related BpmnActivitys.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnActivitys($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnActivityPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnActivityPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnActivityPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnActivity object to this object
+ * through the BpmnActivity foreign key attribute
+ *
+ * @param BpmnActivity $l BpmnActivity
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnActivity(BpmnActivity $l)
+ {
+ $this->collBpmnActivitys[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnActivitys from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnActivitysJoinBpmnProcess($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnActivityPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnActivitys === null) {
+ if ($this->isNew()) {
+ $this->collBpmnActivitys = array();
+ } else {
+
+ $criteria->add(BpmnActivityPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnActivityPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnActivityCriteria) || !$this->lastBpmnActivityCriteria->equals($criteria)) {
+ $this->collBpmnActivitys = BpmnActivityPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ }
+ $this->lastBpmnActivityCriteria = $criteria;
+
+ return $this->collBpmnActivitys;
+ }
+
+ /**
+ * Temporary storage of collBpmnArtifacts to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnArtifacts()
+ {
+ if ($this->collBpmnArtifacts === null) {
+ $this->collBpmnArtifacts = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnArtifacts from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnArtifacts($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnArtifactPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnArtifacts === null) {
+ if ($this->isNew()) {
+ $this->collBpmnArtifacts = array();
+ } else {
+
+ $criteria->add(BpmnArtifactPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnArtifactPeer::addSelectColumns($criteria);
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnArtifactPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnArtifactPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnArtifactCriteria) || !$this->lastBpmnArtifactCriteria->equals($criteria)) {
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnArtifactCriteria = $criteria;
+ return $this->collBpmnArtifacts;
+ }
+
+ /**
+ * Returns the number of related BpmnArtifacts.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnArtifacts($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnArtifactPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnArtifactPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnArtifactPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnArtifact object to this object
+ * through the BpmnArtifact foreign key attribute
+ *
+ * @param BpmnArtifact $l BpmnArtifact
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnArtifact(BpmnArtifact $l)
+ {
+ $this->collBpmnArtifacts[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnArtifacts from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnArtifactsJoinBpmnProcess($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnArtifactPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnArtifacts === null) {
+ if ($this->isNew()) {
+ $this->collBpmnArtifacts = array();
+ } else {
+
+ $criteria->add(BpmnArtifactPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnArtifactPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnArtifactCriteria) || !$this->lastBpmnArtifactCriteria->equals($criteria)) {
+ $this->collBpmnArtifacts = BpmnArtifactPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ }
+ $this->lastBpmnArtifactCriteria = $criteria;
+
+ return $this->collBpmnArtifacts;
+ }
+
+ /**
+ * Temporary storage of collBpmnDiagrams to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnDiagrams()
+ {
+ if ($this->collBpmnDiagrams === null) {
+ $this->collBpmnDiagrams = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnDiagrams from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnDiagrams($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDiagramPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnDiagrams === null) {
+ if ($this->isNew()) {
+ $this->collBpmnDiagrams = array();
+ } else {
+
+ $criteria->add(BpmnDiagramPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnDiagramPeer::addSelectColumns($criteria);
+ $this->collBpmnDiagrams = BpmnDiagramPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnDiagramPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnDiagramPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnDiagramCriteria) || !$this->lastBpmnDiagramCriteria->equals($criteria)) {
+ $this->collBpmnDiagrams = BpmnDiagramPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnDiagramCriteria = $criteria;
+ return $this->collBpmnDiagrams;
+ }
+
+ /**
+ * Returns the number of related BpmnDiagrams.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnDiagrams($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDiagramPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnDiagramPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnDiagramPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnDiagram object to this object
+ * through the BpmnDiagram foreign key attribute
+ *
+ * @param BpmnDiagram $l BpmnDiagram
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnDiagram(BpmnDiagram $l)
+ {
+ $this->collBpmnDiagrams[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+ /**
+ * Temporary storage of collBpmnBounds to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnBounds()
+ {
+ if ($this->collBpmnBounds === null) {
+ $this->collBpmnBounds = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnBounds from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnBounds($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnBoundPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnBounds === null) {
+ if ($this->isNew()) {
+ $this->collBpmnBounds = array();
+ } else {
+
+ $criteria->add(BpmnBoundPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnBoundPeer::addSelectColumns($criteria);
+ $this->collBpmnBounds = BpmnBoundPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnBoundPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnBoundPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnBoundCriteria) || !$this->lastBpmnBoundCriteria->equals($criteria)) {
+ $this->collBpmnBounds = BpmnBoundPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnBoundCriteria = $criteria;
+ return $this->collBpmnBounds;
+ }
+
+ /**
+ * Returns the number of related BpmnBounds.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnBounds($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnBoundPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnBoundPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnBoundPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnBound object to this object
+ * through the BpmnBound foreign key attribute
+ *
+ * @param BpmnBound $l BpmnBound
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnBound(BpmnBound $l)
+ {
+ $this->collBpmnBounds[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnBounds from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnBoundsJoinBpmnDiagram($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnBoundPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnBounds === null) {
+ if ($this->isNew()) {
+ $this->collBpmnBounds = array();
+ } else {
+
+ $criteria->add(BpmnBoundPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnBounds = BpmnBoundPeer::doSelectJoinBpmnDiagram($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnBoundPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnBoundCriteria) || !$this->lastBpmnBoundCriteria->equals($criteria)) {
+ $this->collBpmnBounds = BpmnBoundPeer::doSelectJoinBpmnDiagram($criteria, $con);
+ }
+ }
+ $this->lastBpmnBoundCriteria = $criteria;
+
+ return $this->collBpmnBounds;
+ }
+
+ /**
+ * Temporary storage of collBpmnDatas to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnDatas()
+ {
+ if ($this->collBpmnDatas === null) {
+ $this->collBpmnDatas = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnDatas from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnDatas($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDataPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnDatas === null) {
+ if ($this->isNew()) {
+ $this->collBpmnDatas = array();
+ } else {
+
+ $criteria->add(BpmnDataPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnDataPeer::addSelectColumns($criteria);
+ $this->collBpmnDatas = BpmnDataPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnDataPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnDataPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnDataCriteria) || !$this->lastBpmnDataCriteria->equals($criteria)) {
+ $this->collBpmnDatas = BpmnDataPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnDataCriteria = $criteria;
+ return $this->collBpmnDatas;
+ }
+
+ /**
+ * Returns the number of related BpmnDatas.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnDatas($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDataPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnDataPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnDataPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnData object to this object
+ * through the BpmnData foreign key attribute
+ *
+ * @param BpmnData $l BpmnData
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnData(BpmnData $l)
+ {
+ $this->collBpmnDatas[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnDatas from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnDatasJoinBpmnProcess($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDataPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnDatas === null) {
+ if ($this->isNew()) {
+ $this->collBpmnDatas = array();
+ } else {
+
+ $criteria->add(BpmnDataPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnDatas = BpmnDataPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnDataPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnDataCriteria) || !$this->lastBpmnDataCriteria->equals($criteria)) {
+ $this->collBpmnDatas = BpmnDataPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ }
+ $this->lastBpmnDataCriteria = $criteria;
+
+ return $this->collBpmnDatas;
+ }
+
+ /**
+ * Temporary storage of collBpmnEvents to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnEvents()
+ {
+ if ($this->collBpmnEvents === null) {
+ $this->collBpmnEvents = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnEvents from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnEvents($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnEventPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnEvents === null) {
+ if ($this->isNew()) {
+ $this->collBpmnEvents = array();
+ } else {
+
+ $criteria->add(BpmnEventPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnEventPeer::addSelectColumns($criteria);
+ $this->collBpmnEvents = BpmnEventPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnEventPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnEventPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnEventCriteria) || !$this->lastBpmnEventCriteria->equals($criteria)) {
+ $this->collBpmnEvents = BpmnEventPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnEventCriteria = $criteria;
+ return $this->collBpmnEvents;
+ }
+
+ /**
+ * Returns the number of related BpmnEvents.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnEvents($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnEventPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnEventPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnEventPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnEvent object to this object
+ * through the BpmnEvent foreign key attribute
+ *
+ * @param BpmnEvent $l BpmnEvent
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnEvent(BpmnEvent $l)
+ {
+ $this->collBpmnEvents[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnEvents from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnEventsJoinBpmnProcess($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnEventPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnEvents === null) {
+ if ($this->isNew()) {
+ $this->collBpmnEvents = array();
+ } else {
+
+ $criteria->add(BpmnEventPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnEvents = BpmnEventPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnEventPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnEventCriteria) || !$this->lastBpmnEventCriteria->equals($criteria)) {
+ $this->collBpmnEvents = BpmnEventPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ }
+ $this->lastBpmnEventCriteria = $criteria;
+
+ return $this->collBpmnEvents;
+ }
+
+ /**
+ * Temporary storage of collBpmnFlows to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnFlows()
+ {
+ if ($this->collBpmnFlows === null) {
+ $this->collBpmnFlows = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnFlows from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnFlows($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnFlowPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnFlows === null) {
+ if ($this->isNew()) {
+ $this->collBpmnFlows = array();
+ } else {
+
+ $criteria->add(BpmnFlowPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnFlowPeer::addSelectColumns($criteria);
+ $this->collBpmnFlows = BpmnFlowPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnFlowPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnFlowPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnFlowCriteria) || !$this->lastBpmnFlowCriteria->equals($criteria)) {
+ $this->collBpmnFlows = BpmnFlowPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnFlowCriteria = $criteria;
+ return $this->collBpmnFlows;
+ }
+
+ /**
+ * Returns the number of related BpmnFlows.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnFlows($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnFlowPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnFlowPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnFlowPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnFlow object to this object
+ * through the BpmnFlow foreign key attribute
+ *
+ * @param BpmnFlow $l BpmnFlow
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnFlow(BpmnFlow $l)
+ {
+ $this->collBpmnFlows[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnFlows from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnFlowsJoinBpmnDiagram($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnFlowPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnFlows === null) {
+ if ($this->isNew()) {
+ $this->collBpmnFlows = array();
+ } else {
+
+ $criteria->add(BpmnFlowPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnFlows = BpmnFlowPeer::doSelectJoinBpmnDiagram($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnFlowPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnFlowCriteria) || !$this->lastBpmnFlowCriteria->equals($criteria)) {
+ $this->collBpmnFlows = BpmnFlowPeer::doSelectJoinBpmnDiagram($criteria, $con);
+ }
+ }
+ $this->lastBpmnFlowCriteria = $criteria;
+
+ return $this->collBpmnFlows;
+ }
+
+ /**
+ * Temporary storage of collBpmnGateways to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnGateways()
+ {
+ if ($this->collBpmnGateways === null) {
+ $this->collBpmnGateways = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnGateways from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnGateways($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnGatewayPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnGateways === null) {
+ if ($this->isNew()) {
+ $this->collBpmnGateways = array();
+ } else {
+
+ $criteria->add(BpmnGatewayPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnGatewayPeer::addSelectColumns($criteria);
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnGatewayPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnGatewayPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnGatewayCriteria) || !$this->lastBpmnGatewayCriteria->equals($criteria)) {
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnGatewayCriteria = $criteria;
+ return $this->collBpmnGateways;
+ }
+
+ /**
+ * Returns the number of related BpmnGateways.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnGateways($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnGatewayPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnGatewayPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnGatewayPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnGateway object to this object
+ * through the BpmnGateway foreign key attribute
+ *
+ * @param BpmnGateway $l BpmnGateway
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnGateway(BpmnGateway $l)
+ {
+ $this->collBpmnGateways[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnGateways from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnGatewaysJoinBpmnProcess($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnGatewayPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnGateways === null) {
+ if ($this->isNew()) {
+ $this->collBpmnGateways = array();
+ } else {
+
+ $criteria->add(BpmnGatewayPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnGatewayPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnGatewayCriteria) || !$this->lastBpmnGatewayCriteria->equals($criteria)) {
+ $this->collBpmnGateways = BpmnGatewayPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ }
+ $this->lastBpmnGatewayCriteria = $criteria;
+
+ return $this->collBpmnGateways;
+ }
+
+ /**
+ * Temporary storage of collBpmnLanesets to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnLanesets()
+ {
+ if ($this->collBpmnLanesets === null) {
+ $this->collBpmnLanesets = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnLanesets from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnLanesets($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanesets === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanesets = array();
+ } else {
+
+ $criteria->add(BpmnLanesetPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnLanesetPeer::addSelectColumns($criteria);
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnLanesetPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnLanesetPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnLanesetCriteria) || !$this->lastBpmnLanesetCriteria->equals($criteria)) {
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnLanesetCriteria = $criteria;
+ return $this->collBpmnLanesets;
+ }
+
+ /**
+ * Returns the number of related BpmnLanesets.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnLanesets($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnLanesetPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnLanesetPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnLaneset object to this object
+ * through the BpmnLaneset foreign key attribute
+ *
+ * @param BpmnLaneset $l BpmnLaneset
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnLaneset(BpmnLaneset $l)
+ {
+ $this->collBpmnLanesets[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnLanesets from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnLanesetsJoinBpmnProcess($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanesets === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanesets = array();
+ } else {
+
+ $criteria->add(BpmnLanesetPeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnLanesetPeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnLanesetCriteria) || !$this->lastBpmnLanesetCriteria->equals($criteria)) {
+ $this->collBpmnLanesets = BpmnLanesetPeer::doSelectJoinBpmnProcess($criteria, $con);
+ }
+ }
+ $this->lastBpmnLanesetCriteria = $criteria;
+
+ return $this->collBpmnLanesets;
+ }
+
+ /**
+ * Temporary storage of collBpmnLanes to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnLanes()
+ {
+ if ($this->collBpmnLanes === null) {
+ $this->collBpmnLanes = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnLanes from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnLanes($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanes === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanes = array();
+ } else {
+
+ $criteria->add(BpmnLanePeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnLanePeer::addSelectColumns($criteria);
+ $this->collBpmnLanes = BpmnLanePeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnLanePeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnLanePeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnLaneCriteria) || !$this->lastBpmnLaneCriteria->equals($criteria)) {
+ $this->collBpmnLanes = BpmnLanePeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnLaneCriteria = $criteria;
+ return $this->collBpmnLanes;
+ }
+
+ /**
+ * Returns the number of related BpmnLanes.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnLanes($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnLanePeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnLanePeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnLane object to this object
+ * through the BpmnLane foreign key attribute
+ *
+ * @param BpmnLane $l BpmnLane
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnLane(BpmnLane $l)
+ {
+ $this->collBpmnLanes[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject is new, it will return
+ * an empty collection; or if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnLanes from storage.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in BpmnProject.
+ */
+ public function getBpmnLanesJoinBpmnLaneset($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnLanePeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnLanes === null) {
+ if ($this->isNew()) {
+ $this->collBpmnLanes = array();
+ } else {
+
+ $criteria->add(BpmnLanePeer::PRJ_UID, $this->getPrjUid());
+
+ $this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnLaneset($criteria, $con);
+ }
+ } else {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+ $criteria->add(BpmnLanePeer::PRJ_UID, $this->getPrjUid());
+
+ if (!isset($this->lastBpmnLaneCriteria) || !$this->lastBpmnLaneCriteria->equals($criteria)) {
+ $this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnLaneset($criteria, $con);
+ }
+ }
+ $this->lastBpmnLaneCriteria = $criteria;
+
+ return $this->collBpmnLanes;
+ }
+
+ /**
+ * Temporary storage of collBpmnParticipants to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnParticipants()
+ {
+ if ($this->collBpmnParticipants === null) {
+ $this->collBpmnParticipants = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnParticipants from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnParticipants($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnParticipantPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnParticipants === null) {
+ if ($this->isNew()) {
+ $this->collBpmnParticipants = array();
+ } else {
+
+ $criteria->add(BpmnParticipantPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnParticipantPeer::addSelectColumns($criteria);
+ $this->collBpmnParticipants = BpmnParticipantPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnParticipantPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnParticipantPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnParticipantCriteria) || !$this->lastBpmnParticipantCriteria->equals($criteria)) {
+ $this->collBpmnParticipants = BpmnParticipantPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnParticipantCriteria = $criteria;
+ return $this->collBpmnParticipants;
+ }
+
+ /**
+ * Returns the number of related BpmnParticipants.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnParticipants($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnParticipantPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnParticipantPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnParticipantPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnParticipant object to this object
+ * through the BpmnParticipant foreign key attribute
+ *
+ * @param BpmnParticipant $l BpmnParticipant
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnParticipant(BpmnParticipant $l)
+ {
+ $this->collBpmnParticipants[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+ /**
+ * Temporary storage of collBpmnExtensions to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnExtensions()
+ {
+ if ($this->collBpmnExtensions === null) {
+ $this->collBpmnExtensions = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnExtensions from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnExtensions($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnExtensionPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnExtensions === null) {
+ if ($this->isNew()) {
+ $this->collBpmnExtensions = array();
+ } else {
+
+ $criteria->add(BpmnExtensionPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnExtensionPeer::addSelectColumns($criteria);
+ $this->collBpmnExtensions = BpmnExtensionPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnExtensionPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnExtensionPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnExtensionCriteria) || !$this->lastBpmnExtensionCriteria->equals($criteria)) {
+ $this->collBpmnExtensions = BpmnExtensionPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnExtensionCriteria = $criteria;
+ return $this->collBpmnExtensions;
+ }
+
+ /**
+ * Returns the number of related BpmnExtensions.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnExtensions($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnExtensionPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnExtensionPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnExtensionPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnExtension object to this object
+ * through the BpmnExtension foreign key attribute
+ *
+ * @param BpmnExtension $l BpmnExtension
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnExtension(BpmnExtension $l)
+ {
+ $this->collBpmnExtensions[] = $l;
+ $l->setBpmnProject($this);
+ }
+
+ /**
+ * Temporary storage of collBpmnDocumentations to save a possible db hit in
+ * the event objects are add to the collection, but the
+ * complete collection is never requested.
+ * @return void
+ */
+ public function initBpmnDocumentations()
+ {
+ if ($this->collBpmnDocumentations === null) {
+ $this->collBpmnDocumentations = array();
+ }
+ }
+
+ /**
+ * If this collection has already been initialized with
+ * an identical criteria, it returns the collection.
+ * Otherwise if this BpmnProject has previously
+ * been saved, it will retrieve related BpmnDocumentations from storage.
+ * If this BpmnProject is new, it will return
+ * an empty collection or the current collection, the criteria
+ * is ignored on a new object.
+ *
+ * @param Connection $con
+ * @param Criteria $criteria
+ * @throws PropelException
+ */
+ public function getBpmnDocumentations($criteria = null, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDocumentationPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ if ($this->collBpmnDocumentations === null) {
+ if ($this->isNew()) {
+ $this->collBpmnDocumentations = array();
+ } else {
+
+ $criteria->add(BpmnDocumentationPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnDocumentationPeer::addSelectColumns($criteria);
+ $this->collBpmnDocumentations = BpmnDocumentationPeer::doSelect($criteria, $con);
+ }
+ } else {
+ // criteria has no effect for a new object
+ if (!$this->isNew()) {
+ // the following code is to determine if a new query is
+ // called for. If the criteria is the same as the last
+ // one, just return the collection.
+
+
+ $criteria->add(BpmnDocumentationPeer::PRJ_UID, $this->getPrjUid());
+
+ BpmnDocumentationPeer::addSelectColumns($criteria);
+ if (!isset($this->lastBpmnDocumentationCriteria) || !$this->lastBpmnDocumentationCriteria->equals($criteria)) {
+ $this->collBpmnDocumentations = BpmnDocumentationPeer::doSelect($criteria, $con);
+ }
+ }
+ }
+ $this->lastBpmnDocumentationCriteria = $criteria;
+ return $this->collBpmnDocumentations;
+ }
+
+ /**
+ * Returns the number of related BpmnDocumentations.
+ *
+ * @param Criteria $criteria
+ * @param boolean $distinct
+ * @param Connection $con
+ * @throws PropelException
+ */
+ public function countBpmnDocumentations($criteria = null, $distinct = false, $con = null)
+ {
+ // include the Peer class
+ include_once 'classes/model/om/BaseBpmnDocumentationPeer.php';
+ if ($criteria === null) {
+ $criteria = new Criteria();
+ }
+ elseif ($criteria instanceof Criteria)
+ {
+ $criteria = clone $criteria;
+ }
+
+ $criteria->add(BpmnDocumentationPeer::PRJ_UID, $this->getPrjUid());
+
+ return BpmnDocumentationPeer::doCount($criteria, $distinct, $con);
+ }
+
+ /**
+ * Method called to associate a BpmnDocumentation object to this object
+ * through the BpmnDocumentation foreign key attribute
+ *
+ * @param BpmnDocumentation $l BpmnDocumentation
+ * @return void
+ * @throws PropelException
+ */
+ public function addBpmnDocumentation(BpmnDocumentation $l)
+ {
+ $this->collBpmnDocumentations[] = $l;
+ $l->setBpmnProject($this);
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseBpmnProjectPeer.php b/workflow/engine/classes/model/om/BaseBpmnProjectPeer.php
new file mode 100644
index 000000000..85d7c4d2c
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseBpmnProjectPeer.php
@@ -0,0 +1,582 @@
+ array ('PrjUid', 'PrjName', 'PrjTargetNamespace', 'PrjExpresionLanguage', 'PrjTypeLanguage', 'PrjExporter', 'PrjExporterVersion', 'PrjCreateDate', 'PrjUpdateDate', 'PrjAuthor', 'PrjAuthorVersion', 'PrjOriginalSource', ),
+ BasePeer::TYPE_COLNAME => array (BpmnProjectPeer::PRJ_UID, BpmnProjectPeer::PRJ_NAME, BpmnProjectPeer::PRJ_TARGET_NAMESPACE, BpmnProjectPeer::PRJ_EXPRESION_LANGUAGE, BpmnProjectPeer::PRJ_TYPE_LANGUAGE, BpmnProjectPeer::PRJ_EXPORTER, BpmnProjectPeer::PRJ_EXPORTER_VERSION, BpmnProjectPeer::PRJ_CREATE_DATE, BpmnProjectPeer::PRJ_UPDATE_DATE, BpmnProjectPeer::PRJ_AUTHOR, BpmnProjectPeer::PRJ_AUTHOR_VERSION, BpmnProjectPeer::PRJ_ORIGINAL_SOURCE, ),
+ BasePeer::TYPE_FIELDNAME => array ('PRJ_UID', 'PRJ_NAME', 'PRJ_TARGET_NAMESPACE', 'PRJ_EXPRESION_LANGUAGE', 'PRJ_TYPE_LANGUAGE', 'PRJ_EXPORTER', 'PRJ_EXPORTER_VERSION', 'PRJ_CREATE_DATE', 'PRJ_UPDATE_DATE', 'PRJ_AUTHOR', 'PRJ_AUTHOR_VERSION', 'PRJ_ORIGINAL_SOURCE', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
+ );
+
+ /**
+ * 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 ('PrjUid' => 0, 'PrjName' => 1, 'PrjTargetNamespace' => 2, 'PrjExpresionLanguage' => 3, 'PrjTypeLanguage' => 4, 'PrjExporter' => 5, 'PrjExporterVersion' => 6, 'PrjCreateDate' => 7, 'PrjUpdateDate' => 8, 'PrjAuthor' => 9, 'PrjAuthorVersion' => 10, 'PrjOriginalSource' => 11, ),
+ BasePeer::TYPE_COLNAME => array (BpmnProjectPeer::PRJ_UID => 0, BpmnProjectPeer::PRJ_NAME => 1, BpmnProjectPeer::PRJ_TARGET_NAMESPACE => 2, BpmnProjectPeer::PRJ_EXPRESION_LANGUAGE => 3, BpmnProjectPeer::PRJ_TYPE_LANGUAGE => 4, BpmnProjectPeer::PRJ_EXPORTER => 5, BpmnProjectPeer::PRJ_EXPORTER_VERSION => 6, BpmnProjectPeer::PRJ_CREATE_DATE => 7, BpmnProjectPeer::PRJ_UPDATE_DATE => 8, BpmnProjectPeer::PRJ_AUTHOR => 9, BpmnProjectPeer::PRJ_AUTHOR_VERSION => 10, BpmnProjectPeer::PRJ_ORIGINAL_SOURCE => 11, ),
+ BasePeer::TYPE_FIELDNAME => array ('PRJ_UID' => 0, 'PRJ_NAME' => 1, 'PRJ_TARGET_NAMESPACE' => 2, 'PRJ_EXPRESION_LANGUAGE' => 3, 'PRJ_TYPE_LANGUAGE' => 4, 'PRJ_EXPORTER' => 5, 'PRJ_EXPORTER_VERSION' => 6, 'PRJ_CREATE_DATE' => 7, 'PRJ_UPDATE_DATE' => 8, 'PRJ_AUTHOR' => 9, 'PRJ_AUTHOR_VERSION' => 10, 'PRJ_ORIGINAL_SOURCE' => 11, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
+ );
+
+ /**
+ * @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/BpmnProjectMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.BpmnProjectMapBuilder');
+ }
+ /**
+ * 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 = BpmnProjectPeer::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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BpmnProjectPeer::COLUMN_NAME).
+ * @return string
+ */
+ public static function alias($alias, $column)
+ {
+ return str_replace(BpmnProjectPeer::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(BpmnProjectPeer::PRJ_UID);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_NAME);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_TARGET_NAMESPACE);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_EXPRESION_LANGUAGE);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_TYPE_LANGUAGE);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_EXPORTER);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_EXPORTER_VERSION);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_CREATE_DATE);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_UPDATE_DATE);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_AUTHOR);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_AUTHOR_VERSION);
+
+ $criteria->addSelectColumn(BpmnProjectPeer::PRJ_ORIGINAL_SOURCE);
+
+ }
+
+ const COUNT = 'COUNT(*)';
+ const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
+
+ /**
+ * 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(BpmnProjectPeer::COUNT_DISTINCT);
+ } else {
+ $criteria->addSelectColumn(BpmnProjectPeer::COUNT);
+ }
+
+ // just in case we're grouping: add those columns to the select statement
+ foreach ($criteria->getGroupByColumns() as $column) {
+ $criteria->addSelectColumn($column);
+ }
+
+ $rs = BpmnProjectPeer::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 BpmnProject
+ * @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 = BpmnProjectPeer::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 BpmnProjectPeer::populateObjects(BpmnProjectPeer::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;
+ BpmnProjectPeer::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 = BpmnProjectPeer::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 BpmnProjectPeer::CLASS_DEFAULT;
+ }
+
+ /**
+ * Method perform an INSERT on the database, given a BpmnProject or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnProject 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 BpmnProject 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 BpmnProject or Criteria object.
+ *
+ * @param mixed $values Criteria or BpmnProject 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
+
+ } 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 BPMN_PROJECT 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(BpmnProjectPeer::TABLE_NAME, $con);
+ $con->commit();
+ return $affectedRows;
+ } catch (PropelException $e) {
+ $con->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Method perform a DELETE on the database, given a BpmnProject or Criteria object OR a primary key value.
+ *
+ * @param mixed $values Criteria or BpmnProject 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(BpmnProjectPeer::DATABASE_NAME);
+ }
+
+ if ($values instanceof Criteria) {
+ $criteria = clone $values; // rename for clarity
+ } elseif ($values instanceof BpmnProject) {
+
+ $criteria = $values->buildCriteria();
+ } else {
+ // it must be the primary key
+ $criteria = new Criteria(self::DATABASE_NAME);
+ // primary key is composite; we therefore, expect
+ // the primary key passed to be an array of pkey
+ // values
+ if (count($values) == count($values, COUNT_RECURSIVE)) {
+ // array is not multi-dimensional
+ $values = array($values);
+ }
+ $vals = array();
+ foreach ($values as $value) {
+
+ }
+
+ }
+
+ // 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 BpmnProject 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 BpmnProject $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(BpmnProject $obj, $cols = null)
+ {
+ $columns = array();
+
+ if ($cols) {
+ $dbMap = Propel::getDatabaseMap(BpmnProjectPeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(BpmnProjectPeer::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(BpmnProjectPeer::DATABASE_NAME, BpmnProjectPeer::TABLE_NAME, $columns);
+ }
+}
+
+
+// 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 {
+ BaseBpmnProjectPeer::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/BpmnProjectMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.BpmnProjectMapBuilder');
+}
+