litle changes for /project endpoint
This commit is contained in:
@@ -65,7 +65,7 @@ class BpmnActivityMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('ACT_UID', 'ActUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('ACT_UID', 'ActUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnArtifactMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('ART_UID', 'ArtUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('ART_UID', 'ArtUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnBoundMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('BOU_UID', 'BouUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('BOU_UID', 'BouUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnDataMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('DAT_UID', 'DatUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('DAT_UID', 'DatUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnDiagramMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('DIA_UID', 'DiaUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('DIA_UID', 'DiaUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnDocumentationMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('DOC_UID', 'DocUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('DOC_UID', 'DocUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnEventMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnExtensionMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('EXT_UID', 'ExtUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('EXT_UID', 'ExtUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnFlowMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('FLO_UID', 'FloUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('FLO_UID', 'FloUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnGatewayMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('GAT_UID', 'GatUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('GAT_UID', 'GatUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnLaneMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('LAN_UID', 'LanUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('LAN_UID', 'LanUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnLanesetMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('LNS_UID', 'LnsUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('LNS_UID', 'LnsUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnParticipantMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('PAR_UID', 'ParUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('PAR_UID', 'ParUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnProcessMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class BpmnProjectMapBuilder
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
$tMap->addPrimaryKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRJ_NAME', 'PrjName', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
|
||||
@@ -2104,33 +2104,30 @@ abstract class BaseBpmnActivity extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnActivityPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnActivityPeer::ACT_UID, $this->act_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getActUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (act_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setActUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -2145,8 +2142,6 @@ abstract class BaseBpmnActivity extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setActUid($this->act_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
@@ -2208,6 +2203,8 @@ abstract class BaseBpmnActivity extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setActUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -311,8 +311,8 @@ abstract class BaseBpmnActivityPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_ACTIVITY.ACT_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_ACTIVITY.ACT_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -1066,6 +1066,9 @@ abstract class BaseBpmnActivityPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnActivityPeer::ACT_UID);
|
||||
$selectCriteria->add(BpmnActivityPeer::ACT_UID, $criteria->remove(BpmnActivityPeer::ACT_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1123,22 +1126,11 @@ abstract class BaseBpmnActivityPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnActivity) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnActivityPeer::ACT_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1196,6 +1188,54 @@ abstract class BaseBpmnActivityPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnActivityPeer::DATABASE_NAME, BpmnActivityPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnActivity
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnActivityPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnActivityPeer::ACT_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnActivityPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnActivityPeer::ACT_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnActivityPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -760,33 +760,30 @@ abstract class BaseBpmnArtifact extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnArtifactPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnArtifactPeer::ART_UID, $this->art_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getArtUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (art_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setArtUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -801,8 +798,6 @@ abstract class BaseBpmnArtifact extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setArtUid($this->art_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
@@ -816,6 +811,8 @@ abstract class BaseBpmnArtifact extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setArtUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -191,8 +191,8 @@ abstract class BaseBpmnArtifactPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_ARTIFACT.ART_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_ARTIFACT.ART_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -946,6 +946,9 @@ abstract class BaseBpmnArtifactPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnArtifactPeer::ART_UID);
|
||||
$selectCriteria->add(BpmnArtifactPeer::ART_UID, $criteria->remove(BpmnArtifactPeer::ART_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1003,22 +1006,11 @@ abstract class BaseBpmnArtifactPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnArtifact) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnArtifactPeer::ART_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1076,6 +1068,54 @@ abstract class BaseBpmnArtifactPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnArtifactPeer::DATABASE_NAME, BpmnArtifactPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnArtifact
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnArtifactPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnArtifactPeer::ART_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnArtifactPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnArtifactPeer::ART_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnArtifactPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1152,33 +1152,30 @@ abstract class BaseBpmnBound extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnBoundPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnBoundPeer::BOU_UID, $this->bou_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getBouUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (bou_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setBouUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -1193,8 +1190,6 @@ abstract class BaseBpmnBound extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setBouUid($this->bou_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setDiaUid($this->dia_uid);
|
||||
@@ -1222,6 +1217,8 @@ abstract class BaseBpmnBound extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setBouUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -226,8 +226,8 @@ abstract class BaseBpmnBoundPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_BOUND.BOU_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_BOUND.BOU_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -981,6 +981,9 @@ abstract class BaseBpmnBoundPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnBoundPeer::BOU_UID);
|
||||
$selectCriteria->add(BpmnBoundPeer::BOU_UID, $criteria->remove(BpmnBoundPeer::BOU_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1038,22 +1041,11 @@ abstract class BaseBpmnBoundPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnBound) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnBoundPeer::BOU_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1111,6 +1103,54 @@ abstract class BaseBpmnBoundPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnBoundPeer::DATABASE_NAME, BpmnBoundPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnBound
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnBoundPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnBoundPeer::BOU_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnBoundPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnBoundPeer::BOU_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnBoundPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1096,33 +1096,30 @@ abstract class BaseBpmnData extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnDataPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnDataPeer::DAT_UID, $this->dat_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getDatUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (dat_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setDatUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -1137,8 +1134,6 @@ abstract class BaseBpmnData extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setDatUid($this->dat_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
@@ -1164,6 +1159,8 @@ abstract class BaseBpmnData extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setDatUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -221,8 +221,8 @@ abstract class BaseBpmnDataPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_DATA.DAT_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_DATA.DAT_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -976,6 +976,9 @@ abstract class BaseBpmnDataPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnDataPeer::DAT_UID);
|
||||
$selectCriteria->add(BpmnDataPeer::DAT_UID, $criteria->remove(BpmnDataPeer::DAT_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1033,22 +1036,11 @@ abstract class BaseBpmnDataPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnData) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnDataPeer::DAT_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1106,6 +1098,54 @@ abstract class BaseBpmnDataPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnDataPeer::DATABASE_NAME, BpmnDataPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnData
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnDataPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnDataPeer::DAT_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnDataPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnDataPeer::DAT_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnDataPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -682,33 +682,30 @@ abstract class BaseBpmnDiagram extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnDiagramPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnDiagramPeer::DIA_UID, $this->dia_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getDiaUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (dia_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setDiaUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -723,8 +720,6 @@ abstract class BaseBpmnDiagram extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setDiaUid($this->dia_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setDiaName($this->dia_name);
|
||||
@@ -750,6 +745,8 @@ abstract class BaseBpmnDiagram extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setDiaUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,8 +181,8 @@ abstract class BaseBpmnDiagramPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_DIAGRAM.DIA_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_DIAGRAM.DIA_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -594,6 +594,9 @@ abstract class BaseBpmnDiagramPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnDiagramPeer::DIA_UID);
|
||||
$selectCriteria->add(BpmnDiagramPeer::DIA_UID, $criteria->remove(BpmnDiagramPeer::DIA_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -651,22 +654,11 @@ abstract class BaseBpmnDiagramPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnDiagram) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnDiagramPeer::DIA_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -724,6 +716,54 @@ abstract class BaseBpmnDiagramPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnDiagramPeer::DATABASE_NAME, BpmnDiagramPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnDiagram
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnDiagramPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnDiagramPeer::DIA_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnDiagramPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnDiagramPeer::DIA_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnDiagramPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -682,33 +682,30 @@ abstract class BaseBpmnDocumentation extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnDocumentationPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnDocumentationPeer::DOC_UID, $this->doc_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getDocUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (doc_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setDocUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -723,8 +720,6 @@ abstract class BaseBpmnDocumentation extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setDocUid($this->doc_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setDocElement($this->doc_element);
|
||||
@@ -736,6 +731,8 @@ abstract class BaseBpmnDocumentation extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setDocUid(NULL); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -186,8 +186,8 @@ abstract class BaseBpmnDocumentationPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_DOCUMENTATION.DOC_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_DOCUMENTATION.DOC_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -599,6 +599,9 @@ abstract class BaseBpmnDocumentationPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnDocumentationPeer::DOC_UID);
|
||||
$selectCriteria->add(BpmnDocumentationPeer::DOC_UID, $criteria->remove(BpmnDocumentationPeer::DOC_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -656,22 +659,11 @@ abstract class BaseBpmnDocumentationPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnDocumentation) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnDocumentationPeer::DOC_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -729,6 +721,54 @@ abstract class BaseBpmnDocumentationPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnDocumentationPeer::DATABASE_NAME, BpmnDocumentationPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnDocumentation
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnDocumentationPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnDocumentationPeer::DOC_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnDocumentationPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnDocumentationPeer::DOC_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnDocumentationPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1712,33 +1712,30 @@ abstract class BaseBpmnEvent extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnEventPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnEventPeer::EVN_UID, $this->evn_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getEvnUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (evn_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setEvnUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -1753,8 +1750,6 @@ abstract class BaseBpmnEvent extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setEvnUid($this->evn_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
@@ -1802,6 +1797,8 @@ abstract class BaseBpmnEvent extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setEvnUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -276,8 +276,8 @@ abstract class BaseBpmnEventPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_EVENT.EVN_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_EVENT.EVN_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -1031,6 +1031,9 @@ abstract class BaseBpmnEventPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnEventPeer::EVN_UID);
|
||||
$selectCriteria->add(BpmnEventPeer::EVN_UID, $criteria->remove(BpmnEventPeer::EVN_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1088,22 +1091,11 @@ abstract class BaseBpmnEventPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnEvent) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnEventPeer::EVN_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1161,6 +1153,54 @@ abstract class BaseBpmnEventPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnEventPeer::DATABASE_NAME, BpmnEventPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnEvent
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnEventPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnEventPeer::EVN_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnEventPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnEventPeer::EVN_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnEventPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -682,33 +682,30 @@ abstract class BaseBpmnExtension extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnExtensionPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnExtensionPeer::EXT_UID, $this->ext_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getExtUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (ext_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setExtUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -723,8 +720,6 @@ abstract class BaseBpmnExtension extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setExtUid($this->ext_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setExtElement($this->ext_element);
|
||||
@@ -736,6 +731,8 @@ abstract class BaseBpmnExtension extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setExtUid(NULL); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -186,8 +186,8 @@ abstract class BaseBpmnExtensionPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_EXTENSION.EXT_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_EXTENSION.EXT_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -599,6 +599,9 @@ abstract class BaseBpmnExtensionPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnExtensionPeer::EXT_UID);
|
||||
$selectCriteria->add(BpmnExtensionPeer::EXT_UID, $criteria->remove(BpmnExtensionPeer::EXT_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -656,22 +659,11 @@ abstract class BaseBpmnExtensionPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnExtension) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnExtensionPeer::EXT_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -729,6 +721,54 @@ abstract class BaseBpmnExtensionPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnExtensionPeer::DATABASE_NAME, BpmnExtensionPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnExtension
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnExtensionPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnExtensionPeer::EXT_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnExtensionPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnExtensionPeer::EXT_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnExtensionPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1432,33 +1432,30 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnFlowPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnFlowPeer::FLO_UID, $this->flo_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getFloUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (flo_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setFloUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -1473,8 +1470,6 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setFloUid($this->flo_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setDiaUid($this->dia_uid);
|
||||
@@ -1512,6 +1507,8 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setFloUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -251,8 +251,8 @@ abstract class BaseBpmnFlowPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_FLOW.FLO_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_FLOW.FLO_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -1006,6 +1006,9 @@ abstract class BaseBpmnFlowPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnFlowPeer::FLO_UID);
|
||||
$selectCriteria->add(BpmnFlowPeer::FLO_UID, $criteria->remove(BpmnFlowPeer::FLO_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1063,22 +1066,11 @@ abstract class BaseBpmnFlowPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnFlow) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnFlowPeer::FLO_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1136,6 +1128,54 @@ abstract class BaseBpmnFlowPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnFlowPeer::DATABASE_NAME, BpmnFlowPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnFlow
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnFlowPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnFlowPeer::FLO_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnFlowPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnFlowPeer::FLO_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnFlowPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1040,33 +1040,30 @@ abstract class BaseBpmnGateway extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnGatewayPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnGatewayPeer::GAT_UID, $this->gat_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getGatUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (gat_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setGatUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -1081,8 +1078,6 @@ abstract class BaseBpmnGateway extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setGatUid($this->gat_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
@@ -1106,6 +1101,8 @@ abstract class BaseBpmnGateway extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setGatUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -216,8 +216,8 @@ abstract class BaseBpmnGatewayPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_GATEWAY.GAT_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_GATEWAY.GAT_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -971,6 +971,9 @@ abstract class BaseBpmnGatewayPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnGatewayPeer::GAT_UID);
|
||||
$selectCriteria->add(BpmnGatewayPeer::GAT_UID, $criteria->remove(BpmnGatewayPeer::GAT_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1028,22 +1031,11 @@ abstract class BaseBpmnGatewayPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnGateway) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnGatewayPeer::GAT_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1101,6 +1093,54 @@ abstract class BaseBpmnGatewayPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnGatewayPeer::DATABASE_NAME, BpmnGatewayPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnGateway
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnGatewayPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnGatewayPeer::GAT_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnGatewayPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnGatewayPeer::GAT_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnGatewayPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -760,33 +760,30 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnLanePeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnLanePeer::LAN_UID, $this->lan_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getLanUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (lan_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setLanUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -801,8 +798,6 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setLanUid($this->lan_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setLnsUid($this->lns_uid);
|
||||
@@ -816,6 +811,8 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setLanUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -191,8 +191,8 @@ abstract class BaseBpmnLanePeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_LANE.LAN_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_LANE.LAN_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -946,6 +946,9 @@ abstract class BaseBpmnLanePeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnLanePeer::LAN_UID);
|
||||
$selectCriteria->add(BpmnLanePeer::LAN_UID, $criteria->remove(BpmnLanePeer::LAN_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1003,22 +1006,11 @@ abstract class BaseBpmnLanePeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnLane) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnLanePeer::LAN_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1076,6 +1068,54 @@ abstract class BaseBpmnLanePeer
|
||||
|
||||
return BasePeer::doValidate(BpmnLanePeer::DATABASE_NAME, BpmnLanePeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnLane
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnLanePeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnLanePeer::LAN_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnLanePeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnLanePeer::LAN_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnLanePeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -844,33 +844,30 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnLanesetPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnLanesetPeer::LNS_UID, $this->lns_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getLnsUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (lns_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setLnsUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -885,8 +882,6 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setLnsUid($this->lns_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
@@ -914,6 +909,8 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setLnsUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -196,8 +196,8 @@ abstract class BaseBpmnLanesetPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_LANESET.LNS_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_LANESET.LNS_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -951,6 +951,9 @@ abstract class BaseBpmnLanesetPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnLanesetPeer::LNS_UID);
|
||||
$selectCriteria->add(BpmnLanesetPeer::LNS_UID, $criteria->remove(BpmnLanesetPeer::LNS_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -1008,22 +1011,11 @@ abstract class BaseBpmnLanesetPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnLaneset) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnLanesetPeer::LNS_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -1081,6 +1073,54 @@ abstract class BaseBpmnLanesetPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnLanesetPeer::DATABASE_NAME, BpmnLanesetPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnLaneset
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnLanesetPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnLanesetPeer::LNS_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnLanesetPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnLanesetPeer::LNS_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnLanesetPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -906,33 +906,30 @@ abstract class BaseBpmnParticipant extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnParticipantPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnParticipantPeer::PAR_UID, $this->par_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getParUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (par_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setParUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -947,8 +944,6 @@ abstract class BaseBpmnParticipant extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setParUid($this->par_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
@@ -968,6 +963,8 @@ abstract class BaseBpmnParticipant extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setParUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -206,8 +206,8 @@ abstract class BaseBpmnParticipantPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_PARTICIPANT.PAR_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_PARTICIPANT.PAR_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -619,6 +619,9 @@ abstract class BaseBpmnParticipantPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnParticipantPeer::PAR_UID);
|
||||
$selectCriteria->add(BpmnParticipantPeer::PAR_UID, $criteria->remove(BpmnParticipantPeer::PAR_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -676,22 +679,11 @@ abstract class BaseBpmnParticipantPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnParticipant) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnParticipantPeer::PAR_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -749,6 +741,54 @@ abstract class BaseBpmnParticipantPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnParticipantPeer::DATABASE_NAME, BpmnParticipantPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnParticipant
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnParticipantPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnParticipantPeer::PAR_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnParticipantPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnParticipantPeer::PAR_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnParticipantPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1018,33 +1018,30 @@ abstract class BaseBpmnProcess extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnProcessPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnProcessPeer::PRO_UID, $this->pro_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getProUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (pro_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setProUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -1059,8 +1056,6 @@ abstract class BaseBpmnProcess extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setDiaUid($this->dia_uid);
|
||||
@@ -1110,6 +1105,8 @@ abstract class BaseBpmnProcess extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setProUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -201,8 +201,8 @@ abstract class BaseBpmnProcessPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_PROCESS.PRO_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_PROCESS.PRO_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -614,6 +614,9 @@ abstract class BaseBpmnProcessPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnProcessPeer::PRO_UID);
|
||||
$selectCriteria->add(BpmnProcessPeer::PRO_UID, $criteria->remove(BpmnProcessPeer::PRO_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -671,22 +674,11 @@ abstract class BaseBpmnProcessPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnProcess) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnProcessPeer::PRO_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -744,6 +736,54 @@ abstract class BaseBpmnProcessPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnProcessPeer::DATABASE_NAME, BpmnProcessPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnProcess
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnProcessPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnProcessPeer::PRO_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnProcessPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnProcessPeer::PRO_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnProcessPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1480,33 +1480,30 @@ abstract class BaseBpmnProject extends BaseObject implements Persistent
|
||||
{
|
||||
$criteria = new Criteria(BpmnProjectPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnProjectPeer::PRJ_UID, $this->prj_uid);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns NULL since this table doesn't have a primary key.
|
||||
* This method exists only for BC and is deprecated!
|
||||
* @return null
|
||||
* Returns the primary key for this object (row).
|
||||
* @return string
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
return null;
|
||||
return $this->getPrjUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy primary key setter.
|
||||
* Generic method to set the primary key (prj_uid column).
|
||||
*
|
||||
* 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
|
||||
* @param string $key Primary key.
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($pk)
|
||||
{
|
||||
// do nothing, because this object doesn't have any primary keys
|
||||
}
|
||||
public function setPrimaryKey($key)
|
||||
{
|
||||
$this->setPrjUid($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets contents of passed object to values from current object.
|
||||
@@ -1521,8 +1518,6 @@ abstract class BaseBpmnProject extends BaseObject implements Persistent
|
||||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
|
||||
$copyObj->setPrjUid($this->prj_uid);
|
||||
|
||||
$copyObj->setPrjName($this->prj_name);
|
||||
|
||||
$copyObj->setPrjTargetNamespace($this->prj_target_namespace);
|
||||
@@ -1612,6 +1607,8 @@ abstract class BaseBpmnProject extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setPrjUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -221,8 +221,8 @@ abstract class BaseBpmnProjectPeer
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(*)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT *)';
|
||||
const COUNT = 'COUNT(BPMN_PROJECT.PRJ_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT BPMN_PROJECT.PRJ_UID)';
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria.
|
||||
@@ -431,6 +431,9 @@ abstract class BaseBpmnProjectPeer
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
|
||||
$comparison = $criteria->getComparison(BpmnProjectPeer::PRJ_UID);
|
||||
$selectCriteria->add(BpmnProjectPeer::PRJ_UID, $criteria->remove(BpmnProjectPeer::PRJ_UID), $comparison);
|
||||
|
||||
} else {
|
||||
$criteria = $values->buildCriteria(); // gets full criteria
|
||||
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
|
||||
@@ -488,22 +491,11 @@ abstract class BaseBpmnProjectPeer
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof BpmnProject) {
|
||||
|
||||
$criteria = $values->buildCriteria();
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
// primary key is composite; we therefore, expect
|
||||
// the primary key passed to be an array of pkey
|
||||
// values
|
||||
if (count($values) == count($values, COUNT_RECURSIVE)) {
|
||||
// array is not multi-dimensional
|
||||
$values = array($values);
|
||||
}
|
||||
$vals = array();
|
||||
foreach ($values as $value) {
|
||||
|
||||
}
|
||||
|
||||
$criteria->add(BpmnProjectPeer::PRJ_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// Set the correct dbName
|
||||
@@ -561,6 +553,54 @@ abstract class BaseBpmnProjectPeer
|
||||
|
||||
return BasePeer::doValidate(BpmnProjectPeer::DATABASE_NAME, BpmnProjectPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return BpmnProject
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(BpmnProjectPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(BpmnProjectPeer::PRJ_UID, $pk);
|
||||
|
||||
|
||||
$v = BpmnProjectPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) > 0 ? $v[0] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve multiple objects by pkey.
|
||||
*
|
||||
* @param array $pks List of primary keys
|
||||
* @param Connection $con the connection to use
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function retrieveByPKs($pks, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$objs = null;
|
||||
if (empty($pks)) {
|
||||
$objs = array();
|
||||
} else {
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(BpmnProjectPeer::PRJ_UID, $pks, Criteria::IN);
|
||||
$objs = BpmnProjectPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user