This commit is contained in:
Roly
2018-01-02 12:07:43 +00:00
committed by Julio Cesar Laura Avendaño
parent 8127286f8f
commit 6d7a083f25
17 changed files with 577 additions and 186 deletions

8
composer.lock generated
View File

@@ -644,7 +644,7 @@
], ],
"authors": [ "authors": [
{ {
"name": "Jean-Marc Trémeaux", "name": "Jean-Marc Trémeaux",
"homepage": "http://naku.dohcrew.com/", "homepage": "http://naku.dohcrew.com/",
"role": "Developer" "role": "Developer"
}, },
@@ -3456,7 +3456,7 @@
], ],
"authors": [ "authors": [
{ {
"name": "François Zaninotto" "name": "François Zaninotto"
} }
], ],
"description": "Faker is a PHP library that generates fake data for you.", "description": "Faker is a PHP library that generates fake data for you.",
@@ -3500,7 +3500,7 @@
], ],
"authors": [ "authors": [
{ {
"name": "Christian Lück", "name": "Christian Lück",
"email": "christian@lueck.tv" "email": "christian@lueck.tv"
} }
], ],
@@ -4099,7 +4099,7 @@
], ],
"authors": [ "authors": [
{ {
"name": "Ondřej Machulda", "name": "OndÅ™ej Machulda",
"email": "ondrej.machulda@gmail.com" "email": "ondrej.machulda@gmail.com"
} }
], ],

View File

@@ -95,18 +95,18 @@ class Groups
if (is_object($groupUser) && get_class($groupUser) == 'GroupUser') { if (is_object($groupUser) && get_class($groupUser) == 'GroupUser') {
return true; return true;
} else { } else {
$group = GroupwfPeer::retrieveByPK($grpUid);
$groupUser = new GroupUser(); $groupUser = new GroupUser();
$groupUser->setGrpUid($grpUid); $groupUser->setGrpUid($grpUid);
$groupUser->setUsrUid($usrUid); $groupUser->setUsrUid($usrUid);
$groupUser->setGrpId($group->getGrpId());
$groupUser->Save(); $groupUser->Save();
$groupWf = new Groupwf();
$grpName = $groupWf->loadByGroupUid($grpUid);
$users = new Users(); $users = new Users();
$usrName = $users->load($usrUid); $usrName = $users->load($usrUid);
G::auditLog("AssignUserToGroup", "Assign user ". $usrName['USR_USERNAME'] ." (".$usrUid.") to group ".$grpName['CON_VALUE']." (".$grpUid.") "); G::auditLog("AssignUserToGroup", "Assign user " . $usrName['USR_USERNAME'] . " (" . $usrUid . ") to group " . $group->getGrpTitle() . " (" . $grpUid . ") ");
return true; return true;
} }

View File

@@ -358,6 +358,12 @@ class WorkspaceTools
$stop = microtime(true); $stop = microtime(true);
CLI::logging("<*> Migrating history data took " . ($stop - $start) . " seconds.\n"); CLI::logging("<*> Migrating history data took " . ($stop - $start) . " seconds.\n");
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
$start = microtime(true);
CLI::logging("> Optimizing Self-Service data in table APP_ASSIGN_SELF_SERVICE_VALUE_GROUP....\n");
$this->upgradeSelfServiceData();
$stop = microtime(true);
CLI::logging("<*> Optimizing Self-Service data in table APP_ASSIGN_SELF_SERVICE_VALUE_GROUP took " . ($stop - $start) . " seconds.\n");
} }
/** /**
@@ -4251,6 +4257,7 @@ class WorkspaceTools
$this->setLastContentMigrateTable(true); $this->setLastContentMigrateTable(true);
} }
} }
/** /**
* Remove the DYN_CONTENT_HISTORY from APP_HISTORY * Remove the DYN_CONTENT_HISTORY from APP_HISTORY
* *
@@ -4448,4 +4455,68 @@ class WorkspaceTools
$conf->saveConfig('MIGRATED_APP_HISTORY', 'history'); $conf->saveConfig('MIGRATED_APP_HISTORY', 'history');
} }
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
/**
* Upgrade APP_ASSIGN_SELF_SERVICE_VALUE_GROUP and GROUP_USER tables.
* Before only the identification value of 32 characters was used, now the
* numerical value plus the type is used, 1 for the user and 2 for the group,
* if it is not found, it is updated with -1.
*
* @param object $con
*
* @return void
*/
public function upgradeSelfServiceData($con = null)
{
if ($con === null) {
$this->initPropel(true);
$con = Propel::getConnection(AppDelegationPeer::DATABASE_NAME);
}
CLI::logging("-> Update table GROUP_USER\n");
$con->begin();
$stmt = $con->createStatement();
$stmt->executeQuery(""
. "UPDATE GROUPWF AS GW "
. "INNER JOIN GROUP_USER AS GU ON "
. " GW.GRP_UID=GU.GRP_UID "
. "SET GU.GRP_ID=GW.GRP_ID "
. "WHERE GU.GRP_ID = 0");
$con->commit();
CLI::logging("-> Update table APP_ASSIGN_SELF_SERVICE_VALUE_GROUP\n");
$con->begin();
$stmt = $con->createStatement();
$stmt->executeQuery(""
. "UPDATE GROUPWF AS GW "
. "INNER JOIN APP_ASSIGN_SELF_SERVICE_VALUE_GROUP AS GU ON "
. " GW.GRP_UID=GU.GRP_UID "
. "SET "
. "GU.ASSIGNEE_ID=GW.GRP_ID, "
. "GU.ASSIGNEE_TYPE=2 "
. "WHERE GU.ASSIGNEE_ID = 0");
$con->commit();
$con->begin();
$stmt = $con->createStatement();
$stmt->executeQuery(""
. "UPDATE USERS AS U "
. "INNER JOIN APP_ASSIGN_SELF_SERVICE_VALUE_GROUP AS GU ON "
. " U.USR_UID=GU.GRP_UID "
. "SET "
. "GU.ASSIGNEE_ID=U.USR_ID, "
. "GU.ASSIGNEE_TYPE=1 "
. "WHERE GU.ASSIGNEE_ID = 0");
$con->commit();
$con->begin();
$stmt = $con->createStatement();
$stmt->executeQuery(""
. "UPDATE APP_ASSIGN_SELF_SERVICE_VALUE_GROUP "
. "SET "
. "ASSIGNEE_ID=-1, "
. "ASSIGNEE_TYPE=-1 "
. "WHERE ASSIGNEE_ID = 0");
$con->commit();
}
} }

View File

@@ -2,44 +2,100 @@
require_once 'classes/model/om/BaseAppAssignSelfServiceValueGroup.php'; require_once 'classes/model/om/BaseAppAssignSelfServiceValueGroup.php';
/** /**
* Skeleton subclass for representing a row from the 'APP_ASSIGN_SELF_SERVICE_VALUE_GROUP' table. * Skeleton subclass for representing a row from the 'APP_ASSIGN_SELF_SERVICE_VALUE_GROUP' table.
*
*
*
* You should add additional methods to this class to meet the * You should add additional methods to this class to meet the
* application requirements. This class will only be generated as * application requirements. This class will only be generated as
* long as it does not already exist in the output directory. * long as it does not already exist in the output directory.
*
* @package classes.model
*/ */
class AppAssignSelfServiceValueGroup extends BaseAppAssignSelfServiceValueGroup { class AppAssignSelfServiceValueGroup extends BaseAppAssignSelfServiceValueGroup
{
public function createRows($appAssignSelfServiceValueId, $dataVariable) { /**
try { * Insert multiple rows in table "APP_ASSIGN_SELF_SERVICE_VALUE_GROUP"
*
* @param string $appAssignSelfServiceValueId
* @param mixed $dataVariable
*
* @return void
* @throws Exception
*/
public function createRows($appAssignSelfServiceValueId, $dataVariable)
{
$con = Propel::getConnection(AppAssignSelfServiceValuePeer::DATABASE_NAME); $con = Propel::getConnection(AppAssignSelfServiceValuePeer::DATABASE_NAME);
$con->begin(); $con->begin();
$stmt = $con->createStatement(); $statement = $con->createStatement();
if (is_array($dataVariable)) { if (is_array($dataVariable)) {
foreach ($dataVariable as $uid) { foreach ($dataVariable as $uid) {
$rs = $stmt->executeQuery("INSERT INTO $this->createRow($statement, $appAssignSelfServiceValueId, $uid);
" . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . " (" .
AppAssignSelfServiceValueGroupPeer::ID . ", " .
AppAssignSelfServiceValueGroupPeer::GRP_UID . ")
VALUES (" . $appAssignSelfServiceValueId . ", '" . $uid . "');");
} }
} else { } else {
$rs = $stmt->executeQuery("INSERT INTO $this->createRow($statement, $appAssignSelfServiceValueId, $dataVariable);
" . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . " (" .
AppAssignSelfServiceValueGroupPeer::ID . ", " .
AppAssignSelfServiceValueGroupPeer::GRP_UID . ")
VALUES (" . $appAssignSelfServiceValueId . ", '" . $dataVariable . "');");
} }
$con->commit(); // Commit all rows inserted in batch $con->commit();
} catch (Exception $error) { }
throw new $error;
/**
* Insert a row in table "APP_ASSIGN_SELF_SERVICE_VALUE_GROUP"
*
* @param object $statement
* @param string $appAssignSelfServiceValueId
* @param string $id
*
* @return void
*/
public function createRow($statement, $appAssignSelfServiceValueId, $id)
{
$object = $this->getTypeUserOrGroup($id);
if ($object->id === -1) {
$dataLog = Bootstrap::getDefaultContextLog();
$dataLog['ASSIGNEE_ID'] = $id;
$dataLog['ASSIGNEE_TYPE'] = $object->type;
Bootstrap::registerMonolog('AssignSelfServiceValue', 300, 'Invalid identifier value for Assign Self Service Value', $dataLog, $dataLog['workspace'], 'processmaker.log');
} else {
$sql = "INSERT INTO "
. AppAssignSelfServiceValueGroupPeer::TABLE_NAME
. " ("
. AppAssignSelfServiceValueGroupPeer::ID . ", "
. AppAssignSelfServiceValueGroupPeer::GRP_UID . ", "
. AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID . ", "
. AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE
. ") "
. "VALUES ("
. $appAssignSelfServiceValueId . ", '"
. $id . "', "
. $object->id . ", "
. $object->type
. ");";
$result = $statement->executeQuery($sql);
} }
} }
} // AppAssignSelfServiceValueGroup /**
* Gets the 'id' that corresponds to a user or group and its type, the type
* is 1 for user and 2 for group, if it is not found, -1 is returned.
*
* @param string $uid
*
* @return stdClass
*/
public function getTypeUserOrGroup($uid)
{
$object = new stdClass();
$group = GroupwfPeer::retrieveByPK($uid);
if (!empty($group)) {
$object->type = 2;
$object->id = $group->getGrpId();
return $object;
}
$user = UsersPeer::retrieveByPK($uid);
if (!empty($user)) {
$object->type = 1;
$object->id = $user->getUsrId();
return $object;
}
$object->type = -1;
$object->id = -1;
return $object;
}
}

View File

@@ -333,27 +333,25 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface
try { try {
$arrayAppAssignSelfServiceValueData = array(); $arrayAppAssignSelfServiceValueData = array();
//Get APP_UIDs
$group = new Groups();
$arrayUid = $group->getActiveGroupsForAnUser($userUid); //Set UIDs of Groups (Groups of User)
$arrayUid[] = $userUid; //Set UID of User
$criteria = new Criteria("workflow"); $criteria = new Criteria("workflow");
$sql = "("
. AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID . " IN ("
. " SELECT " . GroupUserPeer::GRP_ID . " "
. " FROM " . GroupUserPeer::TABLE_NAME . " "
. " LEFT JOIN " . GroupwfPeer::TABLE_NAME . " ON (" . GroupUserPeer::GRP_ID . "=" . GroupwfPeer::GRP_ID . ") "
. " WHERE " . GroupUserPeer::USR_UID . "='" . $userUid . "' AND " . GroupwfPeer::GRP_STATUS . "='ACTIVE'"
. " ) AND "
. " " . AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE . "=2 "
. ")";
$criteria->setDistinct(); $criteria->setDistinct();
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_UID); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_UID);
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::DEL_INDEX); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::DEL_INDEX);
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_UID); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_UID);
$criteria->addJoin(AppAssignSelfServiceValuePeer::ID, AppAssignSelfServiceValueGroupPeer::ID, Criteria::INNER_JOIN);
$criteria->add( $criteria->add(AppAssignSelfServiceValueGroupPeer::GRP_UID, $userUid, Criteria::EQUAL);
AppAssignSelfServiceValuePeer::ID, $criteria->addOr(AppAssignSelfServiceValueGroupPeer::GRP_UID, $sql, Criteria::CUSTOM);
AppAssignSelfServiceValuePeer::ID.
" IN (SELECT ".AppAssignSelfServiceValueGroupPeer::ID.
" FROM ".AppAssignSelfServiceValueGroupPeer::TABLE_NAME.
" WHERE ".AppAssignSelfServiceValueGroupPeer::GRP_UID." IN ('".
implode("','", $arrayUid)."'))",
Criteria::CUSTOM
);
$rsCriteria = AppAssignSelfServiceValuePeer::doSelectRS($criteria); $rsCriteria = AppAssignSelfServiceValuePeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC); $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
@@ -368,7 +366,6 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface
); );
} }
//Return
return $arrayAppAssignSelfServiceValueData; return $arrayAppAssignSelfServiceValueData;
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;

View File

@@ -69,6 +69,10 @@ class AppAssignSelfServiceValueGroupMapBuilder
$tMap->addColumn('GRP_UID', 'GrpUid', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addColumn('GRP_UID', 'GrpUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('ASSIGNEE_ID', 'AssigneeId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('ASSIGNEE_TYPE', 'AssigneeType', 'int', CreoleTypes::INTEGER, true, null);
} // doBuild() } // doBuild()
} // AppAssignSelfServiceValueGroupMapBuilder } // AppAssignSelfServiceValueGroupMapBuilder

View File

@@ -67,6 +67,8 @@ class GroupUserMapBuilder
$tMap->addPrimaryKey('GRP_UID', 'GrpUid', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addPrimaryKey('GRP_UID', 'GrpUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('GRP_ID', 'GrpId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addPrimaryKey('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addPrimaryKey('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addValidator('GRP_UID', 'maxLength', 'propel.validator.MaxLengthValidator', '32', 'Group UID can be no larger than 32 in size'); $tMap->addValidator('GRP_UID', 'maxLength', 'propel.validator.MaxLengthValidator', '32', 'Group UID can be no larger than 32 in size');

View File

@@ -63,10 +63,12 @@ class GroupwfMapBuilder
$tMap = $this->dbMap->addTable('GROUPWF'); $tMap = $this->dbMap->addTable('GROUPWF');
$tMap->setPhpName('Groupwf'); $tMap->setPhpName('Groupwf');
$tMap->setUseIdGenerator(false); $tMap->setUseIdGenerator(true);
$tMap->addPrimaryKey('GRP_UID', 'GrpUid', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addPrimaryKey('GRP_UID', 'GrpUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('GRP_ID', 'GrpId', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('GRP_TITLE', 'GrpTitle', 'string', CreoleTypes::LONGVARCHAR, true, null); $tMap->addColumn('GRP_TITLE', 'GrpTitle', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('GRP_STATUS', 'GrpStatus', 'string', CreoleTypes::CHAR, true, 8); $tMap->addColumn('GRP_STATUS', 'GrpStatus', 'string', CreoleTypes::CHAR, true, 8);

View File

@@ -39,6 +39,18 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
*/ */
protected $grp_uid; protected $grp_uid;
/**
* The value for the assignee_id field.
* @var int
*/
protected $assignee_id = 0;
/**
* The value for the assignee_type field.
* @var int
*/
protected $assignee_type = 0;
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
@@ -75,6 +87,28 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
return $this->grp_uid; return $this->grp_uid;
} }
/**
* Get the [assignee_id] column value.
*
* @return int
*/
public function getAssigneeId()
{
return $this->assignee_id;
}
/**
* Get the [assignee_type] column value.
*
* @return int
*/
public function getAssigneeType()
{
return $this->assignee_type;
}
/** /**
* Set the value of [id] column. * Set the value of [id] column.
* *
@@ -119,6 +153,50 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
} // setGrpUid() } // setGrpUid()
/**
* Set the value of [assignee_id] column.
*
* @param int $v new value
* @return void
*/
public function setAssigneeId($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->assignee_id !== $v || $v === 0) {
$this->assignee_id = $v;
$this->modifiedColumns[] = AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID;
}
} // setAssigneeId()
/**
* Set the value of [assignee_type] column.
*
* @param int $v new value
* @return void
*/
public function setAssigneeType($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->assignee_type !== $v || $v === 0) {
$this->assignee_type = $v;
$this->modifiedColumns[] = AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE;
}
} // setAssigneeType()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
* *
@@ -140,12 +218,16 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$this->grp_uid = $rs->getString($startcol + 1); $this->grp_uid = $rs->getString($startcol + 1);
$this->assignee_id = $rs->getInt($startcol + 2);
$this->assignee_type = $rs->getInt($startcol + 3);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 2; // 2 = AppAssignSelfServiceValueGroupPeer::NUM_COLUMNS - AppAssignSelfServiceValueGroupPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 4; // 4 = AppAssignSelfServiceValueGroupPeer::NUM_COLUMNS - AppAssignSelfServiceValueGroupPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating AppAssignSelfServiceValueGroup object", $e); throw new PropelException("Error populating AppAssignSelfServiceValueGroup object", $e);
@@ -355,6 +437,12 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
case 1: case 1:
return $this->getGrpUid(); return $this->getGrpUid();
break; break;
case 2:
return $this->getAssigneeId();
break;
case 3:
return $this->getAssigneeType();
break;
default: default:
return null; return null;
break; break;
@@ -377,6 +465,8 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$result = array( $result = array(
$keys[0] => $this->getId(), $keys[0] => $this->getId(),
$keys[1] => $this->getGrpUid(), $keys[1] => $this->getGrpUid(),
$keys[2] => $this->getAssigneeId(),
$keys[3] => $this->getAssigneeType(),
); );
return $result; return $result;
} }
@@ -414,6 +504,12 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
case 1: case 1:
$this->setGrpUid($value); $this->setGrpUid($value);
break; break;
case 2:
$this->setAssigneeId($value);
break;
case 3:
$this->setAssigneeType($value);
break;
} // switch() } // switch()
} }
@@ -445,6 +541,14 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$this->setGrpUid($arr[$keys[1]]); $this->setGrpUid($arr[$keys[1]]);
} }
if (array_key_exists($keys[2], $arr)) {
$this->setAssigneeId($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setAssigneeType($arr[$keys[3]]);
}
} }
/** /**
@@ -464,6 +568,14 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$criteria->add(AppAssignSelfServiceValueGroupPeer::GRP_UID, $this->grp_uid); $criteria->add(AppAssignSelfServiceValueGroupPeer::GRP_UID, $this->grp_uid);
} }
if ($this->isColumnModified(AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID)) {
$criteria->add(AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID, $this->assignee_id);
}
if ($this->isColumnModified(AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE)) {
$criteria->add(AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE, $this->assignee_type);
}
return $criteria; return $criteria;
} }
@@ -525,6 +637,10 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$copyObj->setGrpUid($this->grp_uid); $copyObj->setGrpUid($this->grp_uid);
$copyObj->setAssigneeId($this->assignee_id);
$copyObj->setAssigneeType($this->assignee_type);
$copyObj->setNew(true); $copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseAppAssignSelfServiceValueGroupPeer
const CLASS_DEFAULT = 'classes.model.AppAssignSelfServiceValueGroup'; const CLASS_DEFAULT = 'classes.model.AppAssignSelfServiceValueGroup';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 2; const NUM_COLUMNS = 4;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -37,6 +37,12 @@ abstract class BaseAppAssignSelfServiceValueGroupPeer
/** the column name for the GRP_UID field */ /** the column name for the GRP_UID field */
const GRP_UID = 'APP_ASSIGN_SELF_SERVICE_VALUE_GROUP.GRP_UID'; const GRP_UID = 'APP_ASSIGN_SELF_SERVICE_VALUE_GROUP.GRP_UID';
/** the column name for the ASSIGNEE_ID field */
const ASSIGNEE_ID = 'APP_ASSIGN_SELF_SERVICE_VALUE_GROUP.ASSIGNEE_ID';
/** the column name for the ASSIGNEE_TYPE field */
const ASSIGNEE_TYPE = 'APP_ASSIGN_SELF_SERVICE_VALUE_GROUP.ASSIGNEE_TYPE';
/** The PHP to DB Name Mapping */ /** The PHP to DB Name Mapping */
private static $phpNameMap = null; private static $phpNameMap = null;
@@ -48,10 +54,10 @@ abstract class BaseAppAssignSelfServiceValueGroupPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('Id', 'GrpUid', ), BasePeer::TYPE_PHPNAME => array ('Id', 'GrpUid', 'AssigneeId', 'AssigneeType', ),
BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValueGroupPeer::ID, AppAssignSelfServiceValueGroupPeer::GRP_UID, ), BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValueGroupPeer::ID, AppAssignSelfServiceValueGroupPeer::GRP_UID, AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID, AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE, ),
BasePeer::TYPE_FIELDNAME => array ('ID', 'GRP_UID', ), BasePeer::TYPE_FIELDNAME => array ('ID', 'GRP_UID', 'ASSIGNEE_ID', 'ASSIGNEE_TYPE', ),
BasePeer::TYPE_NUM => array (0, 1, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
); );
/** /**
@@ -61,10 +67,10 @@ abstract class BaseAppAssignSelfServiceValueGroupPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'GrpUid' => 1, ), BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'GrpUid' => 1, 'AssigneeId' => 2, 'AssigneeType' => 3, ),
BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValueGroupPeer::ID => 0, AppAssignSelfServiceValueGroupPeer::GRP_UID => 1, ), BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValueGroupPeer::ID => 0, AppAssignSelfServiceValueGroupPeer::GRP_UID => 1, AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID => 2, AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE => 3, ),
BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'GRP_UID' => 1, ), BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'GRP_UID' => 1, 'ASSIGNEE_ID' => 2, 'ASSIGNEE_TYPE' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
); );
/** /**
@@ -169,6 +175,10 @@ abstract class BaseAppAssignSelfServiceValueGroupPeer
$criteria->addSelectColumn(AppAssignSelfServiceValueGroupPeer::GRP_UID); $criteria->addSelectColumn(AppAssignSelfServiceValueGroupPeer::GRP_UID);
$criteria->addSelectColumn(AppAssignSelfServiceValueGroupPeer::ASSIGNEE_ID);
$criteria->addSelectColumn(AppAssignSelfServiceValueGroupPeer::ASSIGNEE_TYPE);
} }
const COUNT = 'COUNT(*)'; const COUNT = 'COUNT(*)';

View File

@@ -33,6 +33,12 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
*/ */
protected $grp_uid = '0'; protected $grp_uid = '0';
/**
* The value for the grp_id field.
* @var int
*/
protected $grp_id = 0;
/** /**
* The value for the usr_uid field. * The value for the usr_uid field.
* @var string * @var string
@@ -64,6 +70,17 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
return $this->grp_uid; return $this->grp_uid;
} }
/**
* Get the [grp_id] column value.
*
* @return int
*/
public function getGrpId()
{
return $this->grp_id;
}
/** /**
* Get the [usr_uid] column value. * Get the [usr_uid] column value.
* *
@@ -97,6 +114,28 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
} // setGrpUid() } // setGrpUid()
/**
* Set the value of [grp_id] column.
*
* @param int $v new value
* @return void
*/
public function setGrpId($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->grp_id !== $v || $v === 0) {
$this->grp_id = $v;
$this->modifiedColumns[] = GroupUserPeer::GRP_ID;
}
} // setGrpId()
/** /**
* Set the value of [usr_uid] column. * Set the value of [usr_uid] column.
* *
@@ -138,14 +177,16 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
$this->grp_uid = $rs->getString($startcol + 0); $this->grp_uid = $rs->getString($startcol + 0);
$this->usr_uid = $rs->getString($startcol + 1); $this->grp_id = $rs->getInt($startcol + 1);
$this->usr_uid = $rs->getString($startcol + 2);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 2; // 2 = GroupUserPeer::NUM_COLUMNS - GroupUserPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 3; // 3 = GroupUserPeer::NUM_COLUMNS - GroupUserPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating GroupUser object", $e); throw new PropelException("Error populating GroupUser object", $e);
@@ -353,6 +394,9 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
return $this->getGrpUid(); return $this->getGrpUid();
break; break;
case 1: case 1:
return $this->getGrpId();
break;
case 2:
return $this->getUsrUid(); return $this->getUsrUid();
break; break;
default: default:
@@ -376,7 +420,8 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
$keys = GroupUserPeer::getFieldNames($keyType); $keys = GroupUserPeer::getFieldNames($keyType);
$result = array( $result = array(
$keys[0] => $this->getGrpUid(), $keys[0] => $this->getGrpUid(),
$keys[1] => $this->getUsrUid(), $keys[1] => $this->getGrpId(),
$keys[2] => $this->getUsrUid(),
); );
return $result; return $result;
} }
@@ -412,6 +457,9 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
$this->setGrpUid($value); $this->setGrpUid($value);
break; break;
case 1: case 1:
$this->setGrpId($value);
break;
case 2:
$this->setUsrUid($value); $this->setUsrUid($value);
break; break;
} // switch() } // switch()
@@ -442,7 +490,11 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
} }
if (array_key_exists($keys[1], $arr)) { if (array_key_exists($keys[1], $arr)) {
$this->setUsrUid($arr[$keys[1]]); $this->setGrpId($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setUsrUid($arr[$keys[2]]);
} }
} }
@@ -460,6 +512,10 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
$criteria->add(GroupUserPeer::GRP_UID, $this->grp_uid); $criteria->add(GroupUserPeer::GRP_UID, $this->grp_uid);
} }
if ($this->isColumnModified(GroupUserPeer::GRP_ID)) {
$criteria->add(GroupUserPeer::GRP_ID, $this->grp_id);
}
if ($this->isColumnModified(GroupUserPeer::USR_UID)) { if ($this->isColumnModified(GroupUserPeer::USR_UID)) {
$criteria->add(GroupUserPeer::USR_UID, $this->usr_uid); $criteria->add(GroupUserPeer::USR_UID, $this->usr_uid);
} }
@@ -530,6 +586,8 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
public function copyInto($copyObj, $deepCopy = false) public function copyInto($copyObj, $deepCopy = false)
{ {
$copyObj->setGrpId($this->grp_id);
$copyObj->setNew(true); $copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseGroupUserPeer
const CLASS_DEFAULT = 'classes.model.GroupUser'; const CLASS_DEFAULT = 'classes.model.GroupUser';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 2; const NUM_COLUMNS = 3;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -34,6 +34,9 @@ abstract class BaseGroupUserPeer
/** the column name for the GRP_UID field */ /** the column name for the GRP_UID field */
const GRP_UID = 'GROUP_USER.GRP_UID'; const GRP_UID = 'GROUP_USER.GRP_UID';
/** the column name for the GRP_ID field */
const GRP_ID = 'GROUP_USER.GRP_ID';
/** the column name for the USR_UID field */ /** the column name for the USR_UID field */
const USR_UID = 'GROUP_USER.USR_UID'; const USR_UID = 'GROUP_USER.USR_UID';
@@ -48,10 +51,10 @@ abstract class BaseGroupUserPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('GrpUid', 'UsrUid', ), BasePeer::TYPE_PHPNAME => array ('GrpUid', 'GrpId', 'UsrUid', ),
BasePeer::TYPE_COLNAME => array (GroupUserPeer::GRP_UID, GroupUserPeer::USR_UID, ), BasePeer::TYPE_COLNAME => array (GroupUserPeer::GRP_UID, GroupUserPeer::GRP_ID, GroupUserPeer::USR_UID, ),
BasePeer::TYPE_FIELDNAME => array ('GRP_UID', 'USR_UID', ), BasePeer::TYPE_FIELDNAME => array ('GRP_UID', 'GRP_ID', 'USR_UID', ),
BasePeer::TYPE_NUM => array (0, 1, ) BasePeer::TYPE_NUM => array (0, 1, 2, )
); );
/** /**
@@ -61,10 +64,10 @@ abstract class BaseGroupUserPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('GrpUid' => 0, 'UsrUid' => 1, ), BasePeer::TYPE_PHPNAME => array ('GrpUid' => 0, 'GrpId' => 1, 'UsrUid' => 2, ),
BasePeer::TYPE_COLNAME => array (GroupUserPeer::GRP_UID => 0, GroupUserPeer::USR_UID => 1, ), BasePeer::TYPE_COLNAME => array (GroupUserPeer::GRP_UID => 0, GroupUserPeer::GRP_ID => 1, GroupUserPeer::USR_UID => 2, ),
BasePeer::TYPE_FIELDNAME => array ('GRP_UID' => 0, 'USR_UID' => 1, ), BasePeer::TYPE_FIELDNAME => array ('GRP_UID' => 0, 'GRP_ID' => 1, 'USR_UID' => 2, ),
BasePeer::TYPE_NUM => array (0, 1, ) BasePeer::TYPE_NUM => array (0, 1, 2, )
); );
/** /**
@@ -167,6 +170,8 @@ abstract class BaseGroupUserPeer
$criteria->addSelectColumn(GroupUserPeer::GRP_UID); $criteria->addSelectColumn(GroupUserPeer::GRP_UID);
$criteria->addSelectColumn(GroupUserPeer::GRP_ID);
$criteria->addSelectColumn(GroupUserPeer::USR_UID); $criteria->addSelectColumn(GroupUserPeer::USR_UID);
} }

View File

@@ -33,6 +33,12 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
*/ */
protected $grp_uid; protected $grp_uid;
/**
* The value for the grp_id field.
* @var int
*/
protected $grp_id;
/** /**
* The value for the grp_title field. * The value for the grp_title field.
* @var string * @var string
@@ -82,6 +88,17 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
return $this->grp_uid; return $this->grp_uid;
} }
/**
* Get the [grp_id] column value.
*
* @return int
*/
public function getGrpId()
{
return $this->grp_id;
}
/** /**
* Get the [grp_title] column value. * Get the [grp_title] column value.
* *
@@ -148,6 +165,28 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
} // setGrpUid() } // setGrpUid()
/**
* Set the value of [grp_id] column.
*
* @param int $v new value
* @return void
*/
public function setGrpId($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->grp_id !== $v) {
$this->grp_id = $v;
$this->modifiedColumns[] = GroupwfPeer::GRP_ID;
}
} // setGrpId()
/** /**
* Set the value of [grp_title] column. * Set the value of [grp_title] column.
* *
@@ -255,20 +294,22 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
$this->grp_uid = $rs->getString($startcol + 0); $this->grp_uid = $rs->getString($startcol + 0);
$this->grp_title = $rs->getString($startcol + 1); $this->grp_id = $rs->getInt($startcol + 1);
$this->grp_status = $rs->getString($startcol + 2); $this->grp_title = $rs->getString($startcol + 2);
$this->grp_ldap_dn = $rs->getString($startcol + 3); $this->grp_status = $rs->getString($startcol + 3);
$this->grp_ux = $rs->getString($startcol + 4); $this->grp_ldap_dn = $rs->getString($startcol + 4);
$this->grp_ux = $rs->getString($startcol + 5);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 5; // 5 = GroupwfPeer::NUM_COLUMNS - GroupwfPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 6; // 6 = GroupwfPeer::NUM_COLUMNS - GroupwfPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating Groupwf object", $e); throw new PropelException("Error populating Groupwf object", $e);
@@ -476,15 +517,18 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
return $this->getGrpUid(); return $this->getGrpUid();
break; break;
case 1: case 1:
return $this->getGrpTitle(); return $this->getGrpId();
break; break;
case 2: case 2:
return $this->getGrpStatus(); return $this->getGrpTitle();
break; break;
case 3: case 3:
return $this->getGrpLdapDn(); return $this->getGrpStatus();
break; break;
case 4: case 4:
return $this->getGrpLdapDn();
break;
case 5:
return $this->getGrpUx(); return $this->getGrpUx();
break; break;
default: default:
@@ -508,10 +552,11 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
$keys = GroupwfPeer::getFieldNames($keyType); $keys = GroupwfPeer::getFieldNames($keyType);
$result = array( $result = array(
$keys[0] => $this->getGrpUid(), $keys[0] => $this->getGrpUid(),
$keys[1] => $this->getGrpTitle(), $keys[1] => $this->getGrpId(),
$keys[2] => $this->getGrpStatus(), $keys[2] => $this->getGrpTitle(),
$keys[3] => $this->getGrpLdapDn(), $keys[3] => $this->getGrpStatus(),
$keys[4] => $this->getGrpUx(), $keys[4] => $this->getGrpLdapDn(),
$keys[5] => $this->getGrpUx(),
); );
return $result; return $result;
} }
@@ -547,15 +592,18 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
$this->setGrpUid($value); $this->setGrpUid($value);
break; break;
case 1: case 1:
$this->setGrpTitle($value); $this->setGrpId($value);
break; break;
case 2: case 2:
$this->setGrpStatus($value); $this->setGrpTitle($value);
break; break;
case 3: case 3:
$this->setGrpLdapDn($value); $this->setGrpStatus($value);
break; break;
case 4: case 4:
$this->setGrpLdapDn($value);
break;
case 5:
$this->setGrpUx($value); $this->setGrpUx($value);
break; break;
} // switch() } // switch()
@@ -586,19 +634,23 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
} }
if (array_key_exists($keys[1], $arr)) { if (array_key_exists($keys[1], $arr)) {
$this->setGrpTitle($arr[$keys[1]]); $this->setGrpId($arr[$keys[1]]);
} }
if (array_key_exists($keys[2], $arr)) { if (array_key_exists($keys[2], $arr)) {
$this->setGrpStatus($arr[$keys[2]]); $this->setGrpTitle($arr[$keys[2]]);
} }
if (array_key_exists($keys[3], $arr)) { if (array_key_exists($keys[3], $arr)) {
$this->setGrpLdapDn($arr[$keys[3]]); $this->setGrpStatus($arr[$keys[3]]);
} }
if (array_key_exists($keys[4], $arr)) { if (array_key_exists($keys[4], $arr)) {
$this->setGrpUx($arr[$keys[4]]); $this->setGrpLdapDn($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setGrpUx($arr[$keys[5]]);
} }
} }
@@ -616,6 +668,10 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
$criteria->add(GroupwfPeer::GRP_UID, $this->grp_uid); $criteria->add(GroupwfPeer::GRP_UID, $this->grp_uid);
} }
if ($this->isColumnModified(GroupwfPeer::GRP_ID)) {
$criteria->add(GroupwfPeer::GRP_ID, $this->grp_id);
}
if ($this->isColumnModified(GroupwfPeer::GRP_TITLE)) { if ($this->isColumnModified(GroupwfPeer::GRP_TITLE)) {
$criteria->add(GroupwfPeer::GRP_TITLE, $this->grp_title); $criteria->add(GroupwfPeer::GRP_TITLE, $this->grp_title);
} }
@@ -686,6 +742,8 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
public function copyInto($copyObj, $deepCopy = false) public function copyInto($copyObj, $deepCopy = false)
{ {
$copyObj->setGrpId($this->grp_id);
$copyObj->setGrpTitle($this->grp_title); $copyObj->setGrpTitle($this->grp_title);
$copyObj->setGrpStatus($this->grp_status); $copyObj->setGrpStatus($this->grp_status);

View File

@@ -25,7 +25,7 @@ abstract class BaseGroupwfPeer
const CLASS_DEFAULT = 'classes.model.Groupwf'; const CLASS_DEFAULT = 'classes.model.Groupwf';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 5; const NUM_COLUMNS = 6;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -34,6 +34,9 @@ abstract class BaseGroupwfPeer
/** the column name for the GRP_UID field */ /** the column name for the GRP_UID field */
const GRP_UID = 'GROUPWF.GRP_UID'; const GRP_UID = 'GROUPWF.GRP_UID';
/** the column name for the GRP_ID field */
const GRP_ID = 'GROUPWF.GRP_ID';
/** the column name for the GRP_TITLE field */ /** the column name for the GRP_TITLE field */
const GRP_TITLE = 'GROUPWF.GRP_TITLE'; const GRP_TITLE = 'GROUPWF.GRP_TITLE';
@@ -57,10 +60,10 @@ abstract class BaseGroupwfPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('GrpUid', 'GrpTitle', 'GrpStatus', 'GrpLdapDn', 'GrpUx', ), BasePeer::TYPE_PHPNAME => array ('GrpUid', 'GrpId', 'GrpTitle', 'GrpStatus', 'GrpLdapDn', 'GrpUx', ),
BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID, GroupwfPeer::GRP_TITLE, GroupwfPeer::GRP_STATUS, GroupwfPeer::GRP_LDAP_DN, GroupwfPeer::GRP_UX, ), BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID, GroupwfPeer::GRP_ID, GroupwfPeer::GRP_TITLE, GroupwfPeer::GRP_STATUS, GroupwfPeer::GRP_LDAP_DN, GroupwfPeer::GRP_UX, ),
BasePeer::TYPE_FIELDNAME => array ('GRP_UID', 'GRP_TITLE', 'GRP_STATUS', 'GRP_LDAP_DN', 'GRP_UX', ), BasePeer::TYPE_FIELDNAME => array ('GRP_UID', 'GRP_ID', 'GRP_TITLE', 'GRP_STATUS', 'GRP_LDAP_DN', 'GRP_UX', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
); );
/** /**
@@ -70,10 +73,10 @@ abstract class BaseGroupwfPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('GrpUid' => 0, 'GrpTitle' => 1, 'GrpStatus' => 2, 'GrpLdapDn' => 3, 'GrpUx' => 4, ), BasePeer::TYPE_PHPNAME => array ('GrpUid' => 0, 'GrpId' => 1, 'GrpTitle' => 2, 'GrpStatus' => 3, 'GrpLdapDn' => 4, 'GrpUx' => 5, ),
BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID => 0, GroupwfPeer::GRP_TITLE => 1, GroupwfPeer::GRP_STATUS => 2, GroupwfPeer::GRP_LDAP_DN => 3, GroupwfPeer::GRP_UX => 4, ), BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID => 0, GroupwfPeer::GRP_ID => 1, GroupwfPeer::GRP_TITLE => 2, GroupwfPeer::GRP_STATUS => 3, GroupwfPeer::GRP_LDAP_DN => 4, GroupwfPeer::GRP_UX => 5, ),
BasePeer::TYPE_FIELDNAME => array ('GRP_UID' => 0, 'GRP_TITLE' => 1, 'GRP_STATUS' => 2, 'GRP_LDAP_DN' => 3, 'GRP_UX' => 4, ), BasePeer::TYPE_FIELDNAME => array ('GRP_UID' => 0, 'GRP_ID' => 1, 'GRP_TITLE' => 2, 'GRP_STATUS' => 3, 'GRP_LDAP_DN' => 4, 'GRP_UX' => 5, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
); );
/** /**
@@ -176,6 +179,8 @@ abstract class BaseGroupwfPeer
$criteria->addSelectColumn(GroupwfPeer::GRP_UID); $criteria->addSelectColumn(GroupwfPeer::GRP_UID);
$criteria->addSelectColumn(GroupwfPeer::GRP_ID);
$criteria->addSelectColumn(GroupwfPeer::GRP_TITLE); $criteria->addSelectColumn(GroupwfPeer::GRP_TITLE);
$criteria->addSelectColumn(GroupwfPeer::GRP_STATUS); $criteria->addSelectColumn(GroupwfPeer::GRP_STATUS);

View File

@@ -593,7 +593,7 @@
<rule name="validValues" value="xmlform|grid" message="Please select a valid dynaform type."/> <rule name="validValues" value="xmlform|grid" message="Please select a valid dynaform type."/>
</validator> </validator>
</table> </table>
<table name="GROUPWF"> <table name="GROUPWF" idMethod="native">
<vendor type="mysql"> <vendor type="mysql">
<parameter name="Name" value="GROUPWF"/> <parameter name="Name" value="GROUPWF"/>
<parameter name="Engine" value="InnoDB"/> <parameter name="Engine" value="InnoDB"/>
@@ -615,6 +615,7 @@
<parameter name="Comment" value=""/> <parameter name="Comment" value=""/>
</vendor> </vendor>
<column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true"/> <column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true"/>
<column name="GRP_ID" type="INTEGER" required="true" autoIncrement="true" unique="true"/>
<column name="GRP_TITLE" type="LONGVARCHAR" required="true"/> <column name="GRP_TITLE" type="LONGVARCHAR" required="true"/>
<column name="GRP_STATUS" type="CHAR" size="8" required="true" default="ACTIVE"/> <column name="GRP_STATUS" type="CHAR" size="8" required="true" default="ACTIVE"/>
<column name="GRP_LDAP_DN" type="VARCHAR" size="255" required="true" default=""/> <column name="GRP_LDAP_DN" type="VARCHAR" size="255" required="true" default=""/>
@@ -623,6 +624,9 @@
<rule name="validValues" value="ACTIVE|INACTIVE" message="Please select a valid status."/> <rule name="validValues" value="ACTIVE|INACTIVE" message="Please select a valid status."/>
<rule name="required" message="Application Document UID is required."/> <rule name="required" message="Application Document UID is required."/>
</validator> </validator>
<unique name="GRP_ID">
<unique-column name="GRP_ID" />
</unique>
</table> </table>
<table name="GROUP_USER"> <table name="GROUP_USER">
<vendor type="mysql"> <vendor type="mysql">
@@ -646,6 +650,7 @@
<parameter name="Comment" value=""/> <parameter name="Comment" value=""/>
</vendor> </vendor>
<column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default="0"/> <column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default="0"/>
<column name="GRP_ID" type="INTEGER" required="false" default="0"/>
<column name="USR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default="0"/> <column name="USR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default="0"/>
<validator column="GRP_UID"> <validator column="GRP_UID">
<rule name="maxLength" value="32" message="Group UID can be no larger than ${value} in size"/> <rule name="maxLength" value="32" message="Group UID can be no larger than ${value} in size"/>
@@ -658,6 +663,9 @@
<index name="indexForUsrUid"> <index name="indexForUsrUid">
<index-column name="USR_UID"/> <index-column name="USR_UID"/>
</index> </index>
<index name="INDEX_GRP_ID">
<index-column name="GRP_ID"/>
</index>
</table> </table>
<table name="HOLIDAY" idMethod="native"> <table name="HOLIDAY" idMethod="native">
<vendor type="mysql"> <vendor type="mysql">
@@ -4241,11 +4249,16 @@
<parameter name="Checksum" value=""/> <parameter name="Checksum" value=""/>
<parameter name="Create_options" value=""/> <parameter name="Create_options" value=""/>
</vendor> </vendor>
<column name="ID" type="INTEGER" required="true" default="0"/> <column name="ID" type="INTEGER" required="true" default="0" />
<column name="GRP_UID" type="VARCHAR" size="32" required="true"/> <column name="GRP_UID" type="VARCHAR" size="32" required="true" />
<column name="ASSIGNEE_ID" type="INTEGER" required="false" default="0"/>
<column name="ASSIGNEE_TYPE" type="INTEGER" required="true" default="0" />
<index name="indexId"> <index name="indexId">
<index-column name="ID"/> <index-column name="ID"/>
</index> </index>
<index name="INDEX_ASSIGNEE_ID">
<index-column name="ASSIGNEE_ID"/>
</index>
</table> </table>
<table name="LIST_INBOX"> <table name="LIST_INBOX">

View File

@@ -281,11 +281,13 @@ DROP TABLE IF EXISTS `GROUPWF`;
CREATE TABLE `GROUPWF` CREATE TABLE `GROUPWF`
( (
`GRP_UID` VARCHAR(32) NOT NULL, `GRP_UID` VARCHAR(32) NOT NULL,
`GRP_ID` INTEGER NOT NULL AUTO_INCREMENT,
`GRP_TITLE` MEDIUMTEXT NOT NULL, `GRP_TITLE` MEDIUMTEXT NOT NULL,
`GRP_STATUS` CHAR(8) default 'ACTIVE' NOT NULL, `GRP_STATUS` CHAR(8) default 'ACTIVE' NOT NULL,
`GRP_LDAP_DN` VARCHAR(255) default '' NOT NULL, `GRP_LDAP_DN` VARCHAR(255) default '' NOT NULL,
`GRP_UX` VARCHAR(128) default 'NORMAL', `GRP_UX` VARCHAR(128) default 'NORMAL',
PRIMARY KEY (`GRP_UID`) PRIMARY KEY (`GRP_UID`),
UNIQUE KEY `GRP_ID` (`GRP_ID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- GROUP_USER #-- GROUP_USER
@@ -297,9 +299,11 @@ DROP TABLE IF EXISTS `GROUP_USER`;
CREATE TABLE `GROUP_USER` CREATE TABLE `GROUP_USER`
( (
`GRP_UID` VARCHAR(32) default '0' NOT NULL, `GRP_UID` VARCHAR(32) default '0' NOT NULL,
`GRP_ID` INTEGER default 0,
`USR_UID` VARCHAR(32) default '0' NOT NULL, `USR_UID` VARCHAR(32) default '0' NOT NULL,
PRIMARY KEY (`GRP_UID`,`USR_UID`), PRIMARY KEY (`GRP_UID`,`USR_UID`),
KEY `indexForUsrUid`(`USR_UID`) KEY `indexForUsrUid`(`USR_UID`),
KEY `INDEX_GRP_ID`(`GRP_ID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- HOLIDAY #-- HOLIDAY
@@ -2367,7 +2371,10 @@ CREATE TABLE `APP_ASSIGN_SELF_SERVICE_VALUE_GROUP`
( (
`ID` INTEGER default 0 NOT NULL, `ID` INTEGER default 0 NOT NULL,
`GRP_UID` VARCHAR(32) NOT NULL, `GRP_UID` VARCHAR(32) NOT NULL,
KEY `indexId`(`ID`) `ASSIGNEE_ID` INTEGER default 0,
`ASSIGNEE_TYPE` INTEGER default 0 NOT NULL,
KEY `indexId`(`ID`),
KEY `INDEX_ASSIGNEE_ID`(`ASSIGNEE_ID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- LIST_INBOX #-- LIST_INBOX

View File

@@ -1,10 +1,11 @@
<?php <?php
if (!isset($_SESSION['USER_LOGGED'])) { if (!isset($_SESSION['USER_LOGGED'])) {
$responseObject = new stdclass(); $responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN'); $responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true; $responseObject->success = true;
$responseObject->lostSession = true; $responseObject->lostSession = true;
print G::json_encode( $responseObject ); print G::json_encode($responseObject);
die(); die();
} }
@@ -35,7 +36,7 @@ try {
//Define user when is reassign //Define user when is reassign
if ($filters['action'] == 'to_reassign') { if ($filters['action'] == 'to_reassign') {
if ($filters['user'] == '' ) { if ($filters['user'] == '') {
$userUid = ''; $userUid = '';
} }
if ($filters['user'] !== '' && $filters['user'] !== 'CURRENT_USER') { if ($filters['user'] !== '' && $filters['user'] !== 'CURRENT_USER') {
@@ -47,51 +48,43 @@ try {
switch ($listName) { switch ($listName) {
case 'inbox': case 'inbox':
$list = new ListInbox(); $list = new ListInbox();
$listpeer = 'ListInboxPeer';
break; break;
case 'participated_history': case 'participated_history':
$list = new ListParticipatedHistory(); $list = new ListParticipatedHistory();
$listpeer = 'ListParticipatedHistoryPeer';
break; break;
case 'participated': case 'participated':
case 'participated_last': case 'participated_last':
$list = new ListParticipatedLast(); $list = new ListParticipatedLast();
$listpeer = 'ListParticipatedLastPeer';
break; break;
case 'completed': case 'completed':
$list = new ListCompleted(); $list = new ListCompleted();
$listpeer = 'ListCompletedPeer';
break; break;
case 'paused': case 'paused':
$list = new ListPaused(); $list = new ListPaused();
$listpeer = 'ListPausedPeer';
break; break;
case 'canceled': case 'canceled':
$list = new ListCanceled(); $list = new ListCanceled();
$listpeer = 'ListCanceledPeer';
break; break;
case 'my_inbox': case 'my_inbox':
$list = new ListMyInbox(); $list = new ListMyInbox();
$listpeer = 'ListMyInboxPeer';
break; break;
case 'unassigned': case 'unassigned':
$list = new ListUnassigned(); $list = new ListUnassigned();
$listpeer = 'ListUnassignedPeer';
break; break;
} }
// Validate filters // Validate filters
$filters['search'] = (!is_null($openApplicationUid))? $openApplicationUid : $filters['search']; $filters['search'] = (!is_null($openApplicationUid)) ? $openApplicationUid : $filters['search'];
//Set a flag for review in the list by APP_UID when is used the case Link with parallel task //Set a flag for review in the list by APP_UID when is used the case Link with parallel task
$filters['caseLink'] = (!is_null($openApplicationUid))? $openApplicationUid : ''; $filters['caseLink'] = (!is_null($openApplicationUid)) ? $openApplicationUid : '';
$filters['start'] = (int)$filters['start']; $filters['start'] = (int) $filters['start'];
$filters['start'] = abs($filters['start']); $filters['start'] = abs($filters['start']);
if ($filters['start'] != 0) { if ($filters['start'] != 0) {
$filters['start']+1; $filters['start'] + 1;
} }
$filters['limit'] = (int)$filters['limit']; $filters['limit'] = (int) $filters['limit'];
$filters['limit'] = abs($filters['limit']); $filters['limit'] = abs($filters['limit']);
$conf = new Configurations(); $conf = new Configurations();
$formats = $conf->getFormats(); $formats = $conf->getFormats();
@@ -100,12 +93,12 @@ try {
if ($filters['limit'] == 0) { if ($filters['limit'] == 0) {
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', ''); $generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
if (isset($generalConfCasesList['casesListRowNumber'])) { if (isset($generalConfCasesList['casesListRowNumber'])) {
$filters['limit'] = (int)$generalConfCasesList['casesListRowNumber']; $filters['limit'] = (int) $generalConfCasesList['casesListRowNumber'];
} else { } else {
$filters['limit'] = 25; $filters['limit'] = 25;
} }
} else { } else {
$filters['limit'] = (int)$filters['limit']; $filters['limit'] = (int) $filters['limit'];
} }
switch ($filters['sort']) { switch ($filters['sort']) {
@@ -136,11 +129,7 @@ try {
$filters['dir'] = 'DESC'; $filters['dir'] = 'DESC';
} }
$result = $list->loadList( $result = $list->loadList($userUid, $filters, function (array $record) {
$userUid,
$filters,
function (array $record)
{
try { try {
if (isset($record["DEL_PREVIOUS_USR_UID"])) { if (isset($record["DEL_PREVIOUS_USR_UID"])) {
if ($record["DEL_PREVIOUS_USR_UID"] == "") { if ($record["DEL_PREVIOUS_USR_UID"] == "") {
@@ -192,13 +181,11 @@ try {
$record["APP_STATUS_LABEL"] = G::LoadTranslation("ID_" . $record["APP_STATUS"]); $record["APP_STATUS_LABEL"] = G::LoadTranslation("ID_" . $record["APP_STATUS"]);
} }
//Return
return $record; return $record;
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;
} }
} });
);
$response = array(); $response = array();
$response['filters'] = $filters; $response['filters'] = $filters;