Adicion de tablas para listados
This commit is contained in:
@@ -985,6 +985,13 @@ class Cases
|
||||
if (isset($Fields['APP_DESCRIPTION'])) {
|
||||
unset($Fields['APP_DESCRIPTION']);
|
||||
}
|
||||
if (isset($Fields["APP_STATUS"]) && $Fields["APP_STATUS"] == "COMPLETED") {
|
||||
$Fields['USR_UID'] = $Fields['CURRENT_USER_UID'];
|
||||
$listCompleted = new ListCompleted();
|
||||
$listCompleted->create($Fields);
|
||||
$listMyInbox = new ListMyInbox();
|
||||
$listMyInbox->refresh($Fields);
|
||||
}
|
||||
$oApp->update($Fields);
|
||||
|
||||
$DEL_INDEX = isset($Fields['DEL_INDEX']) ? $Fields['DEL_INDEX'] : '';
|
||||
@@ -1176,6 +1183,8 @@ class Cases
|
||||
$oAppDel = AppDelegationPeer::retrieveByPk($sAppUid, $iDelIndex);
|
||||
$oAppDel->setDelInitDate("now");
|
||||
$oAppDel->save();
|
||||
$inbox = new ListInbox();
|
||||
$inbox->update(array('APP_UID'=>$sAppUid, 'DEL_INDEX'=>$iDelIndex, 'DEL_INIT_DATE'=>Date("Y-m-d H:i:s")));
|
||||
//update searchindex
|
||||
if ($this->appSolr != null) {
|
||||
$this->appSolr->updateApplicationSearchIndex($sAppUid);
|
||||
@@ -1895,6 +1904,8 @@ class Cases
|
||||
throw (new PropelException('The row cannot be created!', new PropelException($msg)));
|
||||
}
|
||||
}
|
||||
$inbox = new ListInbox();
|
||||
$inbox->remove($sAppUid, $iDelIndex);
|
||||
} catch (exception $e) {
|
||||
throw ($e);
|
||||
}
|
||||
|
||||
@@ -89,11 +89,12 @@ class AppDelegation extends BaseAppDelegation
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$delIndex = 1;
|
||||
|
||||
$delPreviusUsrUid = '';
|
||||
if ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
|
||||
$delIndex = (isset($row["DEL_INDEX"]))? $row["DEL_INDEX"] + 1 : 1;
|
||||
$delPreviusUsrUid = $row["USR_UID"];
|
||||
} else {
|
||||
$criteriaDelIndex = new Criteria("workflow");
|
||||
|
||||
@@ -150,6 +151,8 @@ class AppDelegation extends BaseAppDelegation
|
||||
if ($this->validate()) {
|
||||
try {
|
||||
$res = $this->save();
|
||||
$inbox = new ListInbox();
|
||||
$inbox->newRow($this->toArray(BasePeer::TYPE_FIELDNAME), $delPreviusUsrUid);
|
||||
} catch (PropelException $e) {
|
||||
throw ($e);
|
||||
}
|
||||
|
||||
281
workflow/engine/classes/model/ListCompleted.php
Normal file
281
workflow/engine/classes/model/ListCompleted.php
Normal file
@@ -0,0 +1,281 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseListCompleted.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LIST_COMPLETED' 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 ListCompleted extends BaseListCompleted
|
||||
{
|
||||
/**
|
||||
* Create List Completed Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
*
|
||||
*/
|
||||
public function create($data)
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'APP_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['PRO_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_PRO_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['TAS_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_TAS_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$criteria->add( UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL );
|
||||
$dataset = UsersPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
|
||||
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
|
||||
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
|
||||
|
||||
if ($data['DEL_PREVIOUS'] != 0) {
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(AppDelegationPeer::USR_UID);
|
||||
$criteria->add( AppDelegationPeer::DEL_INDEX, $data['DEL_PREVIOUS'], Criteria::EQUAL );
|
||||
$dataset = UsersPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['DEL_PREVIOUS_USR_UID'] = $aRow['USR_UID'];
|
||||
}
|
||||
|
||||
$con = Propel::getConnection( ListCompletedPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
} else {
|
||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||
$e->aValidationFailures = $this->getValidationFailures();
|
||||
throw ($e);
|
||||
}
|
||||
$con->commit();
|
||||
return $result;
|
||||
} catch(Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update List Completed Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
* @throws type
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListCompletedPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$this->setNew( false );
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
$con->commit();
|
||||
return $result;
|
||||
} else {
|
||||
$con->rollback();
|
||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove List Completed
|
||||
*
|
||||
* @param type $seqName
|
||||
* @return type
|
||||
* @throws type
|
||||
*
|
||||
*/
|
||||
public function remove ($app_uid)
|
||||
{
|
||||
$con = Propel::getConnection( ListCompletedPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->setAppUid($app_uid);
|
||||
$con->begin();
|
||||
$this->delete();
|
||||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function loadFilters (&$criteria, $filters)
|
||||
{
|
||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||
|
||||
if ($filter != '') {
|
||||
switch ($filter) {
|
||||
case 'read':
|
||||
$criteria->add( ListCompletedPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
|
||||
break;
|
||||
case 'unread':
|
||||
$criteria->add( ListCompletedPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($search != '') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListCompletedPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
if ($process != '') {
|
||||
$criteria->add( ListCompletedPeer::PRO_UID, $process, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($category != '') {
|
||||
// INNER JOIN FOR TAS_TITLE
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListCompletedPeer::PRO_UID, ProcessPeer::PRO_UID);
|
||||
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
}
|
||||
|
||||
if ($dateFrom != "") {
|
||||
if ($dateTo != "") {
|
||||
if ($dateFrom == $dateTo) {
|
||||
$dateSame = $dateFrom;
|
||||
$dateFrom = $dateSame . " 00:00:00";
|
||||
$dateTo = $dateSame . " 23:59:59";
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
}
|
||||
|
||||
$criteria->add( $criteria->getNewCriterion( ListCompletedPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||
addAnd( $criteria->getNewCriterion( ListCompletedPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
|
||||
$criteria->add( ListCompletedPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
|
||||
}
|
||||
} elseif ($dateTo != "") {
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
|
||||
$criteria->add( ListCompletedPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||
}
|
||||
}
|
||||
|
||||
public function countTotal ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->add( ListCompletedPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
$total = ListCompletedPeer::doCount( $criteria );
|
||||
return (int)$total;
|
||||
}
|
||||
|
||||
public function loadList ($usr_uid, $filters = array())
|
||||
{
|
||||
$resp = array();
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_UID);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::USR_UID);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::TAS_UID);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_NUMBER);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_TITLE);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_PRO_TITLE);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_TAS_TITLE);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_CREATE_DATE);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_FINISH_DATE);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_INDEX);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_PREVIOUS_USR_UID);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_USERNAME);
|
||||
|
||||
$criteria->add( ListCompletedPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "APP_FINISH_DATE";
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
$criteria->addAscendingOrderByColumn($sort);
|
||||
}
|
||||
|
||||
if ($paged == 1) {
|
||||
$criteria->setLimit( $limit );
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListCompletedPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
while ($dataset->next()) {
|
||||
$aRow = $dataset->getRow();
|
||||
$data[] = $aRow;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
} // ListCompleted
|
||||
23
workflow/engine/classes/model/ListCompletedPeer.php
Normal file
23
workflow/engine/classes/model/ListCompletedPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseListCompletedPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/ListCompleted.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LIST_COMPLETED' 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 ListCompletedPeer extends BaseListCompletedPeer {
|
||||
|
||||
} // ListCompletedPeer
|
||||
323
workflow/engine/classes/model/ListInbox.php
Normal file
323
workflow/engine/classes/model/ListInbox.php
Normal file
@@ -0,0 +1,323 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseListInbox.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LIST_INBOX' 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 ListInbox extends BaseListInbox
|
||||
{
|
||||
/**
|
||||
* Create List Inbox Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
*
|
||||
*/
|
||||
public function create($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListInboxPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
} else {
|
||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||
$e->aValidationFailures = $this->getValidationFailures();
|
||||
throw ($e);
|
||||
}
|
||||
$con->commit();
|
||||
|
||||
// create participated history
|
||||
$listParticipatedHistory = new ListParticipatedHistory();
|
||||
$listParticipatedHistory->create($data);
|
||||
|
||||
// create participated history
|
||||
$listMyInbox = new ListMyInbox();
|
||||
$listMyInbox->refresh($data);
|
||||
|
||||
// remove and create participated last
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->remove($data['APP_UID'], $data['USR_UID']);
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->create($data);
|
||||
|
||||
return $result;
|
||||
} catch(Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update List Inbox Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
* @throws type
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListInboxPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$this->setNew( false );
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
$con->commit();
|
||||
|
||||
// update participated history
|
||||
$listParticipatedHistory = new ListParticipatedHistory();
|
||||
$listParticipatedHistory->update($data);
|
||||
|
||||
$oRow = ListInboxPeer::retrieveByPK( $data['APP_UID'], $data['DEL_INDEX'] );
|
||||
$newData = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
|
||||
|
||||
// update participated last
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->update($newData);
|
||||
return $result;
|
||||
} else {
|
||||
$con->rollback();
|
||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove List Inbox
|
||||
*
|
||||
* @param type $seqName
|
||||
* @return type
|
||||
* @throws type
|
||||
*
|
||||
*/
|
||||
public function remove ($app_uid, $del_index)
|
||||
{
|
||||
$con = Propel::getConnection( ListInboxPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->setAppUid($app_uid);
|
||||
$this->setDelIndex($del_index);
|
||||
|
||||
$con->begin();
|
||||
$this->delete();
|
||||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function newRow ($data, $delPreviusUsrUid) {
|
||||
$data['DEL_PREVIOUS_USR_UID'] = $delPreviusUsrUid;
|
||||
$data['DEL_DUE_DATE'] = $data['DEL_TASK_DUE_DATE'];
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
|
||||
$criteria->addSelectColumn( ApplicationPeer::APP_UPDATE_DATE );
|
||||
$criteria->add( ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
|
||||
$dataset = ApplicationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data = array_merge($data, $aRow);
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'APP_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['PRO_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_PRO_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['TAS_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_TAS_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$data['APP_PREVIOUS_USER'] = '';
|
||||
if ($data['DEL_PREVIOUS_USR_UID'] != '') {
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$criteria->add( UsersPeer::USR_UID, $data['DEL_PREVIOUS_USR_UID'], Criteria::EQUAL );
|
||||
$dataset = UsersPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['DEL_PREVIOUS_USR_USERNAME'] = $aRow['USR_USERNAME'];
|
||||
$data['DEL_PREVIOUS_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
|
||||
$data['DEL_PREVIOUS_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
|
||||
}
|
||||
|
||||
self::create($data);
|
||||
}
|
||||
|
||||
public function loadFilters (&$criteria, $filters)
|
||||
{
|
||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||
|
||||
if ($filter != '') {
|
||||
switch ($filter) {
|
||||
case 'read':
|
||||
$criteria->add( ListInboxPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
|
||||
break;
|
||||
case 'unread':
|
||||
$criteria->add( ListInboxPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($search != '') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion( ListInboxPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
if ($process != '') {
|
||||
$criteria->add( ListInboxPeer::PRO_UID, $process, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($category != '') {
|
||||
// INNER JOIN FOR TAS_TITLE
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListInboxPeer::PRO_UID, ProcessPeer::PRO_UID);
|
||||
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
}
|
||||
|
||||
if ($dateFrom != "") {
|
||||
if ($dateTo != "") {
|
||||
if ($dateFrom == $dateTo) {
|
||||
$dateSame = $dateFrom;
|
||||
$dateFrom = $dateSame . " 00:00:00";
|
||||
$dateTo = $dateSame . " 23:59:59";
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
}
|
||||
|
||||
$criteria->add( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||
addAnd( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
|
||||
$criteria->add( ListInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
|
||||
}
|
||||
} elseif ($dateTo != "") {
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
|
||||
$criteria->add( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||
}
|
||||
}
|
||||
|
||||
public function countTotal ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->add( ListInboxPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
$total = ListInboxPeer::doCount( $criteria );
|
||||
return (int)$total;
|
||||
}
|
||||
|
||||
public function loadList ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_UID);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_INDEX);
|
||||
$criteria->addSelectColumn(ListInboxPeer::USR_UID);
|
||||
$criteria->addSelectColumn(ListInboxPeer::TAS_UID);
|
||||
$criteria->addSelectColumn(ListInboxPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_NUMBER);
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_TITLE);
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_PRO_TITLE);
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_TAS_TITLE);
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_UPDATE_DATE);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_UID);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_DELEGATE_DATE);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_INIT_DATE);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_DUE_DATE);
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PRIORITY);
|
||||
|
||||
$criteria->add( ListInboxPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "LIST_INBOX.APP_UPDATE_DATE";
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
$criteria->addAscendingOrderByColumn($sort);
|
||||
}
|
||||
|
||||
if ($paged == 1) {
|
||||
$criteria->setLimit( $limit );
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListInboxPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
while ($dataset->next()) {
|
||||
$aRow = $dataset->getRow();
|
||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation( "ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}" );
|
||||
$data[] = $aRow;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
23
workflow/engine/classes/model/ListInboxPeer.php
Normal file
23
workflow/engine/classes/model/ListInboxPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseListInboxPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/ListInbox.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LIST_INBOX' 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 ListInboxPeer extends BaseListInboxPeer {
|
||||
|
||||
} // ListInboxPeer
|
||||
271
workflow/engine/classes/model/ListMyInbox.php
Normal file
271
workflow/engine/classes/model/ListMyInbox.php
Normal file
@@ -0,0 +1,271 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseListMyInbox.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LIST_MY_INBOX' 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 ListMyInbox extends BaseListMyInbox
|
||||
{
|
||||
/**
|
||||
* Create List My Inbox Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
*
|
||||
*/
|
||||
public function create($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListMyInboxPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
} else {
|
||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||
$e->aValidationFailures = $this->getValidationFailures();
|
||||
throw ($e);
|
||||
}
|
||||
$con->commit();
|
||||
return $result;
|
||||
} catch(Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update List My Inbox Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
* @throws type
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListMyInboxPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$this->setNew( false );
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
$con->commit();
|
||||
return $result;
|
||||
} else {
|
||||
$con->rollback();
|
||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove List My Inbox
|
||||
*
|
||||
* @param type $seqName
|
||||
* @return type
|
||||
* @throws type
|
||||
*
|
||||
*/
|
||||
public function remove ($app_uid, $usr_uid)
|
||||
{
|
||||
$con = Propel::getConnection( ListMyInboxPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->setAppUid($app_uid);
|
||||
$this->setUsrUid($usr_uid);
|
||||
|
||||
$con->begin();
|
||||
$this->delete();
|
||||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh List My Inbox
|
||||
*
|
||||
* @param type $seqName
|
||||
* @return type
|
||||
* @throws type
|
||||
*
|
||||
*/
|
||||
public function refresh ($data)
|
||||
{
|
||||
$data['APP_STATUS'] = (empty($data['APP_STATUS'])) ? 'TO_DO' : $data['APP_STATUS'];
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$criteria->add( UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL );
|
||||
$dataset = UsersPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['DEL_CURRENT_USR_UID'] = $data['USR_UID'];
|
||||
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
|
||||
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
|
||||
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
|
||||
|
||||
if ($data['DEL_INDEX'] == 1 && $data['APP_STATUS'] == 'TO_DO') {
|
||||
$data['APP_CREATE_DATE'] = $data['APP_UPDATE_DATE'];
|
||||
$this->create($data);
|
||||
} else {
|
||||
unset($data['USR_UID']);
|
||||
$this->update($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function loadFilters (&$criteria, $filters)
|
||||
{
|
||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||
|
||||
if ($filter != '') {
|
||||
switch ($filter) {
|
||||
case 'read':
|
||||
$criteria->add( ListMyInboxPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
|
||||
break;
|
||||
case 'unread':
|
||||
$criteria->add( ListMyInboxPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($search != '') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListMyInboxPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
if ($process != '') {
|
||||
$criteria->add( ListMyInboxPeer::PRO_UID, $process, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($category != '') {
|
||||
// INNER JOIN FOR TAS_TITLE
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListMyInboxPeer::PRO_UID, ProcessPeer::PRO_UID);
|
||||
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
}
|
||||
|
||||
if ($dateFrom != "") {
|
||||
if ($dateTo != "") {
|
||||
if ($dateFrom == $dateTo) {
|
||||
$dateSame = $dateFrom;
|
||||
$dateFrom = $dateSame . " 00:00:00";
|
||||
$dateTo = $dateSame . " 23:59:59";
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
}
|
||||
|
||||
$criteria->add( $criteria->getNewCriterion( ListMyInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||
addAnd( $criteria->getNewCriterion( ListMyInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
|
||||
$criteria->add( ListMyInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
|
||||
}
|
||||
} elseif ($dateTo != "") {
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
|
||||
$criteria->add( ListMyInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||
}
|
||||
}
|
||||
|
||||
public function countTotal ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->add( ListMyInboxPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
$total = ListMyInboxPeer::doCount( $criteria );
|
||||
return (int)$total;
|
||||
}
|
||||
|
||||
public function loadList ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_UID);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::USR_UID);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::TAS_UID);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_NUMBER);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_TITLE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_PRO_TITLE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_TAS_TITLE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_CREATE_DATE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_UPDATE_DATE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_FINISH_DATE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_STATUS);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_INDEX);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_UID);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_USERNAME);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_UID);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_DELEGATE_DATE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_INIT_DATE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_DUE_DATE);
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PRIORITY);
|
||||
|
||||
$criteria->add( ListMyInboxPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "APP_UPDATE_DATE";
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
$criteria->addAscendingOrderByColumn($sort);
|
||||
}
|
||||
|
||||
if ($paged == 1) {
|
||||
$criteria->setLimit( $limit );
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListMyInboxPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
while ($dataset->next()) {
|
||||
$aRow = $dataset->getRow();
|
||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation( "ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}" );
|
||||
$data[] = $aRow;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
} // ListMyInbox
|
||||
23
workflow/engine/classes/model/ListMyInboxPeer.php
Normal file
23
workflow/engine/classes/model/ListMyInboxPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseListMyInboxPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/ListMyInbox.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LIST_MY_INBOX' 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 ListMyInboxPeer extends BaseListMyInboxPeer {
|
||||
|
||||
} // ListMyInboxPeer
|
||||
230
workflow/engine/classes/model/ListParticipatedHistory.php
Normal file
230
workflow/engine/classes/model/ListParticipatedHistory.php
Normal file
@@ -0,0 +1,230 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseListParticipatedHistory.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_HISTORY' 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 ListParticipatedHistory extends BaseListParticipatedHistory
|
||||
{
|
||||
/**
|
||||
* Create List Participated History Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
*
|
||||
*/
|
||||
public function create($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListParticipatedHistoryPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
} else {
|
||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||
$e->aValidationFailures = $this->getValidationFailures();
|
||||
throw ($e);
|
||||
}
|
||||
$con->commit();
|
||||
return $result;
|
||||
} catch(Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update List Participated History Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
* @throws type
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListParticipatedHistoryPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$this->setNew( false );
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
$con->commit();
|
||||
return $result;
|
||||
} else {
|
||||
$con->rollback();
|
||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove List Participated History
|
||||
*
|
||||
* @param type $seqName
|
||||
* @return type
|
||||
* @throws type
|
||||
*
|
||||
*/
|
||||
public function remove ($app_uid, $del_index)
|
||||
{
|
||||
$con = Propel::getConnection( ListParticipatedHistoryPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->setAppUid($app_uid);
|
||||
$this->setDelIndex($del_index);
|
||||
|
||||
$con->begin();
|
||||
$this->delete();
|
||||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function loadFilters (&$criteria, $filters)
|
||||
{
|
||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||
|
||||
if ($filter != '') {
|
||||
switch ($filter) {
|
||||
case 'read':
|
||||
$criteria->add( ListParticipatedHistoryPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
|
||||
break;
|
||||
case 'unread':
|
||||
$criteria->add( ListParticipatedHistoryPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($search != '') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListParticipatedHistoryPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
if ($process != '') {
|
||||
$criteria->add( ListParticipatedHistoryPeer::PRO_UID, $process, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($category != '') {
|
||||
// INNER JOIN FOR TAS_TITLE
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListParticipatedHistoryPeer::PRO_UID, ProcessPeer::PRO_UID);
|
||||
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
}
|
||||
|
||||
if ($dateFrom != "") {
|
||||
if ($dateTo != "") {
|
||||
if ($dateFrom == $dateTo) {
|
||||
$dateSame = $dateFrom;
|
||||
$dateFrom = $dateSame . " 00:00:00";
|
||||
$dateTo = $dateSame . " 23:59:59";
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
}
|
||||
|
||||
$criteria->add( $criteria->getNewCriterion( ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||
addAnd( $criteria->getNewCriterion( ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
|
||||
$criteria->add( ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
|
||||
}
|
||||
} elseif ($dateTo != "") {
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
|
||||
$criteria->add( ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||
}
|
||||
}
|
||||
|
||||
public function countTotal ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->add( ListParticipatedHistoryPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
$total = ListParticipatedHistoryPeer::doCount( $criteria );
|
||||
return (int)$total;
|
||||
}
|
||||
|
||||
public function loadList ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_INDEX);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::USR_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::TAS_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_NUMBER);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_TITLE);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_PRO_TITLE);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_TAS_TITLE);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_TAS_TITLE);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_CURRENT_USR_USERNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_CURRENT_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_DELEGATE_DATE);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_INIT_DATE);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_DUE_DATE);
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PRIORITY);
|
||||
|
||||
$criteria->add( ListParticipatedHistoryPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "DEL_DELEGATE_DATE";
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
$criteria->addAscendingOrderByColumn($sort);
|
||||
}
|
||||
|
||||
if ($paged == 1) {
|
||||
$criteria->setLimit( $limit );
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListParticipatedHistoryPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
while ($dataset->next()) {
|
||||
$aRow = $dataset->getRow();
|
||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation( "ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}" );
|
||||
$data[] = $aRow;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseListParticipatedHistoryPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/ListParticipatedHistory.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LIST_PARTICIPATED_HISTORY' 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 ListParticipatedHistoryPeer extends BaseListParticipatedHistoryPeer {
|
||||
|
||||
} // ListParticipatedHistoryPeer
|
||||
227
workflow/engine/classes/model/ListParticipatedLast.php
Normal file
227
workflow/engine/classes/model/ListParticipatedLast.php
Normal file
@@ -0,0 +1,227 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseListParticipatedLast.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_LAST' 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 ListParticipatedLast extends BaseListParticipatedLast
|
||||
{
|
||||
/**
|
||||
* Create List Participated History Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
*
|
||||
*/
|
||||
public function create($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListParticipatedLastPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
} else {
|
||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||
$e->aValidationFailures = $this->getValidationFailures();
|
||||
throw ($e);
|
||||
}
|
||||
$con->commit();
|
||||
return $result;
|
||||
} catch(Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update List Participated History Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
* @throws type
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListParticipatedLastPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$this->setNew( false );
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
$con->commit();
|
||||
return $result;
|
||||
} else {
|
||||
$con->rollback();
|
||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove List Participated History
|
||||
*
|
||||
* @param type $seqName
|
||||
* @return type
|
||||
* @throws type
|
||||
*
|
||||
*/
|
||||
public function remove ($app_uid, $usr_uid)
|
||||
{
|
||||
$con = Propel::getConnection( ListParticipatedLastPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->setAppUid($app_uid);
|
||||
$this->setUsrUid($usr_uid);
|
||||
|
||||
$con->begin();
|
||||
$this->delete();
|
||||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function loadFilters (&$criteria, $filters)
|
||||
{
|
||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||
|
||||
if ($filter != '') {
|
||||
switch ($filter) {
|
||||
case 'read':
|
||||
$criteria->add( ListParticipatedLastPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
|
||||
break;
|
||||
case 'unread':
|
||||
$criteria->add( ListParticipatedLastPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($search != '') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListParticipatedLastPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
if ($process != '') {
|
||||
$criteria->add( ListParticipatedLastPeer::PRO_UID, $process, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($category != '') {
|
||||
// INNER JOIN FOR TAS_TITLE
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListParticipatedLastPeer::PRO_UID, ProcessPeer::PRO_UID);
|
||||
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
}
|
||||
|
||||
if ($dateFrom != "") {
|
||||
if ($dateTo != "") {
|
||||
if ($dateFrom == $dateTo) {
|
||||
$dateSame = $dateFrom;
|
||||
$dateFrom = $dateSame . " 00:00:00";
|
||||
$dateTo = $dateSame . " 23:59:59";
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
}
|
||||
|
||||
$criteria->add( $criteria->getNewCriterion( ListParticipatedLastPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||
addAnd( $criteria->getNewCriterion( ListParticipatedLastPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
|
||||
$criteria->add( ListParticipatedLastPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
|
||||
}
|
||||
} elseif ($dateTo != "") {
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
|
||||
$criteria->add( ListParticipatedLastPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||
}
|
||||
}
|
||||
|
||||
public function countTotal ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->add( ListParticipatedLastPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
$total = ListParticipatedLastPeer::doCount( $criteria );
|
||||
return (int)$total;
|
||||
}
|
||||
|
||||
public function loadList ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::USR_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::TAS_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_NUMBER);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TITLE);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_PRO_TITLE);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TAS_TITLE);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INDEX);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DELEGATE_DATE);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INIT_DATE);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DUE_DATE);
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PRIORITY);
|
||||
|
||||
$criteria->add( ListParticipatedLastPeer::USR_UID, $usr_uid, Criteria::EQUAL );
|
||||
self::loadFilters($criteria, $filters);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "DEL_DELEGATE_DATE";
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
$criteria->addAscendingOrderByColumn($sort);
|
||||
}
|
||||
|
||||
if ($paged == 1) {
|
||||
$criteria->setLimit( $limit );
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListParticipatedLastPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
while ($dataset->next()) {
|
||||
$aRow = $dataset->getRow();
|
||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation( "ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}" );
|
||||
$data[] = $aRow;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
23
workflow/engine/classes/model/ListParticipatedLastPeer.php
Normal file
23
workflow/engine/classes/model/ListParticipatedLastPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseListParticipatedLastPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/ListParticipatedLast.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LIST_PARTICIPATED_LAST' 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 ListParticipatedLastPeer extends BaseListParticipatedLastPeer {
|
||||
|
||||
} // ListParticipatedLastPeer
|
||||
315
workflow/engine/classes/model/ListUnassigned.php
Normal file
315
workflow/engine/classes/model/ListUnassigned.php
Normal file
@@ -0,0 +1,315 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseListUnassigned.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LIST_UNASSIGNED' 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 ListUnassigned extends BaseListUnassigned
|
||||
{
|
||||
/**
|
||||
* Create List Inbox Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
*
|
||||
*/
|
||||
public function create($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListUnassignedPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
} else {
|
||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
||||
$e->aValidationFailures = $this->getValidationFailures();
|
||||
throw ($e);
|
||||
}
|
||||
$con->commit();
|
||||
return $result;
|
||||
} catch(Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update List Inbox Table
|
||||
*
|
||||
* @param type $data
|
||||
* @return type
|
||||
* @throws type
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
$con = Propel::getConnection( ListUnassignedPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$this->setNew( false );
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
$con->commit();
|
||||
return $result;
|
||||
} else {
|
||||
$con->rollback();
|
||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove List Inbox
|
||||
*
|
||||
* @param type $seqName
|
||||
* @return type
|
||||
* @throws type
|
||||
*
|
||||
*/
|
||||
public function remove ($app_uid, $del_index)
|
||||
{
|
||||
$con = Propel::getConnection( ListUnassignedPeer::DATABASE_NAME );
|
||||
try {
|
||||
$this->setAppUid($app_uid);
|
||||
$this->setDelIndex($del_index);
|
||||
|
||||
$con->begin();
|
||||
$this->delete();
|
||||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function newRow ($data, $delPreviusUsrUid) {
|
||||
$data['DEL_PREVIOUS_USR_UID'] = $delPreviusUsrUid;
|
||||
$data['DEL_DUE_DATE'] = $data['DEL_TASK_DUE_DATE'];
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
|
||||
$criteria->addSelectColumn( ApplicationPeer::APP_UPDATE_DATE );
|
||||
$criteria->add( ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
|
||||
$dataset = ApplicationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data = array_merge($data, $aRow);
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'APP_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['PRO_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_PRO_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$criteria->add( ContentPeer::CON_ID, $data['TAS_UID'], Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL );
|
||||
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
|
||||
$dataset = ContentPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_TAS_TITLE'] = $aRow['CON_VALUE'];
|
||||
|
||||
|
||||
$data['APP_PREVIOUS_USER'] = '';
|
||||
if ($data['DEL_PREVIOUS_USR_UID'] != '') {
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$criteria->add( UsersPeer::USR_UID, $data['DEL_PREVIOUS_USR_UID'], Criteria::EQUAL );
|
||||
$dataset = UsersPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_PREVIOUS_USR_USERNAME'] = $aRow['USR_USERNAME'];
|
||||
$data['APP_PREVIOUS_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
|
||||
$data['APP_PREVIOUS_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
|
||||
}
|
||||
|
||||
self::create($data);
|
||||
}
|
||||
|
||||
public function loadFilters (&$criteria, $filters)
|
||||
{
|
||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||
|
||||
if ($filter != '') {
|
||||
switch ($filter) {
|
||||
case 'read':
|
||||
$criteria->add( ListUnassignedPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
|
||||
break;
|
||||
case 'unread':
|
||||
$criteria->add( ListUnassignedPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($search != '') {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion( ListUnassignedPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListUnassignedPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||
addOr( $criteria->getNewCriterion( ListUnassignedPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||
}
|
||||
|
||||
if ($process != '') {
|
||||
$criteria->add( ListUnassignedPeer::PRO_UID, $process, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
if ($category != '') {
|
||||
// INNER JOIN FOR TAS_TITLE
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListUnassignedPeer::PRO_UID, ProcessPeer::PRO_UID);
|
||||
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
}
|
||||
|
||||
if ($dateFrom != "") {
|
||||
if ($dateTo != "") {
|
||||
if ($dateFrom == $dateTo) {
|
||||
$dateSame = $dateFrom;
|
||||
$dateFrom = $dateSame . " 00:00:00";
|
||||
$dateTo = $dateSame . " 23:59:59";
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
}
|
||||
|
||||
$criteria->add( $criteria->getNewCriterion( ListUnassignedPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||
addAnd( $criteria->getNewCriterion( ListUnassignedPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||
} else {
|
||||
$dateFrom = $dateFrom . " 00:00:00";
|
||||
|
||||
$criteria->add( ListUnassignedPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
|
||||
}
|
||||
} elseif ($dateTo != "") {
|
||||
$dateTo = $dateTo . " 23:59:59";
|
||||
|
||||
$criteria->add( ListUnassignedPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||
}
|
||||
}
|
||||
|
||||
public function countTotal ($usr_uid, $filters = array())
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListUnassignedPeer::UNA_UID, ListUnassignedGroupPeer::UNA_UID);
|
||||
$aConditions[] = array(ListUnassignedGroupPeer::USR_UID, "'" . $usr_uid . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
self::loadFilters($criteria, $filters);
|
||||
$total = ListUnassignedPeer::doCount( $criteria );
|
||||
return (int)$total;
|
||||
}
|
||||
|
||||
public function loadList ($usr_uid, $filters = array())
|
||||
{
|
||||
$resp = array();
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_UID);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_INDEX);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::TAS_UID);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_NUMBER);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_TITLE);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PRO_TITLE);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_TAS_TITLE);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PREVIOUS_USR_USERNAME);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PREVIOUS_USR_FIRSTNAME);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PREVIOUS_USR_LASTNAME);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_PREVIOUS_USR_UID);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_DELEGATE_DATE);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_DUE_DATE);
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_PRIORITY);
|
||||
|
||||
$aConditions = array();
|
||||
$aConditions[] = array(ListUnassignedPeer::UNA_UID, ListUnassignedGroupPeer::UNA_UID);
|
||||
$aConditions[] = array(ListUnassignedGroupPeer::USR_UID, "'" . $usr_uid . "'");
|
||||
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
|
||||
|
||||
self::loadFilters($criteria, $filters);
|
||||
|
||||
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "LIST_UNASSIGNED.DEL_DELEGATE_DATE";
|
||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
||||
$count = isset($filters['count']) ? $filters['count'] : 1;
|
||||
|
||||
if ($count == 1) {
|
||||
$criteriaTotal = clone $criteria;
|
||||
$resp['total'] = ListUnassignedPeer::doCount( $criteriaTotal );
|
||||
}
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
$criteria->addAscendingOrderByColumn($sort);
|
||||
}
|
||||
|
||||
if ($paged == 1) {
|
||||
$criteria->setLimit( $limit );
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListUnassignedPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
while ($dataset->next()) {
|
||||
$aRow = $dataset->getRow();
|
||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation( "ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}" );
|
||||
$data[] = $aRow;
|
||||
}
|
||||
|
||||
if ($count == 1) {
|
||||
$resp['data'] = $data;
|
||||
} else {
|
||||
$resp = $data;
|
||||
}
|
||||
return $resp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
19
workflow/engine/classes/model/ListUnassignedGroup.php
Normal file
19
workflow/engine/classes/model/ListUnassignedGroup.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseListUnassignedGroup.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'LIST_UNASSIGNED_GROUP' 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 ListUnassignedGroup extends BaseListUnassignedGroup {
|
||||
|
||||
} // ListUnassignedGroup
|
||||
23
workflow/engine/classes/model/ListUnassignedGroupPeer.php
Normal file
23
workflow/engine/classes/model/ListUnassignedGroupPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseListUnassignedGroupPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/ListUnassignedGroup.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LIST_UNASSIGNED_GROUP' 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 ListUnassignedGroupPeer extends BaseListUnassignedGroupPeer {
|
||||
|
||||
} // ListUnassignedGroupPeer
|
||||
23
workflow/engine/classes/model/ListUnassignedPeer.php
Normal file
23
workflow/engine/classes/model/ListUnassignedPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseListUnassignedPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/ListUnassigned.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'LIST_UNASSIGNED' 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 ListUnassignedPeer extends BaseListUnassignedPeer {
|
||||
|
||||
} // ListUnassignedPeer
|
||||
100
workflow/engine/classes/model/map/ListCompletedMapBuilder.php
Normal file
100
workflow/engine/classes/model/map/ListCompletedMapBuilder.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'LIST_COMPLETED' 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 ListCompletedMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ListCompletedMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('LIST_COMPLETED');
|
||||
$tMap->setPhpName('ListCompleted');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_CREATE_DATE', 'AppCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ListCompletedMapBuilder
|
||||
106
workflow/engine/classes/model/map/ListInboxMapBuilder.php
Normal file
106
workflow/engine/classes/model/map/ListInboxMapBuilder.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'LIST_INBOX' 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 ListInboxMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ListInboxMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('LIST_INBOX');
|
||||
$tMap->setPhpName('ListInbox');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addPrimaryKey('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_UPDATE_DATE', 'AppUpdateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_USERNAME', 'DelPreviousUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_FIRSTNAME', 'DelPreviousUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_LASTNAME', 'DelPreviousUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ListInboxMapBuilder
|
||||
120
workflow/engine/classes/model/map/ListMyInboxMapBuilder.php
Normal file
120
workflow/engine/classes/model/map/ListMyInboxMapBuilder.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'LIST_MY_INBOX' 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 ListMyInboxMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ListMyInboxMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('LIST_MY_INBOX');
|
||||
$tMap->setPhpName('ListMyInbox');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_CREATE_DATE', 'AppCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_UPDATE_DATE', 'AppUpdateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_USERNAME', 'DelPreviousUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_FIRSTNAME', 'DelPreviousUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_LASTNAME', 'DelPreviousUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_UID', 'DelCurrentUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ListMyInboxMapBuilder
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'LIST_PARTICIPATED_HISTORY' 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 ListParticipatedHistoryMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ListParticipatedHistoryMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('LIST_PARTICIPATED_HISTORY');
|
||||
$tMap->setPhpName('ListParticipatedHistory');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addPrimaryKey('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_USERNAME', 'DelPreviousUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_FIRSTNAME', 'DelPreviousUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_LASTNAME', 'DelPreviousUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ListParticipatedHistoryMapBuilder
|
||||
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'LIST_PARTICIPATED_LAST' 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 ListParticipatedLastMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ListParticipatedLastMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('LIST_PARTICIPATED_LAST');
|
||||
$tMap->setPhpName('ListParticipatedLast');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addPrimaryKey('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_USERNAME', 'DelPreviousUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_FIRSTNAME', 'DelPreviousUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_LASTNAME', 'DelPreviousUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ListParticipatedLastMapBuilder
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'LIST_UNASSIGNED_GROUP' 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 ListUnassignedGroupMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ListUnassignedGroupMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('LIST_UNASSIGNED_GROUP');
|
||||
$tMap->setPhpName('ListUnassignedGroup');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('UNA_UID', 'UnaUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addPrimaryKey('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addPrimaryKey('TYPE', 'Type', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('TYP_UID', 'TypUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ListUnassignedGroupMapBuilder
|
||||
102
workflow/engine/classes/model/map/ListUnassignedMapBuilder.php
Normal file
102
workflow/engine/classes/model/map/ListUnassignedMapBuilder.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'LIST_UNASSIGNED' 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 ListUnassignedMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ListUnassignedMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('LIST_UNASSIGNED');
|
||||
$tMap->setPhpName('ListUnassigned');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addPrimaryKey('UNA_UID', 'UnaUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||
|
||||
$tMap->addColumn('APP_PREVIOUS_USR_USERNAME', 'AppPreviousUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('APP_PREVIOUS_USR_FIRSTNAME', 'AppPreviousUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('APP_PREVIOUS_USR_LASTNAME', 'AppPreviousUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ListUnassignedMapBuilder
|
||||
1378
workflow/engine/classes/model/om/BaseListCompleted.php
Normal file
1378
workflow/engine/classes/model/om/BaseListCompleted.php
Normal file
File diff suppressed because it is too large
Load Diff
637
workflow/engine/classes/model/om/BaseListCompletedPeer.php
Normal file
637
workflow/engine/classes/model/om/BaseListCompletedPeer.php
Normal file
@@ -0,0 +1,637 @@
|
||||
<?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 ListCompletedPeer::getOMClass()
|
||||
include_once 'classes/model/ListCompleted.php';
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'LIST_COMPLETED' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListCompletedPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
const DATABASE_NAME = 'workflow';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'LIST_COMPLETED';
|
||||
|
||||
/** A class that can be returned by this peer. */
|
||||
const CLASS_DEFAULT = 'classes.model.ListCompleted';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 15;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'LIST_COMPLETED.APP_UID';
|
||||
|
||||
/** the column name for the USR_UID field */
|
||||
const USR_UID = 'LIST_COMPLETED.USR_UID';
|
||||
|
||||
/** the column name for the TAS_UID field */
|
||||
const TAS_UID = 'LIST_COMPLETED.TAS_UID';
|
||||
|
||||
/** the column name for the PRO_UID field */
|
||||
const PRO_UID = 'LIST_COMPLETED.PRO_UID';
|
||||
|
||||
/** the column name for the APP_NUMBER field */
|
||||
const APP_NUMBER = 'LIST_COMPLETED.APP_NUMBER';
|
||||
|
||||
/** the column name for the APP_TITLE field */
|
||||
const APP_TITLE = 'LIST_COMPLETED.APP_TITLE';
|
||||
|
||||
/** the column name for the APP_PRO_TITLE field */
|
||||
const APP_PRO_TITLE = 'LIST_COMPLETED.APP_PRO_TITLE';
|
||||
|
||||
/** the column name for the APP_TAS_TITLE field */
|
||||
const APP_TAS_TITLE = 'LIST_COMPLETED.APP_TAS_TITLE';
|
||||
|
||||
/** the column name for the APP_CREATE_DATE field */
|
||||
const APP_CREATE_DATE = 'LIST_COMPLETED.APP_CREATE_DATE';
|
||||
|
||||
/** the column name for the APP_FINISH_DATE field */
|
||||
const APP_FINISH_DATE = 'LIST_COMPLETED.APP_FINISH_DATE';
|
||||
|
||||
/** the column name for the DEL_INDEX field */
|
||||
const DEL_INDEX = 'LIST_COMPLETED.DEL_INDEX';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_UID field */
|
||||
const DEL_PREVIOUS_USR_UID = 'LIST_COMPLETED.DEL_PREVIOUS_USR_UID';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_USERNAME field */
|
||||
const DEL_CURRENT_USR_USERNAME = 'LIST_COMPLETED.DEL_CURRENT_USR_USERNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
|
||||
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_COMPLETED.DEL_CURRENT_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
|
||||
const DEL_CURRENT_USR_LASTNAME = 'LIST_COMPLETED.DEL_CURRENT_USR_LASTNAME';
|
||||
|
||||
/** 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 ('AppUid', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppCreateDate', 'AppFinishDate', 'DelIndex', 'DelPreviousUsrUid', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', ),
|
||||
BasePeer::TYPE_COLNAME => array (ListCompletedPeer::APP_UID, ListCompletedPeer::USR_UID, ListCompletedPeer::TAS_UID, ListCompletedPeer::PRO_UID, ListCompletedPeer::APP_NUMBER, ListCompletedPeer::APP_TITLE, ListCompletedPeer::APP_PRO_TITLE, ListCompletedPeer::APP_TAS_TITLE, ListCompletedPeer::APP_CREATE_DATE, ListCompletedPeer::APP_FINISH_DATE, ListCompletedPeer::DEL_INDEX, ListCompletedPeer::DEL_PREVIOUS_USR_UID, ListCompletedPeer::DEL_CURRENT_USR_USERNAME, ListCompletedPeer::DEL_CURRENT_USR_FIRSTNAME, ListCompletedPeer::DEL_CURRENT_USR_LASTNAME, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_CREATE_DATE', 'APP_FINISH_DATE', 'DEL_INDEX', 'DEL_PREVIOUS_USR_UID', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
* 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 ('AppUid' => 0, 'UsrUid' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'AppCreateDate' => 8, 'AppFinishDate' => 9, 'DelIndex' => 10, 'DelPreviousUsrUid' => 11, 'DelCurrentUsrUsername' => 12, 'DelCurrentUsrFirstname' => 13, 'DelCurrentUsrLastname' => 14, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListCompletedPeer::APP_UID => 0, ListCompletedPeer::USR_UID => 1, ListCompletedPeer::TAS_UID => 2, ListCompletedPeer::PRO_UID => 3, ListCompletedPeer::APP_NUMBER => 4, ListCompletedPeer::APP_TITLE => 5, ListCompletedPeer::APP_PRO_TITLE => 6, ListCompletedPeer::APP_TAS_TITLE => 7, ListCompletedPeer::APP_CREATE_DATE => 8, ListCompletedPeer::APP_FINISH_DATE => 9, ListCompletedPeer::DEL_INDEX => 10, ListCompletedPeer::DEL_PREVIOUS_USR_UID => 11, ListCompletedPeer::DEL_CURRENT_USR_USERNAME => 12, ListCompletedPeer::DEL_CURRENT_USR_FIRSTNAME => 13, ListCompletedPeer::DEL_CURRENT_USR_LASTNAME => 14, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'USR_UID' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'APP_CREATE_DATE' => 8, 'APP_FINISH_DATE' => 9, 'DEL_INDEX' => 10, 'DEL_PREVIOUS_USR_UID' => 11, 'DEL_CURRENT_USR_USERNAME' => 12, 'DEL_CURRENT_USR_FIRSTNAME' => 13, 'DEL_CURRENT_USR_LASTNAME' => 14, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
* @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/ListCompletedMapBuilder.php';
|
||||
return BasePeer::getMapBuilder('classes.model.map.ListCompletedMapBuilder');
|
||||
}
|
||||
/**
|
||||
* 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 = ListCompletedPeer::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. ListCompletedPeer::COLUMN_NAME).
|
||||
* @return string
|
||||
*/
|
||||
public static function alias($alias, $column)
|
||||
{
|
||||
return str_replace(ListCompletedPeer::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(ListCompletedPeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::TAS_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::PRO_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_NUMBER);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_PRO_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_TAS_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_CREATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::APP_FINISH_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_INDEX);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_PREVIOUS_USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_LASTNAME);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(LIST_COMPLETED.APP_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_COMPLETED.APP_UID)';
|
||||
|
||||
/**
|
||||
* 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(ListCompletedPeer::COUNT_DISTINCT);
|
||||
} else {
|
||||
$criteria->addSelectColumn(ListCompletedPeer::COUNT);
|
||||
}
|
||||
|
||||
// just in case we're grouping: add those columns to the select statement
|
||||
foreach ($criteria->getGroupByColumns() as $column) {
|
||||
$criteria->addSelectColumn($column);
|
||||
}
|
||||
|
||||
$rs = ListCompletedPeer::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 ListCompleted
|
||||
* @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 = ListCompletedPeer::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 ListCompletedPeer::populateObjects(ListCompletedPeer::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;
|
||||
ListCompletedPeer::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 = ListCompletedPeer::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 ListCompletedPeer::CLASS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform an INSERT on the database, given a ListCompleted or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListCompleted 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 ListCompleted 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 ListCompleted or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListCompleted 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
|
||||
|
||||
$comparison = $criteria->getComparison(ListCompletedPeer::APP_UID);
|
||||
$selectCriteria->add(ListCompletedPeer::APP_UID, $criteria->remove(ListCompletedPeer::APP_UID), $comparison);
|
||||
|
||||
} 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 LIST_COMPLETED 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(ListCompletedPeer::TABLE_NAME, $con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform a DELETE on the database, given a ListCompleted or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ListCompleted 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(ListCompletedPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof ListCompleted) {
|
||||
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
$criteria->add(ListCompletedPeer::APP_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// 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 ListCompleted 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 ListCompleted $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(ListCompleted $obj, $cols = null)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if ($cols) {
|
||||
$dbMap = Propel::getDatabaseMap(ListCompletedPeer::DATABASE_NAME);
|
||||
$tableMap = $dbMap->getTable(ListCompletedPeer::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(ListCompletedPeer::DATABASE_NAME, ListCompletedPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return ListCompleted
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(ListCompletedPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(ListCompletedPeer::APP_UID, $pk);
|
||||
|
||||
|
||||
$v = ListCompletedPeer::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(ListCompletedPeer::APP_UID, $pks, Criteria::IN);
|
||||
$objs = ListCompletedPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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 {
|
||||
BaseListCompletedPeer::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/ListCompletedMapBuilder.php';
|
||||
Propel::registerMapBuilder('classes.model.map.ListCompletedMapBuilder');
|
||||
}
|
||||
|
||||
1620
workflow/engine/classes/model/om/BaseListInbox.php
Normal file
1620
workflow/engine/classes/model/om/BaseListInbox.php
Normal file
File diff suppressed because it is too large
Load Diff
642
workflow/engine/classes/model/om/BaseListInboxPeer.php
Normal file
642
workflow/engine/classes/model/om/BaseListInboxPeer.php
Normal file
@@ -0,0 +1,642 @@
|
||||
<?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 ListInboxPeer::getOMClass()
|
||||
include_once 'classes/model/ListInbox.php';
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'LIST_INBOX' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListInboxPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
const DATABASE_NAME = 'workflow';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'LIST_INBOX';
|
||||
|
||||
/** A class that can be returned by this peer. */
|
||||
const CLASS_DEFAULT = 'classes.model.ListInbox';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 18;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'LIST_INBOX.APP_UID';
|
||||
|
||||
/** the column name for the DEL_INDEX field */
|
||||
const DEL_INDEX = 'LIST_INBOX.DEL_INDEX';
|
||||
|
||||
/** the column name for the USR_UID field */
|
||||
const USR_UID = 'LIST_INBOX.USR_UID';
|
||||
|
||||
/** the column name for the TAS_UID field */
|
||||
const TAS_UID = 'LIST_INBOX.TAS_UID';
|
||||
|
||||
/** the column name for the PRO_UID field */
|
||||
const PRO_UID = 'LIST_INBOX.PRO_UID';
|
||||
|
||||
/** the column name for the APP_NUMBER field */
|
||||
const APP_NUMBER = 'LIST_INBOX.APP_NUMBER';
|
||||
|
||||
/** the column name for the APP_TITLE field */
|
||||
const APP_TITLE = 'LIST_INBOX.APP_TITLE';
|
||||
|
||||
/** the column name for the APP_PRO_TITLE field */
|
||||
const APP_PRO_TITLE = 'LIST_INBOX.APP_PRO_TITLE';
|
||||
|
||||
/** the column name for the APP_TAS_TITLE field */
|
||||
const APP_TAS_TITLE = 'LIST_INBOX.APP_TAS_TITLE';
|
||||
|
||||
/** the column name for the APP_UPDATE_DATE field */
|
||||
const APP_UPDATE_DATE = 'LIST_INBOX.APP_UPDATE_DATE';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_UID field */
|
||||
const DEL_PREVIOUS_USR_UID = 'LIST_INBOX.DEL_PREVIOUS_USR_UID';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_USERNAME field */
|
||||
const DEL_PREVIOUS_USR_USERNAME = 'LIST_INBOX.DEL_PREVIOUS_USR_USERNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_FIRSTNAME field */
|
||||
const DEL_PREVIOUS_USR_FIRSTNAME = 'LIST_INBOX.DEL_PREVIOUS_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_LASTNAME field */
|
||||
const DEL_PREVIOUS_USR_LASTNAME = 'LIST_INBOX.DEL_PREVIOUS_USR_LASTNAME';
|
||||
|
||||
/** the column name for the DEL_DELEGATE_DATE field */
|
||||
const DEL_DELEGATE_DATE = 'LIST_INBOX.DEL_DELEGATE_DATE';
|
||||
|
||||
/** the column name for the DEL_INIT_DATE field */
|
||||
const DEL_INIT_DATE = 'LIST_INBOX.DEL_INIT_DATE';
|
||||
|
||||
/** the column name for the DEL_DUE_DATE field */
|
||||
const DEL_DUE_DATE = 'LIST_INBOX.DEL_DUE_DATE';
|
||||
|
||||
/** the column name for the DEL_PRIORITY field */
|
||||
const DEL_PRIORITY = 'LIST_INBOX.DEL_PRIORITY';
|
||||
|
||||
/** 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 ('AppUid', 'DelIndex', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppUpdateDate', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
|
||||
BasePeer::TYPE_COLNAME => array (ListInboxPeer::APP_UID, ListInboxPeer::DEL_INDEX, ListInboxPeer::USR_UID, ListInboxPeer::TAS_UID, ListInboxPeer::PRO_UID, ListInboxPeer::APP_NUMBER, ListInboxPeer::APP_TITLE, ListInboxPeer::APP_PRO_TITLE, ListInboxPeer::APP_TAS_TITLE, ListInboxPeer::APP_UPDATE_DATE, ListInboxPeer::DEL_PREVIOUS_USR_UID, ListInboxPeer::DEL_PREVIOUS_USR_USERNAME, ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME, ListInboxPeer::DEL_DELEGATE_DATE, ListInboxPeer::DEL_INIT_DATE, ListInboxPeer::DEL_DUE_DATE, ListInboxPeer::DEL_PRIORITY, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'DEL_INDEX', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_UPDATE_DATE', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
);
|
||||
|
||||
/**
|
||||
* holds an array of keys for quick access to the fieldnames array
|
||||
*
|
||||
* first dimension keys are the type constants
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'DelIndex' => 1, 'UsrUid' => 2, 'TasUid' => 3, 'ProUid' => 4, 'AppNumber' => 5, 'AppTitle' => 6, 'AppProTitle' => 7, 'AppTasTitle' => 8, 'AppUpdateDate' => 9, 'DelPreviousUsrUid' => 10, 'DelPreviousUsrUsername' => 11, 'DelPreviousUsrFirstname' => 12, 'DelPreviousUsrLastname' => 13, 'DelDelegateDate' => 14, 'DelInitDate' => 15, 'DelDueDate' => 16, 'DelPriority' => 17, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListInboxPeer::APP_UID => 0, ListInboxPeer::DEL_INDEX => 1, ListInboxPeer::USR_UID => 2, ListInboxPeer::TAS_UID => 3, ListInboxPeer::PRO_UID => 4, ListInboxPeer::APP_NUMBER => 5, ListInboxPeer::APP_TITLE => 6, ListInboxPeer::APP_PRO_TITLE => 7, ListInboxPeer::APP_TAS_TITLE => 8, ListInboxPeer::APP_UPDATE_DATE => 9, ListInboxPeer::DEL_PREVIOUS_USR_UID => 10, ListInboxPeer::DEL_PREVIOUS_USR_USERNAME => 11, ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME => 12, ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME => 13, ListInboxPeer::DEL_DELEGATE_DATE => 14, ListInboxPeer::DEL_INIT_DATE => 15, ListInboxPeer::DEL_DUE_DATE => 16, ListInboxPeer::DEL_PRIORITY => 17, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'USR_UID' => 2, 'TAS_UID' => 3, 'PRO_UID' => 4, 'APP_NUMBER' => 5, 'APP_TITLE' => 6, 'APP_PRO_TITLE' => 7, 'APP_TAS_TITLE' => 8, 'APP_UPDATE_DATE' => 9, 'DEL_PREVIOUS_USR_UID' => 10, 'DEL_PREVIOUS_USR_USERNAME' => 11, 'DEL_PREVIOUS_USR_FIRSTNAME' => 12, 'DEL_PREVIOUS_USR_LASTNAME' => 13, 'DEL_DELEGATE_DATE' => 14, 'DEL_INIT_DATE' => 15, 'DEL_DUE_DATE' => 16, 'DEL_PRIORITY' => 17, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
);
|
||||
|
||||
/**
|
||||
* @return MapBuilder the map builder for this peer
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function getMapBuilder()
|
||||
{
|
||||
include_once 'classes/model/map/ListInboxMapBuilder.php';
|
||||
return BasePeer::getMapBuilder('classes.model.map.ListInboxMapBuilder');
|
||||
}
|
||||
/**
|
||||
* 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 = ListInboxPeer::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. ListInboxPeer::COLUMN_NAME).
|
||||
* @return string
|
||||
*/
|
||||
public static function alias($alias, $column)
|
||||
{
|
||||
return str_replace(ListInboxPeer::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(ListInboxPeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_INDEX);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::TAS_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::PRO_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_NUMBER);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_PRO_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_TAS_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::APP_UPDATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_DELEGATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_INIT_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_DUE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListInboxPeer::DEL_PRIORITY);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(LIST_INBOX.APP_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_INBOX.APP_UID)';
|
||||
|
||||
/**
|
||||
* 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(ListInboxPeer::COUNT_DISTINCT);
|
||||
} else {
|
||||
$criteria->addSelectColumn(ListInboxPeer::COUNT);
|
||||
}
|
||||
|
||||
// just in case we're grouping: add those columns to the select statement
|
||||
foreach ($criteria->getGroupByColumns() as $column) {
|
||||
$criteria->addSelectColumn($column);
|
||||
}
|
||||
|
||||
$rs = ListInboxPeer::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 ListInbox
|
||||
* @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 = ListInboxPeer::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 ListInboxPeer::populateObjects(ListInboxPeer::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;
|
||||
ListInboxPeer::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 = ListInboxPeer::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 ListInboxPeer::CLASS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform an INSERT on the database, given a ListInbox or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListInbox 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 ListInbox 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 ListInbox or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListInbox 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
|
||||
|
||||
$comparison = $criteria->getComparison(ListInboxPeer::APP_UID);
|
||||
$selectCriteria->add(ListInboxPeer::APP_UID, $criteria->remove(ListInboxPeer::APP_UID), $comparison);
|
||||
|
||||
$comparison = $criteria->getComparison(ListInboxPeer::DEL_INDEX);
|
||||
$selectCriteria->add(ListInboxPeer::DEL_INDEX, $criteria->remove(ListInboxPeer::DEL_INDEX), $comparison);
|
||||
|
||||
} 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 LIST_INBOX 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(ListInboxPeer::TABLE_NAME, $con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform a DELETE on the database, given a ListInbox or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ListInbox 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(ListInboxPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof ListInbox) {
|
||||
|
||||
$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) {
|
||||
|
||||
$vals[0][] = $value[0];
|
||||
$vals[1][] = $value[1];
|
||||
}
|
||||
|
||||
$criteria->add(ListInboxPeer::APP_UID, $vals[0], Criteria::IN);
|
||||
$criteria->add(ListInboxPeer::DEL_INDEX, $vals[1], Criteria::IN);
|
||||
}
|
||||
|
||||
// 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 ListInbox 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 ListInbox $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(ListInbox $obj, $cols = null)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if ($cols) {
|
||||
$dbMap = Propel::getDatabaseMap(ListInboxPeer::DATABASE_NAME);
|
||||
$tableMap = $dbMap->getTable(ListInboxPeer::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(ListInboxPeer::DATABASE_NAME, ListInboxPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve object using using composite pkey values.
|
||||
* @param string $app_uid
|
||||
* @param int $del_index
|
||||
* @param Connection $con
|
||||
* @return ListInbox
|
||||
*/
|
||||
public static function retrieveByPK($app_uid, $del_index, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(ListInboxPeer::APP_UID, $app_uid);
|
||||
$criteria->add(ListInboxPeer::DEL_INDEX, $del_index);
|
||||
$v = ListInboxPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) ? $v[0] : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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 {
|
||||
BaseListInboxPeer::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/ListInboxMapBuilder.php';
|
||||
Propel::registerMapBuilder('classes.model.map.ListInboxMapBuilder');
|
||||
}
|
||||
|
||||
2070
workflow/engine/classes/model/om/BaseListMyInbox.php
Normal file
2070
workflow/engine/classes/model/om/BaseListMyInbox.php
Normal file
File diff suppressed because it is too large
Load Diff
687
workflow/engine/classes/model/om/BaseListMyInboxPeer.php
Normal file
687
workflow/engine/classes/model/om/BaseListMyInboxPeer.php
Normal file
@@ -0,0 +1,687 @@
|
||||
<?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 ListMyInboxPeer::getOMClass()
|
||||
include_once 'classes/model/ListMyInbox.php';
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'LIST_MY_INBOX' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListMyInboxPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
const DATABASE_NAME = 'workflow';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'LIST_MY_INBOX';
|
||||
|
||||
/** A class that can be returned by this peer. */
|
||||
const CLASS_DEFAULT = 'classes.model.ListMyInbox';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 25;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'LIST_MY_INBOX.APP_UID';
|
||||
|
||||
/** the column name for the USR_UID field */
|
||||
const USR_UID = 'LIST_MY_INBOX.USR_UID';
|
||||
|
||||
/** the column name for the TAS_UID field */
|
||||
const TAS_UID = 'LIST_MY_INBOX.TAS_UID';
|
||||
|
||||
/** the column name for the PRO_UID field */
|
||||
const PRO_UID = 'LIST_MY_INBOX.PRO_UID';
|
||||
|
||||
/** the column name for the APP_NUMBER field */
|
||||
const APP_NUMBER = 'LIST_MY_INBOX.APP_NUMBER';
|
||||
|
||||
/** the column name for the APP_TITLE field */
|
||||
const APP_TITLE = 'LIST_MY_INBOX.APP_TITLE';
|
||||
|
||||
/** the column name for the APP_PRO_TITLE field */
|
||||
const APP_PRO_TITLE = 'LIST_MY_INBOX.APP_PRO_TITLE';
|
||||
|
||||
/** the column name for the APP_TAS_TITLE field */
|
||||
const APP_TAS_TITLE = 'LIST_MY_INBOX.APP_TAS_TITLE';
|
||||
|
||||
/** the column name for the APP_CREATE_DATE field */
|
||||
const APP_CREATE_DATE = 'LIST_MY_INBOX.APP_CREATE_DATE';
|
||||
|
||||
/** the column name for the APP_UPDATE_DATE field */
|
||||
const APP_UPDATE_DATE = 'LIST_MY_INBOX.APP_UPDATE_DATE';
|
||||
|
||||
/** the column name for the APP_FINISH_DATE field */
|
||||
const APP_FINISH_DATE = 'LIST_MY_INBOX.APP_FINISH_DATE';
|
||||
|
||||
/** the column name for the APP_STATUS field */
|
||||
const APP_STATUS = 'LIST_MY_INBOX.APP_STATUS';
|
||||
|
||||
/** the column name for the DEL_INDEX field */
|
||||
const DEL_INDEX = 'LIST_MY_INBOX.DEL_INDEX';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_UID field */
|
||||
const DEL_PREVIOUS_USR_UID = 'LIST_MY_INBOX.DEL_PREVIOUS_USR_UID';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_USERNAME field */
|
||||
const DEL_PREVIOUS_USR_USERNAME = 'LIST_MY_INBOX.DEL_PREVIOUS_USR_USERNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_FIRSTNAME field */
|
||||
const DEL_PREVIOUS_USR_FIRSTNAME = 'LIST_MY_INBOX.DEL_PREVIOUS_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_LASTNAME field */
|
||||
const DEL_PREVIOUS_USR_LASTNAME = 'LIST_MY_INBOX.DEL_PREVIOUS_USR_LASTNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_UID field */
|
||||
const DEL_CURRENT_USR_UID = 'LIST_MY_INBOX.DEL_CURRENT_USR_UID';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_USERNAME field */
|
||||
const DEL_CURRENT_USR_USERNAME = 'LIST_MY_INBOX.DEL_CURRENT_USR_USERNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
|
||||
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_MY_INBOX.DEL_CURRENT_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
|
||||
const DEL_CURRENT_USR_LASTNAME = 'LIST_MY_INBOX.DEL_CURRENT_USR_LASTNAME';
|
||||
|
||||
/** the column name for the DEL_DELEGATE_DATE field */
|
||||
const DEL_DELEGATE_DATE = 'LIST_MY_INBOX.DEL_DELEGATE_DATE';
|
||||
|
||||
/** the column name for the DEL_INIT_DATE field */
|
||||
const DEL_INIT_DATE = 'LIST_MY_INBOX.DEL_INIT_DATE';
|
||||
|
||||
/** the column name for the DEL_DUE_DATE field */
|
||||
const DEL_DUE_DATE = 'LIST_MY_INBOX.DEL_DUE_DATE';
|
||||
|
||||
/** the column name for the DEL_PRIORITY field */
|
||||
const DEL_PRIORITY = 'LIST_MY_INBOX.DEL_PRIORITY';
|
||||
|
||||
/** 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 ('AppUid', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppCreateDate', 'AppUpdateDate', 'AppFinishDate', 'AppStatus', 'DelIndex', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelCurrentUsrUid', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
|
||||
BasePeer::TYPE_COLNAME => array (ListMyInboxPeer::APP_UID, ListMyInboxPeer::USR_UID, ListMyInboxPeer::TAS_UID, ListMyInboxPeer::PRO_UID, ListMyInboxPeer::APP_NUMBER, ListMyInboxPeer::APP_TITLE, ListMyInboxPeer::APP_PRO_TITLE, ListMyInboxPeer::APP_TAS_TITLE, ListMyInboxPeer::APP_CREATE_DATE, ListMyInboxPeer::APP_UPDATE_DATE, ListMyInboxPeer::APP_FINISH_DATE, ListMyInboxPeer::APP_STATUS, ListMyInboxPeer::DEL_INDEX, ListMyInboxPeer::DEL_PREVIOUS_USR_UID, ListMyInboxPeer::DEL_PREVIOUS_USR_USERNAME, ListMyInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListMyInboxPeer::DEL_PREVIOUS_USR_LASTNAME, ListMyInboxPeer::DEL_CURRENT_USR_UID, ListMyInboxPeer::DEL_CURRENT_USR_USERNAME, ListMyInboxPeer::DEL_CURRENT_USR_FIRSTNAME, ListMyInboxPeer::DEL_CURRENT_USR_LASTNAME, ListMyInboxPeer::DEL_DELEGATE_DATE, ListMyInboxPeer::DEL_INIT_DATE, ListMyInboxPeer::DEL_DUE_DATE, ListMyInboxPeer::DEL_PRIORITY, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_CREATE_DATE', 'APP_UPDATE_DATE', 'APP_FINISH_DATE', 'APP_STATUS', 'DEL_INDEX', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_CURRENT_USR_UID', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, )
|
||||
);
|
||||
|
||||
/**
|
||||
* 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 ('AppUid' => 0, 'UsrUid' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'AppCreateDate' => 8, 'AppUpdateDate' => 9, 'AppFinishDate' => 10, 'AppStatus' => 11, 'DelIndex' => 12, 'DelPreviousUsrUid' => 13, 'DelPreviousUsrUsername' => 14, 'DelPreviousUsrFirstname' => 15, 'DelPreviousUsrLastname' => 16, 'DelCurrentUsrUid' => 17, 'DelCurrentUsrUsername' => 18, 'DelCurrentUsrFirstname' => 19, 'DelCurrentUsrLastname' => 20, 'DelDelegateDate' => 21, 'DelInitDate' => 22, 'DelDueDate' => 23, 'DelPriority' => 24, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListMyInboxPeer::APP_UID => 0, ListMyInboxPeer::USR_UID => 1, ListMyInboxPeer::TAS_UID => 2, ListMyInboxPeer::PRO_UID => 3, ListMyInboxPeer::APP_NUMBER => 4, ListMyInboxPeer::APP_TITLE => 5, ListMyInboxPeer::APP_PRO_TITLE => 6, ListMyInboxPeer::APP_TAS_TITLE => 7, ListMyInboxPeer::APP_CREATE_DATE => 8, ListMyInboxPeer::APP_UPDATE_DATE => 9, ListMyInboxPeer::APP_FINISH_DATE => 10, ListMyInboxPeer::APP_STATUS => 11, ListMyInboxPeer::DEL_INDEX => 12, ListMyInboxPeer::DEL_PREVIOUS_USR_UID => 13, ListMyInboxPeer::DEL_PREVIOUS_USR_USERNAME => 14, ListMyInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME => 15, ListMyInboxPeer::DEL_PREVIOUS_USR_LASTNAME => 16, ListMyInboxPeer::DEL_CURRENT_USR_UID => 17, ListMyInboxPeer::DEL_CURRENT_USR_USERNAME => 18, ListMyInboxPeer::DEL_CURRENT_USR_FIRSTNAME => 19, ListMyInboxPeer::DEL_CURRENT_USR_LASTNAME => 20, ListMyInboxPeer::DEL_DELEGATE_DATE => 21, ListMyInboxPeer::DEL_INIT_DATE => 22, ListMyInboxPeer::DEL_DUE_DATE => 23, ListMyInboxPeer::DEL_PRIORITY => 24, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'USR_UID' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'APP_CREATE_DATE' => 8, 'APP_UPDATE_DATE' => 9, 'APP_FINISH_DATE' => 10, 'APP_STATUS' => 11, 'DEL_INDEX' => 12, 'DEL_PREVIOUS_USR_UID' => 13, 'DEL_PREVIOUS_USR_USERNAME' => 14, 'DEL_PREVIOUS_USR_FIRSTNAME' => 15, 'DEL_PREVIOUS_USR_LASTNAME' => 16, 'DEL_CURRENT_USR_UID' => 17, 'DEL_CURRENT_USR_USERNAME' => 18, 'DEL_CURRENT_USR_FIRSTNAME' => 19, 'DEL_CURRENT_USR_LASTNAME' => 20, 'DEL_DELEGATE_DATE' => 21, 'DEL_INIT_DATE' => 22, 'DEL_DUE_DATE' => 23, 'DEL_PRIORITY' => 24, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, )
|
||||
);
|
||||
|
||||
/**
|
||||
* @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/ListMyInboxMapBuilder.php';
|
||||
return BasePeer::getMapBuilder('classes.model.map.ListMyInboxMapBuilder');
|
||||
}
|
||||
/**
|
||||
* 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 = ListMyInboxPeer::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. ListMyInboxPeer::COLUMN_NAME).
|
||||
* @return string
|
||||
*/
|
||||
public static function alias($alias, $column)
|
||||
{
|
||||
return str_replace(ListMyInboxPeer::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(ListMyInboxPeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::TAS_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::PRO_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_NUMBER);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_PRO_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_TAS_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_CREATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_UPDATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_FINISH_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::APP_STATUS);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_INDEX);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_CURRENT_USR_LASTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_DELEGATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_INIT_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_DUE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PRIORITY);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(LIST_MY_INBOX.APP_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_MY_INBOX.APP_UID)';
|
||||
|
||||
/**
|
||||
* 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(ListMyInboxPeer::COUNT_DISTINCT);
|
||||
} else {
|
||||
$criteria->addSelectColumn(ListMyInboxPeer::COUNT);
|
||||
}
|
||||
|
||||
// just in case we're grouping: add those columns to the select statement
|
||||
foreach ($criteria->getGroupByColumns() as $column) {
|
||||
$criteria->addSelectColumn($column);
|
||||
}
|
||||
|
||||
$rs = ListMyInboxPeer::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 ListMyInbox
|
||||
* @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 = ListMyInboxPeer::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 ListMyInboxPeer::populateObjects(ListMyInboxPeer::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;
|
||||
ListMyInboxPeer::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 = ListMyInboxPeer::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 ListMyInboxPeer::CLASS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform an INSERT on the database, given a ListMyInbox or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListMyInbox 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 ListMyInbox 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 ListMyInbox or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListMyInbox 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
|
||||
|
||||
$comparison = $criteria->getComparison(ListMyInboxPeer::APP_UID);
|
||||
$selectCriteria->add(ListMyInboxPeer::APP_UID, $criteria->remove(ListMyInboxPeer::APP_UID), $comparison);
|
||||
|
||||
} 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 LIST_MY_INBOX 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(ListMyInboxPeer::TABLE_NAME, $con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform a DELETE on the database, given a ListMyInbox or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ListMyInbox 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(ListMyInboxPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof ListMyInbox) {
|
||||
|
||||
$criteria = $values->buildPkeyCriteria();
|
||||
} else {
|
||||
// it must be the primary key
|
||||
$criteria = new Criteria(self::DATABASE_NAME);
|
||||
$criteria->add(ListMyInboxPeer::APP_UID, (array) $values, Criteria::IN);
|
||||
}
|
||||
|
||||
// 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 ListMyInbox 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 ListMyInbox $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(ListMyInbox $obj, $cols = null)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if ($cols) {
|
||||
$dbMap = Propel::getDatabaseMap(ListMyInboxPeer::DATABASE_NAME);
|
||||
$tableMap = $dbMap->getTable(ListMyInboxPeer::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(ListMyInboxPeer::DATABASE_NAME, ListMyInboxPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a single object by pkey.
|
||||
*
|
||||
* @param mixed $pk the primary key.
|
||||
* @param Connection $con the connection to use
|
||||
* @return ListMyInbox
|
||||
*/
|
||||
public static function retrieveByPK($pk, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
$criteria = new Criteria(ListMyInboxPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(ListMyInboxPeer::APP_UID, $pk);
|
||||
|
||||
|
||||
$v = ListMyInboxPeer::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(ListMyInboxPeer::APP_UID, $pks, Criteria::IN);
|
||||
$objs = ListMyInboxPeer::doSelect($criteria, $con);
|
||||
}
|
||||
return $objs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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 {
|
||||
BaseListMyInboxPeer::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/ListMyInboxMapBuilder.php';
|
||||
Propel::registerMapBuilder('classes.model.map.ListMyInboxMapBuilder');
|
||||
}
|
||||
|
||||
1708
workflow/engine/classes/model/om/BaseListParticipatedHistory.php
Normal file
1708
workflow/engine/classes/model/om/BaseListParticipatedHistory.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,652 @@
|
||||
<?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 ListParticipatedHistoryPeer::getOMClass()
|
||||
include_once 'classes/model/ListParticipatedHistory.php';
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'LIST_PARTICIPATED_HISTORY' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListParticipatedHistoryPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
const DATABASE_NAME = 'workflow';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'LIST_PARTICIPATED_HISTORY';
|
||||
|
||||
/** A class that can be returned by this peer. */
|
||||
const CLASS_DEFAULT = 'classes.model.ListParticipatedHistory';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 20;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'LIST_PARTICIPATED_HISTORY.APP_UID';
|
||||
|
||||
/** the column name for the DEL_INDEX field */
|
||||
const DEL_INDEX = 'LIST_PARTICIPATED_HISTORY.DEL_INDEX';
|
||||
|
||||
/** the column name for the USR_UID field */
|
||||
const USR_UID = 'LIST_PARTICIPATED_HISTORY.USR_UID';
|
||||
|
||||
/** the column name for the TAS_UID field */
|
||||
const TAS_UID = 'LIST_PARTICIPATED_HISTORY.TAS_UID';
|
||||
|
||||
/** the column name for the PRO_UID field */
|
||||
const PRO_UID = 'LIST_PARTICIPATED_HISTORY.PRO_UID';
|
||||
|
||||
/** the column name for the APP_NUMBER field */
|
||||
const APP_NUMBER = 'LIST_PARTICIPATED_HISTORY.APP_NUMBER';
|
||||
|
||||
/** the column name for the APP_TITLE field */
|
||||
const APP_TITLE = 'LIST_PARTICIPATED_HISTORY.APP_TITLE';
|
||||
|
||||
/** the column name for the APP_PRO_TITLE field */
|
||||
const APP_PRO_TITLE = 'LIST_PARTICIPATED_HISTORY.APP_PRO_TITLE';
|
||||
|
||||
/** the column name for the APP_TAS_TITLE field */
|
||||
const APP_TAS_TITLE = 'LIST_PARTICIPATED_HISTORY.APP_TAS_TITLE';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_UID field */
|
||||
const DEL_PREVIOUS_USR_UID = 'LIST_PARTICIPATED_HISTORY.DEL_PREVIOUS_USR_UID';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_USERNAME field */
|
||||
const DEL_PREVIOUS_USR_USERNAME = 'LIST_PARTICIPATED_HISTORY.DEL_PREVIOUS_USR_USERNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_FIRSTNAME field */
|
||||
const DEL_PREVIOUS_USR_FIRSTNAME = 'LIST_PARTICIPATED_HISTORY.DEL_PREVIOUS_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_LASTNAME field */
|
||||
const DEL_PREVIOUS_USR_LASTNAME = 'LIST_PARTICIPATED_HISTORY.DEL_PREVIOUS_USR_LASTNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_USERNAME field */
|
||||
const DEL_CURRENT_USR_USERNAME = 'LIST_PARTICIPATED_HISTORY.DEL_CURRENT_USR_USERNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
|
||||
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_PARTICIPATED_HISTORY.DEL_CURRENT_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
|
||||
const DEL_CURRENT_USR_LASTNAME = 'LIST_PARTICIPATED_HISTORY.DEL_CURRENT_USR_LASTNAME';
|
||||
|
||||
/** the column name for the DEL_DELEGATE_DATE field */
|
||||
const DEL_DELEGATE_DATE = 'LIST_PARTICIPATED_HISTORY.DEL_DELEGATE_DATE';
|
||||
|
||||
/** the column name for the DEL_INIT_DATE field */
|
||||
const DEL_INIT_DATE = 'LIST_PARTICIPATED_HISTORY.DEL_INIT_DATE';
|
||||
|
||||
/** the column name for the DEL_DUE_DATE field */
|
||||
const DEL_DUE_DATE = 'LIST_PARTICIPATED_HISTORY.DEL_DUE_DATE';
|
||||
|
||||
/** the column name for the DEL_PRIORITY field */
|
||||
const DEL_PRIORITY = 'LIST_PARTICIPATED_HISTORY.DEL_PRIORITY';
|
||||
|
||||
/** 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 ('AppUid', 'DelIndex', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
|
||||
BasePeer::TYPE_COLNAME => array (ListParticipatedHistoryPeer::APP_UID, ListParticipatedHistoryPeer::DEL_INDEX, ListParticipatedHistoryPeer::USR_UID, ListParticipatedHistoryPeer::TAS_UID, ListParticipatedHistoryPeer::PRO_UID, ListParticipatedHistoryPeer::APP_NUMBER, ListParticipatedHistoryPeer::APP_TITLE, ListParticipatedHistoryPeer::APP_PRO_TITLE, ListParticipatedHistoryPeer::APP_TAS_TITLE, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_UID, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_USERNAME, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_LASTNAME, ListParticipatedHistoryPeer::DEL_CURRENT_USR_USERNAME, ListParticipatedHistoryPeer::DEL_CURRENT_USR_FIRSTNAME, ListParticipatedHistoryPeer::DEL_CURRENT_USR_LASTNAME, ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, ListParticipatedHistoryPeer::DEL_INIT_DATE, ListParticipatedHistoryPeer::DEL_DUE_DATE, ListParticipatedHistoryPeer::DEL_PRIORITY, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'DEL_INDEX', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, )
|
||||
);
|
||||
|
||||
/**
|
||||
* 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 ('AppUid' => 0, 'DelIndex' => 1, 'UsrUid' => 2, 'TasUid' => 3, 'ProUid' => 4, 'AppNumber' => 5, 'AppTitle' => 6, 'AppProTitle' => 7, 'AppTasTitle' => 8, 'DelPreviousUsrUid' => 9, 'DelPreviousUsrUsername' => 10, 'DelPreviousUsrFirstname' => 11, 'DelPreviousUsrLastname' => 12, 'DelCurrentUsrUsername' => 13, 'DelCurrentUsrFirstname' => 14, 'DelCurrentUsrLastname' => 15, 'DelDelegateDate' => 16, 'DelInitDate' => 17, 'DelDueDate' => 18, 'DelPriority' => 19, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListParticipatedHistoryPeer::APP_UID => 0, ListParticipatedHistoryPeer::DEL_INDEX => 1, ListParticipatedHistoryPeer::USR_UID => 2, ListParticipatedHistoryPeer::TAS_UID => 3, ListParticipatedHistoryPeer::PRO_UID => 4, ListParticipatedHistoryPeer::APP_NUMBER => 5, ListParticipatedHistoryPeer::APP_TITLE => 6, ListParticipatedHistoryPeer::APP_PRO_TITLE => 7, ListParticipatedHistoryPeer::APP_TAS_TITLE => 8, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_UID => 9, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_USERNAME => 10, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_FIRSTNAME => 11, ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_LASTNAME => 12, ListParticipatedHistoryPeer::DEL_CURRENT_USR_USERNAME => 13, ListParticipatedHistoryPeer::DEL_CURRENT_USR_FIRSTNAME => 14, ListParticipatedHistoryPeer::DEL_CURRENT_USR_LASTNAME => 15, ListParticipatedHistoryPeer::DEL_DELEGATE_DATE => 16, ListParticipatedHistoryPeer::DEL_INIT_DATE => 17, ListParticipatedHistoryPeer::DEL_DUE_DATE => 18, ListParticipatedHistoryPeer::DEL_PRIORITY => 19, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'USR_UID' => 2, 'TAS_UID' => 3, 'PRO_UID' => 4, 'APP_NUMBER' => 5, 'APP_TITLE' => 6, 'APP_PRO_TITLE' => 7, 'APP_TAS_TITLE' => 8, 'DEL_PREVIOUS_USR_UID' => 9, 'DEL_PREVIOUS_USR_USERNAME' => 10, 'DEL_PREVIOUS_USR_FIRSTNAME' => 11, 'DEL_PREVIOUS_USR_LASTNAME' => 12, 'DEL_CURRENT_USR_USERNAME' => 13, 'DEL_CURRENT_USR_FIRSTNAME' => 14, 'DEL_CURRENT_USR_LASTNAME' => 15, 'DEL_DELEGATE_DATE' => 16, 'DEL_INIT_DATE' => 17, 'DEL_DUE_DATE' => 18, 'DEL_PRIORITY' => 19, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, )
|
||||
);
|
||||
|
||||
/**
|
||||
* @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/ListParticipatedHistoryMapBuilder.php';
|
||||
return BasePeer::getMapBuilder('classes.model.map.ListParticipatedHistoryMapBuilder');
|
||||
}
|
||||
/**
|
||||
* 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 = ListParticipatedHistoryPeer::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. ListParticipatedHistoryPeer::COLUMN_NAME).
|
||||
* @return string
|
||||
*/
|
||||
public static function alias($alias, $column)
|
||||
{
|
||||
return str_replace(ListParticipatedHistoryPeer::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(ListParticipatedHistoryPeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_INDEX);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::TAS_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::PRO_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_NUMBER);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_PRO_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::APP_TAS_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_CURRENT_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_CURRENT_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_CURRENT_USR_LASTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_DELEGATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_INIT_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_DUE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PRIORITY);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(LIST_PARTICIPATED_HISTORY.APP_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_PARTICIPATED_HISTORY.APP_UID)';
|
||||
|
||||
/**
|
||||
* 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(ListParticipatedHistoryPeer::COUNT_DISTINCT);
|
||||
} else {
|
||||
$criteria->addSelectColumn(ListParticipatedHistoryPeer::COUNT);
|
||||
}
|
||||
|
||||
// just in case we're grouping: add those columns to the select statement
|
||||
foreach ($criteria->getGroupByColumns() as $column) {
|
||||
$criteria->addSelectColumn($column);
|
||||
}
|
||||
|
||||
$rs = ListParticipatedHistoryPeer::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 ListParticipatedHistory
|
||||
* @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 = ListParticipatedHistoryPeer::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 ListParticipatedHistoryPeer::populateObjects(ListParticipatedHistoryPeer::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;
|
||||
ListParticipatedHistoryPeer::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 = ListParticipatedHistoryPeer::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 ListParticipatedHistoryPeer::CLASS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform an INSERT on the database, given a ListParticipatedHistory or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListParticipatedHistory 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 ListParticipatedHistory 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 ListParticipatedHistory or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListParticipatedHistory 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
|
||||
|
||||
$comparison = $criteria->getComparison(ListParticipatedHistoryPeer::APP_UID);
|
||||
$selectCriteria->add(ListParticipatedHistoryPeer::APP_UID, $criteria->remove(ListParticipatedHistoryPeer::APP_UID), $comparison);
|
||||
|
||||
$comparison = $criteria->getComparison(ListParticipatedHistoryPeer::DEL_INDEX);
|
||||
$selectCriteria->add(ListParticipatedHistoryPeer::DEL_INDEX, $criteria->remove(ListParticipatedHistoryPeer::DEL_INDEX), $comparison);
|
||||
|
||||
} 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 LIST_PARTICIPATED_HISTORY 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(ListParticipatedHistoryPeer::TABLE_NAME, $con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform a DELETE on the database, given a ListParticipatedHistory or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ListParticipatedHistory 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(ListParticipatedHistoryPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof ListParticipatedHistory) {
|
||||
|
||||
$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) {
|
||||
|
||||
$vals[0][] = $value[0];
|
||||
$vals[1][] = $value[1];
|
||||
}
|
||||
|
||||
$criteria->add(ListParticipatedHistoryPeer::APP_UID, $vals[0], Criteria::IN);
|
||||
$criteria->add(ListParticipatedHistoryPeer::DEL_INDEX, $vals[1], Criteria::IN);
|
||||
}
|
||||
|
||||
// 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 ListParticipatedHistory 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 ListParticipatedHistory $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(ListParticipatedHistory $obj, $cols = null)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if ($cols) {
|
||||
$dbMap = Propel::getDatabaseMap(ListParticipatedHistoryPeer::DATABASE_NAME);
|
||||
$tableMap = $dbMap->getTable(ListParticipatedHistoryPeer::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(ListParticipatedHistoryPeer::DATABASE_NAME, ListParticipatedHistoryPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve object using using composite pkey values.
|
||||
* @param string $app_uid
|
||||
* @param int $del_index
|
||||
* @param Connection $con
|
||||
* @return ListParticipatedHistory
|
||||
*/
|
||||
public static function retrieveByPK($app_uid, $del_index, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(ListParticipatedHistoryPeer::APP_UID, $app_uid);
|
||||
$criteria->add(ListParticipatedHistoryPeer::DEL_INDEX, $del_index);
|
||||
$v = ListParticipatedHistoryPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) ? $v[0] : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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 {
|
||||
BaseListParticipatedHistoryPeer::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/ListParticipatedHistoryMapBuilder.php';
|
||||
Propel::registerMapBuilder('classes.model.map.ListParticipatedHistoryMapBuilder');
|
||||
}
|
||||
|
||||
1534
workflow/engine/classes/model/om/BaseListParticipatedLast.php
Normal file
1534
workflow/engine/classes/model/om/BaseListParticipatedLast.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,637 @@
|
||||
<?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 ListParticipatedLastPeer::getOMClass()
|
||||
include_once 'classes/model/ListParticipatedLast.php';
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'LIST_PARTICIPATED_LAST' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListParticipatedLastPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
const DATABASE_NAME = 'workflow';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'LIST_PARTICIPATED_LAST';
|
||||
|
||||
/** A class that can be returned by this peer. */
|
||||
const CLASS_DEFAULT = 'classes.model.ListParticipatedLast';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 17;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'LIST_PARTICIPATED_LAST.APP_UID';
|
||||
|
||||
/** the column name for the USR_UID field */
|
||||
const USR_UID = 'LIST_PARTICIPATED_LAST.USR_UID';
|
||||
|
||||
/** the column name for the TAS_UID field */
|
||||
const TAS_UID = 'LIST_PARTICIPATED_LAST.TAS_UID';
|
||||
|
||||
/** the column name for the PRO_UID field */
|
||||
const PRO_UID = 'LIST_PARTICIPATED_LAST.PRO_UID';
|
||||
|
||||
/** the column name for the APP_NUMBER field */
|
||||
const APP_NUMBER = 'LIST_PARTICIPATED_LAST.APP_NUMBER';
|
||||
|
||||
/** the column name for the APP_TITLE field */
|
||||
const APP_TITLE = 'LIST_PARTICIPATED_LAST.APP_TITLE';
|
||||
|
||||
/** the column name for the APP_PRO_TITLE field */
|
||||
const APP_PRO_TITLE = 'LIST_PARTICIPATED_LAST.APP_PRO_TITLE';
|
||||
|
||||
/** the column name for the APP_TAS_TITLE field */
|
||||
const APP_TAS_TITLE = 'LIST_PARTICIPATED_LAST.APP_TAS_TITLE';
|
||||
|
||||
/** the column name for the DEL_INDEX field */
|
||||
const DEL_INDEX = 'LIST_PARTICIPATED_LAST.DEL_INDEX';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_UID field */
|
||||
const DEL_PREVIOUS_USR_UID = 'LIST_PARTICIPATED_LAST.DEL_PREVIOUS_USR_UID';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_USERNAME field */
|
||||
const DEL_PREVIOUS_USR_USERNAME = 'LIST_PARTICIPATED_LAST.DEL_PREVIOUS_USR_USERNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_FIRSTNAME field */
|
||||
const DEL_PREVIOUS_USR_FIRSTNAME = 'LIST_PARTICIPATED_LAST.DEL_PREVIOUS_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_LASTNAME field */
|
||||
const DEL_PREVIOUS_USR_LASTNAME = 'LIST_PARTICIPATED_LAST.DEL_PREVIOUS_USR_LASTNAME';
|
||||
|
||||
/** the column name for the DEL_DELEGATE_DATE field */
|
||||
const DEL_DELEGATE_DATE = 'LIST_PARTICIPATED_LAST.DEL_DELEGATE_DATE';
|
||||
|
||||
/** the column name for the DEL_INIT_DATE field */
|
||||
const DEL_INIT_DATE = 'LIST_PARTICIPATED_LAST.DEL_INIT_DATE';
|
||||
|
||||
/** the column name for the DEL_DUE_DATE field */
|
||||
const DEL_DUE_DATE = 'LIST_PARTICIPATED_LAST.DEL_DUE_DATE';
|
||||
|
||||
/** the column name for the DEL_PRIORITY field */
|
||||
const DEL_PRIORITY = 'LIST_PARTICIPATED_LAST.DEL_PRIORITY';
|
||||
|
||||
/** 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 ('AppUid', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'DelIndex', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
|
||||
BasePeer::TYPE_COLNAME => array (ListParticipatedLastPeer::APP_UID, ListParticipatedLastPeer::USR_UID, ListParticipatedLastPeer::TAS_UID, ListParticipatedLastPeer::PRO_UID, ListParticipatedLastPeer::APP_NUMBER, ListParticipatedLastPeer::APP_TITLE, ListParticipatedLastPeer::APP_PRO_TITLE, ListParticipatedLastPeer::APP_TAS_TITLE, ListParticipatedLastPeer::DEL_INDEX, ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID, ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME, ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME, ListParticipatedLastPeer::DEL_DELEGATE_DATE, ListParticipatedLastPeer::DEL_INIT_DATE, ListParticipatedLastPeer::DEL_DUE_DATE, ListParticipatedLastPeer::DEL_PRIORITY, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'DEL_INDEX', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
|
||||
);
|
||||
|
||||
/**
|
||||
* 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 ('AppUid' => 0, 'UsrUid' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'DelIndex' => 8, 'DelPreviousUsrUid' => 9, 'DelPreviousUsrUsername' => 10, 'DelPreviousUsrFirstname' => 11, 'DelPreviousUsrLastname' => 12, 'DelDelegateDate' => 13, 'DelInitDate' => 14, 'DelDueDate' => 15, 'DelPriority' => 16, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListParticipatedLastPeer::APP_UID => 0, ListParticipatedLastPeer::USR_UID => 1, ListParticipatedLastPeer::TAS_UID => 2, ListParticipatedLastPeer::PRO_UID => 3, ListParticipatedLastPeer::APP_NUMBER => 4, ListParticipatedLastPeer::APP_TITLE => 5, ListParticipatedLastPeer::APP_PRO_TITLE => 6, ListParticipatedLastPeer::APP_TAS_TITLE => 7, ListParticipatedLastPeer::DEL_INDEX => 8, ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID => 9, ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME => 10, ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME => 11, ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME => 12, ListParticipatedLastPeer::DEL_DELEGATE_DATE => 13, ListParticipatedLastPeer::DEL_INIT_DATE => 14, ListParticipatedLastPeer::DEL_DUE_DATE => 15, ListParticipatedLastPeer::DEL_PRIORITY => 16, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'USR_UID' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'DEL_INDEX' => 8, 'DEL_PREVIOUS_USR_UID' => 9, 'DEL_PREVIOUS_USR_USERNAME' => 10, 'DEL_PREVIOUS_USR_FIRSTNAME' => 11, 'DEL_PREVIOUS_USR_LASTNAME' => 12, 'DEL_DELEGATE_DATE' => 13, 'DEL_INIT_DATE' => 14, 'DEL_DUE_DATE' => 15, 'DEL_PRIORITY' => 16, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
|
||||
);
|
||||
|
||||
/**
|
||||
* @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/ListParticipatedLastMapBuilder.php';
|
||||
return BasePeer::getMapBuilder('classes.model.map.ListParticipatedLastMapBuilder');
|
||||
}
|
||||
/**
|
||||
* 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 = ListParticipatedLastPeer::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. ListParticipatedLastPeer::COLUMN_NAME).
|
||||
* @return string
|
||||
*/
|
||||
public static function alias($alias, $column)
|
||||
{
|
||||
return str_replace(ListParticipatedLastPeer::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(ListParticipatedLastPeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::TAS_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::PRO_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_NUMBER);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_PRO_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TAS_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INDEX);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DELEGATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INIT_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DUE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PRIORITY);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(LIST_PARTICIPATED_LAST.APP_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_PARTICIPATED_LAST.APP_UID)';
|
||||
|
||||
/**
|
||||
* 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(ListParticipatedLastPeer::COUNT_DISTINCT);
|
||||
} else {
|
||||
$criteria->addSelectColumn(ListParticipatedLastPeer::COUNT);
|
||||
}
|
||||
|
||||
// just in case we're grouping: add those columns to the select statement
|
||||
foreach ($criteria->getGroupByColumns() as $column) {
|
||||
$criteria->addSelectColumn($column);
|
||||
}
|
||||
|
||||
$rs = ListParticipatedLastPeer::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 ListParticipatedLast
|
||||
* @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 = ListParticipatedLastPeer::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 ListParticipatedLastPeer::populateObjects(ListParticipatedLastPeer::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;
|
||||
ListParticipatedLastPeer::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 = ListParticipatedLastPeer::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 ListParticipatedLastPeer::CLASS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform an INSERT on the database, given a ListParticipatedLast or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListParticipatedLast 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 ListParticipatedLast 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 ListParticipatedLast or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListParticipatedLast 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
|
||||
|
||||
$comparison = $criteria->getComparison(ListParticipatedLastPeer::APP_UID);
|
||||
$selectCriteria->add(ListParticipatedLastPeer::APP_UID, $criteria->remove(ListParticipatedLastPeer::APP_UID), $comparison);
|
||||
|
||||
$comparison = $criteria->getComparison(ListParticipatedLastPeer::USR_UID);
|
||||
$selectCriteria->add(ListParticipatedLastPeer::USR_UID, $criteria->remove(ListParticipatedLastPeer::USR_UID), $comparison);
|
||||
|
||||
} 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 LIST_PARTICIPATED_LAST 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(ListParticipatedLastPeer::TABLE_NAME, $con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform a DELETE on the database, given a ListParticipatedLast or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ListParticipatedLast 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(ListParticipatedLastPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof ListParticipatedLast) {
|
||||
|
||||
$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) {
|
||||
|
||||
$vals[0][] = $value[0];
|
||||
$vals[1][] = $value[1];
|
||||
}
|
||||
|
||||
$criteria->add(ListParticipatedLastPeer::APP_UID, $vals[0], Criteria::IN);
|
||||
$criteria->add(ListParticipatedLastPeer::USR_UID, $vals[1], Criteria::IN);
|
||||
}
|
||||
|
||||
// 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 ListParticipatedLast 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 ListParticipatedLast $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(ListParticipatedLast $obj, $cols = null)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if ($cols) {
|
||||
$dbMap = Propel::getDatabaseMap(ListParticipatedLastPeer::DATABASE_NAME);
|
||||
$tableMap = $dbMap->getTable(ListParticipatedLastPeer::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(ListParticipatedLastPeer::DATABASE_NAME, ListParticipatedLastPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve object using using composite pkey values.
|
||||
* @param string $app_uid
|
||||
* @param string $usr_uid
|
||||
* @param Connection $con
|
||||
* @return ListParticipatedLast
|
||||
*/
|
||||
public static function retrieveByPK($app_uid, $usr_uid, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
|
||||
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
|
||||
$v = ListParticipatedLastPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) ? $v[0] : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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 {
|
||||
BaseListParticipatedLastPeer::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/ListParticipatedLastMapBuilder.php';
|
||||
Propel::registerMapBuilder('classes.model.map.ListParticipatedLastMapBuilder');
|
||||
}
|
||||
|
||||
1448
workflow/engine/classes/model/om/BaseListUnassigned.php
Normal file
1448
workflow/engine/classes/model/om/BaseListUnassigned.php
Normal file
File diff suppressed because it is too large
Load Diff
701
workflow/engine/classes/model/om/BaseListUnassignedGroup.php
Normal file
701
workflow/engine/classes/model/om/BaseListUnassignedGroup.php
Normal file
@@ -0,0 +1,701 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/om/BaseObject.php';
|
||||
|
||||
require_once 'propel/om/Persistent.php';
|
||||
|
||||
|
||||
include_once 'propel/util/Criteria.php';
|
||||
|
||||
include_once 'classes/model/ListUnassignedGroupPeer.php';
|
||||
|
||||
/**
|
||||
* Base class that represents a row from the 'LIST_UNASSIGNED_GROUP' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListUnassignedGroup 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 ListUnassignedGroupPeer
|
||||
*/
|
||||
protected static $peer;
|
||||
|
||||
/**
|
||||
* The value for the una_uid field.
|
||||
* @var string
|
||||
*/
|
||||
protected $una_uid = '';
|
||||
|
||||
/**
|
||||
* The value for the usr_uid field.
|
||||
* @var string
|
||||
*/
|
||||
protected $usr_uid = '';
|
||||
|
||||
/**
|
||||
* The value for the type field.
|
||||
* @var string
|
||||
*/
|
||||
protected $type = '';
|
||||
|
||||
/**
|
||||
* The value for the typ_uid field.
|
||||
* @var string
|
||||
*/
|
||||
protected $typ_uid = '';
|
||||
|
||||
/**
|
||||
* 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 [una_uid] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnaUid()
|
||||
{
|
||||
|
||||
return $this->una_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [usr_uid] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUsrUid()
|
||||
{
|
||||
|
||||
return $this->usr_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [type] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [typ_uid] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTypUid()
|
||||
{
|
||||
|
||||
return $this->typ_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [una_uid] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setUnaUid($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->una_uid !== $v || $v === '') {
|
||||
$this->una_uid = $v;
|
||||
$this->modifiedColumns[] = ListUnassignedGroupPeer::UNA_UID;
|
||||
}
|
||||
|
||||
} // setUnaUid()
|
||||
|
||||
/**
|
||||
* Set the value of [usr_uid] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setUsrUid($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->usr_uid !== $v || $v === '') {
|
||||
$this->usr_uid = $v;
|
||||
$this->modifiedColumns[] = ListUnassignedGroupPeer::USR_UID;
|
||||
}
|
||||
|
||||
} // setUsrUid()
|
||||
|
||||
/**
|
||||
* Set the value of [type] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setType($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->type !== $v || $v === '') {
|
||||
$this->type = $v;
|
||||
$this->modifiedColumns[] = ListUnassignedGroupPeer::TYPE;
|
||||
}
|
||||
|
||||
} // setType()
|
||||
|
||||
/**
|
||||
* Set the value of [typ_uid] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setTypUid($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->typ_uid !== $v || $v === '') {
|
||||
$this->typ_uid = $v;
|
||||
$this->modifiedColumns[] = ListUnassignedGroupPeer::TYP_UID;
|
||||
}
|
||||
|
||||
} // setTypUid()
|
||||
|
||||
/**
|
||||
* 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->una_uid = $rs->getString($startcol + 0);
|
||||
|
||||
$this->usr_uid = $rs->getString($startcol + 1);
|
||||
|
||||
$this->type = $rs->getString($startcol + 2);
|
||||
|
||||
$this->typ_uid = $rs->getString($startcol + 3);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 4; // 4 = ListUnassignedGroupPeer::NUM_COLUMNS - ListUnassignedGroupPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating ListUnassignedGroup 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(ListUnassignedGroupPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
try {
|
||||
$con->begin();
|
||||
ListUnassignedGroupPeer::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(ListUnassignedGroupPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
try {
|
||||
$con->begin();
|
||||
$affectedRows = $this->doSave($con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the object in the database.
|
||||
*
|
||||
* If the object is new, it inserts it; otherwise an update is performed.
|
||||
* All related objects are also updated in this method.
|
||||
*
|
||||
* @param Connection $con
|
||||
* @return int The number of rows affected by this insert/update and any referring
|
||||
* @throws PropelException
|
||||
* @see save()
|
||||
*/
|
||||
protected function doSave($con)
|
||||
{
|
||||
$affectedRows = 0; // initialize var to track total num of affected rows
|
||||
if (!$this->alreadyInSave) {
|
||||
$this->alreadyInSave = true;
|
||||
|
||||
|
||||
// If this object has been modified, then save it to the database.
|
||||
if ($this->isModified()) {
|
||||
if ($this->isNew()) {
|
||||
$pk = ListUnassignedGroupPeer::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 += ListUnassignedGroupPeer::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();
|
||||
|
||||
|
||||
if (($retval = ListUnassignedGroupPeer::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 = ListUnassignedGroupPeer::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->getUnaUid();
|
||||
break;
|
||||
case 1:
|
||||
return $this->getUsrUid();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getType();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getTypUid();
|
||||
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 = ListUnassignedGroupPeer::getFieldNames($keyType);
|
||||
$result = array(
|
||||
$keys[0] => $this->getUnaUid(),
|
||||
$keys[1] => $this->getUsrUid(),
|
||||
$keys[2] => $this->getType(),
|
||||
$keys[3] => $this->getTypUid(),
|
||||
);
|
||||
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 = ListUnassignedGroupPeer::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->setUnaUid($value);
|
||||
break;
|
||||
case 1:
|
||||
$this->setUsrUid($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setType($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setTypUid($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 = ListUnassignedGroupPeer::getFieldNames($keyType);
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) {
|
||||
$this->setUnaUid($arr[$keys[0]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[1], $arr)) {
|
||||
$this->setUsrUid($arr[$keys[1]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[2], $arr)) {
|
||||
$this->setType($arr[$keys[2]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[3], $arr)) {
|
||||
$this->setTypUid($arr[$keys[3]]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a Criteria object containing the values of all modified columns in this object.
|
||||
*
|
||||
* @return Criteria The Criteria object containing all modified values.
|
||||
*/
|
||||
public function buildCriteria()
|
||||
{
|
||||
$criteria = new Criteria(ListUnassignedGroupPeer::DATABASE_NAME);
|
||||
|
||||
if ($this->isColumnModified(ListUnassignedGroupPeer::UNA_UID)) {
|
||||
$criteria->add(ListUnassignedGroupPeer::UNA_UID, $this->una_uid);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(ListUnassignedGroupPeer::USR_UID)) {
|
||||
$criteria->add(ListUnassignedGroupPeer::USR_UID, $this->usr_uid);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(ListUnassignedGroupPeer::TYPE)) {
|
||||
$criteria->add(ListUnassignedGroupPeer::TYPE, $this->type);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(ListUnassignedGroupPeer::TYP_UID)) {
|
||||
$criteria->add(ListUnassignedGroupPeer::TYP_UID, $this->typ_uid);
|
||||
}
|
||||
|
||||
|
||||
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(ListUnassignedGroupPeer::DATABASE_NAME);
|
||||
|
||||
$criteria->add(ListUnassignedGroupPeer::UNA_UID, $this->una_uid);
|
||||
$criteria->add(ListUnassignedGroupPeer::USR_UID, $this->usr_uid);
|
||||
$criteria->add(ListUnassignedGroupPeer::TYPE, $this->type);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the composite primary key for this object.
|
||||
* The array elements will be in same order as specified in XML.
|
||||
* @return array
|
||||
*/
|
||||
public function getPrimaryKey()
|
||||
{
|
||||
$pks = array();
|
||||
|
||||
$pks[0] = $this->getUnaUid();
|
||||
|
||||
$pks[1] = $this->getUsrUid();
|
||||
|
||||
$pks[2] = $this->getType();
|
||||
|
||||
return $pks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the [composite] primary key.
|
||||
*
|
||||
* @param array $keys The elements of the composite key (order must match the order in XML file).
|
||||
* @return void
|
||||
*/
|
||||
public function setPrimaryKey($keys)
|
||||
{
|
||||
|
||||
$this->setUnaUid($keys[0]);
|
||||
|
||||
$this->setUsrUid($keys[1]);
|
||||
|
||||
$this->setType($keys[2]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ListUnassignedGroup (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->setTypUid($this->typ_uid);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setUnaUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
$copyObj->setUsrUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
$copyObj->setType(''); // this is a pkey column, so set to default value
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ListUnassignedGroup 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 ListUnassignedGroupPeer
|
||||
*/
|
||||
public function getPeer()
|
||||
{
|
||||
if (self::$peer === null) {
|
||||
self::$peer = new ListUnassignedGroupPeer();
|
||||
}
|
||||
return self::$peer;
|
||||
}
|
||||
}
|
||||
|
||||
579
workflow/engine/classes/model/om/BaseListUnassignedGroupPeer.php
Normal file
579
workflow/engine/classes/model/om/BaseListUnassignedGroupPeer.php
Normal file
@@ -0,0 +1,579 @@
|
||||
<?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 ListUnassignedGroupPeer::getOMClass()
|
||||
include_once 'classes/model/ListUnassignedGroup.php';
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'LIST_UNASSIGNED_GROUP' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListUnassignedGroupPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
const DATABASE_NAME = 'workflow';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'LIST_UNASSIGNED_GROUP';
|
||||
|
||||
/** A class that can be returned by this peer. */
|
||||
const CLASS_DEFAULT = 'classes.model.ListUnassignedGroup';
|
||||
|
||||
/** 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 UNA_UID field */
|
||||
const UNA_UID = 'LIST_UNASSIGNED_GROUP.UNA_UID';
|
||||
|
||||
/** the column name for the USR_UID field */
|
||||
const USR_UID = 'LIST_UNASSIGNED_GROUP.USR_UID';
|
||||
|
||||
/** the column name for the TYPE field */
|
||||
const TYPE = 'LIST_UNASSIGNED_GROUP.TYPE';
|
||||
|
||||
/** the column name for the TYP_UID field */
|
||||
const TYP_UID = 'LIST_UNASSIGNED_GROUP.TYP_UID';
|
||||
|
||||
/** 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 ('UnaUid', 'UsrUid', 'Type', 'TypUid', ),
|
||||
BasePeer::TYPE_COLNAME => array (ListUnassignedGroupPeer::UNA_UID, ListUnassignedGroupPeer::USR_UID, ListUnassignedGroupPeer::TYPE, ListUnassignedGroupPeer::TYP_UID, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('UNA_UID', 'USR_UID', 'TYPE', 'TYP_UID', ),
|
||||
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 ('UnaUid' => 0, 'UsrUid' => 1, 'Type' => 2, 'TypUid' => 3, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListUnassignedGroupPeer::UNA_UID => 0, ListUnassignedGroupPeer::USR_UID => 1, ListUnassignedGroupPeer::TYPE => 2, ListUnassignedGroupPeer::TYP_UID => 3, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('UNA_UID' => 0, 'USR_UID' => 1, 'TYPE' => 2, 'TYP_UID' => 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/ListUnassignedGroupMapBuilder.php';
|
||||
return BasePeer::getMapBuilder('classes.model.map.ListUnassignedGroupMapBuilder');
|
||||
}
|
||||
/**
|
||||
* 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 = ListUnassignedGroupPeer::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. ListUnassignedGroupPeer::COLUMN_NAME).
|
||||
* @return string
|
||||
*/
|
||||
public static function alias($alias, $column)
|
||||
{
|
||||
return str_replace(ListUnassignedGroupPeer::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(ListUnassignedGroupPeer::UNA_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedGroupPeer::USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedGroupPeer::TYPE);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedGroupPeer::TYP_UID);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(LIST_UNASSIGNED_GROUP.UNA_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_UNASSIGNED_GROUP.UNA_UID)';
|
||||
|
||||
/**
|
||||
* 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(ListUnassignedGroupPeer::COUNT_DISTINCT);
|
||||
} else {
|
||||
$criteria->addSelectColumn(ListUnassignedGroupPeer::COUNT);
|
||||
}
|
||||
|
||||
// just in case we're grouping: add those columns to the select statement
|
||||
foreach ($criteria->getGroupByColumns() as $column) {
|
||||
$criteria->addSelectColumn($column);
|
||||
}
|
||||
|
||||
$rs = ListUnassignedGroupPeer::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 ListUnassignedGroup
|
||||
* @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 = ListUnassignedGroupPeer::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 ListUnassignedGroupPeer::populateObjects(ListUnassignedGroupPeer::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;
|
||||
ListUnassignedGroupPeer::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 = ListUnassignedGroupPeer::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 ListUnassignedGroupPeer::CLASS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform an INSERT on the database, given a ListUnassignedGroup or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListUnassignedGroup 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 ListUnassignedGroup 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 ListUnassignedGroup or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListUnassignedGroup 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
|
||||
|
||||
$comparison = $criteria->getComparison(ListUnassignedGroupPeer::UNA_UID);
|
||||
$selectCriteria->add(ListUnassignedGroupPeer::UNA_UID, $criteria->remove(ListUnassignedGroupPeer::UNA_UID), $comparison);
|
||||
|
||||
$comparison = $criteria->getComparison(ListUnassignedGroupPeer::USR_UID);
|
||||
$selectCriteria->add(ListUnassignedGroupPeer::USR_UID, $criteria->remove(ListUnassignedGroupPeer::USR_UID), $comparison);
|
||||
|
||||
$comparison = $criteria->getComparison(ListUnassignedGroupPeer::TYPE);
|
||||
$selectCriteria->add(ListUnassignedGroupPeer::TYPE, $criteria->remove(ListUnassignedGroupPeer::TYPE), $comparison);
|
||||
|
||||
} 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 LIST_UNASSIGNED_GROUP 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(ListUnassignedGroupPeer::TABLE_NAME, $con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform a DELETE on the database, given a ListUnassignedGroup or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ListUnassignedGroup 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(ListUnassignedGroupPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof ListUnassignedGroup) {
|
||||
|
||||
$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) {
|
||||
|
||||
$vals[0][] = $value[0];
|
||||
$vals[1][] = $value[1];
|
||||
$vals[2][] = $value[2];
|
||||
}
|
||||
|
||||
$criteria->add(ListUnassignedGroupPeer::UNA_UID, $vals[0], Criteria::IN);
|
||||
$criteria->add(ListUnassignedGroupPeer::USR_UID, $vals[1], Criteria::IN);
|
||||
$criteria->add(ListUnassignedGroupPeer::TYPE, $vals[2], Criteria::IN);
|
||||
}
|
||||
|
||||
// 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 ListUnassignedGroup 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 ListUnassignedGroup $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(ListUnassignedGroup $obj, $cols = null)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if ($cols) {
|
||||
$dbMap = Propel::getDatabaseMap(ListUnassignedGroupPeer::DATABASE_NAME);
|
||||
$tableMap = $dbMap->getTable(ListUnassignedGroupPeer::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(ListUnassignedGroupPeer::DATABASE_NAME, ListUnassignedGroupPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve object using using composite pkey values.
|
||||
* @param string $una_uid
|
||||
* @param string $usr_uid
|
||||
* @param string $type
|
||||
* @param Connection $con
|
||||
* @return ListUnassignedGroup
|
||||
*/
|
||||
public static function retrieveByPK($una_uid, $usr_uid, $type, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(ListUnassignedGroupPeer::UNA_UID, $una_uid);
|
||||
$criteria->add(ListUnassignedGroupPeer::USR_UID, $usr_uid);
|
||||
$criteria->add(ListUnassignedGroupPeer::TYPE, $type);
|
||||
$v = ListUnassignedGroupPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) ? $v[0] : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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 {
|
||||
BaseListUnassignedGroupPeer::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/ListUnassignedGroupMapBuilder.php';
|
||||
Propel::registerMapBuilder('classes.model.map.ListUnassignedGroupMapBuilder');
|
||||
}
|
||||
|
||||
632
workflow/engine/classes/model/om/BaseListUnassignedPeer.php
Normal file
632
workflow/engine/classes/model/om/BaseListUnassignedPeer.php
Normal file
@@ -0,0 +1,632 @@
|
||||
<?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 ListUnassignedPeer::getOMClass()
|
||||
include_once 'classes/model/ListUnassigned.php';
|
||||
|
||||
/**
|
||||
* Base static class for performing query and update operations on the 'LIST_UNASSIGNED' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseListUnassignedPeer
|
||||
{
|
||||
|
||||
/** the default database name for this class */
|
||||
const DATABASE_NAME = 'workflow';
|
||||
|
||||
/** the table name for this class */
|
||||
const TABLE_NAME = 'LIST_UNASSIGNED';
|
||||
|
||||
/** A class that can be returned by this peer. */
|
||||
const CLASS_DEFAULT = 'classes.model.ListUnassigned';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 16;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
||||
|
||||
/** the column name for the APP_UID field */
|
||||
const APP_UID = 'LIST_UNASSIGNED.APP_UID';
|
||||
|
||||
/** the column name for the UNA_UID field */
|
||||
const UNA_UID = 'LIST_UNASSIGNED.UNA_UID';
|
||||
|
||||
/** the column name for the TAS_UID field */
|
||||
const TAS_UID = 'LIST_UNASSIGNED.TAS_UID';
|
||||
|
||||
/** the column name for the PRO_UID field */
|
||||
const PRO_UID = 'LIST_UNASSIGNED.PRO_UID';
|
||||
|
||||
/** the column name for the APP_NUMBER field */
|
||||
const APP_NUMBER = 'LIST_UNASSIGNED.APP_NUMBER';
|
||||
|
||||
/** the column name for the APP_TITLE field */
|
||||
const APP_TITLE = 'LIST_UNASSIGNED.APP_TITLE';
|
||||
|
||||
/** the column name for the APP_PRO_TITLE field */
|
||||
const APP_PRO_TITLE = 'LIST_UNASSIGNED.APP_PRO_TITLE';
|
||||
|
||||
/** the column name for the APP_TAS_TITLE field */
|
||||
const APP_TAS_TITLE = 'LIST_UNASSIGNED.APP_TAS_TITLE';
|
||||
|
||||
/** the column name for the APP_PREVIOUS_USR_USERNAME field */
|
||||
const APP_PREVIOUS_USR_USERNAME = 'LIST_UNASSIGNED.APP_PREVIOUS_USR_USERNAME';
|
||||
|
||||
/** the column name for the APP_PREVIOUS_USR_FIRSTNAME field */
|
||||
const APP_PREVIOUS_USR_FIRSTNAME = 'LIST_UNASSIGNED.APP_PREVIOUS_USR_FIRSTNAME';
|
||||
|
||||
/** the column name for the APP_PREVIOUS_USR_LASTNAME field */
|
||||
const APP_PREVIOUS_USR_LASTNAME = 'LIST_UNASSIGNED.APP_PREVIOUS_USR_LASTNAME';
|
||||
|
||||
/** the column name for the DEL_INDEX field */
|
||||
const DEL_INDEX = 'LIST_UNASSIGNED.DEL_INDEX';
|
||||
|
||||
/** the column name for the DEL_PREVIOUS_USR_UID field */
|
||||
const DEL_PREVIOUS_USR_UID = 'LIST_UNASSIGNED.DEL_PREVIOUS_USR_UID';
|
||||
|
||||
/** the column name for the DEL_DELEGATE_DATE field */
|
||||
const DEL_DELEGATE_DATE = 'LIST_UNASSIGNED.DEL_DELEGATE_DATE';
|
||||
|
||||
/** the column name for the DEL_DUE_DATE field */
|
||||
const DEL_DUE_DATE = 'LIST_UNASSIGNED.DEL_DUE_DATE';
|
||||
|
||||
/** the column name for the DEL_PRIORITY field */
|
||||
const DEL_PRIORITY = 'LIST_UNASSIGNED.DEL_PRIORITY';
|
||||
|
||||
/** 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 ('AppUid', 'UnaUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppPreviousUsrUsername', 'AppPreviousUsrFirstname', 'AppPreviousUsrLastname', 'DelIndex', 'DelPreviousUsrUid', 'DelDelegateDate', 'DelDueDate', 'DelPriority', ),
|
||||
BasePeer::TYPE_COLNAME => array (ListUnassignedPeer::APP_UID, ListUnassignedPeer::UNA_UID, ListUnassignedPeer::TAS_UID, ListUnassignedPeer::PRO_UID, ListUnassignedPeer::APP_NUMBER, ListUnassignedPeer::APP_TITLE, ListUnassignedPeer::APP_PRO_TITLE, ListUnassignedPeer::APP_TAS_TITLE, ListUnassignedPeer::APP_PREVIOUS_USR_USERNAME, ListUnassignedPeer::APP_PREVIOUS_USR_FIRSTNAME, ListUnassignedPeer::APP_PREVIOUS_USR_LASTNAME, ListUnassignedPeer::DEL_INDEX, ListUnassignedPeer::DEL_PREVIOUS_USR_UID, ListUnassignedPeer::DEL_DELEGATE_DATE, ListUnassignedPeer::DEL_DUE_DATE, ListUnassignedPeer::DEL_PRIORITY, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'UNA_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_PREVIOUS_USR_USERNAME', 'APP_PREVIOUS_USR_FIRSTNAME', 'APP_PREVIOUS_USR_LASTNAME', 'DEL_INDEX', 'DEL_PREVIOUS_USR_UID', 'DEL_DELEGATE_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
);
|
||||
|
||||
/**
|
||||
* 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 ('AppUid' => 0, 'UnaUid' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'AppPreviousUsrUsername' => 8, 'AppPreviousUsrFirstname' => 9, 'AppPreviousUsrLastname' => 10, 'DelIndex' => 11, 'DelPreviousUsrUid' => 12, 'DelDelegateDate' => 13, 'DelDueDate' => 14, 'DelPriority' => 15, ),
|
||||
BasePeer::TYPE_COLNAME => array (ListUnassignedPeer::APP_UID => 0, ListUnassignedPeer::UNA_UID => 1, ListUnassignedPeer::TAS_UID => 2, ListUnassignedPeer::PRO_UID => 3, ListUnassignedPeer::APP_NUMBER => 4, ListUnassignedPeer::APP_TITLE => 5, ListUnassignedPeer::APP_PRO_TITLE => 6, ListUnassignedPeer::APP_TAS_TITLE => 7, ListUnassignedPeer::APP_PREVIOUS_USR_USERNAME => 8, ListUnassignedPeer::APP_PREVIOUS_USR_FIRSTNAME => 9, ListUnassignedPeer::APP_PREVIOUS_USR_LASTNAME => 10, ListUnassignedPeer::DEL_INDEX => 11, ListUnassignedPeer::DEL_PREVIOUS_USR_UID => 12, ListUnassignedPeer::DEL_DELEGATE_DATE => 13, ListUnassignedPeer::DEL_DUE_DATE => 14, ListUnassignedPeer::DEL_PRIORITY => 15, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'UNA_UID' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'APP_PREVIOUS_USR_USERNAME' => 8, 'APP_PREVIOUS_USR_FIRSTNAME' => 9, 'APP_PREVIOUS_USR_LASTNAME' => 10, 'DEL_INDEX' => 11, 'DEL_PREVIOUS_USR_UID' => 12, 'DEL_DELEGATE_DATE' => 13, 'DEL_DUE_DATE' => 14, 'DEL_PRIORITY' => 15, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
);
|
||||
|
||||
/**
|
||||
* @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/ListUnassignedMapBuilder.php';
|
||||
return BasePeer::getMapBuilder('classes.model.map.ListUnassignedMapBuilder');
|
||||
}
|
||||
/**
|
||||
* 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 = ListUnassignedPeer::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. ListUnassignedPeer::COLUMN_NAME).
|
||||
* @return string
|
||||
*/
|
||||
public static function alias($alias, $column)
|
||||
{
|
||||
return str_replace(ListUnassignedPeer::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(ListUnassignedPeer::APP_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::UNA_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::TAS_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::PRO_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_NUMBER);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PRO_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_TAS_TITLE);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PREVIOUS_USR_USERNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PREVIOUS_USR_FIRSTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::APP_PREVIOUS_USR_LASTNAME);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_INDEX);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_PREVIOUS_USR_UID);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_DELEGATE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_DUE_DATE);
|
||||
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::DEL_PRIORITY);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(LIST_UNASSIGNED.APP_UID)';
|
||||
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_UNASSIGNED.APP_UID)';
|
||||
|
||||
/**
|
||||
* 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(ListUnassignedPeer::COUNT_DISTINCT);
|
||||
} else {
|
||||
$criteria->addSelectColumn(ListUnassignedPeer::COUNT);
|
||||
}
|
||||
|
||||
// just in case we're grouping: add those columns to the select statement
|
||||
foreach ($criteria->getGroupByColumns() as $column) {
|
||||
$criteria->addSelectColumn($column);
|
||||
}
|
||||
|
||||
$rs = ListUnassignedPeer::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 ListUnassigned
|
||||
* @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 = ListUnassignedPeer::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 ListUnassignedPeer::populateObjects(ListUnassignedPeer::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;
|
||||
ListUnassignedPeer::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 = ListUnassignedPeer::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 ListUnassignedPeer::CLASS_DEFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform an INSERT on the database, given a ListUnassigned or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListUnassigned 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 ListUnassigned 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 ListUnassigned or Criteria object.
|
||||
*
|
||||
* @param mixed $values Criteria or ListUnassigned 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
|
||||
|
||||
$comparison = $criteria->getComparison(ListUnassignedPeer::APP_UID);
|
||||
$selectCriteria->add(ListUnassignedPeer::APP_UID, $criteria->remove(ListUnassignedPeer::APP_UID), $comparison);
|
||||
|
||||
$comparison = $criteria->getComparison(ListUnassignedPeer::UNA_UID);
|
||||
$selectCriteria->add(ListUnassignedPeer::UNA_UID, $criteria->remove(ListUnassignedPeer::UNA_UID), $comparison);
|
||||
|
||||
} 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 LIST_UNASSIGNED 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(ListUnassignedPeer::TABLE_NAME, $con);
|
||||
$con->commit();
|
||||
return $affectedRows;
|
||||
} catch (PropelException $e) {
|
||||
$con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method perform a DELETE on the database, given a ListUnassigned or Criteria object OR a primary key value.
|
||||
*
|
||||
* @param mixed $values Criteria or ListUnassigned 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(ListUnassignedPeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
if ($values instanceof Criteria) {
|
||||
$criteria = clone $values; // rename for clarity
|
||||
} elseif ($values instanceof ListUnassigned) {
|
||||
|
||||
$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) {
|
||||
|
||||
$vals[0][] = $value[0];
|
||||
$vals[1][] = $value[1];
|
||||
}
|
||||
|
||||
$criteria->add(ListUnassignedPeer::APP_UID, $vals[0], Criteria::IN);
|
||||
$criteria->add(ListUnassignedPeer::UNA_UID, $vals[1], Criteria::IN);
|
||||
}
|
||||
|
||||
// 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 ListUnassigned 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 ListUnassigned $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(ListUnassigned $obj, $cols = null)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
if ($cols) {
|
||||
$dbMap = Propel::getDatabaseMap(ListUnassignedPeer::DATABASE_NAME);
|
||||
$tableMap = $dbMap->getTable(ListUnassignedPeer::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(ListUnassignedPeer::DATABASE_NAME, ListUnassignedPeer::TABLE_NAME, $columns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve object using using composite pkey values.
|
||||
* @param string $app_uid
|
||||
* @param string $una_uid
|
||||
* @param Connection $con
|
||||
* @return ListUnassigned
|
||||
*/
|
||||
public static function retrieveByPK($app_uid, $una_uid, $con = null)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||
}
|
||||
$criteria = new Criteria();
|
||||
$criteria->add(ListUnassignedPeer::APP_UID, $app_uid);
|
||||
$criteria->add(ListUnassignedPeer::UNA_UID, $una_uid);
|
||||
$v = ListUnassignedPeer::doSelect($criteria, $con);
|
||||
|
||||
return !empty($v) ? $v[0] : null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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 {
|
||||
BaseListUnassignedPeer::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/ListUnassignedMapBuilder.php';
|
||||
Propel::registerMapBuilder('classes.model.map.ListUnassignedMapBuilder');
|
||||
}
|
||||
|
||||
@@ -3878,5 +3878,295 @@
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" />
|
||||
<column name="GRP_UID" type="VARCHAR" size="32" required="true" default="" />
|
||||
</table>
|
||||
<table name="LIST_INBOX">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="LIST_INBOX"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="88"/>
|
||||
<parameter name="Avg_row_length" value="311"/>
|
||||
<parameter name="Data_length" value="27984"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="7168"/>
|
||||
<parameter name="Data_free" value="564"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Update_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="Inbox list"/>
|
||||
</vendor>
|
||||
<column name="APP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="DEL_INDEX" type="INTEGER" required="true" primaryKey="true" default="0"/>
|
||||
<column name="USR_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
||||
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_UPDATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_DELEGATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="DEL_INIT_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_DUE_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_PRIORITY" type="VARCHAR" size="32" required="true" default="3"/>
|
||||
<index name="indexInboxUser">
|
||||
<index-column name="USR_UID"/>
|
||||
<index-column name="DEL_DELEGATE_DATE"/>
|
||||
<vendor type="mysql">
|
||||
<parameter name="Table" value="LIST_INBOX"/>
|
||||
<parameter name="Non_unique" value="1"/>
|
||||
<parameter name="Key_name" value="indexInboxUser"/>
|
||||
<parameter name="Seq_in_index" value="1"/>
|
||||
</vendor>
|
||||
</index>
|
||||
</table>
|
||||
<table name="LIST_PARTICIPATED_HISTORY">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="LIST_PARTICIPATED_HISTORY"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="88"/>
|
||||
<parameter name="Avg_row_length" value="311"/>
|
||||
<parameter name="Data_length" value="27984"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="7168"/>
|
||||
<parameter name="Data_free" value="564"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Update_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="Participated history list"/>
|
||||
</vendor>
|
||||
<column name="APP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="DEL_INDEX" type="INTEGER" required="true" primaryKey="true" default="0"/>
|
||||
<column name="USR_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
||||
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_CURRENT_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="DEL_CURRENT_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_CURRENT_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_DELEGATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="DEL_INIT_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_DUE_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_PRIORITY" type="VARCHAR" size="32" required="true" default="3"/>
|
||||
<index name="indexInboxUser">
|
||||
<index-column name="USR_UID"/>
|
||||
<index-column name="DEL_DELEGATE_DATE"/>
|
||||
<vendor type="mysql">
|
||||
<parameter name="Table" value="LIST_PARTICIPATED_HISTORY"/>
|
||||
<parameter name="Non_unique" value="1"/>
|
||||
<parameter name="Key_name" value="indexParticipatedUser"/>
|
||||
<parameter name="Seq_in_index" value="1"/>
|
||||
</vendor>
|
||||
</index>
|
||||
</table>
|
||||
<table name="LIST_PARTICIPATED_LAST">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="LIST_PARTICIPATED_LAST"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="88"/>
|
||||
<parameter name="Avg_row_length" value="311"/>
|
||||
<parameter name="Data_length" value="27984"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="7168"/>
|
||||
<parameter name="Data_free" value="564"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Update_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="Participated last list"/>
|
||||
</vendor>
|
||||
<column name="APP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="USR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
||||
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
|
||||
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_DELEGATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="DEL_INIT_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_DUE_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_PRIORITY" type="VARCHAR" size="32" required="true" default="3"/>
|
||||
</table>
|
||||
<table name="LIST_COMPLETED">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="LIST_COMPLETED"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="88"/>
|
||||
<parameter name="Avg_row_length" value="311"/>
|
||||
<parameter name="Data_length" value="27984"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="7168"/>
|
||||
<parameter name="Data_free" value="564"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Update_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="Completed list"/>
|
||||
</vendor>
|
||||
<column name="APP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="USR_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
||||
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_CREATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="APP_FINISH_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
|
||||
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||
<column name="DEL_CURRENT_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="DEL_CURRENT_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_CURRENT_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
</table>
|
||||
|
||||
<table name="LIST_MY_INBOX">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="LIST_MY_INBOX"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="88"/>
|
||||
<parameter name="Avg_row_length" value="311"/>
|
||||
<parameter name="Data_length" value="27984"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="7168"/>
|
||||
<parameter name="Data_free" value="564"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Update_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="My Inbox list"/>
|
||||
</vendor>
|
||||
<column name="APP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="USR_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
||||
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_CREATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="APP_UPDATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="APP_FINISH_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="APP_STATUS" type="VARCHAR" size="100" required="true" default=""/>
|
||||
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
|
||||
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_PREVIOUS_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_CURRENT_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||
<column name="DEL_CURRENT_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="DEL_CURRENT_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_CURRENT_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_DELEGATE_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_INIT_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_DUE_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_PRIORITY" type="VARCHAR" size="32" required="true" default="3"/>
|
||||
</table>
|
||||
<table name="LIST_UNASSIGNED">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="LIST_UNASSIGNED"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="88"/>
|
||||
<parameter name="Avg_row_length" value="311"/>
|
||||
<parameter name="Data_length" value="27984"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="7168"/>
|
||||
<parameter name="Data_free" value="564"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Update_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="Unassiged list"/>
|
||||
</vendor>
|
||||
<column name="APP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="UNA_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="APP_NUMBER" type="INTEGER" required="true" default="0"/>
|
||||
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||
<column name="APP_PREVIOUS_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||
<column name="APP_PREVIOUS_USR_FIRSTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="APP_PREVIOUS_USR_LASTNAME" type="VARCHAR" size="50" default=""/>
|
||||
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
|
||||
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||
<column name="DEL_DELEGATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="DEL_DUE_DATE" type="TIMESTAMP" required="false"/>
|
||||
<column name="DEL_PRIORITY" type="VARCHAR" size="32" required="true" default="3"/>
|
||||
</table>
|
||||
<table name="LIST_UNASSIGNED_GROUP">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="LIST_UNASSIGNED_GROUP"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="88"/>
|
||||
<parameter name="Avg_row_length" value="311"/>
|
||||
<parameter name="Data_length" value="27984"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="7168"/>
|
||||
<parameter name="Data_free" value="564"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Update_time" value="2014-10-10 14:00:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="Unassiged list"/>
|
||||
</vendor>
|
||||
<column name="UNA_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="USR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="TYPE" type="VARCHAR" size="255" required="true" primaryKey="true" default=""/>
|
||||
<column name="TYP_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
</table>
|
||||
</database>
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ CREATE TABLE `INPUT_DOCUMENT`
|
||||
`INP_DOC_DESTINATION_PATH` MEDIUMTEXT,
|
||||
`INP_DOC_TAGS` MEDIUMTEXT,
|
||||
`INP_DOC_TYPE_FILE` VARCHAR(200) default '*.*',
|
||||
`INP_DOC_MAX_FILESIZE` INTEGER default 0 NOT NULL,
|
||||
`INP_DOC_MAX_FILESIZE` INTEGER default 0 NOT NULL,
|
||||
`INP_DOC_MAX_FILESIZE_UNIT` VARCHAR(2) default 'KB' NOT NULL,
|
||||
PRIMARY KEY (`INP_DOC_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Documentation required';
|
||||
@@ -406,8 +406,8 @@ CREATE TABLE `PROCESS`
|
||||
`PRO_TRI_CANCELED` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_TRI_PAUSED` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_TRI_REASSIGNED` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_TRI_UNPAUSED` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_TYPE_PROCESS` VARCHAR(32) default 'PUBLIC' NOT NULL,
|
||||
`PRO_TRI_UNPAUSED` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_TYPE_PROCESS` VARCHAR(32) default 'PUBLIC' NOT NULL,
|
||||
`PRO_SHOW_DELEGATE` TINYINT default 1 NOT NULL,
|
||||
`PRO_SHOW_DYNAFORM` TINYINT default 0 NOT NULL,
|
||||
`PRO_CATEGORY` VARCHAR(48) default '' NOT NULL,
|
||||
@@ -1012,8 +1012,8 @@ CREATE TABLE `FIELDS`
|
||||
`FLD_NULL` TINYINT default 1 NOT NULL,
|
||||
`FLD_AUTO_INCREMENT` TINYINT default 0 NOT NULL,
|
||||
`FLD_KEY` TINYINT default 0 NOT NULL,
|
||||
`FLD_TABLE_INDEX` TINYINT default 0 NOT NULL,
|
||||
`FLD_FOREIGN_KEY` TINYINT default 0 NOT NULL,
|
||||
`FLD_TABLE_INDEX` TINYINT default 0 NOT NULL,
|
||||
`FLD_FOREIGN_KEY` TINYINT default 0,
|
||||
`FLD_FOREIGN_KEY_TABLE` VARCHAR(32) default '' NOT NULL,
|
||||
`FLD_DYN_NAME` VARCHAR(128) default '',
|
||||
`FLD_DYN_UID` VARCHAR(128) default '',
|
||||
@@ -2089,8 +2089,6 @@ CREATE TABLE `PROCESS_VARIABLES`
|
||||
`VAR_ACCEPTED_VALUES` MEDIUMTEXT,
|
||||
PRIMARY KEY (`VAR_UID`)
|
||||
)ENGINE=InnoDB ;
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- APP_TIMEOUT_ACTION_EXECUTED
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -2104,13 +2102,14 @@ CREATE TABLE `APP_TIMEOUT_ACTION_EXECUTED`
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`EXECUTION_DATE` DATETIME,
|
||||
PRIMARY KEY (`APP_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||
|
||||
)ENGINE=InnoDB ;
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- ADDONS_STORE
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `ADDONS_STORE`;
|
||||
|
||||
|
||||
CREATE TABLE `ADDONS_STORE`
|
||||
(
|
||||
`STORE_ID` VARCHAR(32) NOT NULL,
|
||||
@@ -2120,12 +2119,13 @@ CREATE TABLE `ADDONS_STORE`
|
||||
`STORE_LAST_UPDATED` DATETIME,
|
||||
PRIMARY KEY (`STORE_ID`)
|
||||
)ENGINE=InnoDB ;
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- ADDONS_MANAGER
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `ADDONS_MANAGER`;
|
||||
|
||||
|
||||
CREATE TABLE `ADDONS_MANAGER`
|
||||
(
|
||||
`ADDON_ID` VARCHAR(255) NOT NULL,
|
||||
@@ -2147,40 +2147,236 @@ CREATE TABLE `ADDONS_MANAGER`
|
||||
`ADDON_DOWNLOAD_PROGRESS` FLOAT,
|
||||
`ADDON_DOWNLOAD_MD5` VARCHAR(32),
|
||||
PRIMARY KEY (`ADDON_ID`,`STORE_ID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Addons manager';
|
||||
|
||||
|
||||
)ENGINE=InnoDB ;
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LICENSE_MANAGER
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LICENSE_MANAGER`;
|
||||
CREATE TABLE IF NOT EXISTS `LICENSE_MANAGER` (
|
||||
`LICENSE_UID` varchar(32) NOT NULL DEFAULT '',
|
||||
`LICENSE_USER` varchar(150) NOT NULL DEFAULT '0',
|
||||
`LICENSE_START` int(11) NOT NULL DEFAULT '0',
|
||||
`LICENSE_END` int(11) NOT NULL DEFAULT '0',
|
||||
`LICENSE_SPAN` int(11) NOT NULL DEFAULT '0',
|
||||
`LICENSE_STATUS` varchar(100) DEFAULT '',
|
||||
`LICENSE_DATA` mediumtext NOT NULL,
|
||||
`LICENSE_PATH` varchar(255) NOT NULL DEFAULT '0',
|
||||
`LICENSE_WORKSPACE` varchar(32) NOT NULL DEFAULT '0',
|
||||
`LICENSE_TYPE` varchar(32) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`LICENSE_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Licenses Manager';
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
#-- APP_ASSIGN_SELF_SERVICE_VALUE
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS APP_ASSIGN_SELF_SERVICE_VALUE;
|
||||
|
||||
CREATE TABLE APP_ASSIGN_SELF_SERVICE_VALUE
|
||||
CREATE TABLE `LICENSE_MANAGER`
|
||||
(
|
||||
APP_UID VARCHAR(32) NOT NULL,
|
||||
DEL_INDEX INTEGER DEFAULT 0 NOT NULL,
|
||||
PRO_UID VARCHAR(32) NOT NULL,
|
||||
TAS_UID VARCHAR(32) NOT NULL,
|
||||
GRP_UID VARCHAR(32) DEFAULT '' NOT NULL
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||
`LICENSE_UID` VARCHAR(32) NOT NULL,
|
||||
`LICENSE_USER` VARCHAR(150) default '0' NOT NULL,
|
||||
`LICENSE_START` INTEGER default 0 NOT NULL,
|
||||
`LICENSE_END` INTEGER default 0 NOT NULL,
|
||||
`LICENSE_SPAN` INTEGER default 0 NOT NULL,
|
||||
`LICENSE_STATUS` VARCHAR(100) default '' NOT NULL,
|
||||
`LICENSE_DATA` MEDIUMTEXT NOT NULL,
|
||||
`LICENSE_PATH` VARCHAR(255) default '0' NOT NULL,
|
||||
`LICENSE_WORKSPACE` VARCHAR(32) default '0' NOT NULL,
|
||||
`LICENSE_TYPE` VARCHAR(32) default '0' NOT NULL,
|
||||
PRIMARY KEY (`LICENSE_UID`)
|
||||
)ENGINE=InnoDB ;
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- APP_ASSIGN_SELF_SERVICE_VALUE
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `APP_ASSIGN_SELF_SERVICE_VALUE`;
|
||||
|
||||
|
||||
CREATE TABLE `APP_ASSIGN_SELF_SERVICE_VALUE`
|
||||
(
|
||||
`APP_UID` VARCHAR(32) NOT NULL,
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) NOT NULL,
|
||||
`TAS_UID` VARCHAR(32) NOT NULL,
|
||||
`GRP_UID` VARCHAR(32) default '' NOT NULL
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LIST_INBOX
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LIST_INBOX`;
|
||||
|
||||
|
||||
CREATE TABLE `LIST_INBOX`
|
||||
(
|
||||
`APP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`USR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
||||
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_UPDATE_DATE` DATETIME NOT NULL,
|
||||
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
||||
`DEL_PREVIOUS_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`DEL_PREVIOUS_USR_LASTNAME` VARCHAR(50) default '',
|
||||
`DEL_DELEGATE_DATE` DATETIME NOT NULL,
|
||||
`DEL_INIT_DATE` DATETIME,
|
||||
`DEL_DUE_DATE` DATETIME,
|
||||
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
|
||||
PRIMARY KEY (`APP_UID`,`DEL_INDEX`),
|
||||
KEY `indexInboxUser`(`USR_UID`, `DEL_DELEGATE_DATE`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Inbox list';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LIST_PARTICIPATED_HISTORY
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LIST_PARTICIPATED_HISTORY`;
|
||||
|
||||
|
||||
CREATE TABLE `LIST_PARTICIPATED_HISTORY`
|
||||
(
|
||||
`APP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`USR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
||||
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
||||
`DEL_PREVIOUS_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`DEL_PREVIOUS_USR_LASTNAME` VARCHAR(50) default '',
|
||||
`DEL_CURRENT_USR_USERNAME` VARCHAR(100) default '',
|
||||
`DEL_CURRENT_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`DEL_CURRENT_USR_LASTNAME` VARCHAR(50) default '',
|
||||
`DEL_DELEGATE_DATE` DATETIME NOT NULL,
|
||||
`DEL_INIT_DATE` DATETIME,
|
||||
`DEL_DUE_DATE` DATETIME,
|
||||
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
|
||||
PRIMARY KEY (`APP_UID`,`DEL_INDEX`),
|
||||
KEY `indexInboxUser`(`USR_UID`, `DEL_DELEGATE_DATE`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Participated history list';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LIST_PARTICIPATED_LAST
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LIST_PARTICIPATED_LAST`;
|
||||
|
||||
|
||||
CREATE TABLE `LIST_PARTICIPATED_LAST`
|
||||
(
|
||||
`APP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`USR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
||||
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
||||
`DEL_PREVIOUS_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`DEL_PREVIOUS_USR_LASTNAME` VARCHAR(50) default '',
|
||||
`DEL_DELEGATE_DATE` DATETIME NOT NULL,
|
||||
`DEL_INIT_DATE` DATETIME,
|
||||
`DEL_DUE_DATE` DATETIME,
|
||||
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
|
||||
PRIMARY KEY (`APP_UID`,`USR_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Participated last list';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LIST_COMPLETED
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LIST_COMPLETED`;
|
||||
|
||||
|
||||
CREATE TABLE `LIST_COMPLETED`
|
||||
(
|
||||
`APP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`USR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
||||
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_CREATE_DATE` DATETIME NOT NULL,
|
||||
`APP_FINISH_DATE` DATETIME NOT NULL,
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_CURRENT_USR_USERNAME` VARCHAR(100) default '',
|
||||
`DEL_CURRENT_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`DEL_CURRENT_USR_LASTNAME` VARCHAR(50) default '',
|
||||
PRIMARY KEY (`APP_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Completed list';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LIST_MY_INBOX
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LIST_MY_INBOX`;
|
||||
|
||||
|
||||
CREATE TABLE `LIST_MY_INBOX`
|
||||
(
|
||||
`APP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`USR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
||||
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_CREATE_DATE` DATETIME NOT NULL,
|
||||
`APP_UPDATE_DATE` DATETIME NOT NULL,
|
||||
`APP_FINISH_DATE` DATETIME NOT NULL,
|
||||
`APP_STATUS` VARCHAR(100) default '' NOT NULL,
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
||||
`DEL_PREVIOUS_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`DEL_PREVIOUS_USR_LASTNAME` VARCHAR(50) default '',
|
||||
`DEL_CURRENT_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_CURRENT_USR_USERNAME` VARCHAR(100) default '',
|
||||
`DEL_CURRENT_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`DEL_CURRENT_USR_LASTNAME` VARCHAR(50) default '',
|
||||
`DEL_DELEGATE_DATE` DATETIME,
|
||||
`DEL_INIT_DATE` DATETIME,
|
||||
`DEL_DUE_DATE` DATETIME,
|
||||
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
|
||||
PRIMARY KEY (`APP_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='My Inbox list';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LIST_UNASSIGNED
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LIST_UNASSIGNED`;
|
||||
|
||||
|
||||
CREATE TABLE `LIST_UNASSIGNED`
|
||||
(
|
||||
`APP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`UNA_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`APP_NUMBER` INTEGER default 0 NOT NULL,
|
||||
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||
`APP_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
||||
`APP_PREVIOUS_USR_FIRSTNAME` VARCHAR(50) default '',
|
||||
`APP_PREVIOUS_USR_LASTNAME` VARCHAR(50) default '',
|
||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_DELEGATE_DATE` DATETIME NOT NULL,
|
||||
`DEL_DUE_DATE` DATETIME,
|
||||
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
|
||||
PRIMARY KEY (`APP_UID`,`UNA_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Unassiged list';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- LIST_UNASSIGNED_GROUP
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `LIST_UNASSIGNED_GROUP`;
|
||||
|
||||
|
||||
CREATE TABLE `LIST_UNASSIGNED_GROUP`
|
||||
(
|
||||
`UNA_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`USR_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TYPE` VARCHAR(255) default '' NOT NULL,
|
||||
`TYP_UID` VARCHAR(32) default '' NOT NULL,
|
||||
PRIMARY KEY (`UNA_UID`,`USR_UID`,`TYPE`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Unassiged list';
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
153
workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
Normal file
153
workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use \G;
|
||||
|
||||
/**
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*/
|
||||
class Lists {
|
||||
|
||||
/**
|
||||
* Get list for Cases
|
||||
*
|
||||
* @access public
|
||||
* @param array $dataList, Data for list
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*/
|
||||
public function getList($listName = 'inbox', $dataList = array(), $total = false)
|
||||
{
|
||||
Validator::isArray($dataList, '$dataList');
|
||||
if (!isset($dataList["userId"])) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_USER_NOT_EXIST", array('userId',''))));
|
||||
} else {
|
||||
Validator::usrUid($dataList["userId"], "userId");
|
||||
}
|
||||
|
||||
$userUid = $dataList["userId"];
|
||||
$filters["paged"] = isset( $dataList["paged"] ) ? $dataList["paged"] : true;
|
||||
$filters['count'] = isset( $dataList['count'] ) ? $dataList['count'] : true;
|
||||
|
||||
$filters["category"] = isset( $dataList["category"] ) ? $dataList["category"] : "";
|
||||
$filters["process"] = isset( $dataList["process"] ) ? $dataList["process"] : "";
|
||||
$filters["search"] = isset( $dataList["search"] ) ? $dataList["search"] : "";
|
||||
$filters["filter"] = isset( $dataList["filter"] ) ? $dataList["filter"] : "";
|
||||
$filters["dateFrom"] = (!empty( $dataList["dateFrom"] )) ? substr( $dataList["dateFrom"], 0, 10 ) : "";
|
||||
$filters["dateTo"] = (!empty( $dataList["dateTo"] )) ? substr( $dataList["dateTo"], 0, 10 ) : "";
|
||||
|
||||
$filters["start"] = isset( $dataList["start"] ) ? $dataList["start"] : "0";
|
||||
$filters["limit"] = isset( $dataList["limit"] ) ? $dataList["limit"] : "25";
|
||||
$filters["sort"] = isset( $dataList["sort"] ) ? $dataList["sort"] : "";
|
||||
$filters["dir"] = isset( $dataList["dir"] ) ? $dataList["dir"] : "DESC";
|
||||
|
||||
// Select list
|
||||
switch ($listName) {
|
||||
case 'inbox':
|
||||
$list = new \ListInbox();
|
||||
$listpeer = 'ListInboxPeer';
|
||||
break;
|
||||
case 'participated_history':
|
||||
$list = new \ListParticipatedHistory();
|
||||
$listpeer = 'ListParticipatedHistoryPeer';
|
||||
break;
|
||||
case 'participated_last':
|
||||
$list = new \ListParticipatedLast();
|
||||
$listpeer = 'ListParticipatedLastPeer';
|
||||
break;
|
||||
case 'completed':
|
||||
$list = new \ListCompleted();
|
||||
$listpeer = 'ListCompletedPeer';
|
||||
break;
|
||||
case 'my_inbox':
|
||||
$list = new \ListMyInbox();
|
||||
$listpeer = 'ListMyInboxPeer';
|
||||
break;
|
||||
case 'unassigned':
|
||||
$list = new \ListUnassigned();
|
||||
$listpeer = 'ListUnassignedPeer';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Validate filters
|
||||
$filters["start"] = (int)$filters["start"];
|
||||
$filters["start"] = abs($filters["start"]);
|
||||
if ($filters["start"] != 0) {
|
||||
$filters["start"]--;
|
||||
}
|
||||
|
||||
$filters["limit"] = (int)$filters["limit"];
|
||||
$filters["limit"] = abs($filters["limit"]);
|
||||
if ($filters["limit"] == 0) {
|
||||
G::LoadClass("configuration");
|
||||
$conf = new \Configurations();
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
if (isset($generalConfCasesList['casesListRowNumber'])) {
|
||||
$filters["limit"] = (int)$generalConfCasesList['casesListRowNumber'];
|
||||
} else {
|
||||
$filters["limit"] = 25;
|
||||
}
|
||||
} else {
|
||||
$filters["limit"] = (int)$filters["limit"];
|
||||
}
|
||||
|
||||
$filters["sort"] = G::toUpper($filters["sort"]);
|
||||
$columnsList = $listpeer::getFieldNames(\BasePeer::TYPE_FIELDNAME);
|
||||
if (!(in_array($filters["sort"], $columnsList))) {
|
||||
$filters["sort"] = '';
|
||||
}
|
||||
|
||||
$filters["dir"] = G::toUpper($filters["dir"]);
|
||||
if (!($filters["dir"] == 'DESC' || $filters["dir"] == 'ASC')) {
|
||||
$filters["dir"] = 'DESC';
|
||||
}
|
||||
if ($filters["process"] != '') {
|
||||
Validator::proUid($filters["process"], '$pro_uid');
|
||||
}
|
||||
if ($filters["category"] != '') {
|
||||
Validator::catUid($filters["category"], '$cat_uid');
|
||||
}
|
||||
if ($filters["dateFrom"] != '') {
|
||||
Validator::isDate($filters["dateFrom"], 'Y-m-d', '$date_from');
|
||||
}
|
||||
if ($filters["dateTo"] != '') {
|
||||
Validator::isDate($filters["dateTo"], 'Y-m-d', '$date_to');
|
||||
}
|
||||
|
||||
if ($total) {
|
||||
$total = $list->countTotal($userUid, $filters);
|
||||
return $total;
|
||||
}
|
||||
|
||||
$result = $list->loadList($userUid, $filters);
|
||||
if (!empty($result)) {
|
||||
foreach ($result as &$value) {
|
||||
$value = array_change_key_case($value, CASE_LOWER);
|
||||
}
|
||||
}
|
||||
|
||||
$response = array();
|
||||
if ($filters["paged"]) {
|
||||
$filtersData = array();
|
||||
$filtersData['start'] = $filters["start"]+1;
|
||||
$filtersData['limit'] = $filters["limit"];
|
||||
$filtersData['sort'] = G::toLower($filters["sort"]);
|
||||
$filtersData['dir'] = G::toLower($filters["dir"]);
|
||||
$filtersData['cat_uid'] = $filters["category"];
|
||||
$filtersData['pro_uid'] = $filters["process"];
|
||||
$filtersData['search'] = $filters["search"];
|
||||
$filtersData['date_from'] = $filters["dateFrom"];
|
||||
$filtersData['date_to'] = $filters["dateTo"];
|
||||
$response['filters'] = $filtersData;
|
||||
$response['data'] = $result;
|
||||
} else {
|
||||
$response = $result;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
643
workflow/engine/src/ProcessMaker/Services/Api/Lists.php
Normal file
643
workflow/engine/src/ProcessMaker/Services/Api/Lists.php
Normal file
@@ -0,0 +1,643 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Services\Api;
|
||||
|
||||
use \ProcessMaker\Services\Api;
|
||||
use \Luracast\Restler\RestException;
|
||||
|
||||
|
||||
/**
|
||||
* Cases Api Controller
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @protected
|
||||
*/
|
||||
class Lists extends Api
|
||||
{
|
||||
/**
|
||||
* Get list Inbox
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET
|
||||
* @url GET /inbox
|
||||
*/
|
||||
public function doGetListInbox(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_UPDATE_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('inbox', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Inbox
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /inbox/total
|
||||
* @url GET /total
|
||||
*/
|
||||
public function doGetCountInbox(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('inbox', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list Participated Last
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /participated
|
||||
* @url GET /participated-last
|
||||
*/
|
||||
public function doGetListParticipatedLast(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_UPDATE_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('participated_last', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Participated Last
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /participated/total
|
||||
* @url GET /participated-last/total
|
||||
*/
|
||||
public function doGetCountParticipatedLast(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('participated_last', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list Participated History
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /participated-history
|
||||
*/
|
||||
public function doGetListParticipatedHistory(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_UPDATE_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('participated_history', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Participated History
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /participated-history/total
|
||||
*/
|
||||
public function doGetCountParticipatedHistory(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('participated_history', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get List Completed
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /completed
|
||||
*/
|
||||
public function doGetListCompleted(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_UPDATE_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('completed', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Participated History
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /completed/total
|
||||
*/
|
||||
public function doGetCountCompleted(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('completed', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get List Completed
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /my-inbox
|
||||
*/
|
||||
public function doGetListMyInbox(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_UPDATE_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('completed', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Participated History
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /my-inbox/total
|
||||
*/
|
||||
public function doGetCountListMyInbox(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('completed', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list Unassigned
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /unassigned
|
||||
*/
|
||||
public function doGetListUnassigned(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_UPDATE_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = '',
|
||||
$usr_uid = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = (empty($usr_uid)) ? $this->getUserId() : $usr_uid;
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('unassigned', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Unassigned
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /unassigned/total
|
||||
*/
|
||||
public function doGetCountUnassigned(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('participated_history', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,3 +79,7 @@ debug = 1
|
||||
[alias: roles]
|
||||
role = "ProcessMaker\Services\Api\Role"
|
||||
|
||||
[alias: lists]
|
||||
list = "ProcessMaker\Services\Api\Lists"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user