Adding BPMN model classes

This commit is contained in:
Erik Amaru Ortiz
2013-12-02 17:36:37 -04:00
parent b33d616678
commit a773385ff2
75 changed files with 39246 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,130 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_ACTIVITY' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnActivityMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnActivityMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,82 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_ARTIFACT' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnArtifactMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnArtifactMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,96 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_BOUND' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnBoundMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnBoundMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,94 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_DATA' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnDataMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnDataMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,78 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_DIAGRAM' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnDiagramMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnDiagramMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,80 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_DOCUMENTATION' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnDocumentationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnDocumentationMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,116 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_EVENT' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnEventMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnEventMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,80 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_EXTENSION' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnExtensionMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnExtensionMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,106 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_FLOW' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnFlowMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnFlowMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,92 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_GATEWAY' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnGatewayMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnGatewayMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,82 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_LANE' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnLaneMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnLaneMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,84 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_LANESET' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnLanesetMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnLanesetMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,88 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_PARTICIPANT' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnParticipantMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnParticipantMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,86 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_PROCESS' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnProcessMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnProcessMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

View File

@@ -0,0 +1,94 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'BPMN_PROJECT' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class BpmnProjectMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.BpmnProjectMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,961 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/BpmnArtifactPeer.php';
/**
* Base class that represents a row from the 'BPMN_ARTIFACT' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnArtifact extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var BpmnArtifactPeer
*/
protected static $peer;
/**
* The value for the art_uid field.
* @var string
*/
protected $art_uid = '';
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the pro_uid field.
* @var string
*/
protected $pro_uid = '';
/**
* The value for the art_type field.
* @var string
*/
protected $art_type;
/**
* The value for the art_name field.
* @var string
*/
protected $art_name;
/**
* The value for the art_category_ref field.
* @var string
*/
protected $art_category_ref;
/**
* @var BpmnProject
*/
protected $aBpmnProject;
/**
* @var BpmnProcess
*/
protected $aBpmnProcess;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [art_uid] column value.
*
* @return string
*/
public function getArtUid()
{
return $this->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 <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
// 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;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,745 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by BpmnDiagramPeer::getOMClass()
include_once 'classes/model/BpmnDiagram.php';
/**
* Base static class for performing query and update operations on the 'BPMN_DIAGRAM' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnDiagramPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'BPMN_DIAGRAM';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.BpmnDiagram';
/** The total number of columns. */
const NUM_COLUMNS = 4;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the DIA_UID field */
const DIA_UID = 'BPMN_DIAGRAM.DIA_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'BPMN_DIAGRAM.PRJ_UID';
/** the column name for the DIA_NAME field */
const DIA_NAME = 'BPMN_DIAGRAM.DIA_NAME';
/** the column name for the DIA_IS_CLOSABLE field */
const DIA_IS_CLOSABLE = 'BPMN_DIAGRAM.DIA_IS_CLOSABLE';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('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.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. 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');
}

View File

@@ -0,0 +1,830 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/BpmnDocumentationPeer.php';
/**
* Base class that represents a row from the 'BPMN_DOCUMENTATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnDocumentation extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var BpmnDocumentationPeer
*/
protected static $peer;
/**
* The value for the doc_uid field.
* @var string
*/
protected $doc_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the doc_element field.
* @var string
*/
protected $doc_element;
/**
* The value for the doc_element_type field.
* @var string
*/
protected $doc_element_type;
/**
* The value for the doc_documentation field.
* @var string
*/
protected $doc_documentation;
/**
* @var BpmnProject
*/
protected $aBpmnProject;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [doc_uid] column value.
*
* @return string
*/
public function getDocUid()
{
return $this->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 <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
// 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;
}
}

View File

@@ -0,0 +1,750 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by BpmnDocumentationPeer::getOMClass()
include_once 'classes/model/BpmnDocumentation.php';
/**
* Base static class for performing query and update operations on the 'BPMN_DOCUMENTATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnDocumentationPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'BPMN_DOCUMENTATION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.BpmnDocumentation';
/** The total number of columns. */
const NUM_COLUMNS = 5;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the DOC_UID field */
const DOC_UID = 'BPMN_DOCUMENTATION.DOC_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'BPMN_DOCUMENTATION.PRJ_UID';
/** the column name for the DOC_ELEMENT field */
const DOC_ELEMENT = 'BPMN_DOCUMENTATION.DOC_ELEMENT';
/** the column name for the DOC_ELEMENT_TYPE field */
const DOC_ELEMENT_TYPE = 'BPMN_DOCUMENTATION.DOC_ELEMENT_TYPE';
/** the column name for the DOC_DOCUMENTATION field */
const DOC_DOCUMENTATION = 'BPMN_DOCUMENTATION.DOC_DOCUMENTATION';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('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.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. 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');
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,830 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/BpmnExtensionPeer.php';
/**
* Base class that represents a row from the 'BPMN_EXTENSION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnExtension extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var BpmnExtensionPeer
*/
protected static $peer;
/**
* The value for the ext_uid field.
* @var string
*/
protected $ext_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the ext_element field.
* @var string
*/
protected $ext_element;
/**
* The value for the ext_element_type field.
* @var string
*/
protected $ext_element_type;
/**
* The value for the ext_extension field.
* @var string
*/
protected $ext_extension;
/**
* @var BpmnProject
*/
protected $aBpmnProject;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [ext_uid] column value.
*
* @return string
*/
public function getExtUid()
{
return $this->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 <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
// 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;
}
}

View File

@@ -0,0 +1,750 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by BpmnExtensionPeer::getOMClass()
include_once 'classes/model/BpmnExtension.php';
/**
* Base static class for performing query and update operations on the 'BPMN_EXTENSION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnExtensionPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'BPMN_EXTENSION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.BpmnExtension';
/** The total number of columns. */
const NUM_COLUMNS = 5;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the EXT_UID field */
const EXT_UID = 'BPMN_EXTENSION.EXT_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'BPMN_EXTENSION.PRJ_UID';
/** the column name for the EXT_ELEMENT field */
const EXT_ELEMENT = 'BPMN_EXTENSION.EXT_ELEMENT';
/** the column name for the EXT_ELEMENT_TYPE field */
const EXT_ELEMENT_TYPE = 'BPMN_EXTENSION.EXT_ELEMENT_TYPE';
/** the column name for the EXT_EXTENSION field */
const EXT_EXTENSION = 'BPMN_EXTENSION.EXT_EXTENSION';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('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.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. 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');
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,961 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/BpmnLanePeer.php';
/**
* Base class that represents a row from the 'BPMN_LANE' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnLane extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var BpmnLanePeer
*/
protected static $peer;
/**
* The value for the lan_uid field.
* @var string
*/
protected $lan_uid = '';
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the lns_uid field.
* @var string
*/
protected $lns_uid;
/**
* The value for the lan_name field.
* @var string
*/
protected $lan_name;
/**
* The value for the lan_child_laneset field.
* @var string
*/
protected $lan_child_laneset;
/**
* The value for the lan_is_horizontal field.
* @var int
*/
protected $lan_is_horizontal = 1;
/**
* @var BpmnProject
*/
protected $aBpmnProject;
/**
* @var BpmnLaneset
*/
protected $aBpmnLaneset;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [lan_uid] column value.
*
* @return string
*/
public function getLanUid()
{
return $this->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 <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
// 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;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,770 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by BpmnParticipantPeer::getOMClass()
include_once 'classes/model/BpmnParticipant.php';
/**
* Base static class for performing query and update operations on the 'BPMN_PARTICIPANT' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnParticipantPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'BPMN_PARTICIPANT';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.BpmnParticipant';
/** The total number of columns. */
const NUM_COLUMNS = 9;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the PAR_UID field */
const PAR_UID = 'BPMN_PARTICIPANT.PAR_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'BPMN_PARTICIPANT.PRJ_UID';
/** the column name for the PRO_UID field */
const PRO_UID = 'BPMN_PARTICIPANT.PRO_UID';
/** the column name for the LNS_UID field */
const LNS_UID = 'BPMN_PARTICIPANT.LNS_UID';
/** the column name for the PAR_NAME field */
const PAR_NAME = 'BPMN_PARTICIPANT.PAR_NAME';
/** the column name for the PAR_MINIMUM field */
const PAR_MINIMUM = 'BPMN_PARTICIPANT.PAR_MINIMUM';
/** the column name for the PAR_MAXIMUM field */
const PAR_MAXIMUM = 'BPMN_PARTICIPANT.PAR_MAXIMUM';
/** the column name for the PAR_NUM_PARTICIPANTS field */
const PAR_NUM_PARTICIPANTS = 'BPMN_PARTICIPANT.PAR_NUM_PARTICIPANTS';
/** the column name for the PAR_IS_HORIZONTAL field */
const PAR_IS_HORIZONTAL = 'BPMN_PARTICIPANT.PAR_IS_HORIZONTAL';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('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.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. 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');
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,765 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by BpmnProcessPeer::getOMClass()
include_once 'classes/model/BpmnProcess.php';
/**
* Base static class for performing query and update operations on the 'BPMN_PROCESS' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnProcessPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'BPMN_PROCESS';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.BpmnProcess';
/** The total number of columns. */
const NUM_COLUMNS = 8;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the PRO_UID field */
const PRO_UID = 'BPMN_PROCESS.PRO_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'BPMN_PROCESS.PRJ_UID';
/** the column name for the DIA_UID field */
const DIA_UID = 'BPMN_PROCESS.DIA_UID';
/** the column name for the PRO_NAME field */
const PRO_NAME = 'BPMN_PROCESS.PRO_NAME';
/** the column name for the PRO_TYPE field */
const PRO_TYPE = 'BPMN_PROCESS.PRO_TYPE';
/** the column name for the PRO_IS_EXECUTABLE field */
const PRO_IS_EXECUTABLE = 'BPMN_PROCESS.PRO_IS_EXECUTABLE';
/** the column name for the PRO_IS_CLOSED field */
const PRO_IS_CLOSED = 'BPMN_PROCESS.PRO_IS_CLOSED';
/** the column name for the PRO_IS_SUBPROCESS field */
const PRO_IS_SUBPROCESS = 'BPMN_PROCESS.PRO_IS_SUBPROCESS';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('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.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. 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');
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,582 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by BpmnProjectPeer::getOMClass()
include_once 'classes/model/BpmnProject.php';
/**
* Base static class for performing query and update operations on the 'BPMN_PROJECT' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseBpmnProjectPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'BPMN_PROJECT';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.BpmnProject';
/** The total number of columns. */
const NUM_COLUMNS = 12;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the PRJ_UID field */
const PRJ_UID = 'BPMN_PROJECT.PRJ_UID';
/** the column name for the PRJ_NAME field */
const PRJ_NAME = 'BPMN_PROJECT.PRJ_NAME';
/** the column name for the PRJ_TARGET_NAMESPACE field */
const PRJ_TARGET_NAMESPACE = 'BPMN_PROJECT.PRJ_TARGET_NAMESPACE';
/** the column name for the PRJ_EXPRESION_LANGUAGE field */
const PRJ_EXPRESION_LANGUAGE = 'BPMN_PROJECT.PRJ_EXPRESION_LANGUAGE';
/** the column name for the PRJ_TYPE_LANGUAGE field */
const PRJ_TYPE_LANGUAGE = 'BPMN_PROJECT.PRJ_TYPE_LANGUAGE';
/** the column name for the PRJ_EXPORTER field */
const PRJ_EXPORTER = 'BPMN_PROJECT.PRJ_EXPORTER';
/** the column name for the PRJ_EXPORTER_VERSION field */
const PRJ_EXPORTER_VERSION = 'BPMN_PROJECT.PRJ_EXPORTER_VERSION';
/** the column name for the PRJ_CREATE_DATE field */
const PRJ_CREATE_DATE = 'BPMN_PROJECT.PRJ_CREATE_DATE';
/** the column name for the PRJ_UPDATE_DATE field */
const PRJ_UPDATE_DATE = 'BPMN_PROJECT.PRJ_UPDATE_DATE';
/** the column name for the PRJ_AUTHOR field */
const PRJ_AUTHOR = 'BPMN_PROJECT.PRJ_AUTHOR';
/** the column name for the PRJ_AUTHOR_VERSION field */
const PRJ_AUTHOR_VERSION = 'BPMN_PROJECT.PRJ_AUTHOR_VERSION';
/** the column name for the PRJ_ORIGINAL_SOURCE field */
const PRJ_ORIGINAL_SOURCE = 'BPMN_PROJECT.PRJ_ORIGINAL_SOURCE';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('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.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. 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');
}