diff --git a/workflow/engine/classes/class.case.php b/workflow/engine/classes/class.case.php
index f1df920be..d27f9c836 100755
--- a/workflow/engine/classes/class.case.php
+++ b/workflow/engine/classes/class.case.php
@@ -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);
}
diff --git a/workflow/engine/classes/model/AppDelegation.php b/workflow/engine/classes/model/AppDelegation.php
index 11d22f872..c28d594a6 100755
--- a/workflow/engine/classes/model/AppDelegation.php
+++ b/workflow/engine/classes/model/AppDelegation.php
@@ -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);
}
diff --git a/workflow/engine/classes/model/ListCompleted.php b/workflow/engine/classes/model/ListCompleted.php
new file mode 100644
index 000000000..be44881dd
--- /dev/null
+++ b/workflow/engine/classes/model/ListCompleted.php
@@ -0,0 +1,281 @@
+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
diff --git a/workflow/engine/classes/model/ListCompletedPeer.php b/workflow/engine/classes/model/ListCompletedPeer.php
new file mode 100644
index 000000000..d6dd44225
--- /dev/null
+++ b/workflow/engine/classes/model/ListCompletedPeer.php
@@ -0,0 +1,23 @@
+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;
+ }
+}
diff --git a/workflow/engine/classes/model/ListInboxPeer.php b/workflow/engine/classes/model/ListInboxPeer.php
new file mode 100644
index 000000000..9722cce1b
--- /dev/null
+++ b/workflow/engine/classes/model/ListInboxPeer.php
@@ -0,0 +1,23 @@
+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
diff --git a/workflow/engine/classes/model/ListMyInboxPeer.php b/workflow/engine/classes/model/ListMyInboxPeer.php
new file mode 100644
index 000000000..c32a6eae3
--- /dev/null
+++ b/workflow/engine/classes/model/ListMyInboxPeer.php
@@ -0,0 +1,23 @@
+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;
+ }
+}
diff --git a/workflow/engine/classes/model/ListParticipatedHistoryPeer.php b/workflow/engine/classes/model/ListParticipatedHistoryPeer.php
new file mode 100644
index 000000000..c3c51e5e6
--- /dev/null
+++ b/workflow/engine/classes/model/ListParticipatedHistoryPeer.php
@@ -0,0 +1,23 @@
+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;
+ }
+}
diff --git a/workflow/engine/classes/model/ListParticipatedLastPeer.php b/workflow/engine/classes/model/ListParticipatedLastPeer.php
new file mode 100644
index 000000000..a6502cf33
--- /dev/null
+++ b/workflow/engine/classes/model/ListParticipatedLastPeer.php
@@ -0,0 +1,23 @@
+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;
+ }
+}
+
+
diff --git a/workflow/engine/classes/model/ListUnassignedGroup.php b/workflow/engine/classes/model/ListUnassignedGroup.php
new file mode 100644
index 000000000..c735ae4f4
--- /dev/null
+++ b/workflow/engine/classes/model/ListUnassignedGroup.php
@@ -0,0 +1,19 @@
+dbMap !== null);
+ }
+
+ /**
+ * Gets the databasemap this map builder built.
+ *
+ * @return the databasemap
+ */
+ public function getDatabaseMap()
+ {
+ return $this->dbMap;
+ }
+
+ /**
+ * The doBuild() method builds the DatabaseMap
+ *
+ * @return void
+ * @throws PropelException
+ */
+ public function doBuild()
+ {
+ $this->dbMap = Propel::getDatabaseMap('workflow');
+
+ $tMap = $this->dbMap->addTable('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
diff --git a/workflow/engine/classes/model/map/ListInboxMapBuilder.php b/workflow/engine/classes/model/map/ListInboxMapBuilder.php
new file mode 100644
index 000000000..f82b2d7eb
--- /dev/null
+++ b/workflow/engine/classes/model/map/ListInboxMapBuilder.php
@@ -0,0 +1,106 @@
+dbMap !== null);
+ }
+
+ /**
+ * Gets the databasemap this map builder built.
+ *
+ * @return the databasemap
+ */
+ public function getDatabaseMap()
+ {
+ return $this->dbMap;
+ }
+
+ /**
+ * The doBuild() method builds the DatabaseMap
+ *
+ * @return void
+ * @throws PropelException
+ */
+ public function doBuild()
+ {
+ $this->dbMap = Propel::getDatabaseMap('workflow');
+
+ $tMap = $this->dbMap->addTable('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
diff --git a/workflow/engine/classes/model/map/ListMyInboxMapBuilder.php b/workflow/engine/classes/model/map/ListMyInboxMapBuilder.php
new file mode 100644
index 000000000..2aec4e7b9
--- /dev/null
+++ b/workflow/engine/classes/model/map/ListMyInboxMapBuilder.php
@@ -0,0 +1,120 @@
+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
diff --git a/workflow/engine/classes/model/map/ListParticipatedHistoryMapBuilder.php b/workflow/engine/classes/model/map/ListParticipatedHistoryMapBuilder.php
new file mode 100644
index 000000000..79afcc5fc
--- /dev/null
+++ b/workflow/engine/classes/model/map/ListParticipatedHistoryMapBuilder.php
@@ -0,0 +1,110 @@
+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
diff --git a/workflow/engine/classes/model/map/ListParticipatedLastMapBuilder.php b/workflow/engine/classes/model/map/ListParticipatedLastMapBuilder.php
new file mode 100644
index 000000000..e9ee783d9
--- /dev/null
+++ b/workflow/engine/classes/model/map/ListParticipatedLastMapBuilder.php
@@ -0,0 +1,104 @@
+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
diff --git a/workflow/engine/classes/model/map/ListUnassignedGroupMapBuilder.php b/workflow/engine/classes/model/map/ListUnassignedGroupMapBuilder.php
new file mode 100644
index 000000000..8dceba57f
--- /dev/null
+++ b/workflow/engine/classes/model/map/ListUnassignedGroupMapBuilder.php
@@ -0,0 +1,78 @@
+dbMap !== null);
+ }
+
+ /**
+ * Gets the databasemap this map builder built.
+ *
+ * @return the databasemap
+ */
+ public function getDatabaseMap()
+ {
+ return $this->dbMap;
+ }
+
+ /**
+ * The doBuild() method builds the DatabaseMap
+ *
+ * @return void
+ * @throws PropelException
+ */
+ public function doBuild()
+ {
+ $this->dbMap = Propel::getDatabaseMap('workflow');
+
+ $tMap = $this->dbMap->addTable('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
diff --git a/workflow/engine/classes/model/map/ListUnassignedMapBuilder.php b/workflow/engine/classes/model/map/ListUnassignedMapBuilder.php
new file mode 100644
index 000000000..e8ab00588
--- /dev/null
+++ b/workflow/engine/classes/model/map/ListUnassignedMapBuilder.php
@@ -0,0 +1,102 @@
+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
diff --git a/workflow/engine/classes/model/om/BaseListCompleted.php b/workflow/engine/classes/model/om/BaseListCompleted.php
new file mode 100644
index 000000000..a0fb8e8ad
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListCompleted.php
@@ -0,0 +1,1378 @@
+app_uid;
+ }
+
+ /**
+ * Get the [usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getUsrUid()
+ {
+
+ return $this->usr_uid;
+ }
+
+ /**
+ * Get the [tas_uid] column value.
+ *
+ * @return string
+ */
+ public function getTasUid()
+ {
+
+ return $this->tas_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [app_number] column value.
+ *
+ * @return int
+ */
+ public function getAppNumber()
+ {
+
+ return $this->app_number;
+ }
+
+ /**
+ * Get the [app_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTitle()
+ {
+
+ return $this->app_title;
+ }
+
+ /**
+ * Get the [app_pro_title] column value.
+ *
+ * @return string
+ */
+ public function getAppProTitle()
+ {
+
+ return $this->app_pro_title;
+ }
+
+ /**
+ * Get the [app_tas_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTasTitle()
+ {
+
+ return $this->app_tas_title;
+ }
+
+ /**
+ * Get the [optionally formatted] [app_create_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getAppCreateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->app_create_date === null || $this->app_create_date === '') {
+ return null;
+ } elseif (!is_int($this->app_create_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->app_create_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [app_create_date] as date/time value: " .
+ var_export($this->app_create_date, true));
+ }
+ } else {
+ $ts = $this->app_create_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [app_finish_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getAppFinishDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->app_finish_date === null || $this->app_finish_date === '') {
+ return null;
+ } elseif (!is_int($this->app_finish_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->app_finish_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [app_finish_date] as date/time value: " .
+ var_export($this->app_finish_date, true));
+ }
+ } else {
+ $ts = $this->app_finish_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [del_index] column value.
+ *
+ * @return int
+ */
+ public function getDelIndex()
+ {
+
+ return $this->del_index;
+ }
+
+ /**
+ * Get the [del_previous_usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUid()
+ {
+
+ return $this->del_previous_usr_uid;
+ }
+
+ /**
+ * Get the [del_current_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrUsername()
+ {
+
+ return $this->del_current_usr_username;
+ }
+
+ /**
+ * Get the [del_current_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrFirstname()
+ {
+
+ return $this->del_current_usr_firstname;
+ }
+
+ /**
+ * Get the [del_current_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrLastname()
+ {
+
+ return $this->del_current_usr_lastname;
+ }
+
+ /**
+ * Set the value of [app_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppUid($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->app_uid !== $v || $v === '') {
+ $this->app_uid = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::APP_UID;
+ }
+
+ } // setAppUid()
+
+ /**
+ * 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[] = ListCompletedPeer::USR_UID;
+ }
+
+ } // setUsrUid()
+
+ /**
+ * Set the value of [tas_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setTasUid($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->tas_uid !== $v || $v === '') {
+ $this->tas_uid = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::TAS_UID;
+ }
+
+ } // setTasUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [app_number] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppNumber($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->app_number !== $v || $v === 0) {
+ $this->app_number = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::APP_NUMBER;
+ }
+
+ } // setAppNumber()
+
+ /**
+ * Set the value of [app_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTitle($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->app_title !== $v || $v === '') {
+ $this->app_title = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::APP_TITLE;
+ }
+
+ } // setAppTitle()
+
+ /**
+ * Set the value of [app_pro_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppProTitle($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->app_pro_title !== $v || $v === '') {
+ $this->app_pro_title = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::APP_PRO_TITLE;
+ }
+
+ } // setAppProTitle()
+
+ /**
+ * Set the value of [app_tas_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTasTitle($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->app_tas_title !== $v || $v === '') {
+ $this->app_tas_title = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::APP_TAS_TITLE;
+ }
+
+ } // setAppTasTitle()
+
+ /**
+ * Set the value of [app_create_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppCreateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [app_create_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->app_create_date !== $ts) {
+ $this->app_create_date = $ts;
+ $this->modifiedColumns[] = ListCompletedPeer::APP_CREATE_DATE;
+ }
+
+ } // setAppCreateDate()
+
+ /**
+ * Set the value of [app_finish_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppFinishDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [app_finish_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->app_finish_date !== $ts) {
+ $this->app_finish_date = $ts;
+ $this->modifiedColumns[] = ListCompletedPeer::APP_FINISH_DATE;
+ }
+
+ } // setAppFinishDate()
+
+ /**
+ * Set the value of [del_index] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelIndex($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->del_index !== $v || $v === 0) {
+ $this->del_index = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::DEL_INDEX;
+ }
+
+ } // setDelIndex()
+
+ /**
+ * Set the value of [del_previous_usr_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUid($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->del_previous_usr_uid !== $v || $v === '') {
+ $this->del_previous_usr_uid = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::DEL_PREVIOUS_USR_UID;
+ }
+
+ } // setDelPreviousUsrUid()
+
+ /**
+ * Set the value of [del_current_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrUsername($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->del_current_usr_username !== $v || $v === '') {
+ $this->del_current_usr_username = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::DEL_CURRENT_USR_USERNAME;
+ }
+
+ } // setDelCurrentUsrUsername()
+
+ /**
+ * Set the value of [del_current_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrFirstname($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->del_current_usr_firstname !== $v || $v === '') {
+ $this->del_current_usr_firstname = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::DEL_CURRENT_USR_FIRSTNAME;
+ }
+
+ } // setDelCurrentUsrFirstname()
+
+ /**
+ * Set the value of [del_current_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrLastname($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->del_current_usr_lastname !== $v || $v === '') {
+ $this->del_current_usr_lastname = $v;
+ $this->modifiedColumns[] = ListCompletedPeer::DEL_CURRENT_USR_LASTNAME;
+ }
+
+ } // setDelCurrentUsrLastname()
+
+ /**
+ * 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->app_uid = $rs->getString($startcol + 0);
+
+ $this->usr_uid = $rs->getString($startcol + 1);
+
+ $this->tas_uid = $rs->getString($startcol + 2);
+
+ $this->pro_uid = $rs->getString($startcol + 3);
+
+ $this->app_number = $rs->getInt($startcol + 4);
+
+ $this->app_title = $rs->getString($startcol + 5);
+
+ $this->app_pro_title = $rs->getString($startcol + 6);
+
+ $this->app_tas_title = $rs->getString($startcol + 7);
+
+ $this->app_create_date = $rs->getTimestamp($startcol + 8, null);
+
+ $this->app_finish_date = $rs->getTimestamp($startcol + 9, null);
+
+ $this->del_index = $rs->getInt($startcol + 10);
+
+ $this->del_previous_usr_uid = $rs->getString($startcol + 11);
+
+ $this->del_current_usr_username = $rs->getString($startcol + 12);
+
+ $this->del_current_usr_firstname = $rs->getString($startcol + 13);
+
+ $this->del_current_usr_lastname = $rs->getString($startcol + 14);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 15; // 15 = ListCompletedPeer::NUM_COLUMNS - ListCompletedPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating ListCompleted 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(ListCompletedPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ ListCompletedPeer::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(ListCompletedPeer::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 = ListCompletedPeer::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 += ListCompletedPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ $this->alreadyInSave = false;
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = ListCompletedPeer::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 = ListCompletedPeer::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->getAppUid();
+ break;
+ case 1:
+ return $this->getUsrUid();
+ break;
+ case 2:
+ return $this->getTasUid();
+ break;
+ case 3:
+ return $this->getProUid();
+ break;
+ case 4:
+ return $this->getAppNumber();
+ break;
+ case 5:
+ return $this->getAppTitle();
+ break;
+ case 6:
+ return $this->getAppProTitle();
+ break;
+ case 7:
+ return $this->getAppTasTitle();
+ break;
+ case 8:
+ return $this->getAppCreateDate();
+ break;
+ case 9:
+ return $this->getAppFinishDate();
+ break;
+ case 10:
+ return $this->getDelIndex();
+ break;
+ case 11:
+ return $this->getDelPreviousUsrUid();
+ break;
+ case 12:
+ return $this->getDelCurrentUsrUsername();
+ break;
+ case 13:
+ return $this->getDelCurrentUsrFirstname();
+ break;
+ case 14:
+ return $this->getDelCurrentUsrLastname();
+ 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 = ListCompletedPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getAppUid(),
+ $keys[1] => $this->getUsrUid(),
+ $keys[2] => $this->getTasUid(),
+ $keys[3] => $this->getProUid(),
+ $keys[4] => $this->getAppNumber(),
+ $keys[5] => $this->getAppTitle(),
+ $keys[6] => $this->getAppProTitle(),
+ $keys[7] => $this->getAppTasTitle(),
+ $keys[8] => $this->getAppCreateDate(),
+ $keys[9] => $this->getAppFinishDate(),
+ $keys[10] => $this->getDelIndex(),
+ $keys[11] => $this->getDelPreviousUsrUid(),
+ $keys[12] => $this->getDelCurrentUsrUsername(),
+ $keys[13] => $this->getDelCurrentUsrFirstname(),
+ $keys[14] => $this->getDelCurrentUsrLastname(),
+ );
+ 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 = ListCompletedPeer::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->setAppUid($value);
+ break;
+ case 1:
+ $this->setUsrUid($value);
+ break;
+ case 2:
+ $this->setTasUid($value);
+ break;
+ case 3:
+ $this->setProUid($value);
+ break;
+ case 4:
+ $this->setAppNumber($value);
+ break;
+ case 5:
+ $this->setAppTitle($value);
+ break;
+ case 6:
+ $this->setAppProTitle($value);
+ break;
+ case 7:
+ $this->setAppTasTitle($value);
+ break;
+ case 8:
+ $this->setAppCreateDate($value);
+ break;
+ case 9:
+ $this->setAppFinishDate($value);
+ break;
+ case 10:
+ $this->setDelIndex($value);
+ break;
+ case 11:
+ $this->setDelPreviousUsrUid($value);
+ break;
+ case 12:
+ $this->setDelCurrentUsrUsername($value);
+ break;
+ case 13:
+ $this->setDelCurrentUsrFirstname($value);
+ break;
+ case 14:
+ $this->setDelCurrentUsrLastname($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 = ListCompletedPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setAppUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setUsrUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setTasUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setProUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setAppNumber($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setAppTitle($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setAppProTitle($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setAppTasTitle($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setAppCreateDate($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setAppFinishDate($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setDelIndex($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setDelPreviousUsrUid($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setDelCurrentUsrUsername($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setDelCurrentUsrFirstname($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setDelCurrentUsrLastname($arr[$keys[14]]);
+ }
+
+ }
+
+ /**
+ * 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(ListCompletedPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(ListCompletedPeer::APP_UID)) {
+ $criteria->add(ListCompletedPeer::APP_UID, $this->app_uid);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::USR_UID)) {
+ $criteria->add(ListCompletedPeer::USR_UID, $this->usr_uid);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::TAS_UID)) {
+ $criteria->add(ListCompletedPeer::TAS_UID, $this->tas_uid);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::PRO_UID)) {
+ $criteria->add(ListCompletedPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::APP_NUMBER)) {
+ $criteria->add(ListCompletedPeer::APP_NUMBER, $this->app_number);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::APP_TITLE)) {
+ $criteria->add(ListCompletedPeer::APP_TITLE, $this->app_title);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::APP_PRO_TITLE)) {
+ $criteria->add(ListCompletedPeer::APP_PRO_TITLE, $this->app_pro_title);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::APP_TAS_TITLE)) {
+ $criteria->add(ListCompletedPeer::APP_TAS_TITLE, $this->app_tas_title);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::APP_CREATE_DATE)) {
+ $criteria->add(ListCompletedPeer::APP_CREATE_DATE, $this->app_create_date);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::APP_FINISH_DATE)) {
+ $criteria->add(ListCompletedPeer::APP_FINISH_DATE, $this->app_finish_date);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::DEL_INDEX)) {
+ $criteria->add(ListCompletedPeer::DEL_INDEX, $this->del_index);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::DEL_PREVIOUS_USR_UID)) {
+ $criteria->add(ListCompletedPeer::DEL_PREVIOUS_USR_UID, $this->del_previous_usr_uid);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::DEL_CURRENT_USR_USERNAME)) {
+ $criteria->add(ListCompletedPeer::DEL_CURRENT_USR_USERNAME, $this->del_current_usr_username);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::DEL_CURRENT_USR_FIRSTNAME)) {
+ $criteria->add(ListCompletedPeer::DEL_CURRENT_USR_FIRSTNAME, $this->del_current_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListCompletedPeer::DEL_CURRENT_USR_LASTNAME)) {
+ $criteria->add(ListCompletedPeer::DEL_CURRENT_USR_LASTNAME, $this->del_current_usr_lastname);
+ }
+
+
+ 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(ListCompletedPeer::DATABASE_NAME);
+
+ $criteria->add(ListCompletedPeer::APP_UID, $this->app_uid);
+
+ return $criteria;
+ }
+
+ /**
+ * Returns the primary key for this object (row).
+ * @return string
+ */
+ public function getPrimaryKey()
+ {
+ return $this->getAppUid();
+ }
+
+ /**
+ * Generic method to set the primary key (app_uid column).
+ *
+ * @param string $key Primary key.
+ * @return void
+ */
+ public function setPrimaryKey($key)
+ {
+ $this->setAppUid($key);
+ }
+
+ /**
+ * 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 ListCompleted (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->setUsrUid($this->usr_uid);
+
+ $copyObj->setTasUid($this->tas_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setAppNumber($this->app_number);
+
+ $copyObj->setAppTitle($this->app_title);
+
+ $copyObj->setAppProTitle($this->app_pro_title);
+
+ $copyObj->setAppTasTitle($this->app_tas_title);
+
+ $copyObj->setAppCreateDate($this->app_create_date);
+
+ $copyObj->setAppFinishDate($this->app_finish_date);
+
+ $copyObj->setDelIndex($this->del_index);
+
+ $copyObj->setDelPreviousUsrUid($this->del_previous_usr_uid);
+
+ $copyObj->setDelCurrentUsrUsername($this->del_current_usr_username);
+
+ $copyObj->setDelCurrentUsrFirstname($this->del_current_usr_firstname);
+
+ $copyObj->setDelCurrentUsrLastname($this->del_current_usr_lastname);
+
+
+ $copyObj->setNew(true);
+
+ $copyObj->setAppUid(''); // 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 ListCompleted 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 ListCompletedPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new ListCompletedPeer();
+ }
+ return self::$peer;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListCompletedPeer.php b/workflow/engine/classes/model/om/BaseListCompletedPeer.php
new file mode 100644
index 000000000..ad8546d19
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListCompletedPeer.php
@@ -0,0 +1,637 @@
+ 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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. 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');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListInbox.php b/workflow/engine/classes/model/om/BaseListInbox.php
new file mode 100644
index 000000000..df2257281
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListInbox.php
@@ -0,0 +1,1620 @@
+app_uid;
+ }
+
+ /**
+ * Get the [del_index] column value.
+ *
+ * @return int
+ */
+ public function getDelIndex()
+ {
+
+ return $this->del_index;
+ }
+
+ /**
+ * Get the [usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getUsrUid()
+ {
+
+ return $this->usr_uid;
+ }
+
+ /**
+ * Get the [tas_uid] column value.
+ *
+ * @return string
+ */
+ public function getTasUid()
+ {
+
+ return $this->tas_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [app_number] column value.
+ *
+ * @return int
+ */
+ public function getAppNumber()
+ {
+
+ return $this->app_number;
+ }
+
+ /**
+ * Get the [app_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTitle()
+ {
+
+ return $this->app_title;
+ }
+
+ /**
+ * Get the [app_pro_title] column value.
+ *
+ * @return string
+ */
+ public function getAppProTitle()
+ {
+
+ return $this->app_pro_title;
+ }
+
+ /**
+ * Get the [app_tas_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTasTitle()
+ {
+
+ return $this->app_tas_title;
+ }
+
+ /**
+ * Get the [optionally formatted] [app_update_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getAppUpdateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->app_update_date === null || $this->app_update_date === '') {
+ return null;
+ } elseif (!is_int($this->app_update_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->app_update_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [app_update_date] as date/time value: " .
+ var_export($this->app_update_date, true));
+ }
+ } else {
+ $ts = $this->app_update_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [del_previous_usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUid()
+ {
+
+ return $this->del_previous_usr_uid;
+ }
+
+ /**
+ * Get the [del_previous_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUsername()
+ {
+
+ return $this->del_previous_usr_username;
+ }
+
+ /**
+ * Get the [del_previous_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrFirstname()
+ {
+
+ return $this->del_previous_usr_firstname;
+ }
+
+ /**
+ * Get the [del_previous_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrLastname()
+ {
+
+ return $this->del_previous_usr_lastname;
+ }
+
+ /**
+ * Get the [optionally formatted] [del_delegate_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDelegateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_delegate_date === null || $this->del_delegate_date === '') {
+ return null;
+ } elseif (!is_int($this->del_delegate_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_delegate_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_delegate_date] as date/time value: " .
+ var_export($this->del_delegate_date, true));
+ }
+ } else {
+ $ts = $this->del_delegate_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_init_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelInitDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_init_date === null || $this->del_init_date === '') {
+ return null;
+ } elseif (!is_int($this->del_init_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_init_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_init_date] as date/time value: " .
+ var_export($this->del_init_date, true));
+ }
+ } else {
+ $ts = $this->del_init_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_due_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDueDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_due_date === null || $this->del_due_date === '') {
+ return null;
+ } elseif (!is_int($this->del_due_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_due_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_due_date] as date/time value: " .
+ var_export($this->del_due_date, true));
+ }
+ } else {
+ $ts = $this->del_due_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [del_priority] column value.
+ *
+ * @return string
+ */
+ public function getDelPriority()
+ {
+
+ return $this->del_priority;
+ }
+
+ /**
+ * Set the value of [app_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppUid($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->app_uid !== $v || $v === '') {
+ $this->app_uid = $v;
+ $this->modifiedColumns[] = ListInboxPeer::APP_UID;
+ }
+
+ } // setAppUid()
+
+ /**
+ * Set the value of [del_index] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelIndex($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->del_index !== $v || $v === 0) {
+ $this->del_index = $v;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_INDEX;
+ }
+
+ } // setDelIndex()
+
+ /**
+ * 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[] = ListInboxPeer::USR_UID;
+ }
+
+ } // setUsrUid()
+
+ /**
+ * Set the value of [tas_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setTasUid($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->tas_uid !== $v || $v === '') {
+ $this->tas_uid = $v;
+ $this->modifiedColumns[] = ListInboxPeer::TAS_UID;
+ }
+
+ } // setTasUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = ListInboxPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [app_number] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppNumber($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->app_number !== $v || $v === 0) {
+ $this->app_number = $v;
+ $this->modifiedColumns[] = ListInboxPeer::APP_NUMBER;
+ }
+
+ } // setAppNumber()
+
+ /**
+ * Set the value of [app_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTitle($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->app_title !== $v || $v === '') {
+ $this->app_title = $v;
+ $this->modifiedColumns[] = ListInboxPeer::APP_TITLE;
+ }
+
+ } // setAppTitle()
+
+ /**
+ * Set the value of [app_pro_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppProTitle($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->app_pro_title !== $v || $v === '') {
+ $this->app_pro_title = $v;
+ $this->modifiedColumns[] = ListInboxPeer::APP_PRO_TITLE;
+ }
+
+ } // setAppProTitle()
+
+ /**
+ * Set the value of [app_tas_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTasTitle($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->app_tas_title !== $v || $v === '') {
+ $this->app_tas_title = $v;
+ $this->modifiedColumns[] = ListInboxPeer::APP_TAS_TITLE;
+ }
+
+ } // setAppTasTitle()
+
+ /**
+ * Set the value of [app_update_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppUpdateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [app_update_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->app_update_date !== $ts) {
+ $this->app_update_date = $ts;
+ $this->modifiedColumns[] = ListInboxPeer::APP_UPDATE_DATE;
+ }
+
+ } // setAppUpdateDate()
+
+ /**
+ * Set the value of [del_previous_usr_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUid($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->del_previous_usr_uid !== $v || $v === '') {
+ $this->del_previous_usr_uid = $v;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_PREVIOUS_USR_UID;
+ }
+
+ } // setDelPreviousUsrUid()
+
+ /**
+ * Set the value of [del_previous_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUsername($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->del_previous_usr_username !== $v || $v === '') {
+ $this->del_previous_usr_username = $v;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_PREVIOUS_USR_USERNAME;
+ }
+
+ } // setDelPreviousUsrUsername()
+
+ /**
+ * Set the value of [del_previous_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrFirstname($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->del_previous_usr_firstname !== $v || $v === '') {
+ $this->del_previous_usr_firstname = $v;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME;
+ }
+
+ } // setDelPreviousUsrFirstname()
+
+ /**
+ * Set the value of [del_previous_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrLastname($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->del_previous_usr_lastname !== $v || $v === '') {
+ $this->del_previous_usr_lastname = $v;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME;
+ }
+
+ } // setDelPreviousUsrLastname()
+
+ /**
+ * Set the value of [del_delegate_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDelegateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_delegate_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_delegate_date !== $ts) {
+ $this->del_delegate_date = $ts;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_DELEGATE_DATE;
+ }
+
+ } // setDelDelegateDate()
+
+ /**
+ * Set the value of [del_init_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelInitDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_init_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_init_date !== $ts) {
+ $this->del_init_date = $ts;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_INIT_DATE;
+ }
+
+ } // setDelInitDate()
+
+ /**
+ * Set the value of [del_due_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDueDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_due_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_due_date !== $ts) {
+ $this->del_due_date = $ts;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_DUE_DATE;
+ }
+
+ } // setDelDueDate()
+
+ /**
+ * Set the value of [del_priority] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPriority($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->del_priority !== $v || $v === '3') {
+ $this->del_priority = $v;
+ $this->modifiedColumns[] = ListInboxPeer::DEL_PRIORITY;
+ }
+
+ } // setDelPriority()
+
+ /**
+ * 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->app_uid = $rs->getString($startcol + 0);
+
+ $this->del_index = $rs->getInt($startcol + 1);
+
+ $this->usr_uid = $rs->getString($startcol + 2);
+
+ $this->tas_uid = $rs->getString($startcol + 3);
+
+ $this->pro_uid = $rs->getString($startcol + 4);
+
+ $this->app_number = $rs->getInt($startcol + 5);
+
+ $this->app_title = $rs->getString($startcol + 6);
+
+ $this->app_pro_title = $rs->getString($startcol + 7);
+
+ $this->app_tas_title = $rs->getString($startcol + 8);
+
+ $this->app_update_date = $rs->getTimestamp($startcol + 9, null);
+
+ $this->del_previous_usr_uid = $rs->getString($startcol + 10);
+
+ $this->del_previous_usr_username = $rs->getString($startcol + 11);
+
+ $this->del_previous_usr_firstname = $rs->getString($startcol + 12);
+
+ $this->del_previous_usr_lastname = $rs->getString($startcol + 13);
+
+ $this->del_delegate_date = $rs->getTimestamp($startcol + 14, null);
+
+ $this->del_init_date = $rs->getTimestamp($startcol + 15, null);
+
+ $this->del_due_date = $rs->getTimestamp($startcol + 16, null);
+
+ $this->del_priority = $rs->getString($startcol + 17);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 18; // 18 = ListInboxPeer::NUM_COLUMNS - ListInboxPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating ListInbox 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(ListInboxPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ ListInboxPeer::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(ListInboxPeer::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 = ListInboxPeer::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 += ListInboxPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ $this->alreadyInSave = false;
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = ListInboxPeer::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 = ListInboxPeer::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->getAppUid();
+ break;
+ case 1:
+ return $this->getDelIndex();
+ break;
+ case 2:
+ return $this->getUsrUid();
+ break;
+ case 3:
+ return $this->getTasUid();
+ break;
+ case 4:
+ return $this->getProUid();
+ break;
+ case 5:
+ return $this->getAppNumber();
+ break;
+ case 6:
+ return $this->getAppTitle();
+ break;
+ case 7:
+ return $this->getAppProTitle();
+ break;
+ case 8:
+ return $this->getAppTasTitle();
+ break;
+ case 9:
+ return $this->getAppUpdateDate();
+ break;
+ case 10:
+ return $this->getDelPreviousUsrUid();
+ break;
+ case 11:
+ return $this->getDelPreviousUsrUsername();
+ break;
+ case 12:
+ return $this->getDelPreviousUsrFirstname();
+ break;
+ case 13:
+ return $this->getDelPreviousUsrLastname();
+ break;
+ case 14:
+ return $this->getDelDelegateDate();
+ break;
+ case 15:
+ return $this->getDelInitDate();
+ break;
+ case 16:
+ return $this->getDelDueDate();
+ break;
+ case 17:
+ return $this->getDelPriority();
+ 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 = ListInboxPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getAppUid(),
+ $keys[1] => $this->getDelIndex(),
+ $keys[2] => $this->getUsrUid(),
+ $keys[3] => $this->getTasUid(),
+ $keys[4] => $this->getProUid(),
+ $keys[5] => $this->getAppNumber(),
+ $keys[6] => $this->getAppTitle(),
+ $keys[7] => $this->getAppProTitle(),
+ $keys[8] => $this->getAppTasTitle(),
+ $keys[9] => $this->getAppUpdateDate(),
+ $keys[10] => $this->getDelPreviousUsrUid(),
+ $keys[11] => $this->getDelPreviousUsrUsername(),
+ $keys[12] => $this->getDelPreviousUsrFirstname(),
+ $keys[13] => $this->getDelPreviousUsrLastname(),
+ $keys[14] => $this->getDelDelegateDate(),
+ $keys[15] => $this->getDelInitDate(),
+ $keys[16] => $this->getDelDueDate(),
+ $keys[17] => $this->getDelPriority(),
+ );
+ 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 = ListInboxPeer::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->setAppUid($value);
+ break;
+ case 1:
+ $this->setDelIndex($value);
+ break;
+ case 2:
+ $this->setUsrUid($value);
+ break;
+ case 3:
+ $this->setTasUid($value);
+ break;
+ case 4:
+ $this->setProUid($value);
+ break;
+ case 5:
+ $this->setAppNumber($value);
+ break;
+ case 6:
+ $this->setAppTitle($value);
+ break;
+ case 7:
+ $this->setAppProTitle($value);
+ break;
+ case 8:
+ $this->setAppTasTitle($value);
+ break;
+ case 9:
+ $this->setAppUpdateDate($value);
+ break;
+ case 10:
+ $this->setDelPreviousUsrUid($value);
+ break;
+ case 11:
+ $this->setDelPreviousUsrUsername($value);
+ break;
+ case 12:
+ $this->setDelPreviousUsrFirstname($value);
+ break;
+ case 13:
+ $this->setDelPreviousUsrLastname($value);
+ break;
+ case 14:
+ $this->setDelDelegateDate($value);
+ break;
+ case 15:
+ $this->setDelInitDate($value);
+ break;
+ case 16:
+ $this->setDelDueDate($value);
+ break;
+ case 17:
+ $this->setDelPriority($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 = ListInboxPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setAppUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setDelIndex($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setUsrUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setTasUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setProUid($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setAppNumber($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setAppTitle($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setAppProTitle($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setAppTasTitle($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setAppUpdateDate($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setDelPreviousUsrUid($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setDelPreviousUsrUsername($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setDelPreviousUsrFirstname($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setDelPreviousUsrLastname($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setDelDelegateDate($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setDelInitDate($arr[$keys[15]]);
+ }
+
+ if (array_key_exists($keys[16], $arr)) {
+ $this->setDelDueDate($arr[$keys[16]]);
+ }
+
+ if (array_key_exists($keys[17], $arr)) {
+ $this->setDelPriority($arr[$keys[17]]);
+ }
+
+ }
+
+ /**
+ * Build a Criteria object containing the values of all modified columns in this object.
+ *
+ * @return Criteria The Criteria object containing all modified values.
+ */
+ public function buildCriteria()
+ {
+ $criteria = new Criteria(ListInboxPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(ListInboxPeer::APP_UID)) {
+ $criteria->add(ListInboxPeer::APP_UID, $this->app_uid);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_INDEX)) {
+ $criteria->add(ListInboxPeer::DEL_INDEX, $this->del_index);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::USR_UID)) {
+ $criteria->add(ListInboxPeer::USR_UID, $this->usr_uid);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::TAS_UID)) {
+ $criteria->add(ListInboxPeer::TAS_UID, $this->tas_uid);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::PRO_UID)) {
+ $criteria->add(ListInboxPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::APP_NUMBER)) {
+ $criteria->add(ListInboxPeer::APP_NUMBER, $this->app_number);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::APP_TITLE)) {
+ $criteria->add(ListInboxPeer::APP_TITLE, $this->app_title);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::APP_PRO_TITLE)) {
+ $criteria->add(ListInboxPeer::APP_PRO_TITLE, $this->app_pro_title);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::APP_TAS_TITLE)) {
+ $criteria->add(ListInboxPeer::APP_TAS_TITLE, $this->app_tas_title);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::APP_UPDATE_DATE)) {
+ $criteria->add(ListInboxPeer::APP_UPDATE_DATE, $this->app_update_date);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_PREVIOUS_USR_UID)) {
+ $criteria->add(ListInboxPeer::DEL_PREVIOUS_USR_UID, $this->del_previous_usr_uid);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_PREVIOUS_USR_USERNAME)) {
+ $criteria->add(ListInboxPeer::DEL_PREVIOUS_USR_USERNAME, $this->del_previous_usr_username);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME)) {
+ $criteria->add(ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME, $this->del_previous_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME)) {
+ $criteria->add(ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME, $this->del_previous_usr_lastname);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_DELEGATE_DATE)) {
+ $criteria->add(ListInboxPeer::DEL_DELEGATE_DATE, $this->del_delegate_date);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_INIT_DATE)) {
+ $criteria->add(ListInboxPeer::DEL_INIT_DATE, $this->del_init_date);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_DUE_DATE)) {
+ $criteria->add(ListInboxPeer::DEL_DUE_DATE, $this->del_due_date);
+ }
+
+ if ($this->isColumnModified(ListInboxPeer::DEL_PRIORITY)) {
+ $criteria->add(ListInboxPeer::DEL_PRIORITY, $this->del_priority);
+ }
+
+
+ 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(ListInboxPeer::DATABASE_NAME);
+
+ $criteria->add(ListInboxPeer::APP_UID, $this->app_uid);
+ $criteria->add(ListInboxPeer::DEL_INDEX, $this->del_index);
+
+ 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->getAppUid();
+
+ $pks[1] = $this->getDelIndex();
+
+ 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->setAppUid($keys[0]);
+
+ $this->setDelIndex($keys[1]);
+
+ }
+
+ /**
+ * 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 ListInbox (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->setUsrUid($this->usr_uid);
+
+ $copyObj->setTasUid($this->tas_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setAppNumber($this->app_number);
+
+ $copyObj->setAppTitle($this->app_title);
+
+ $copyObj->setAppProTitle($this->app_pro_title);
+
+ $copyObj->setAppTasTitle($this->app_tas_title);
+
+ $copyObj->setAppUpdateDate($this->app_update_date);
+
+ $copyObj->setDelPreviousUsrUid($this->del_previous_usr_uid);
+
+ $copyObj->setDelPreviousUsrUsername($this->del_previous_usr_username);
+
+ $copyObj->setDelPreviousUsrFirstname($this->del_previous_usr_firstname);
+
+ $copyObj->setDelPreviousUsrLastname($this->del_previous_usr_lastname);
+
+ $copyObj->setDelDelegateDate($this->del_delegate_date);
+
+ $copyObj->setDelInitDate($this->del_init_date);
+
+ $copyObj->setDelDueDate($this->del_due_date);
+
+ $copyObj->setDelPriority($this->del_priority);
+
+
+ $copyObj->setNew(true);
+
+ $copyObj->setAppUid(''); // this is a pkey column, so set to default value
+
+ $copyObj->setDelIndex('0'); // 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 ListInbox 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 ListInboxPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new ListInboxPeer();
+ }
+ return self::$peer;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListInboxPeer.php b/workflow/engine/classes/model/om/BaseListInboxPeer.php
new file mode 100644
index 000000000..ea20f38d9
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListInboxPeer.php
@@ -0,0 +1,642 @@
+ 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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. 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');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListMyInbox.php b/workflow/engine/classes/model/om/BaseListMyInbox.php
new file mode 100644
index 000000000..56a9eb6f5
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListMyInbox.php
@@ -0,0 +1,2070 @@
+app_uid;
+ }
+
+ /**
+ * Get the [usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getUsrUid()
+ {
+
+ return $this->usr_uid;
+ }
+
+ /**
+ * Get the [tas_uid] column value.
+ *
+ * @return string
+ */
+ public function getTasUid()
+ {
+
+ return $this->tas_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [app_number] column value.
+ *
+ * @return int
+ */
+ public function getAppNumber()
+ {
+
+ return $this->app_number;
+ }
+
+ /**
+ * Get the [app_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTitle()
+ {
+
+ return $this->app_title;
+ }
+
+ /**
+ * Get the [app_pro_title] column value.
+ *
+ * @return string
+ */
+ public function getAppProTitle()
+ {
+
+ return $this->app_pro_title;
+ }
+
+ /**
+ * Get the [app_tas_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTasTitle()
+ {
+
+ return $this->app_tas_title;
+ }
+
+ /**
+ * Get the [optionally formatted] [app_create_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getAppCreateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->app_create_date === null || $this->app_create_date === '') {
+ return null;
+ } elseif (!is_int($this->app_create_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->app_create_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [app_create_date] as date/time value: " .
+ var_export($this->app_create_date, true));
+ }
+ } else {
+ $ts = $this->app_create_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [app_update_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getAppUpdateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->app_update_date === null || $this->app_update_date === '') {
+ return null;
+ } elseif (!is_int($this->app_update_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->app_update_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [app_update_date] as date/time value: " .
+ var_export($this->app_update_date, true));
+ }
+ } else {
+ $ts = $this->app_update_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [app_finish_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getAppFinishDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->app_finish_date === null || $this->app_finish_date === '') {
+ return null;
+ } elseif (!is_int($this->app_finish_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->app_finish_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [app_finish_date] as date/time value: " .
+ var_export($this->app_finish_date, true));
+ }
+ } else {
+ $ts = $this->app_finish_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [app_status] column value.
+ *
+ * @return string
+ */
+ public function getAppStatus()
+ {
+
+ return $this->app_status;
+ }
+
+ /**
+ * Get the [del_index] column value.
+ *
+ * @return int
+ */
+ public function getDelIndex()
+ {
+
+ return $this->del_index;
+ }
+
+ /**
+ * Get the [del_previous_usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUid()
+ {
+
+ return $this->del_previous_usr_uid;
+ }
+
+ /**
+ * Get the [del_previous_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUsername()
+ {
+
+ return $this->del_previous_usr_username;
+ }
+
+ /**
+ * Get the [del_previous_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrFirstname()
+ {
+
+ return $this->del_previous_usr_firstname;
+ }
+
+ /**
+ * Get the [del_previous_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrLastname()
+ {
+
+ return $this->del_previous_usr_lastname;
+ }
+
+ /**
+ * Get the [del_current_usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrUid()
+ {
+
+ return $this->del_current_usr_uid;
+ }
+
+ /**
+ * Get the [del_current_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrUsername()
+ {
+
+ return $this->del_current_usr_username;
+ }
+
+ /**
+ * Get the [del_current_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrFirstname()
+ {
+
+ return $this->del_current_usr_firstname;
+ }
+
+ /**
+ * Get the [del_current_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrLastname()
+ {
+
+ return $this->del_current_usr_lastname;
+ }
+
+ /**
+ * Get the [optionally formatted] [del_delegate_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDelegateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_delegate_date === null || $this->del_delegate_date === '') {
+ return null;
+ } elseif (!is_int($this->del_delegate_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_delegate_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_delegate_date] as date/time value: " .
+ var_export($this->del_delegate_date, true));
+ }
+ } else {
+ $ts = $this->del_delegate_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_init_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelInitDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_init_date === null || $this->del_init_date === '') {
+ return null;
+ } elseif (!is_int($this->del_init_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_init_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_init_date] as date/time value: " .
+ var_export($this->del_init_date, true));
+ }
+ } else {
+ $ts = $this->del_init_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_due_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDueDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_due_date === null || $this->del_due_date === '') {
+ return null;
+ } elseif (!is_int($this->del_due_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_due_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_due_date] as date/time value: " .
+ var_export($this->del_due_date, true));
+ }
+ } else {
+ $ts = $this->del_due_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [del_priority] column value.
+ *
+ * @return string
+ */
+ public function getDelPriority()
+ {
+
+ return $this->del_priority;
+ }
+
+ /**
+ * Set the value of [app_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppUid($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->app_uid !== $v || $v === '') {
+ $this->app_uid = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_UID;
+ }
+
+ } // setAppUid()
+
+ /**
+ * 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[] = ListMyInboxPeer::USR_UID;
+ }
+
+ } // setUsrUid()
+
+ /**
+ * Set the value of [tas_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setTasUid($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->tas_uid !== $v || $v === '') {
+ $this->tas_uid = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::TAS_UID;
+ }
+
+ } // setTasUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [app_number] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppNumber($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->app_number !== $v || $v === 0) {
+ $this->app_number = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_NUMBER;
+ }
+
+ } // setAppNumber()
+
+ /**
+ * Set the value of [app_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTitle($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->app_title !== $v || $v === '') {
+ $this->app_title = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_TITLE;
+ }
+
+ } // setAppTitle()
+
+ /**
+ * Set the value of [app_pro_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppProTitle($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->app_pro_title !== $v || $v === '') {
+ $this->app_pro_title = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_PRO_TITLE;
+ }
+
+ } // setAppProTitle()
+
+ /**
+ * Set the value of [app_tas_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTasTitle($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->app_tas_title !== $v || $v === '') {
+ $this->app_tas_title = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_TAS_TITLE;
+ }
+
+ } // setAppTasTitle()
+
+ /**
+ * Set the value of [app_create_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppCreateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [app_create_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->app_create_date !== $ts) {
+ $this->app_create_date = $ts;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_CREATE_DATE;
+ }
+
+ } // setAppCreateDate()
+
+ /**
+ * Set the value of [app_update_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppUpdateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [app_update_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->app_update_date !== $ts) {
+ $this->app_update_date = $ts;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_UPDATE_DATE;
+ }
+
+ } // setAppUpdateDate()
+
+ /**
+ * Set the value of [app_finish_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppFinishDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [app_finish_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->app_finish_date !== $ts) {
+ $this->app_finish_date = $ts;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_FINISH_DATE;
+ }
+
+ } // setAppFinishDate()
+
+ /**
+ * Set the value of [app_status] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppStatus($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->app_status !== $v || $v === '') {
+ $this->app_status = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::APP_STATUS;
+ }
+
+ } // setAppStatus()
+
+ /**
+ * Set the value of [del_index] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelIndex($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->del_index !== $v || $v === 0) {
+ $this->del_index = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_INDEX;
+ }
+
+ } // setDelIndex()
+
+ /**
+ * Set the value of [del_previous_usr_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUid($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->del_previous_usr_uid !== $v || $v === '') {
+ $this->del_previous_usr_uid = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_PREVIOUS_USR_UID;
+ }
+
+ } // setDelPreviousUsrUid()
+
+ /**
+ * Set the value of [del_previous_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUsername($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->del_previous_usr_username !== $v || $v === '') {
+ $this->del_previous_usr_username = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_PREVIOUS_USR_USERNAME;
+ }
+
+ } // setDelPreviousUsrUsername()
+
+ /**
+ * Set the value of [del_previous_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrFirstname($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->del_previous_usr_firstname !== $v || $v === '') {
+ $this->del_previous_usr_firstname = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME;
+ }
+
+ } // setDelPreviousUsrFirstname()
+
+ /**
+ * Set the value of [del_previous_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrLastname($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->del_previous_usr_lastname !== $v || $v === '') {
+ $this->del_previous_usr_lastname = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_PREVIOUS_USR_LASTNAME;
+ }
+
+ } // setDelPreviousUsrLastname()
+
+ /**
+ * Set the value of [del_current_usr_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrUid($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->del_current_usr_uid !== $v || $v === '') {
+ $this->del_current_usr_uid = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_CURRENT_USR_UID;
+ }
+
+ } // setDelCurrentUsrUid()
+
+ /**
+ * Set the value of [del_current_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrUsername($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->del_current_usr_username !== $v || $v === '') {
+ $this->del_current_usr_username = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_CURRENT_USR_USERNAME;
+ }
+
+ } // setDelCurrentUsrUsername()
+
+ /**
+ * Set the value of [del_current_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrFirstname($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->del_current_usr_firstname !== $v || $v === '') {
+ $this->del_current_usr_firstname = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_CURRENT_USR_FIRSTNAME;
+ }
+
+ } // setDelCurrentUsrFirstname()
+
+ /**
+ * Set the value of [del_current_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrLastname($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->del_current_usr_lastname !== $v || $v === '') {
+ $this->del_current_usr_lastname = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_CURRENT_USR_LASTNAME;
+ }
+
+ } // setDelCurrentUsrLastname()
+
+ /**
+ * Set the value of [del_delegate_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDelegateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_delegate_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_delegate_date !== $ts) {
+ $this->del_delegate_date = $ts;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_DELEGATE_DATE;
+ }
+
+ } // setDelDelegateDate()
+
+ /**
+ * Set the value of [del_init_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelInitDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_init_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_init_date !== $ts) {
+ $this->del_init_date = $ts;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_INIT_DATE;
+ }
+
+ } // setDelInitDate()
+
+ /**
+ * Set the value of [del_due_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDueDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_due_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_due_date !== $ts) {
+ $this->del_due_date = $ts;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_DUE_DATE;
+ }
+
+ } // setDelDueDate()
+
+ /**
+ * Set the value of [del_priority] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPriority($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->del_priority !== $v || $v === '3') {
+ $this->del_priority = $v;
+ $this->modifiedColumns[] = ListMyInboxPeer::DEL_PRIORITY;
+ }
+
+ } // setDelPriority()
+
+ /**
+ * 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->app_uid = $rs->getString($startcol + 0);
+
+ $this->usr_uid = $rs->getString($startcol + 1);
+
+ $this->tas_uid = $rs->getString($startcol + 2);
+
+ $this->pro_uid = $rs->getString($startcol + 3);
+
+ $this->app_number = $rs->getInt($startcol + 4);
+
+ $this->app_title = $rs->getString($startcol + 5);
+
+ $this->app_pro_title = $rs->getString($startcol + 6);
+
+ $this->app_tas_title = $rs->getString($startcol + 7);
+
+ $this->app_create_date = $rs->getTimestamp($startcol + 8, null);
+
+ $this->app_update_date = $rs->getTimestamp($startcol + 9, null);
+
+ $this->app_finish_date = $rs->getTimestamp($startcol + 10, null);
+
+ $this->app_status = $rs->getString($startcol + 11);
+
+ $this->del_index = $rs->getInt($startcol + 12);
+
+ $this->del_previous_usr_uid = $rs->getString($startcol + 13);
+
+ $this->del_previous_usr_username = $rs->getString($startcol + 14);
+
+ $this->del_previous_usr_firstname = $rs->getString($startcol + 15);
+
+ $this->del_previous_usr_lastname = $rs->getString($startcol + 16);
+
+ $this->del_current_usr_uid = $rs->getString($startcol + 17);
+
+ $this->del_current_usr_username = $rs->getString($startcol + 18);
+
+ $this->del_current_usr_firstname = $rs->getString($startcol + 19);
+
+ $this->del_current_usr_lastname = $rs->getString($startcol + 20);
+
+ $this->del_delegate_date = $rs->getTimestamp($startcol + 21, null);
+
+ $this->del_init_date = $rs->getTimestamp($startcol + 22, null);
+
+ $this->del_due_date = $rs->getTimestamp($startcol + 23, null);
+
+ $this->del_priority = $rs->getString($startcol + 24);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 25; // 25 = ListMyInboxPeer::NUM_COLUMNS - ListMyInboxPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating ListMyInbox 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(ListMyInboxPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ ListMyInboxPeer::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(ListMyInboxPeer::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 = ListMyInboxPeer::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 += ListMyInboxPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ $this->alreadyInSave = false;
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = ListMyInboxPeer::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 = ListMyInboxPeer::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->getAppUid();
+ break;
+ case 1:
+ return $this->getUsrUid();
+ break;
+ case 2:
+ return $this->getTasUid();
+ break;
+ case 3:
+ return $this->getProUid();
+ break;
+ case 4:
+ return $this->getAppNumber();
+ break;
+ case 5:
+ return $this->getAppTitle();
+ break;
+ case 6:
+ return $this->getAppProTitle();
+ break;
+ case 7:
+ return $this->getAppTasTitle();
+ break;
+ case 8:
+ return $this->getAppCreateDate();
+ break;
+ case 9:
+ return $this->getAppUpdateDate();
+ break;
+ case 10:
+ return $this->getAppFinishDate();
+ break;
+ case 11:
+ return $this->getAppStatus();
+ break;
+ case 12:
+ return $this->getDelIndex();
+ break;
+ case 13:
+ return $this->getDelPreviousUsrUid();
+ break;
+ case 14:
+ return $this->getDelPreviousUsrUsername();
+ break;
+ case 15:
+ return $this->getDelPreviousUsrFirstname();
+ break;
+ case 16:
+ return $this->getDelPreviousUsrLastname();
+ break;
+ case 17:
+ return $this->getDelCurrentUsrUid();
+ break;
+ case 18:
+ return $this->getDelCurrentUsrUsername();
+ break;
+ case 19:
+ return $this->getDelCurrentUsrFirstname();
+ break;
+ case 20:
+ return $this->getDelCurrentUsrLastname();
+ break;
+ case 21:
+ return $this->getDelDelegateDate();
+ break;
+ case 22:
+ return $this->getDelInitDate();
+ break;
+ case 23:
+ return $this->getDelDueDate();
+ break;
+ case 24:
+ return $this->getDelPriority();
+ 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 = ListMyInboxPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getAppUid(),
+ $keys[1] => $this->getUsrUid(),
+ $keys[2] => $this->getTasUid(),
+ $keys[3] => $this->getProUid(),
+ $keys[4] => $this->getAppNumber(),
+ $keys[5] => $this->getAppTitle(),
+ $keys[6] => $this->getAppProTitle(),
+ $keys[7] => $this->getAppTasTitle(),
+ $keys[8] => $this->getAppCreateDate(),
+ $keys[9] => $this->getAppUpdateDate(),
+ $keys[10] => $this->getAppFinishDate(),
+ $keys[11] => $this->getAppStatus(),
+ $keys[12] => $this->getDelIndex(),
+ $keys[13] => $this->getDelPreviousUsrUid(),
+ $keys[14] => $this->getDelPreviousUsrUsername(),
+ $keys[15] => $this->getDelPreviousUsrFirstname(),
+ $keys[16] => $this->getDelPreviousUsrLastname(),
+ $keys[17] => $this->getDelCurrentUsrUid(),
+ $keys[18] => $this->getDelCurrentUsrUsername(),
+ $keys[19] => $this->getDelCurrentUsrFirstname(),
+ $keys[20] => $this->getDelCurrentUsrLastname(),
+ $keys[21] => $this->getDelDelegateDate(),
+ $keys[22] => $this->getDelInitDate(),
+ $keys[23] => $this->getDelDueDate(),
+ $keys[24] => $this->getDelPriority(),
+ );
+ 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 = ListMyInboxPeer::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->setAppUid($value);
+ break;
+ case 1:
+ $this->setUsrUid($value);
+ break;
+ case 2:
+ $this->setTasUid($value);
+ break;
+ case 3:
+ $this->setProUid($value);
+ break;
+ case 4:
+ $this->setAppNumber($value);
+ break;
+ case 5:
+ $this->setAppTitle($value);
+ break;
+ case 6:
+ $this->setAppProTitle($value);
+ break;
+ case 7:
+ $this->setAppTasTitle($value);
+ break;
+ case 8:
+ $this->setAppCreateDate($value);
+ break;
+ case 9:
+ $this->setAppUpdateDate($value);
+ break;
+ case 10:
+ $this->setAppFinishDate($value);
+ break;
+ case 11:
+ $this->setAppStatus($value);
+ break;
+ case 12:
+ $this->setDelIndex($value);
+ break;
+ case 13:
+ $this->setDelPreviousUsrUid($value);
+ break;
+ case 14:
+ $this->setDelPreviousUsrUsername($value);
+ break;
+ case 15:
+ $this->setDelPreviousUsrFirstname($value);
+ break;
+ case 16:
+ $this->setDelPreviousUsrLastname($value);
+ break;
+ case 17:
+ $this->setDelCurrentUsrUid($value);
+ break;
+ case 18:
+ $this->setDelCurrentUsrUsername($value);
+ break;
+ case 19:
+ $this->setDelCurrentUsrFirstname($value);
+ break;
+ case 20:
+ $this->setDelCurrentUsrLastname($value);
+ break;
+ case 21:
+ $this->setDelDelegateDate($value);
+ break;
+ case 22:
+ $this->setDelInitDate($value);
+ break;
+ case 23:
+ $this->setDelDueDate($value);
+ break;
+ case 24:
+ $this->setDelPriority($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 = ListMyInboxPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setAppUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setUsrUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setTasUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setProUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setAppNumber($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setAppTitle($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setAppProTitle($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setAppTasTitle($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setAppCreateDate($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setAppUpdateDate($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setAppFinishDate($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setAppStatus($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setDelIndex($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setDelPreviousUsrUid($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setDelPreviousUsrUsername($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setDelPreviousUsrFirstname($arr[$keys[15]]);
+ }
+
+ if (array_key_exists($keys[16], $arr)) {
+ $this->setDelPreviousUsrLastname($arr[$keys[16]]);
+ }
+
+ if (array_key_exists($keys[17], $arr)) {
+ $this->setDelCurrentUsrUid($arr[$keys[17]]);
+ }
+
+ if (array_key_exists($keys[18], $arr)) {
+ $this->setDelCurrentUsrUsername($arr[$keys[18]]);
+ }
+
+ if (array_key_exists($keys[19], $arr)) {
+ $this->setDelCurrentUsrFirstname($arr[$keys[19]]);
+ }
+
+ if (array_key_exists($keys[20], $arr)) {
+ $this->setDelCurrentUsrLastname($arr[$keys[20]]);
+ }
+
+ if (array_key_exists($keys[21], $arr)) {
+ $this->setDelDelegateDate($arr[$keys[21]]);
+ }
+
+ if (array_key_exists($keys[22], $arr)) {
+ $this->setDelInitDate($arr[$keys[22]]);
+ }
+
+ if (array_key_exists($keys[23], $arr)) {
+ $this->setDelDueDate($arr[$keys[23]]);
+ }
+
+ if (array_key_exists($keys[24], $arr)) {
+ $this->setDelPriority($arr[$keys[24]]);
+ }
+
+ }
+
+ /**
+ * 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(ListMyInboxPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_UID)) {
+ $criteria->add(ListMyInboxPeer::APP_UID, $this->app_uid);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::USR_UID)) {
+ $criteria->add(ListMyInboxPeer::USR_UID, $this->usr_uid);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::TAS_UID)) {
+ $criteria->add(ListMyInboxPeer::TAS_UID, $this->tas_uid);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::PRO_UID)) {
+ $criteria->add(ListMyInboxPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_NUMBER)) {
+ $criteria->add(ListMyInboxPeer::APP_NUMBER, $this->app_number);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_TITLE)) {
+ $criteria->add(ListMyInboxPeer::APP_TITLE, $this->app_title);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_PRO_TITLE)) {
+ $criteria->add(ListMyInboxPeer::APP_PRO_TITLE, $this->app_pro_title);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_TAS_TITLE)) {
+ $criteria->add(ListMyInboxPeer::APP_TAS_TITLE, $this->app_tas_title);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_CREATE_DATE)) {
+ $criteria->add(ListMyInboxPeer::APP_CREATE_DATE, $this->app_create_date);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_UPDATE_DATE)) {
+ $criteria->add(ListMyInboxPeer::APP_UPDATE_DATE, $this->app_update_date);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_FINISH_DATE)) {
+ $criteria->add(ListMyInboxPeer::APP_FINISH_DATE, $this->app_finish_date);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::APP_STATUS)) {
+ $criteria->add(ListMyInboxPeer::APP_STATUS, $this->app_status);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_INDEX)) {
+ $criteria->add(ListMyInboxPeer::DEL_INDEX, $this->del_index);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_PREVIOUS_USR_UID)) {
+ $criteria->add(ListMyInboxPeer::DEL_PREVIOUS_USR_UID, $this->del_previous_usr_uid);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_PREVIOUS_USR_USERNAME)) {
+ $criteria->add(ListMyInboxPeer::DEL_PREVIOUS_USR_USERNAME, $this->del_previous_usr_username);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME)) {
+ $criteria->add(ListMyInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME, $this->del_previous_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_PREVIOUS_USR_LASTNAME)) {
+ $criteria->add(ListMyInboxPeer::DEL_PREVIOUS_USR_LASTNAME, $this->del_previous_usr_lastname);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_CURRENT_USR_UID)) {
+ $criteria->add(ListMyInboxPeer::DEL_CURRENT_USR_UID, $this->del_current_usr_uid);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_CURRENT_USR_USERNAME)) {
+ $criteria->add(ListMyInboxPeer::DEL_CURRENT_USR_USERNAME, $this->del_current_usr_username);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_CURRENT_USR_FIRSTNAME)) {
+ $criteria->add(ListMyInboxPeer::DEL_CURRENT_USR_FIRSTNAME, $this->del_current_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_CURRENT_USR_LASTNAME)) {
+ $criteria->add(ListMyInboxPeer::DEL_CURRENT_USR_LASTNAME, $this->del_current_usr_lastname);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_DELEGATE_DATE)) {
+ $criteria->add(ListMyInboxPeer::DEL_DELEGATE_DATE, $this->del_delegate_date);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_INIT_DATE)) {
+ $criteria->add(ListMyInboxPeer::DEL_INIT_DATE, $this->del_init_date);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_DUE_DATE)) {
+ $criteria->add(ListMyInboxPeer::DEL_DUE_DATE, $this->del_due_date);
+ }
+
+ if ($this->isColumnModified(ListMyInboxPeer::DEL_PRIORITY)) {
+ $criteria->add(ListMyInboxPeer::DEL_PRIORITY, $this->del_priority);
+ }
+
+
+ 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(ListMyInboxPeer::DATABASE_NAME);
+
+ $criteria->add(ListMyInboxPeer::APP_UID, $this->app_uid);
+
+ return $criteria;
+ }
+
+ /**
+ * Returns the primary key for this object (row).
+ * @return string
+ */
+ public function getPrimaryKey()
+ {
+ return $this->getAppUid();
+ }
+
+ /**
+ * Generic method to set the primary key (app_uid column).
+ *
+ * @param string $key Primary key.
+ * @return void
+ */
+ public function setPrimaryKey($key)
+ {
+ $this->setAppUid($key);
+ }
+
+ /**
+ * 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 ListMyInbox (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->setUsrUid($this->usr_uid);
+
+ $copyObj->setTasUid($this->tas_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setAppNumber($this->app_number);
+
+ $copyObj->setAppTitle($this->app_title);
+
+ $copyObj->setAppProTitle($this->app_pro_title);
+
+ $copyObj->setAppTasTitle($this->app_tas_title);
+
+ $copyObj->setAppCreateDate($this->app_create_date);
+
+ $copyObj->setAppUpdateDate($this->app_update_date);
+
+ $copyObj->setAppFinishDate($this->app_finish_date);
+
+ $copyObj->setAppStatus($this->app_status);
+
+ $copyObj->setDelIndex($this->del_index);
+
+ $copyObj->setDelPreviousUsrUid($this->del_previous_usr_uid);
+
+ $copyObj->setDelPreviousUsrUsername($this->del_previous_usr_username);
+
+ $copyObj->setDelPreviousUsrFirstname($this->del_previous_usr_firstname);
+
+ $copyObj->setDelPreviousUsrLastname($this->del_previous_usr_lastname);
+
+ $copyObj->setDelCurrentUsrUid($this->del_current_usr_uid);
+
+ $copyObj->setDelCurrentUsrUsername($this->del_current_usr_username);
+
+ $copyObj->setDelCurrentUsrFirstname($this->del_current_usr_firstname);
+
+ $copyObj->setDelCurrentUsrLastname($this->del_current_usr_lastname);
+
+ $copyObj->setDelDelegateDate($this->del_delegate_date);
+
+ $copyObj->setDelInitDate($this->del_init_date);
+
+ $copyObj->setDelDueDate($this->del_due_date);
+
+ $copyObj->setDelPriority($this->del_priority);
+
+
+ $copyObj->setNew(true);
+
+ $copyObj->setAppUid(''); // 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 ListMyInbox 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 ListMyInboxPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new ListMyInboxPeer();
+ }
+ return self::$peer;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListMyInboxPeer.php b/workflow/engine/classes/model/om/BaseListMyInboxPeer.php
new file mode 100644
index 000000000..767848769
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListMyInboxPeer.php
@@ -0,0 +1,687 @@
+ 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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. 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');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListParticipatedHistory.php b/workflow/engine/classes/model/om/BaseListParticipatedHistory.php
new file mode 100644
index 000000000..ee0fc28bd
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListParticipatedHistory.php
@@ -0,0 +1,1708 @@
+app_uid;
+ }
+
+ /**
+ * Get the [del_index] column value.
+ *
+ * @return int
+ */
+ public function getDelIndex()
+ {
+
+ return $this->del_index;
+ }
+
+ /**
+ * Get the [usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getUsrUid()
+ {
+
+ return $this->usr_uid;
+ }
+
+ /**
+ * Get the [tas_uid] column value.
+ *
+ * @return string
+ */
+ public function getTasUid()
+ {
+
+ return $this->tas_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [app_number] column value.
+ *
+ * @return int
+ */
+ public function getAppNumber()
+ {
+
+ return $this->app_number;
+ }
+
+ /**
+ * Get the [app_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTitle()
+ {
+
+ return $this->app_title;
+ }
+
+ /**
+ * Get the [app_pro_title] column value.
+ *
+ * @return string
+ */
+ public function getAppProTitle()
+ {
+
+ return $this->app_pro_title;
+ }
+
+ /**
+ * Get the [app_tas_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTasTitle()
+ {
+
+ return $this->app_tas_title;
+ }
+
+ /**
+ * Get the [del_previous_usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUid()
+ {
+
+ return $this->del_previous_usr_uid;
+ }
+
+ /**
+ * Get the [del_previous_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUsername()
+ {
+
+ return $this->del_previous_usr_username;
+ }
+
+ /**
+ * Get the [del_previous_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrFirstname()
+ {
+
+ return $this->del_previous_usr_firstname;
+ }
+
+ /**
+ * Get the [del_previous_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrLastname()
+ {
+
+ return $this->del_previous_usr_lastname;
+ }
+
+ /**
+ * Get the [del_current_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrUsername()
+ {
+
+ return $this->del_current_usr_username;
+ }
+
+ /**
+ * Get the [del_current_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrFirstname()
+ {
+
+ return $this->del_current_usr_firstname;
+ }
+
+ /**
+ * Get the [del_current_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getDelCurrentUsrLastname()
+ {
+
+ return $this->del_current_usr_lastname;
+ }
+
+ /**
+ * Get the [optionally formatted] [del_delegate_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDelegateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_delegate_date === null || $this->del_delegate_date === '') {
+ return null;
+ } elseif (!is_int($this->del_delegate_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_delegate_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_delegate_date] as date/time value: " .
+ var_export($this->del_delegate_date, true));
+ }
+ } else {
+ $ts = $this->del_delegate_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_init_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelInitDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_init_date === null || $this->del_init_date === '') {
+ return null;
+ } elseif (!is_int($this->del_init_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_init_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_init_date] as date/time value: " .
+ var_export($this->del_init_date, true));
+ }
+ } else {
+ $ts = $this->del_init_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_due_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDueDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_due_date === null || $this->del_due_date === '') {
+ return null;
+ } elseif (!is_int($this->del_due_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_due_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_due_date] as date/time value: " .
+ var_export($this->del_due_date, true));
+ }
+ } else {
+ $ts = $this->del_due_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [del_priority] column value.
+ *
+ * @return string
+ */
+ public function getDelPriority()
+ {
+
+ return $this->del_priority;
+ }
+
+ /**
+ * Set the value of [app_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppUid($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->app_uid !== $v || $v === '') {
+ $this->app_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::APP_UID;
+ }
+
+ } // setAppUid()
+
+ /**
+ * Set the value of [del_index] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelIndex($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->del_index !== $v || $v === 0) {
+ $this->del_index = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_INDEX;
+ }
+
+ } // setDelIndex()
+
+ /**
+ * 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[] = ListParticipatedHistoryPeer::USR_UID;
+ }
+
+ } // setUsrUid()
+
+ /**
+ * Set the value of [tas_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setTasUid($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->tas_uid !== $v || $v === '') {
+ $this->tas_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::TAS_UID;
+ }
+
+ } // setTasUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [app_number] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppNumber($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->app_number !== $v || $v === 0) {
+ $this->app_number = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::APP_NUMBER;
+ }
+
+ } // setAppNumber()
+
+ /**
+ * Set the value of [app_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTitle($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->app_title !== $v || $v === '') {
+ $this->app_title = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::APP_TITLE;
+ }
+
+ } // setAppTitle()
+
+ /**
+ * Set the value of [app_pro_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppProTitle($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->app_pro_title !== $v || $v === '') {
+ $this->app_pro_title = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::APP_PRO_TITLE;
+ }
+
+ } // setAppProTitle()
+
+ /**
+ * Set the value of [app_tas_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTasTitle($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->app_tas_title !== $v || $v === '') {
+ $this->app_tas_title = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::APP_TAS_TITLE;
+ }
+
+ } // setAppTasTitle()
+
+ /**
+ * Set the value of [del_previous_usr_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUid($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->del_previous_usr_uid !== $v || $v === '') {
+ $this->del_previous_usr_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_UID;
+ }
+
+ } // setDelPreviousUsrUid()
+
+ /**
+ * Set the value of [del_previous_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUsername($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->del_previous_usr_username !== $v || $v === '') {
+ $this->del_previous_usr_username = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_USERNAME;
+ }
+
+ } // setDelPreviousUsrUsername()
+
+ /**
+ * Set the value of [del_previous_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrFirstname($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->del_previous_usr_firstname !== $v || $v === '') {
+ $this->del_previous_usr_firstname = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_FIRSTNAME;
+ }
+
+ } // setDelPreviousUsrFirstname()
+
+ /**
+ * Set the value of [del_previous_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrLastname($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->del_previous_usr_lastname !== $v || $v === '') {
+ $this->del_previous_usr_lastname = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_LASTNAME;
+ }
+
+ } // setDelPreviousUsrLastname()
+
+ /**
+ * Set the value of [del_current_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrUsername($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->del_current_usr_username !== $v || $v === '') {
+ $this->del_current_usr_username = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_CURRENT_USR_USERNAME;
+ }
+
+ } // setDelCurrentUsrUsername()
+
+ /**
+ * Set the value of [del_current_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrFirstname($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->del_current_usr_firstname !== $v || $v === '') {
+ $this->del_current_usr_firstname = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_CURRENT_USR_FIRSTNAME;
+ }
+
+ } // setDelCurrentUsrFirstname()
+
+ /**
+ * Set the value of [del_current_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelCurrentUsrLastname($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->del_current_usr_lastname !== $v || $v === '') {
+ $this->del_current_usr_lastname = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_CURRENT_USR_LASTNAME;
+ }
+
+ } // setDelCurrentUsrLastname()
+
+ /**
+ * Set the value of [del_delegate_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDelegateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_delegate_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_delegate_date !== $ts) {
+ $this->del_delegate_date = $ts;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_DELEGATE_DATE;
+ }
+
+ } // setDelDelegateDate()
+
+ /**
+ * Set the value of [del_init_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelInitDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_init_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_init_date !== $ts) {
+ $this->del_init_date = $ts;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_INIT_DATE;
+ }
+
+ } // setDelInitDate()
+
+ /**
+ * Set the value of [del_due_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDueDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_due_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_due_date !== $ts) {
+ $this->del_due_date = $ts;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_DUE_DATE;
+ }
+
+ } // setDelDueDate()
+
+ /**
+ * Set the value of [del_priority] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPriority($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->del_priority !== $v || $v === '3') {
+ $this->del_priority = $v;
+ $this->modifiedColumns[] = ListParticipatedHistoryPeer::DEL_PRIORITY;
+ }
+
+ } // setDelPriority()
+
+ /**
+ * 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->app_uid = $rs->getString($startcol + 0);
+
+ $this->del_index = $rs->getInt($startcol + 1);
+
+ $this->usr_uid = $rs->getString($startcol + 2);
+
+ $this->tas_uid = $rs->getString($startcol + 3);
+
+ $this->pro_uid = $rs->getString($startcol + 4);
+
+ $this->app_number = $rs->getInt($startcol + 5);
+
+ $this->app_title = $rs->getString($startcol + 6);
+
+ $this->app_pro_title = $rs->getString($startcol + 7);
+
+ $this->app_tas_title = $rs->getString($startcol + 8);
+
+ $this->del_previous_usr_uid = $rs->getString($startcol + 9);
+
+ $this->del_previous_usr_username = $rs->getString($startcol + 10);
+
+ $this->del_previous_usr_firstname = $rs->getString($startcol + 11);
+
+ $this->del_previous_usr_lastname = $rs->getString($startcol + 12);
+
+ $this->del_current_usr_username = $rs->getString($startcol + 13);
+
+ $this->del_current_usr_firstname = $rs->getString($startcol + 14);
+
+ $this->del_current_usr_lastname = $rs->getString($startcol + 15);
+
+ $this->del_delegate_date = $rs->getTimestamp($startcol + 16, null);
+
+ $this->del_init_date = $rs->getTimestamp($startcol + 17, null);
+
+ $this->del_due_date = $rs->getTimestamp($startcol + 18, null);
+
+ $this->del_priority = $rs->getString($startcol + 19);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 20; // 20 = ListParticipatedHistoryPeer::NUM_COLUMNS - ListParticipatedHistoryPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating ListParticipatedHistory 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(ListParticipatedHistoryPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ ListParticipatedHistoryPeer::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(ListParticipatedHistoryPeer::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 = ListParticipatedHistoryPeer::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 += ListParticipatedHistoryPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ $this->alreadyInSave = false;
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = ListParticipatedHistoryPeer::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 = ListParticipatedHistoryPeer::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->getAppUid();
+ break;
+ case 1:
+ return $this->getDelIndex();
+ break;
+ case 2:
+ return $this->getUsrUid();
+ break;
+ case 3:
+ return $this->getTasUid();
+ break;
+ case 4:
+ return $this->getProUid();
+ break;
+ case 5:
+ return $this->getAppNumber();
+ break;
+ case 6:
+ return $this->getAppTitle();
+ break;
+ case 7:
+ return $this->getAppProTitle();
+ break;
+ case 8:
+ return $this->getAppTasTitle();
+ break;
+ case 9:
+ return $this->getDelPreviousUsrUid();
+ break;
+ case 10:
+ return $this->getDelPreviousUsrUsername();
+ break;
+ case 11:
+ return $this->getDelPreviousUsrFirstname();
+ break;
+ case 12:
+ return $this->getDelPreviousUsrLastname();
+ break;
+ case 13:
+ return $this->getDelCurrentUsrUsername();
+ break;
+ case 14:
+ return $this->getDelCurrentUsrFirstname();
+ break;
+ case 15:
+ return $this->getDelCurrentUsrLastname();
+ break;
+ case 16:
+ return $this->getDelDelegateDate();
+ break;
+ case 17:
+ return $this->getDelInitDate();
+ break;
+ case 18:
+ return $this->getDelDueDate();
+ break;
+ case 19:
+ return $this->getDelPriority();
+ 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 = ListParticipatedHistoryPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getAppUid(),
+ $keys[1] => $this->getDelIndex(),
+ $keys[2] => $this->getUsrUid(),
+ $keys[3] => $this->getTasUid(),
+ $keys[4] => $this->getProUid(),
+ $keys[5] => $this->getAppNumber(),
+ $keys[6] => $this->getAppTitle(),
+ $keys[7] => $this->getAppProTitle(),
+ $keys[8] => $this->getAppTasTitle(),
+ $keys[9] => $this->getDelPreviousUsrUid(),
+ $keys[10] => $this->getDelPreviousUsrUsername(),
+ $keys[11] => $this->getDelPreviousUsrFirstname(),
+ $keys[12] => $this->getDelPreviousUsrLastname(),
+ $keys[13] => $this->getDelCurrentUsrUsername(),
+ $keys[14] => $this->getDelCurrentUsrFirstname(),
+ $keys[15] => $this->getDelCurrentUsrLastname(),
+ $keys[16] => $this->getDelDelegateDate(),
+ $keys[17] => $this->getDelInitDate(),
+ $keys[18] => $this->getDelDueDate(),
+ $keys[19] => $this->getDelPriority(),
+ );
+ 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 = ListParticipatedHistoryPeer::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->setAppUid($value);
+ break;
+ case 1:
+ $this->setDelIndex($value);
+ break;
+ case 2:
+ $this->setUsrUid($value);
+ break;
+ case 3:
+ $this->setTasUid($value);
+ break;
+ case 4:
+ $this->setProUid($value);
+ break;
+ case 5:
+ $this->setAppNumber($value);
+ break;
+ case 6:
+ $this->setAppTitle($value);
+ break;
+ case 7:
+ $this->setAppProTitle($value);
+ break;
+ case 8:
+ $this->setAppTasTitle($value);
+ break;
+ case 9:
+ $this->setDelPreviousUsrUid($value);
+ break;
+ case 10:
+ $this->setDelPreviousUsrUsername($value);
+ break;
+ case 11:
+ $this->setDelPreviousUsrFirstname($value);
+ break;
+ case 12:
+ $this->setDelPreviousUsrLastname($value);
+ break;
+ case 13:
+ $this->setDelCurrentUsrUsername($value);
+ break;
+ case 14:
+ $this->setDelCurrentUsrFirstname($value);
+ break;
+ case 15:
+ $this->setDelCurrentUsrLastname($value);
+ break;
+ case 16:
+ $this->setDelDelegateDate($value);
+ break;
+ case 17:
+ $this->setDelInitDate($value);
+ break;
+ case 18:
+ $this->setDelDueDate($value);
+ break;
+ case 19:
+ $this->setDelPriority($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 = ListParticipatedHistoryPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setAppUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setDelIndex($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setUsrUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setTasUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setProUid($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setAppNumber($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setAppTitle($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setAppProTitle($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setAppTasTitle($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setDelPreviousUsrUid($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setDelPreviousUsrUsername($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setDelPreviousUsrFirstname($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setDelPreviousUsrLastname($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setDelCurrentUsrUsername($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setDelCurrentUsrFirstname($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setDelCurrentUsrLastname($arr[$keys[15]]);
+ }
+
+ if (array_key_exists($keys[16], $arr)) {
+ $this->setDelDelegateDate($arr[$keys[16]]);
+ }
+
+ if (array_key_exists($keys[17], $arr)) {
+ $this->setDelInitDate($arr[$keys[17]]);
+ }
+
+ if (array_key_exists($keys[18], $arr)) {
+ $this->setDelDueDate($arr[$keys[18]]);
+ }
+
+ if (array_key_exists($keys[19], $arr)) {
+ $this->setDelPriority($arr[$keys[19]]);
+ }
+
+ }
+
+ /**
+ * 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(ListParticipatedHistoryPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::APP_UID)) {
+ $criteria->add(ListParticipatedHistoryPeer::APP_UID, $this->app_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_INDEX)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_INDEX, $this->del_index);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::USR_UID)) {
+ $criteria->add(ListParticipatedHistoryPeer::USR_UID, $this->usr_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::TAS_UID)) {
+ $criteria->add(ListParticipatedHistoryPeer::TAS_UID, $this->tas_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::PRO_UID)) {
+ $criteria->add(ListParticipatedHistoryPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::APP_NUMBER)) {
+ $criteria->add(ListParticipatedHistoryPeer::APP_NUMBER, $this->app_number);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::APP_TITLE)) {
+ $criteria->add(ListParticipatedHistoryPeer::APP_TITLE, $this->app_title);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::APP_PRO_TITLE)) {
+ $criteria->add(ListParticipatedHistoryPeer::APP_PRO_TITLE, $this->app_pro_title);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::APP_TAS_TITLE)) {
+ $criteria->add(ListParticipatedHistoryPeer::APP_TAS_TITLE, $this->app_tas_title);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_UID)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_UID, $this->del_previous_usr_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_USERNAME)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_USERNAME, $this->del_previous_usr_username);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_FIRSTNAME)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_FIRSTNAME, $this->del_previous_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_LASTNAME)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_PREVIOUS_USR_LASTNAME, $this->del_previous_usr_lastname);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_CURRENT_USR_USERNAME)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_CURRENT_USR_USERNAME, $this->del_current_usr_username);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_CURRENT_USR_FIRSTNAME)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_CURRENT_USR_FIRSTNAME, $this->del_current_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_CURRENT_USR_LASTNAME)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_CURRENT_USR_LASTNAME, $this->del_current_usr_lastname);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_DELEGATE_DATE)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, $this->del_delegate_date);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_INIT_DATE)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_INIT_DATE, $this->del_init_date);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_DUE_DATE)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_DUE_DATE, $this->del_due_date);
+ }
+
+ if ($this->isColumnModified(ListParticipatedHistoryPeer::DEL_PRIORITY)) {
+ $criteria->add(ListParticipatedHistoryPeer::DEL_PRIORITY, $this->del_priority);
+ }
+
+
+ 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(ListParticipatedHistoryPeer::DATABASE_NAME);
+
+ $criteria->add(ListParticipatedHistoryPeer::APP_UID, $this->app_uid);
+ $criteria->add(ListParticipatedHistoryPeer::DEL_INDEX, $this->del_index);
+
+ 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->getAppUid();
+
+ $pks[1] = $this->getDelIndex();
+
+ 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->setAppUid($keys[0]);
+
+ $this->setDelIndex($keys[1]);
+
+ }
+
+ /**
+ * 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 ListParticipatedHistory (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->setUsrUid($this->usr_uid);
+
+ $copyObj->setTasUid($this->tas_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setAppNumber($this->app_number);
+
+ $copyObj->setAppTitle($this->app_title);
+
+ $copyObj->setAppProTitle($this->app_pro_title);
+
+ $copyObj->setAppTasTitle($this->app_tas_title);
+
+ $copyObj->setDelPreviousUsrUid($this->del_previous_usr_uid);
+
+ $copyObj->setDelPreviousUsrUsername($this->del_previous_usr_username);
+
+ $copyObj->setDelPreviousUsrFirstname($this->del_previous_usr_firstname);
+
+ $copyObj->setDelPreviousUsrLastname($this->del_previous_usr_lastname);
+
+ $copyObj->setDelCurrentUsrUsername($this->del_current_usr_username);
+
+ $copyObj->setDelCurrentUsrFirstname($this->del_current_usr_firstname);
+
+ $copyObj->setDelCurrentUsrLastname($this->del_current_usr_lastname);
+
+ $copyObj->setDelDelegateDate($this->del_delegate_date);
+
+ $copyObj->setDelInitDate($this->del_init_date);
+
+ $copyObj->setDelDueDate($this->del_due_date);
+
+ $copyObj->setDelPriority($this->del_priority);
+
+
+ $copyObj->setNew(true);
+
+ $copyObj->setAppUid(''); // this is a pkey column, so set to default value
+
+ $copyObj->setDelIndex('0'); // 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 ListParticipatedHistory 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 ListParticipatedHistoryPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new ListParticipatedHistoryPeer();
+ }
+ return self::$peer;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListParticipatedHistoryPeer.php b/workflow/engine/classes/model/om/BaseListParticipatedHistoryPeer.php
new file mode 100644
index 000000000..eed3e090c
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListParticipatedHistoryPeer.php
@@ -0,0 +1,652 @@
+ 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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. 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');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListParticipatedLast.php b/workflow/engine/classes/model/om/BaseListParticipatedLast.php
new file mode 100644
index 000000000..6b6288169
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListParticipatedLast.php
@@ -0,0 +1,1534 @@
+app_uid;
+ }
+
+ /**
+ * Get the [usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getUsrUid()
+ {
+
+ return $this->usr_uid;
+ }
+
+ /**
+ * Get the [tas_uid] column value.
+ *
+ * @return string
+ */
+ public function getTasUid()
+ {
+
+ return $this->tas_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [app_number] column value.
+ *
+ * @return int
+ */
+ public function getAppNumber()
+ {
+
+ return $this->app_number;
+ }
+
+ /**
+ * Get the [app_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTitle()
+ {
+
+ return $this->app_title;
+ }
+
+ /**
+ * Get the [app_pro_title] column value.
+ *
+ * @return string
+ */
+ public function getAppProTitle()
+ {
+
+ return $this->app_pro_title;
+ }
+
+ /**
+ * Get the [app_tas_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTasTitle()
+ {
+
+ return $this->app_tas_title;
+ }
+
+ /**
+ * Get the [del_index] column value.
+ *
+ * @return int
+ */
+ public function getDelIndex()
+ {
+
+ return $this->del_index;
+ }
+
+ /**
+ * Get the [del_previous_usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUid()
+ {
+
+ return $this->del_previous_usr_uid;
+ }
+
+ /**
+ * Get the [del_previous_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUsername()
+ {
+
+ return $this->del_previous_usr_username;
+ }
+
+ /**
+ * Get the [del_previous_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrFirstname()
+ {
+
+ return $this->del_previous_usr_firstname;
+ }
+
+ /**
+ * Get the [del_previous_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrLastname()
+ {
+
+ return $this->del_previous_usr_lastname;
+ }
+
+ /**
+ * Get the [optionally formatted] [del_delegate_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDelegateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_delegate_date === null || $this->del_delegate_date === '') {
+ return null;
+ } elseif (!is_int($this->del_delegate_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_delegate_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_delegate_date] as date/time value: " .
+ var_export($this->del_delegate_date, true));
+ }
+ } else {
+ $ts = $this->del_delegate_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_init_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelInitDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_init_date === null || $this->del_init_date === '') {
+ return null;
+ } elseif (!is_int($this->del_init_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_init_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_init_date] as date/time value: " .
+ var_export($this->del_init_date, true));
+ }
+ } else {
+ $ts = $this->del_init_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_due_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDueDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_due_date === null || $this->del_due_date === '') {
+ return null;
+ } elseif (!is_int($this->del_due_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_due_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_due_date] as date/time value: " .
+ var_export($this->del_due_date, true));
+ }
+ } else {
+ $ts = $this->del_due_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [del_priority] column value.
+ *
+ * @return string
+ */
+ public function getDelPriority()
+ {
+
+ return $this->del_priority;
+ }
+
+ /**
+ * Set the value of [app_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppUid($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->app_uid !== $v || $v === '') {
+ $this->app_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::APP_UID;
+ }
+
+ } // setAppUid()
+
+ /**
+ * 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[] = ListParticipatedLastPeer::USR_UID;
+ }
+
+ } // setUsrUid()
+
+ /**
+ * Set the value of [tas_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setTasUid($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->tas_uid !== $v || $v === '') {
+ $this->tas_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::TAS_UID;
+ }
+
+ } // setTasUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [app_number] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppNumber($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->app_number !== $v || $v === 0) {
+ $this->app_number = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::APP_NUMBER;
+ }
+
+ } // setAppNumber()
+
+ /**
+ * Set the value of [app_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTitle($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->app_title !== $v || $v === '') {
+ $this->app_title = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::APP_TITLE;
+ }
+
+ } // setAppTitle()
+
+ /**
+ * Set the value of [app_pro_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppProTitle($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->app_pro_title !== $v || $v === '') {
+ $this->app_pro_title = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::APP_PRO_TITLE;
+ }
+
+ } // setAppProTitle()
+
+ /**
+ * Set the value of [app_tas_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTasTitle($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->app_tas_title !== $v || $v === '') {
+ $this->app_tas_title = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::APP_TAS_TITLE;
+ }
+
+ } // setAppTasTitle()
+
+ /**
+ * Set the value of [del_index] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelIndex($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->del_index !== $v || $v === 0) {
+ $this->del_index = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_INDEX;
+ }
+
+ } // setDelIndex()
+
+ /**
+ * Set the value of [del_previous_usr_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUid($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->del_previous_usr_uid !== $v || $v === '') {
+ $this->del_previous_usr_uid = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID;
+ }
+
+ } // setDelPreviousUsrUid()
+
+ /**
+ * Set the value of [del_previous_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUsername($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->del_previous_usr_username !== $v || $v === '') {
+ $this->del_previous_usr_username = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME;
+ }
+
+ } // setDelPreviousUsrUsername()
+
+ /**
+ * Set the value of [del_previous_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrFirstname($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->del_previous_usr_firstname !== $v || $v === '') {
+ $this->del_previous_usr_firstname = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME;
+ }
+
+ } // setDelPreviousUsrFirstname()
+
+ /**
+ * Set the value of [del_previous_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrLastname($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->del_previous_usr_lastname !== $v || $v === '') {
+ $this->del_previous_usr_lastname = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME;
+ }
+
+ } // setDelPreviousUsrLastname()
+
+ /**
+ * Set the value of [del_delegate_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDelegateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_delegate_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_delegate_date !== $ts) {
+ $this->del_delegate_date = $ts;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_DELEGATE_DATE;
+ }
+
+ } // setDelDelegateDate()
+
+ /**
+ * Set the value of [del_init_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelInitDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_init_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_init_date !== $ts) {
+ $this->del_init_date = $ts;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_INIT_DATE;
+ }
+
+ } // setDelInitDate()
+
+ /**
+ * Set the value of [del_due_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDueDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_due_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_due_date !== $ts) {
+ $this->del_due_date = $ts;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_DUE_DATE;
+ }
+
+ } // setDelDueDate()
+
+ /**
+ * Set the value of [del_priority] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPriority($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->del_priority !== $v || $v === '3') {
+ $this->del_priority = $v;
+ $this->modifiedColumns[] = ListParticipatedLastPeer::DEL_PRIORITY;
+ }
+
+ } // setDelPriority()
+
+ /**
+ * 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->app_uid = $rs->getString($startcol + 0);
+
+ $this->usr_uid = $rs->getString($startcol + 1);
+
+ $this->tas_uid = $rs->getString($startcol + 2);
+
+ $this->pro_uid = $rs->getString($startcol + 3);
+
+ $this->app_number = $rs->getInt($startcol + 4);
+
+ $this->app_title = $rs->getString($startcol + 5);
+
+ $this->app_pro_title = $rs->getString($startcol + 6);
+
+ $this->app_tas_title = $rs->getString($startcol + 7);
+
+ $this->del_index = $rs->getInt($startcol + 8);
+
+ $this->del_previous_usr_uid = $rs->getString($startcol + 9);
+
+ $this->del_previous_usr_username = $rs->getString($startcol + 10);
+
+ $this->del_previous_usr_firstname = $rs->getString($startcol + 11);
+
+ $this->del_previous_usr_lastname = $rs->getString($startcol + 12);
+
+ $this->del_delegate_date = $rs->getTimestamp($startcol + 13, null);
+
+ $this->del_init_date = $rs->getTimestamp($startcol + 14, null);
+
+ $this->del_due_date = $rs->getTimestamp($startcol + 15, null);
+
+ $this->del_priority = $rs->getString($startcol + 16);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 17; // 17 = ListParticipatedLastPeer::NUM_COLUMNS - ListParticipatedLastPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating ListParticipatedLast 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(ListParticipatedLastPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ ListParticipatedLastPeer::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(ListParticipatedLastPeer::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 = ListParticipatedLastPeer::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 += ListParticipatedLastPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ $this->alreadyInSave = false;
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = ListParticipatedLastPeer::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 = ListParticipatedLastPeer::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->getAppUid();
+ break;
+ case 1:
+ return $this->getUsrUid();
+ break;
+ case 2:
+ return $this->getTasUid();
+ break;
+ case 3:
+ return $this->getProUid();
+ break;
+ case 4:
+ return $this->getAppNumber();
+ break;
+ case 5:
+ return $this->getAppTitle();
+ break;
+ case 6:
+ return $this->getAppProTitle();
+ break;
+ case 7:
+ return $this->getAppTasTitle();
+ break;
+ case 8:
+ return $this->getDelIndex();
+ break;
+ case 9:
+ return $this->getDelPreviousUsrUid();
+ break;
+ case 10:
+ return $this->getDelPreviousUsrUsername();
+ break;
+ case 11:
+ return $this->getDelPreviousUsrFirstname();
+ break;
+ case 12:
+ return $this->getDelPreviousUsrLastname();
+ break;
+ case 13:
+ return $this->getDelDelegateDate();
+ break;
+ case 14:
+ return $this->getDelInitDate();
+ break;
+ case 15:
+ return $this->getDelDueDate();
+ break;
+ case 16:
+ return $this->getDelPriority();
+ 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 = ListParticipatedLastPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getAppUid(),
+ $keys[1] => $this->getUsrUid(),
+ $keys[2] => $this->getTasUid(),
+ $keys[3] => $this->getProUid(),
+ $keys[4] => $this->getAppNumber(),
+ $keys[5] => $this->getAppTitle(),
+ $keys[6] => $this->getAppProTitle(),
+ $keys[7] => $this->getAppTasTitle(),
+ $keys[8] => $this->getDelIndex(),
+ $keys[9] => $this->getDelPreviousUsrUid(),
+ $keys[10] => $this->getDelPreviousUsrUsername(),
+ $keys[11] => $this->getDelPreviousUsrFirstname(),
+ $keys[12] => $this->getDelPreviousUsrLastname(),
+ $keys[13] => $this->getDelDelegateDate(),
+ $keys[14] => $this->getDelInitDate(),
+ $keys[15] => $this->getDelDueDate(),
+ $keys[16] => $this->getDelPriority(),
+ );
+ 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 = ListParticipatedLastPeer::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->setAppUid($value);
+ break;
+ case 1:
+ $this->setUsrUid($value);
+ break;
+ case 2:
+ $this->setTasUid($value);
+ break;
+ case 3:
+ $this->setProUid($value);
+ break;
+ case 4:
+ $this->setAppNumber($value);
+ break;
+ case 5:
+ $this->setAppTitle($value);
+ break;
+ case 6:
+ $this->setAppProTitle($value);
+ break;
+ case 7:
+ $this->setAppTasTitle($value);
+ break;
+ case 8:
+ $this->setDelIndex($value);
+ break;
+ case 9:
+ $this->setDelPreviousUsrUid($value);
+ break;
+ case 10:
+ $this->setDelPreviousUsrUsername($value);
+ break;
+ case 11:
+ $this->setDelPreviousUsrFirstname($value);
+ break;
+ case 12:
+ $this->setDelPreviousUsrLastname($value);
+ break;
+ case 13:
+ $this->setDelDelegateDate($value);
+ break;
+ case 14:
+ $this->setDelInitDate($value);
+ break;
+ case 15:
+ $this->setDelDueDate($value);
+ break;
+ case 16:
+ $this->setDelPriority($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 = ListParticipatedLastPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setAppUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setUsrUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setTasUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setProUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setAppNumber($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setAppTitle($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setAppProTitle($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setAppTasTitle($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setDelIndex($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setDelPreviousUsrUid($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setDelPreviousUsrUsername($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setDelPreviousUsrFirstname($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setDelPreviousUsrLastname($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setDelDelegateDate($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setDelInitDate($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setDelDueDate($arr[$keys[15]]);
+ }
+
+ if (array_key_exists($keys[16], $arr)) {
+ $this->setDelPriority($arr[$keys[16]]);
+ }
+
+ }
+
+ /**
+ * 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(ListParticipatedLastPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::APP_UID)) {
+ $criteria->add(ListParticipatedLastPeer::APP_UID, $this->app_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::USR_UID)) {
+ $criteria->add(ListParticipatedLastPeer::USR_UID, $this->usr_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::TAS_UID)) {
+ $criteria->add(ListParticipatedLastPeer::TAS_UID, $this->tas_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::PRO_UID)) {
+ $criteria->add(ListParticipatedLastPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::APP_NUMBER)) {
+ $criteria->add(ListParticipatedLastPeer::APP_NUMBER, $this->app_number);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::APP_TITLE)) {
+ $criteria->add(ListParticipatedLastPeer::APP_TITLE, $this->app_title);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::APP_PRO_TITLE)) {
+ $criteria->add(ListParticipatedLastPeer::APP_PRO_TITLE, $this->app_pro_title);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::APP_TAS_TITLE)) {
+ $criteria->add(ListParticipatedLastPeer::APP_TAS_TITLE, $this->app_tas_title);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_INDEX)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_INDEX, $this->del_index);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID, $this->del_previous_usr_uid);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME, $this->del_previous_usr_username);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME, $this->del_previous_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME, $this->del_previous_usr_lastname);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_DELEGATE_DATE)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_DELEGATE_DATE, $this->del_delegate_date);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_INIT_DATE)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_INIT_DATE, $this->del_init_date);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_DUE_DATE)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_DUE_DATE, $this->del_due_date);
+ }
+
+ if ($this->isColumnModified(ListParticipatedLastPeer::DEL_PRIORITY)) {
+ $criteria->add(ListParticipatedLastPeer::DEL_PRIORITY, $this->del_priority);
+ }
+
+
+ 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(ListParticipatedLastPeer::DATABASE_NAME);
+
+ $criteria->add(ListParticipatedLastPeer::APP_UID, $this->app_uid);
+ $criteria->add(ListParticipatedLastPeer::USR_UID, $this->usr_uid);
+
+ 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->getAppUid();
+
+ $pks[1] = $this->getUsrUid();
+
+ 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->setAppUid($keys[0]);
+
+ $this->setUsrUid($keys[1]);
+
+ }
+
+ /**
+ * 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 ListParticipatedLast (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->setTasUid($this->tas_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setAppNumber($this->app_number);
+
+ $copyObj->setAppTitle($this->app_title);
+
+ $copyObj->setAppProTitle($this->app_pro_title);
+
+ $copyObj->setAppTasTitle($this->app_tas_title);
+
+ $copyObj->setDelIndex($this->del_index);
+
+ $copyObj->setDelPreviousUsrUid($this->del_previous_usr_uid);
+
+ $copyObj->setDelPreviousUsrUsername($this->del_previous_usr_username);
+
+ $copyObj->setDelPreviousUsrFirstname($this->del_previous_usr_firstname);
+
+ $copyObj->setDelPreviousUsrLastname($this->del_previous_usr_lastname);
+
+ $copyObj->setDelDelegateDate($this->del_delegate_date);
+
+ $copyObj->setDelInitDate($this->del_init_date);
+
+ $copyObj->setDelDueDate($this->del_due_date);
+
+ $copyObj->setDelPriority($this->del_priority);
+
+
+ $copyObj->setNew(true);
+
+ $copyObj->setAppUid(''); // this is a pkey column, so set to default value
+
+ $copyObj->setUsrUid(''); // 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 ListParticipatedLast 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 ListParticipatedLastPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new ListParticipatedLastPeer();
+ }
+ return self::$peer;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListParticipatedLastPeer.php b/workflow/engine/classes/model/om/BaseListParticipatedLastPeer.php
new file mode 100644
index 000000000..cd9362886
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListParticipatedLastPeer.php
@@ -0,0 +1,637 @@
+ 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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. 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');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListUnassigned.php b/workflow/engine/classes/model/om/BaseListUnassigned.php
new file mode 100644
index 000000000..99ea97f2c
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListUnassigned.php
@@ -0,0 +1,1448 @@
+app_uid;
+ }
+
+ /**
+ * Get the [una_uid] column value.
+ *
+ * @return string
+ */
+ public function getUnaUid()
+ {
+
+ return $this->una_uid;
+ }
+
+ /**
+ * Get the [tas_uid] column value.
+ *
+ * @return string
+ */
+ public function getTasUid()
+ {
+
+ return $this->tas_uid;
+ }
+
+ /**
+ * Get the [pro_uid] column value.
+ *
+ * @return string
+ */
+ public function getProUid()
+ {
+
+ return $this->pro_uid;
+ }
+
+ /**
+ * Get the [app_number] column value.
+ *
+ * @return int
+ */
+ public function getAppNumber()
+ {
+
+ return $this->app_number;
+ }
+
+ /**
+ * Get the [app_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTitle()
+ {
+
+ return $this->app_title;
+ }
+
+ /**
+ * Get the [app_pro_title] column value.
+ *
+ * @return string
+ */
+ public function getAppProTitle()
+ {
+
+ return $this->app_pro_title;
+ }
+
+ /**
+ * Get the [app_tas_title] column value.
+ *
+ * @return string
+ */
+ public function getAppTasTitle()
+ {
+
+ return $this->app_tas_title;
+ }
+
+ /**
+ * Get the [app_previous_usr_username] column value.
+ *
+ * @return string
+ */
+ public function getAppPreviousUsrUsername()
+ {
+
+ return $this->app_previous_usr_username;
+ }
+
+ /**
+ * Get the [app_previous_usr_firstname] column value.
+ *
+ * @return string
+ */
+ public function getAppPreviousUsrFirstname()
+ {
+
+ return $this->app_previous_usr_firstname;
+ }
+
+ /**
+ * Get the [app_previous_usr_lastname] column value.
+ *
+ * @return string
+ */
+ public function getAppPreviousUsrLastname()
+ {
+
+ return $this->app_previous_usr_lastname;
+ }
+
+ /**
+ * Get the [del_index] column value.
+ *
+ * @return int
+ */
+ public function getDelIndex()
+ {
+
+ return $this->del_index;
+ }
+
+ /**
+ * Get the [del_previous_usr_uid] column value.
+ *
+ * @return string
+ */
+ public function getDelPreviousUsrUid()
+ {
+
+ return $this->del_previous_usr_uid;
+ }
+
+ /**
+ * Get the [optionally formatted] [del_delegate_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDelegateDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_delegate_date === null || $this->del_delegate_date === '') {
+ return null;
+ } elseif (!is_int($this->del_delegate_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_delegate_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_delegate_date] as date/time value: " .
+ var_export($this->del_delegate_date, true));
+ }
+ } else {
+ $ts = $this->del_delegate_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [optionally formatted] [del_due_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getDelDueDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->del_due_date === null || $this->del_due_date === '') {
+ return null;
+ } elseif (!is_int($this->del_due_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->del_due_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [del_due_date] as date/time value: " .
+ var_export($this->del_due_date, true));
+ }
+ } else {
+ $ts = $this->del_due_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
+ /**
+ * Get the [del_priority] column value.
+ *
+ * @return string
+ */
+ public function getDelPriority()
+ {
+
+ return $this->del_priority;
+ }
+
+ /**
+ * Set the value of [app_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppUid($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->app_uid !== $v || $v === '') {
+ $this->app_uid = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_UID;
+ }
+
+ } // setAppUid()
+
+ /**
+ * 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[] = ListUnassignedPeer::UNA_UID;
+ }
+
+ } // setUnaUid()
+
+ /**
+ * Set the value of [tas_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setTasUid($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->tas_uid !== $v || $v === '') {
+ $this->tas_uid = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::TAS_UID;
+ }
+
+ } // setTasUid()
+
+ /**
+ * Set the value of [pro_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setProUid($v)
+ {
+
+ // Since the native PHP type for this column is string,
+ // we will cast the input to a string (if it is not).
+ if ($v !== null && !is_string($v)) {
+ $v = (string) $v;
+ }
+
+ if ($this->pro_uid !== $v || $v === '') {
+ $this->pro_uid = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::PRO_UID;
+ }
+
+ } // setProUid()
+
+ /**
+ * Set the value of [app_number] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppNumber($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->app_number !== $v || $v === 0) {
+ $this->app_number = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_NUMBER;
+ }
+
+ } // setAppNumber()
+
+ /**
+ * Set the value of [app_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTitle($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->app_title !== $v || $v === '') {
+ $this->app_title = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_TITLE;
+ }
+
+ } // setAppTitle()
+
+ /**
+ * Set the value of [app_pro_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppProTitle($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->app_pro_title !== $v || $v === '') {
+ $this->app_pro_title = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_PRO_TITLE;
+ }
+
+ } // setAppProTitle()
+
+ /**
+ * Set the value of [app_tas_title] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppTasTitle($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->app_tas_title !== $v || $v === '') {
+ $this->app_tas_title = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_TAS_TITLE;
+ }
+
+ } // setAppTasTitle()
+
+ /**
+ * Set the value of [app_previous_usr_username] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppPreviousUsrUsername($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->app_previous_usr_username !== $v || $v === '') {
+ $this->app_previous_usr_username = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_PREVIOUS_USR_USERNAME;
+ }
+
+ } // setAppPreviousUsrUsername()
+
+ /**
+ * Set the value of [app_previous_usr_firstname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppPreviousUsrFirstname($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->app_previous_usr_firstname !== $v || $v === '') {
+ $this->app_previous_usr_firstname = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_PREVIOUS_USR_FIRSTNAME;
+ }
+
+ } // setAppPreviousUsrFirstname()
+
+ /**
+ * Set the value of [app_previous_usr_lastname] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setAppPreviousUsrLastname($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->app_previous_usr_lastname !== $v || $v === '') {
+ $this->app_previous_usr_lastname = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::APP_PREVIOUS_USR_LASTNAME;
+ }
+
+ } // setAppPreviousUsrLastname()
+
+ /**
+ * Set the value of [del_index] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelIndex($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->del_index !== $v || $v === 0) {
+ $this->del_index = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::DEL_INDEX;
+ }
+
+ } // setDelIndex()
+
+ /**
+ * Set the value of [del_previous_usr_uid] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPreviousUsrUid($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->del_previous_usr_uid !== $v || $v === '') {
+ $this->del_previous_usr_uid = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::DEL_PREVIOUS_USR_UID;
+ }
+
+ } // setDelPreviousUsrUid()
+
+ /**
+ * Set the value of [del_delegate_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDelegateDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_delegate_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_delegate_date !== $ts) {
+ $this->del_delegate_date = $ts;
+ $this->modifiedColumns[] = ListUnassignedPeer::DEL_DELEGATE_DATE;
+ }
+
+ } // setDelDelegateDate()
+
+ /**
+ * Set the value of [del_due_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setDelDueDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [del_due_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->del_due_date !== $ts) {
+ $this->del_due_date = $ts;
+ $this->modifiedColumns[] = ListUnassignedPeer::DEL_DUE_DATE;
+ }
+
+ } // setDelDueDate()
+
+ /**
+ * Set the value of [del_priority] column.
+ *
+ * @param string $v new value
+ * @return void
+ */
+ public function setDelPriority($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->del_priority !== $v || $v === '3') {
+ $this->del_priority = $v;
+ $this->modifiedColumns[] = ListUnassignedPeer::DEL_PRIORITY;
+ }
+
+ } // setDelPriority()
+
+ /**
+ * 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->app_uid = $rs->getString($startcol + 0);
+
+ $this->una_uid = $rs->getString($startcol + 1);
+
+ $this->tas_uid = $rs->getString($startcol + 2);
+
+ $this->pro_uid = $rs->getString($startcol + 3);
+
+ $this->app_number = $rs->getInt($startcol + 4);
+
+ $this->app_title = $rs->getString($startcol + 5);
+
+ $this->app_pro_title = $rs->getString($startcol + 6);
+
+ $this->app_tas_title = $rs->getString($startcol + 7);
+
+ $this->app_previous_usr_username = $rs->getString($startcol + 8);
+
+ $this->app_previous_usr_firstname = $rs->getString($startcol + 9);
+
+ $this->app_previous_usr_lastname = $rs->getString($startcol + 10);
+
+ $this->del_index = $rs->getInt($startcol + 11);
+
+ $this->del_previous_usr_uid = $rs->getString($startcol + 12);
+
+ $this->del_delegate_date = $rs->getTimestamp($startcol + 13, null);
+
+ $this->del_due_date = $rs->getTimestamp($startcol + 14, null);
+
+ $this->del_priority = $rs->getString($startcol + 15);
+
+ $this->resetModified();
+
+ $this->setNew(false);
+
+ // FIXME - using NUM_COLUMNS may be clearer.
+ return $startcol + 16; // 16 = ListUnassignedPeer::NUM_COLUMNS - ListUnassignedPeer::NUM_LAZY_LOAD_COLUMNS).
+
+ } catch (Exception $e) {
+ throw new PropelException("Error populating ListUnassigned 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(ListUnassignedPeer::DATABASE_NAME);
+ }
+
+ try {
+ $con->begin();
+ ListUnassignedPeer::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(ListUnassignedPeer::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 = ListUnassignedPeer::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 += ListUnassignedPeer::doUpdate($this, $con);
+ }
+ $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
+ }
+
+ $this->alreadyInSave = false;
+ }
+ return $affectedRows;
+ } // doSave()
+
+ /**
+ * Array of ValidationFailed objects.
+ * @var array ValidationFailed[]
+ */
+ protected $validationFailures = array();
+
+ /**
+ * Gets any ValidationFailed objects that resulted from last call to validate().
+ *
+ *
+ * @return array ValidationFailed[]
+ * @see validate()
+ */
+ public function getValidationFailures()
+ {
+ return $this->validationFailures;
+ }
+
+ /**
+ * Validates the objects modified field values and all objects related to this table.
+ *
+ * If $columns is either a column name or an array of column names
+ * only those columns are validated.
+ *
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
+ * @see doValidate()
+ * @see getValidationFailures()
+ */
+ public function validate($columns = null)
+ {
+ $res = $this->doValidate($columns);
+ if ($res === true) {
+ $this->validationFailures = array();
+ return true;
+ } else {
+ $this->validationFailures = $res;
+ return false;
+ }
+ }
+
+ /**
+ * This function performs the validation work for complex object models.
+ *
+ * In addition to checking the current object, all related objects will
+ * also be validated. If all pass then true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = ListUnassignedPeer::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 = ListUnassignedPeer::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->getAppUid();
+ break;
+ case 1:
+ return $this->getUnaUid();
+ break;
+ case 2:
+ return $this->getTasUid();
+ break;
+ case 3:
+ return $this->getProUid();
+ break;
+ case 4:
+ return $this->getAppNumber();
+ break;
+ case 5:
+ return $this->getAppTitle();
+ break;
+ case 6:
+ return $this->getAppProTitle();
+ break;
+ case 7:
+ return $this->getAppTasTitle();
+ break;
+ case 8:
+ return $this->getAppPreviousUsrUsername();
+ break;
+ case 9:
+ return $this->getAppPreviousUsrFirstname();
+ break;
+ case 10:
+ return $this->getAppPreviousUsrLastname();
+ break;
+ case 11:
+ return $this->getDelIndex();
+ break;
+ case 12:
+ return $this->getDelPreviousUsrUid();
+ break;
+ case 13:
+ return $this->getDelDelegateDate();
+ break;
+ case 14:
+ return $this->getDelDueDate();
+ break;
+ case 15:
+ return $this->getDelPriority();
+ 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 = ListUnassignedPeer::getFieldNames($keyType);
+ $result = array(
+ $keys[0] => $this->getAppUid(),
+ $keys[1] => $this->getUnaUid(),
+ $keys[2] => $this->getTasUid(),
+ $keys[3] => $this->getProUid(),
+ $keys[4] => $this->getAppNumber(),
+ $keys[5] => $this->getAppTitle(),
+ $keys[6] => $this->getAppProTitle(),
+ $keys[7] => $this->getAppTasTitle(),
+ $keys[8] => $this->getAppPreviousUsrUsername(),
+ $keys[9] => $this->getAppPreviousUsrFirstname(),
+ $keys[10] => $this->getAppPreviousUsrLastname(),
+ $keys[11] => $this->getDelIndex(),
+ $keys[12] => $this->getDelPreviousUsrUid(),
+ $keys[13] => $this->getDelDelegateDate(),
+ $keys[14] => $this->getDelDueDate(),
+ $keys[15] => $this->getDelPriority(),
+ );
+ 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 = ListUnassignedPeer::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->setAppUid($value);
+ break;
+ case 1:
+ $this->setUnaUid($value);
+ break;
+ case 2:
+ $this->setTasUid($value);
+ break;
+ case 3:
+ $this->setProUid($value);
+ break;
+ case 4:
+ $this->setAppNumber($value);
+ break;
+ case 5:
+ $this->setAppTitle($value);
+ break;
+ case 6:
+ $this->setAppProTitle($value);
+ break;
+ case 7:
+ $this->setAppTasTitle($value);
+ break;
+ case 8:
+ $this->setAppPreviousUsrUsername($value);
+ break;
+ case 9:
+ $this->setAppPreviousUsrFirstname($value);
+ break;
+ case 10:
+ $this->setAppPreviousUsrLastname($value);
+ break;
+ case 11:
+ $this->setDelIndex($value);
+ break;
+ case 12:
+ $this->setDelPreviousUsrUid($value);
+ break;
+ case 13:
+ $this->setDelDelegateDate($value);
+ break;
+ case 14:
+ $this->setDelDueDate($value);
+ break;
+ case 15:
+ $this->setDelPriority($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 = ListUnassignedPeer::getFieldNames($keyType);
+
+ if (array_key_exists($keys[0], $arr)) {
+ $this->setAppUid($arr[$keys[0]]);
+ }
+
+ if (array_key_exists($keys[1], $arr)) {
+ $this->setUnaUid($arr[$keys[1]]);
+ }
+
+ if (array_key_exists($keys[2], $arr)) {
+ $this->setTasUid($arr[$keys[2]]);
+ }
+
+ if (array_key_exists($keys[3], $arr)) {
+ $this->setProUid($arr[$keys[3]]);
+ }
+
+ if (array_key_exists($keys[4], $arr)) {
+ $this->setAppNumber($arr[$keys[4]]);
+ }
+
+ if (array_key_exists($keys[5], $arr)) {
+ $this->setAppTitle($arr[$keys[5]]);
+ }
+
+ if (array_key_exists($keys[6], $arr)) {
+ $this->setAppProTitle($arr[$keys[6]]);
+ }
+
+ if (array_key_exists($keys[7], $arr)) {
+ $this->setAppTasTitle($arr[$keys[7]]);
+ }
+
+ if (array_key_exists($keys[8], $arr)) {
+ $this->setAppPreviousUsrUsername($arr[$keys[8]]);
+ }
+
+ if (array_key_exists($keys[9], $arr)) {
+ $this->setAppPreviousUsrFirstname($arr[$keys[9]]);
+ }
+
+ if (array_key_exists($keys[10], $arr)) {
+ $this->setAppPreviousUsrLastname($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setDelIndex($arr[$keys[11]]);
+ }
+
+ if (array_key_exists($keys[12], $arr)) {
+ $this->setDelPreviousUsrUid($arr[$keys[12]]);
+ }
+
+ if (array_key_exists($keys[13], $arr)) {
+ $this->setDelDelegateDate($arr[$keys[13]]);
+ }
+
+ if (array_key_exists($keys[14], $arr)) {
+ $this->setDelDueDate($arr[$keys[14]]);
+ }
+
+ if (array_key_exists($keys[15], $arr)) {
+ $this->setDelPriority($arr[$keys[15]]);
+ }
+
+ }
+
+ /**
+ * 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(ListUnassignedPeer::DATABASE_NAME);
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_UID)) {
+ $criteria->add(ListUnassignedPeer::APP_UID, $this->app_uid);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::UNA_UID)) {
+ $criteria->add(ListUnassignedPeer::UNA_UID, $this->una_uid);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::TAS_UID)) {
+ $criteria->add(ListUnassignedPeer::TAS_UID, $this->tas_uid);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::PRO_UID)) {
+ $criteria->add(ListUnassignedPeer::PRO_UID, $this->pro_uid);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_NUMBER)) {
+ $criteria->add(ListUnassignedPeer::APP_NUMBER, $this->app_number);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_TITLE)) {
+ $criteria->add(ListUnassignedPeer::APP_TITLE, $this->app_title);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_PRO_TITLE)) {
+ $criteria->add(ListUnassignedPeer::APP_PRO_TITLE, $this->app_pro_title);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_TAS_TITLE)) {
+ $criteria->add(ListUnassignedPeer::APP_TAS_TITLE, $this->app_tas_title);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_PREVIOUS_USR_USERNAME)) {
+ $criteria->add(ListUnassignedPeer::APP_PREVIOUS_USR_USERNAME, $this->app_previous_usr_username);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_PREVIOUS_USR_FIRSTNAME)) {
+ $criteria->add(ListUnassignedPeer::APP_PREVIOUS_USR_FIRSTNAME, $this->app_previous_usr_firstname);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::APP_PREVIOUS_USR_LASTNAME)) {
+ $criteria->add(ListUnassignedPeer::APP_PREVIOUS_USR_LASTNAME, $this->app_previous_usr_lastname);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::DEL_INDEX)) {
+ $criteria->add(ListUnassignedPeer::DEL_INDEX, $this->del_index);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::DEL_PREVIOUS_USR_UID)) {
+ $criteria->add(ListUnassignedPeer::DEL_PREVIOUS_USR_UID, $this->del_previous_usr_uid);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::DEL_DELEGATE_DATE)) {
+ $criteria->add(ListUnassignedPeer::DEL_DELEGATE_DATE, $this->del_delegate_date);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::DEL_DUE_DATE)) {
+ $criteria->add(ListUnassignedPeer::DEL_DUE_DATE, $this->del_due_date);
+ }
+
+ if ($this->isColumnModified(ListUnassignedPeer::DEL_PRIORITY)) {
+ $criteria->add(ListUnassignedPeer::DEL_PRIORITY, $this->del_priority);
+ }
+
+
+ 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(ListUnassignedPeer::DATABASE_NAME);
+
+ $criteria->add(ListUnassignedPeer::APP_UID, $this->app_uid);
+ $criteria->add(ListUnassignedPeer::UNA_UID, $this->una_uid);
+
+ 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->getAppUid();
+
+ $pks[1] = $this->getUnaUid();
+
+ 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->setAppUid($keys[0]);
+
+ $this->setUnaUid($keys[1]);
+
+ }
+
+ /**
+ * 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 ListUnassigned (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->setTasUid($this->tas_uid);
+
+ $copyObj->setProUid($this->pro_uid);
+
+ $copyObj->setAppNumber($this->app_number);
+
+ $copyObj->setAppTitle($this->app_title);
+
+ $copyObj->setAppProTitle($this->app_pro_title);
+
+ $copyObj->setAppTasTitle($this->app_tas_title);
+
+ $copyObj->setAppPreviousUsrUsername($this->app_previous_usr_username);
+
+ $copyObj->setAppPreviousUsrFirstname($this->app_previous_usr_firstname);
+
+ $copyObj->setAppPreviousUsrLastname($this->app_previous_usr_lastname);
+
+ $copyObj->setDelIndex($this->del_index);
+
+ $copyObj->setDelPreviousUsrUid($this->del_previous_usr_uid);
+
+ $copyObj->setDelDelegateDate($this->del_delegate_date);
+
+ $copyObj->setDelDueDate($this->del_due_date);
+
+ $copyObj->setDelPriority($this->del_priority);
+
+
+ $copyObj->setNew(true);
+
+ $copyObj->setAppUid(''); // this is a pkey column, so set to default value
+
+ $copyObj->setUnaUid(''); // 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 ListUnassigned 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 ListUnassignedPeer
+ */
+ public function getPeer()
+ {
+ if (self::$peer === null) {
+ self::$peer = new ListUnassignedPeer();
+ }
+ return self::$peer;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListUnassignedGroup.php b/workflow/engine/classes/model/om/BaseListUnassignedGroup.php
new file mode 100644
index 000000000..4b586fa0b
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListUnassignedGroup.php
@@ -0,0 +1,701 @@
+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 true is returned; otherwise
+ * an aggreagated array of ValidationFailed objects will be returned.
+ *
+ * @param array $columns Array of column names to validate.
+ * @return mixed true if all validations pass;
+ array of ValidationFailed objects otherwise.
+ */
+ protected function doValidate($columns = null)
+ {
+ if (!$this->alreadyInValidation) {
+ $this->alreadyInValidation = true;
+ $retval = null;
+
+ $failureMap = array();
+
+
+ if (($retval = 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;
+ }
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListUnassignedGroupPeer.php b/workflow/engine/classes/model/om/BaseListUnassignedGroupPeer.php
new file mode 100644
index 000000000..131c82a82
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListUnassignedGroupPeer.php
@@ -0,0 +1,579 @@
+ 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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. 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');
+}
+
diff --git a/workflow/engine/classes/model/om/BaseListUnassignedPeer.php b/workflow/engine/classes/model/om/BaseListUnassignedPeer.php
new file mode 100644
index 000000000..f1aa4a965
--- /dev/null
+++ b/workflow/engine/classes/model/om/BaseListUnassignedPeer.php
@@ -0,0 +1,632 @@
+ 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.
+ *
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ *
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. 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');
+}
+
diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml
index 891abcd52..d463b93e9 100755
--- a/workflow/engine/config/schema.xml
+++ b/workflow/engine/config/schema.xml
@@ -3878,5 +3878,295 @@