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

View File

@@ -2,44 +2,100 @@
require_once 'classes/model/om/BaseAppAssignSelfServiceValueGroup.php';
/**
* 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
* application requirements. This class will only be generated as
* 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 {
$con = Propel::getConnection(AppAssignSelfServiceValuePeer::DATABASE_NAME);
$con->begin();
$stmt = $con->createStatement();
if (is_array($dataVariable)) {
foreach ($dataVariable as $uid) {
$rs = $stmt->executeQuery("INSERT INTO
" . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . " (" .
AppAssignSelfServiceValueGroupPeer::ID . ", " .
AppAssignSelfServiceValueGroupPeer::GRP_UID . ")
VALUES (" . $appAssignSelfServiceValueId . ", '" . $uid . "');");
}
} else {
$rs = $stmt->executeQuery("INSERT INTO
" . AppAssignSelfServiceValueGroupPeer::TABLE_NAME . " (" .
AppAssignSelfServiceValueGroupPeer::ID . ", " .
AppAssignSelfServiceValueGroupPeer::GRP_UID . ")
VALUES (" . $appAssignSelfServiceValueId . ", '" . $dataVariable . "');");
}
$con->commit(); // Commit all rows inserted in batch
} catch (Exception $error) {
throw new $error;
}
}
/**
* 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->begin();
$statement = $con->createStatement();
if (is_array($dataVariable)) {
foreach ($dataVariable as $uid) {
$this->createRow($statement, $appAssignSelfServiceValueId, $uid);
}
} else {
$this->createRow($statement, $appAssignSelfServiceValueId, $dataVariable);
}
$con->commit();
}
} // AppAssignSelfServiceValueGroup
/**
* 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);
}
}
/**
* 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 {
$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");
$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->addSelectColumn(AppAssignSelfServiceValuePeer::APP_UID);
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::DEL_INDEX);
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_UID);
$criteria->add(
AppAssignSelfServiceValuePeer::ID,
AppAssignSelfServiceValuePeer::ID.
" IN (SELECT ".AppAssignSelfServiceValueGroupPeer::ID.
" FROM ".AppAssignSelfServiceValueGroupPeer::TABLE_NAME.
" WHERE ".AppAssignSelfServiceValueGroupPeer::GRP_UID." IN ('".
implode("','", $arrayUid)."'))",
Criteria::CUSTOM
);
$criteria->addJoin(AppAssignSelfServiceValuePeer::ID, AppAssignSelfServiceValueGroupPeer::ID, Criteria::INNER_JOIN);
$criteria->add(AppAssignSelfServiceValueGroupPeer::GRP_UID, $userUid, Criteria::EQUAL);
$criteria->addOr(AppAssignSelfServiceValueGroupPeer::GRP_UID, $sql, Criteria::CUSTOM);
$rsCriteria = AppAssignSelfServiceValuePeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
@@ -368,7 +366,6 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface
);
}
//Return
return $arrayAppAssignSelfServiceValueData;
} catch (Exception $e) {
throw $e;

View File

@@ -69,6 +69,10 @@ class AppAssignSelfServiceValueGroupMapBuilder
$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()
} // AppAssignSelfServiceValueGroupMapBuilder

View File

@@ -67,6 +67,8 @@ class GroupUserMapBuilder
$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->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->setPhpName('Groupwf');
$tMap->setUseIdGenerator(false);
$tMap->setUseIdGenerator(true);
$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_STATUS', 'GrpStatus', 'string', CreoleTypes::CHAR, true, 8);

View File

@@ -39,6 +39,18 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
*/
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
* by another object which falls in this transaction.
@@ -75,6 +87,28 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
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.
*
@@ -119,6 +153,50 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
} // 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.
*
@@ -140,12 +218,16 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$this->grp_uid = $rs->getString($startcol + 1);
$this->assignee_id = $rs->getInt($startcol + 2);
$this->assignee_type = $rs->getInt($startcol + 3);
$this->resetModified();
$this->setNew(false);
// 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) {
throw new PropelException("Error populating AppAssignSelfServiceValueGroup object", $e);
@@ -355,6 +437,12 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
case 1:
return $this->getGrpUid();
break;
case 2:
return $this->getAssigneeId();
break;
case 3:
return $this->getAssigneeType();
break;
default:
return null;
break;
@@ -377,6 +465,8 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$result = array(
$keys[0] => $this->getId(),
$keys[1] => $this->getGrpUid(),
$keys[2] => $this->getAssigneeId(),
$keys[3] => $this->getAssigneeType(),
);
return $result;
}
@@ -414,6 +504,12 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
case 1:
$this->setGrpUid($value);
break;
case 2:
$this->setAssigneeId($value);
break;
case 3:
$this->setAssigneeType($value);
break;
} // switch()
}
@@ -445,6 +541,14 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$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);
}
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;
}
@@ -525,6 +637,10 @@ abstract class BaseAppAssignSelfServiceValueGroup extends BaseObject implements
$copyObj->setGrpUid($this->grp_uid);
$copyObj->setAssigneeId($this->assignee_id);
$copyObj->setAssigneeType($this->assignee_type);
$copyObj->setNew(true);

View File

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

View File

@@ -33,6 +33,12 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
*/
protected $grp_uid = '0';
/**
* The value for the grp_id field.
* @var int
*/
protected $grp_id = 0;
/**
* The value for the usr_uid field.
* @var string
@@ -64,6 +70,17 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
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.
*
@@ -97,6 +114,28 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
} // 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.
*
@@ -138,14 +177,16 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
$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->setNew(false);
// 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) {
throw new PropelException("Error populating GroupUser object", $e);
@@ -353,6 +394,9 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
return $this->getGrpUid();
break;
case 1:
return $this->getGrpId();
break;
case 2:
return $this->getUsrUid();
break;
default:
@@ -376,7 +420,8 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
$keys = GroupUserPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getGrpUid(),
$keys[1] => $this->getUsrUid(),
$keys[1] => $this->getGrpId(),
$keys[2] => $this->getUsrUid(),
);
return $result;
}
@@ -412,6 +457,9 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
$this->setGrpUid($value);
break;
case 1:
$this->setGrpId($value);
break;
case 2:
$this->setUsrUid($value);
break;
} // switch()
@@ -442,7 +490,11 @@ abstract class BaseGroupUser extends BaseObject implements Persistent
}
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);
}
if ($this->isColumnModified(GroupUserPeer::GRP_ID)) {
$criteria->add(GroupUserPeer::GRP_ID, $this->grp_id);
}
if ($this->isColumnModified(GroupUserPeer::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)
{
$copyObj->setGrpId($this->grp_id);
$copyObj->setNew(true);

View File

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

View File

@@ -33,6 +33,12 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
*/
protected $grp_uid;
/**
* The value for the grp_id field.
* @var int
*/
protected $grp_id;
/**
* The value for the grp_title field.
* @var string
@@ -82,6 +88,17 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
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.
*
@@ -148,6 +165,28 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
} // 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.
*
@@ -255,20 +294,22 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
$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->setNew(false);
// 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) {
throw new PropelException("Error populating Groupwf object", $e);
@@ -476,15 +517,18 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
return $this->getGrpUid();
break;
case 1:
return $this->getGrpTitle();
return $this->getGrpId();
break;
case 2:
return $this->getGrpStatus();
return $this->getGrpTitle();
break;
case 3:
return $this->getGrpLdapDn();
return $this->getGrpStatus();
break;
case 4:
return $this->getGrpLdapDn();
break;
case 5:
return $this->getGrpUx();
break;
default:
@@ -508,10 +552,11 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
$keys = GroupwfPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getGrpUid(),
$keys[1] => $this->getGrpTitle(),
$keys[2] => $this->getGrpStatus(),
$keys[3] => $this->getGrpLdapDn(),
$keys[4] => $this->getGrpUx(),
$keys[1] => $this->getGrpId(),
$keys[2] => $this->getGrpTitle(),
$keys[3] => $this->getGrpStatus(),
$keys[4] => $this->getGrpLdapDn(),
$keys[5] => $this->getGrpUx(),
);
return $result;
}
@@ -547,15 +592,18 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
$this->setGrpUid($value);
break;
case 1:
$this->setGrpTitle($value);
$this->setGrpId($value);
break;
case 2:
$this->setGrpStatus($value);
$this->setGrpTitle($value);
break;
case 3:
$this->setGrpLdapDn($value);
$this->setGrpStatus($value);
break;
case 4:
$this->setGrpLdapDn($value);
break;
case 5:
$this->setGrpUx($value);
break;
} // switch()
@@ -586,19 +634,23 @@ abstract class BaseGroupwf extends BaseObject implements Persistent
}
if (array_key_exists($keys[1], $arr)) {
$this->setGrpTitle($arr[$keys[1]]);
$this->setGrpId($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setGrpStatus($arr[$keys[2]]);
$this->setGrpTitle($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setGrpLdapDn($arr[$keys[3]]);
$this->setGrpStatus($arr[$keys[3]]);
}
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);
}
if ($this->isColumnModified(GroupwfPeer::GRP_ID)) {
$criteria->add(GroupwfPeer::GRP_ID, $this->grp_id);
}
if ($this->isColumnModified(GroupwfPeer::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)
{
$copyObj->setGrpId($this->grp_id);
$copyObj->setGrpTitle($this->grp_title);
$copyObj->setGrpStatus($this->grp_status);

View File

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