本文整理汇总了PHP中Criteria::addAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP Criteria::addAlias方法的具体用法?PHP Criteria::addAlias怎么用?PHP Criteria::addAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Criteria
的用法示例。
在下文中一共展示了Criteria::addAlias方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTriggerCriteria
/**
* Get criteria for Trigger
*
* return object
*/
public function getTriggerCriteria()
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\TriggersPeer::TRI_UID);
$criteria->addAsColumn("TRI_TITLE", "CT.CON_VALUE");
$criteria->addAsColumn("TRI_DESCRIPTION", "CD.CON_VALUE");
$criteria->addSelectColumn(\TriggersPeer::TRI_TYPE);
$criteria->addSelectColumn(\TriggersPeer::TRI_WEBBOT);
$criteria->addSelectColumn(\TriggersPeer::TRI_PARAM);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\TriggersPeer::TRI_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "TRI_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
$arrayCondition = array();
$arrayCondition[] = array(\TriggersPeer::TRI_UID, "CD.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "TRI_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
return $criteria;
} catch (\Exception $e) {
throw $e;
}
}
示例2: getPager
public static function getPager($max = 10, $page = 1, $date_req = null, $pass_name = null, $req_name = null, $pass_lname = null, $req_lname = null)
{
$c = new Criteria();
$c->addJoin(self::PASSENGER_ID, PassengerPeer::ID, Criteria::LEFT_JOIN);
$c->addJoin(self::REQUESTER_ID, RequesterPeer::ID, Criteria::LEFT_JOIN);
$c->addJoin(PassengerPeer::PERSON_ID, PersonPeer::alias('c1', PersonPeer::ID), Criteria::LEFT_JOIN);
$c->addJoin(RequesterPeer::PERSON_ID, PersonPeer::alias('c2', PersonPeer::ID), Criteria::LEFT_JOIN);
$c->addAlias('c1', PersonPeer::TABLE_NAME);
$c->addAlias('c2', PersonPeer::TABLE_NAME);
if ($date_req) {
$c->add(self::DATE_REQUESTED, '%' . date('Y-m-d', strtotime($date_req)) . '%', Criteria::LIKE);
}
if ($pass_name) {
$c->add(PersonPeer::alias("c1", PersonPeer::FIRST_NAME), $pass_name . '%', Criteria::LIKE);
}
if ($req_name) {
$c->add(PersonPeer::alias("c2", PersonPeer::FIRST_NAME), $req_name . '%', Criteria::LIKE);
}
if ($pass_lname) {
$c->add(PersonPeer::alias("c1", PersonPeer::LAST_NAME), $pass_lname . '%', Criteria::LIKE);
}
if ($req_lname) {
$c->add(PersonPeer::alias("c2", PersonPeer::LAST_NAME), $req_lname . '%', Criteria::LIKE);
}
$c->addAscendingOrderByColumn(self::DATE_REQUESTED);
$pager = new sfPropelPager('Itinerary', $max);
$pager->setCriteria($c);
$pager->setPage($page);
$pager->init();
return $pager;
}
示例3: __get
public function __get($name)
{
switch ($name) {
case '_maintenanceNote':
if (!isset($this->maintenanceNote)) {
$criteria = new Criteria();
$criteria->add(QubitNote::OBJECT_ID, $this->resource->id);
$criteria->add(QubitNote::TYPE_ID, QubitTerm::MAINTENANCE_NOTE_ID);
if (1 == count($query = QubitNote::get($criteria))) {
$this->maintenanceNote = $query[0];
} else {
$this->maintenanceNote = new QubitNote();
$this->maintenanceNote->typeId = QubitTerm::MAINTENANCE_NOTE_ID;
$this->resource->notes[] = $this->maintenanceNote;
}
}
return $this->maintenanceNote;
case 'maintenanceNotes':
return $this->_maintenanceNote->content;
case 'relatedAuthorityRecord':
if (!isset($this->relatedAuthorityRecord)) {
$criteria = new Criteria();
$criteria->add(QubitRelation::SUBJECT_ID, $this->resource->id);
$criteria->addJoin(QubitRelation::OBJECT_ID, QubitActor::ID);
$this->relatedAuthorityRecord = QubitRelation::get($criteria);
}
return $this->relatedAuthorityRecord;
case 'relatedFunction':
if (!isset($this->relatedFunction)) {
$criteria = new Criteria();
$criteria->add($criteria->getNewCriterion(QubitRelation::OBJECT_ID, $this->resource->id)->addOr($criteria->getNewCriterion(QubitRelation::SUBJECT_ID, $this->resource->id)));
$criteria->addAlias('ro', QubitFunction::TABLE_NAME);
$criteria->addJoin(QubitRelation::OBJECT_ID, 'ro.id');
$criteria->addAlias('rs', QubitFunction::TABLE_NAME);
$criteria->addJoin(QubitRelation::SUBJECT_ID, 'rs.id');
$criteria->addAscendingOrderByColumn(QubitRelation::TYPE_ID);
$this->relatedFunction = QubitRelation::get($criteria);
}
return $this->relatedFunction;
case 'relatedResource':
if (!isset($this->relatedResource)) {
$criteria = new Criteria();
$criteria->add(QubitRelation::SUBJECT_ID, $this->resource->id);
$criteria->addJoin(QubitRelation::OBJECT_ID, QubitInformationObject::ID);
$this->relatedResource = QubitRelation::get($criteria);
}
return $this->relatedResource;
case 'sourceCulture':
return $this->resource->sourceCulture;
}
}
示例4: getCriteriaDBSList
public function getCriteriaDBSList($sProcessUID)
{
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
$oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_TYPE);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_SERVER);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_DATABASE_NAME);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_USERNAME);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PASSWORD);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PORT);
$oCriteria->addAsColumn('DBS_DESCRIPTION', 'C.CON_VALUE');
$oCriteria->addAlias('C', 'CONTENT');
$aConditions = array();
$aConditions[] = array(DbSourcePeer::DBS_UID, 'C.CON_ID');
$aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'DBS_DESCRIPTION' . $sDelimiter);
$aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID);
return $oCriteria;
}
示例5: existsTitle
/**
* Verify if exists the title of a Department
*
* @param string $departmentTitle Title
* @param string $departmentUidExclude Unique id of Department to exclude
*
* return bool Return true if exists the title of a Department, false otherwise
*/
public function existsTitle($departmentTitle, $departmentUidExclude = "")
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\DepartmentPeer::DEP_UID);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\DepartmentPeer::DEP_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "DEPO_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
if ($departmentUidExclude != "") {
$criteria->add(\DepartmentPeer::DEP_UID, $departmentUidExclude, \Criteria::NOT_EQUAL);
}
$criteria->add("CT.CON_VALUE", $departmentTitle, \Criteria::EQUAL);
$rsCriteria = \DepartmentPeer::doSelectRS($criteria);
return $rsCriteria->next() ? true : false;
} catch (\Exception $e) {
throw $e;
}
}
示例6: getCriteriaDBSList
public function getCriteriaDBSList($sProcessUID)
{
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
$oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_TYPE);
$oCriteria->addAsColumn("DBS_SERVER", "CASE WHEN " . DbSourcePeer::DBS_TYPE . " = 'oracle' AND " . DbSourcePeer::DBS_CONNECTION_TYPE . " = 'TNS' THEN CONCAT('[', " . DbSourcePeer::DBS_TNS . ", ']') ELSE " . DbSourcePeer::DBS_SERVER . " END");
$oCriteria->addAsColumn("DBS_DATABASE_NAME", "CASE WHEN " . DbSourcePeer::DBS_TYPE . " = 'oracle' AND " . DbSourcePeer::DBS_CONNECTION_TYPE . " = 'TNS' THEN CONCAT('[', " . DbSourcePeer::DBS_TNS . ", ']') ELSE " . DbSourcePeer::DBS_DATABASE_NAME . " END");
$oCriteria->addSelectColumn(DbSourcePeer::DBS_USERNAME);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PASSWORD);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PORT);
$oCriteria->addAsColumn('DBS_DESCRIPTION', 'C.CON_VALUE');
$oCriteria->addAlias('C', 'CONTENT');
$aConditions = array();
$aConditions[] = array(DbSourcePeer::DBS_UID, 'C.CON_ID');
$aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'DBS_DESCRIPTION' . $sDelimiter);
$aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID);
return $oCriteria;
}
示例7: getSubprocesss
/**
* Get SubProcess in Process
*
* return object
*/
public function getSubprocesss($pro_uid, $tas_uid)
{
try {
$pro_uid = $this->validateProUid($pro_uid);
$tas_uid = $this->validateTasUid($tas_uid);
$oCriteria = new \Criteria('workflow');
$del = \DBAdapter::getStringDelimiter();
$oCriteria->add(SubProcessPeer::PRO_PARENT, $pro_uid);
$oCriteria->add(SubProcessPeer::TAS_PARENT, $tas_uid);
$oCriteria->addAsColumn('CON_VALUE', 'C1.CON_VALUE', 'CON_TITLE');
$oCriteria->addAlias("C1", 'CONTENT');
$tasTitleConds = array();
$tasTitleConds[] = array(SubProcessPeer::TAS_PARENT, 'C1.CON_ID');
$tasTitleConds[] = array('C1.CON_CATEGORY', $del . 'TAS_TITLE' . $del);
$tasTitleConds[] = array('C1.CON_LANG', $del . SYS_LANG . $del);
$oCriteria->addJoinMC($tasTitleConds, \Criteria::LEFT_JOIN);
$oDataset = SubProcessPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$aRow = array_change_key_case($aRow, CASE_LOWER);
$response['spr_uid'] = $aRow['sp_uid'];
$response['spr_pro_parent'] = $aRow['pro_parent'];
$response['spr_tas_parent'] = $aRow['tas_parent'];
$response['spr_pro'] = $aRow['pro_uid'];
$response['spr_tas'] = $aRow['tas_uid'];
$response['spr_name'] = $aRow['con_value'];
$response['spr_synchronous'] = $aRow['sp_synchronous'];
$response['spr_variables_out'] = unserialize($aRow['sp_variables_out']);
if ((int) $response['spr_synchronous'] === 1) {
$response['spr_variables_in'] = unserialize($aRow['sp_variables_in']);
}
return $response;
} catch (\Exception $e) {
throw $e;
}
}
示例8: getExtTriggersList
public function getExtTriggersList($start, $limit, $sProcessUID = '')
{
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(TriggersPeer::TRI_UID);
$oCriteria->addSelectColumn(TriggersPeer::PRO_UID);
$oCriteria->add(TriggersPeer::PRO_UID, $sProcessUID);
$this->tmpCriteria = clone $oCriteria;
$oCriteria->addAsColumn('TRI_TITLE', 'C1.CON_VALUE');
$oCriteria->addAsColumn('TRI_DESCRIPTION', 'C2.CON_VALUE');
$oCriteria->addAlias('C1', 'CONTENT');
$oCriteria->addAlias('C2', 'CONTENT');
$aConditions = array();
$aConditions[] = array(TriggersPeer::TRI_UID, 'C1.CON_ID');
$aConditions[] = array('C1.CON_CATEGORY', $sDelimiter . 'TRI_TITLE' . $sDelimiter);
$aConditions[] = array('C1.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$aConditions = array();
$aConditions[] = array(TriggersPeer::TRI_UID, 'C2.CON_ID');
$aConditions[] = array('C2.CON_CATEGORY', $sDelimiter . 'TRI_TITLE' . $sDelimiter);
$aConditions[] = array('C2.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(TriggersPeer::PRO_UID, $sProcessUID);
$oCriteria->addAscendingOrderByColumn('TRI_TITLE');
if ($start != '') {
$oCriteria->setOffset($start);
}
if ($limit != '') {
$oCriteria->setLimit($limit);
}
$oDataset = TriggersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$triggersArray = "";
$triggersArray[] = array('TRI_UID' => 'char', 'PRO_UID' => 'char', 'TRI_TITLE' => 'char', 'TRI_DESCRIPTION' => 'char');
while ($aRow = $oDataset->getRow()) {
if ($aRow['TRI_TITLE'] == null || $aRow['TRI_TITLE'] == "") {
// There is no translation for this Trigger name, try to get/regenerate the label
$triggerO = new Triggers();
$triggerObj = $triggerO->load($aRow['TRI_UID']);
$aRow['TRI_TITLE'] = $triggerObj['TRI_TITLE'];
$aRow['TRI_DESCRIPTION'] = $triggerObj['TRI_DESCRIPTION'];
}
$triggersArray[] = $aRow;
$oDataset->next();
}
return $triggersArray;
}
示例9: testDoDeleteTableAlias
public function testDoDeleteTableAlias()
{
$con = Propel::getConnection();
$c = new Criteria(BookPeer::DATABASE_NAME);
$c->addAlias('b', BookPeer::TABLE_NAME);
$c->add('b.TITLE', 'War And Peace');
BasePeer::doDelete($c, $con);
$expectedSQL = "DELETE b FROM `book` AS b WHERE b.TITLE='War And Peace'";
$this->assertEquals($expectedSQL, $con->getLastExecutedQuery(), 'doDelete() accepts a Criteria with a table alias');
}
示例10: getApplicationDelegationData
/**
* Get application and delegation data from database
*
* @param string $AppUID
* the application identifier
* @return array of records from database
*/
public function getApplicationDelegationData($AppUID)
{
$allAppDbData = array();
$c = new Criteria();
$c->addSelectColumn(ApplicationPeer::APP_UID);
$c->addSelectColumn(ApplicationPeer::APP_NUMBER);
$c->addSelectColumn(ApplicationPeer::APP_STATUS);
$c->addSelectColumn(ApplicationPeer::PRO_UID);
$c->addSelectColumn(ApplicationPeer::APP_CREATE_DATE);
$c->addSelectColumn(ApplicationPeer::APP_FINISH_DATE);
$c->addSelectColumn(ApplicationPeer::APP_UPDATE_DATE);
$c->addSelectColumn(ApplicationPeer::APP_DATA);
$c->addAsColumn('APP_TITLE', 'capp.CON_VALUE');
$c->addAsColumn('PRO_TITLE', 'cpro.CON_VALUE');
$c->addSelectColumn('ad.DEL_INDEX');
$c->addSelectColumn('ad.DEL_PREVIOUS');
$c->addSelectColumn('ad.TAS_UID');
$c->addSelectColumn('ad.USR_UID');
$c->addSelectColumn('ad.DEL_TYPE');
$c->addSelectColumn('ad.DEL_THREAD');
$c->addSelectColumn('ad.DEL_THREAD_STATUS');
$c->addSelectColumn('ad.DEL_PRIORITY');
$c->addSelectColumn('ad.DEL_DELEGATE_DATE');
$c->addSelectColumn('ad.DEL_INIT_DATE');
$c->addSelectColumn('ad.DEL_TASK_DUE_DATE');
$c->addSelectColumn('ad.DEL_FINISH_DATE');
$c->addSelectColumn('ad.DEL_DURATION');
$c->addSelectColumn('ad.DEL_QUEUE_DURATION');
$c->addSelectColumn('ad.DEL_DELAY_DURATION');
$c->addSelectColumn('ad.DEL_STARTED');
$c->addSelectColumn('ad.DEL_FINISHED');
$c->addSelectColumn('ad.DEL_DELAYED');
$c->addSelectColumn('ad.APP_OVERDUE_PERCENTAGE');
$c->addSelectColumn('at.APP_THREAD_INDEX');
$c->addSelectColumn('at.APP_THREAD_PARENT');
$c->addSelectColumn('at.APP_THREAD_STATUS');
$c->addAlias('capp', 'CONTENT');
$c->addAlias('cpro', 'CONTENT');
$c->addAlias('ad', 'APP_DELEGATION');
$c->addAlias('at', 'APP_THREAD');
$aConditions = array();
$aConditions[] = array(ApplicationPeer::APP_UID, 'capp.CON_ID');
$aConditions[] = array('capp.CON_CATEGORY', DBAdapter::getStringDelimiter() . 'APP_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array('capp.CON_LANG', DBAdapter::getStringDelimiter() . 'en' . DBAdapter::getStringDelimiter());
$c->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$aConditions = array();
$aConditions[] = array(ApplicationPeer::PRO_UID, 'cpro.CON_ID');
$aConditions[] = array('cpro.CON_CATEGORY', DBAdapter::getStringDelimiter() . 'PRO_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array('cpro.CON_LANG', DBAdapter::getStringDelimiter() . 'en' . DBAdapter::getStringDelimiter());
$c->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$c->addJoin(ApplicationPeer::APP_UID, 'ad.APP_UID', Criteria::JOIN);
$aConditions = array();
$aConditions[] = array('ad.APP_UID', 'at.APP_UID');
$aConditions[] = array('ad.DEL_THREAD', 'at.APP_THREAD_INDEX');
$c->addJoinMC($aConditions, Criteria::JOIN);
$c->add(ApplicationPeer::APP_UID, $AppUID);
$rs = ApplicationPeer::doSelectRS($c);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rs->next();
$row = $rs->getRow();
while (is_array($row)) {
$allAppDbData[] = $row;
$rs->next();
$row = $rs->getRow();
}
return $allAppDbData;
}
示例11: getAppEventsCriteria
public function getAppEventsCriteria($sProcessUid = '', $sStatus = '', $EVN_ACTION = '')
{
try {
require_once 'classes/model/Event.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(AppEventPeer::APP_UID);
$oCriteria->addSelectColumn(AppEventPeer::DEL_INDEX);
$oCriteria->addSelectColumn(AppEventPeer::EVN_UID);
$oCriteria->addSelectColumn(AppEventPeer::APP_EVN_ACTION_DATE);
$oCriteria->addSelectColumn(AppEventPeer::APP_EVN_ATTEMPTS);
$oCriteria->addSelectColumn(AppEventPeer::APP_EVN_LAST_EXECUTION_DATE);
$oCriteria->addSelectColumn(AppEventPeer::APP_EVN_STATUS);
$oCriteria->addSelectColumn(EventPeer::PRO_UID);
$oCriteria->addSelectColumn(EventPeer::EVN_WHEN_OCCURS);
$oCriteria->addSelectColumn(EventPeer::EVN_ACTION);
$oCriteria->addAsColumn('EVN_DESCRIPTION', 'C1.CON_VALUE');
$oCriteria->addAsColumn('TAS_TITLE', 'C2.CON_VALUE');
$oCriteria->addAsColumn('APP_TITLE', 'C3.CON_VALUE');
$oCriteria->addAsColumn('PRO_TITLE', 'C4.CON_VALUE');
$oCriteria->addAlias('C1', 'CONTENT');
$oCriteria->addAlias('C2', 'CONTENT');
$oCriteria->addAlias('C3', 'CONTENT');
$oCriteria->addAlias('C4', 'CONTENT');
$oCriteria->addJoin(AppEventPeer::EVN_UID, EventPeer::EVN_UID, Criteria::LEFT_JOIN);
$del = DBAdapter::getStringDelimiter();
$aConditions = array();
$aConditions[] = array(EventPeer::EVN_UID, 'C1.CON_ID');
$aConditions[] = array('C1.CON_CATEGORY', $del . 'EVN_DESCRIPTION' . $del);
$aConditions[] = array('C1.CON_LANG', $del . SYS_LANG . $del);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$aConditions = array();
$aConditions[] = array(AppEventPeer::APP_UID, AppDelegationPeer::APP_UID);
$aConditions[] = array(AppEventPeer::DEL_INDEX, AppDelegationPeer::DEL_INDEX);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$aConditions = array();
$aConditions[] = array(AppDelegationPeer::TAS_UID, 'C2.CON_ID');
$aConditions[] = array('C2.CON_CATEGORY', $del . 'TAS_TITLE' . $del);
$aConditions[] = array('C2.CON_LANG', $del . SYS_LANG . $del);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$aConditions = array();
$aConditions[] = array(AppDelegationPeer::APP_UID, 'C3.CON_ID');
$aConditions[] = array('C3.CON_CATEGORY', $del . 'APP_TITLE' . $del);
$aConditions[] = array('C3.CON_LANG', $del . SYS_LANG . $del);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$aConditions = array();
$aConditions[] = array(AppDelegationPeer::PRO_UID, 'C4.CON_ID');
$aConditions[] = array('C4.CON_CATEGORY', $del . 'PRO_TITLE' . $del);
$aConditions[] = array('C4.CON_LANG', $del . SYS_LANG . $del);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(AppEventPeer::EVN_UID, '', Criteria::NOT_EQUAL);
if ($sProcessUid != '') {
$oCriteria->add(EventPeer::PRO_UID, $sProcessUid);
}
if ($EVN_ACTION != '') {
$oCriteria->add(EventPeer::EVN_ACTION, $EVN_ACTION);
}
switch ($sStatus) {
case '':
//Nothing
break;
case 'PENDING':
$oCriteria->add(AppEventPeer::APP_EVN_STATUS, 'OPEN');
break;
case 'COMPLETED':
$oCriteria->add(AppEventPeer::APP_EVN_STATUS, 'CLOSE');
break;
}
//$oCriteria->addDescendingOrderByColumn(AppEventPeer::APP_EVN_ACTION_DATE);
return $oCriteria;
} catch (Exception $oError) {
throw $oError;
}
}
示例12: getInputDocumentCriteria
/**
* Get criteria for InputDocument
*
* return object
*/
public function getInputDocumentCriteria()
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
$criteria->addAsColumn("INP_DOC_TITLE", "CT.CON_VALUE");
$criteria->addAsColumn("INP_DOC_DESCRIPTION", "CD.CON_VALUE");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_FORM_NEEDED);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_ORIGINAL);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_PUBLISHED);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_VERSIONING);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_DESTINATION_PATH);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TAGS);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TYPE_FILE);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
$arrayCondition = array();
$arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CD.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "INP_DOC_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
return $criteria;
} catch (\Exception $e) {
throw $e;
}
}
示例13:
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_UID);
$criteria->addSelectColumn(AppMessagePeer::APP_UID);
$criteria->addSelectColumn(AppMessagePeer::DEL_INDEX);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_TYPE);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_SUBJECT);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_FROM);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_TO);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_BODY);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_STATUS);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_DATE);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_SEND_DATE);
$criteria->addSelectColumn(AppMessagePeer::APP_MSG_SHOW_MESSAGE);
$criteria->addSelectColumn(ApplicationPeer::PRO_UID);
$criteria->addSelectColumn(ApplicationPeer::APP_NUMBER);
$criteria->addAsColumn('PRO_TITLE', 'C2.CON_VALUE');
$criteria->addAlias('C2', 'CONTENT');
if ($emailStatus != '') {
$criteria->add(AppMessagePeer::APP_MSG_STATUS, $emailStatus);
}
if ($proUid != '') {
$criteria->add(ApplicationPeer::PRO_UID, $proUid);
}
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";
示例14: getAdvancedSearch
public function getAdvancedSearch($sCase, $sProcess, $sTask, $sCurrentUser, $sSentby, $sLastModFrom, $sLastModTo, $sStatus, $permisse, $userlogged, $aSupervisor)
{
$sTypeList = '';
$sUIDUserLogged = '';
$c = new Criteria('workflow');
$c->clearSelectColumns();
$c->addSelectColumn(ApplicationPeer::APP_UID);
$c->addSelectColumn(ApplicationPeer::APP_NUMBER);
$c->addSelectColumn(ApplicationPeer::APP_UPDATE_DATE);
$c->addSelectColumn(AppDelegationPeer::DEL_PRIORITY);
//$c->addSelectColumn(AppDelegationPeer::DEL_TASK_DUE_DATE);
$c->addAsColumn(
'DEL_TASK_DUE_DATE', " IF (" . AppDelegationPeer::DEL_TASK_DUE_DATE . " <= NOW(), CONCAT('<span style=\'color:red\';>', " .
AppDelegationPeer::DEL_TASK_DUE_DATE . ", '</span>'), " . AppDelegationPeer::DEL_TASK_DUE_DATE . ") ");
$c->addSelectColumn(AppDelegationPeer::DEL_INDEX);
$c->addSelectColumn(AppDelegationPeer::TAS_UID);
$c->addSelectColumn(AppDelegationPeer::DEL_INIT_DATE);
$c->addSelectColumn(AppDelegationPeer::DEL_FINISH_DATE);
$c->addSelectColumn(UsersPeer::USR_UID);
$c->addAsColumn('APP_CURRENT_USER', "CONCAT(USERS.USR_LASTNAME, ' ', USERS.USR_FIRSTNAME)");
$c->addSelectColumn(ApplicationPeer::APP_STATUS);
$c->addAsColumn('APP_TITLE', 'APP_TITLE.CON_VALUE');
$c->addAsColumn('APP_PRO_TITLE', 'PRO_TITLE.CON_VALUE');
$c->addAsColumn('APP_TAS_TITLE', 'TAS_TITLE.CON_VALUE');
//$c->addAsColumn('APP_DEL_PREVIOUS_USER', 'APP_LAST_USER.USR_USERNAME');
$c->addAsColumn(
'APP_DEL_PREVIOUS_USER', "CONCAT(APP_LAST_USER.USR_LASTNAME, ' ', APP_LAST_USER.USR_FIRSTNAME)"
);
$c->addAlias("APP_TITLE", 'CONTENT');
$c->addAlias("PRO_TITLE", 'CONTENT');
$c->addAlias("TAS_TITLE", 'CONTENT');
$c->addAlias("APP_PREV_DEL", 'APP_DELEGATION');
$c->addAlias("APP_LAST_USER", 'USERS');
$c->addJoin(ApplicationPeer::APP_UID, AppDelegationPeer::APP_UID, Criteria::LEFT_JOIN);
$c->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$appThreadConds[] = array(ApplicationPeer::APP_UID, AppThreadPeer::APP_UID);
$appThreadConds[] = array(AppDelegationPeer::DEL_INDEX, AppThreadPeer::DEL_INDEX);
$c->addJoinMC($appThreadConds, Criteria::LEFT_JOIN);
$c->addJoin(AppDelegationPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
$del = DBAdapter::getStringDelimiter();
$appTitleConds = array();
$appTitleConds[] = array(ApplicationPeer::APP_UID, 'APP_TITLE.CON_ID');
$appTitleConds[] = array('APP_TITLE.CON_CATEGORY', $del . 'APP_TITLE' . $del);
$appTitleConds[] = array('APP_TITLE.CON_LANG', $del . SYS_LANG . $del);
$c->addJoinMC($appTitleConds, Criteria::LEFT_JOIN);
//.........这里部分代码省略.........
示例15: getDynaFormCriteria
/**
* Get criteria for DynaForm
*
* return object
*/
public function getDynaFormCriteria()
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\DynaformPeer::DYN_UID);
$criteria->addAsColumn("DYN_TITLE", "CT.CON_VALUE");
$criteria->addAsColumn("DYN_DESCRIPTION", "CD.CON_VALUE");
$criteria->addSelectColumn(\DynaformPeer::DYN_TYPE);
$criteria->addSelectColumn(\DynaformPeer::DYN_CONTENT);
$criteria->addSelectColumn(\DynaformPeer::DYN_VERSION);
$criteria->addSelectColumn(\DynaformPeer::DYN_UPDATE_DATE);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\DynaformPeer::DYN_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "DYN_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
$arrayCondition = array();
$arrayCondition[] = array(\DynaformPeer::DYN_UID, "CD.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "DYN_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
return $criteria;
} catch (\Exception $e) {
throw $e;
}
}