2013-12-02 17:36:37 -04:00
|
|
|
<?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
|
|
|
|
|
*/
|
2013-12-23 17:17:01 -04:00
|
|
|
class BpmnBound extends BaseBpmnBound
|
|
|
|
|
{
|
|
|
|
|
public static function findOneBy($field, $value)
|
|
|
|
|
{
|
2014-02-04 20:50:18 -04:00
|
|
|
$rows = self::findAllBy($field, $value);
|
2013-12-02 17:36:37 -04:00
|
|
|
|
2014-02-04 20:50:18 -04:00
|
|
|
return empty($rows) ? null : $rows[0];
|
|
|
|
|
}
|
2013-12-23 17:17:01 -04:00
|
|
|
|
2014-02-04 20:50:18 -04:00
|
|
|
public static function findAllBy($field, $value)
|
|
|
|
|
{
|
|
|
|
|
$c = new Criteria('workflow');
|
|
|
|
|
$c->add($field, $value, Criteria::EQUAL);
|
2013-12-23 17:17:01 -04:00
|
|
|
|
2014-02-04 20:50:18 -04:00
|
|
|
return BpmnBoundPeer::doSelect($c);
|
2013-12-23 17:17:01 -04:00
|
|
|
}
|
2014-01-17 13:37:15 -04:00
|
|
|
|
|
|
|
|
public static function findByElement($type, $uid)
|
|
|
|
|
{
|
|
|
|
|
$bouElementType = 'bpmn' . ucfirst(strtolower($type));
|
|
|
|
|
|
|
|
|
|
$c = new Criteria('workflow');
|
|
|
|
|
$c->add(BpmnBoundPeer::ELEMENT_UID, $uid, CRITERIA::EQUAL);
|
|
|
|
|
$c->add(BpmnBoundPeer::BOU_ELEMENT_TYPE, $bouElementType, CRITERIA::EQUAL);
|
|
|
|
|
|
|
|
|
|
return BpmnBoundPeer::doSelectOne($c);
|
|
|
|
|
}
|
2013-12-02 17:36:37 -04:00
|
|
|
} // BpmnBound
|