update APP_DELAY and APP_THREAD

This commit is contained in:
Paula Quispe
2017-02-13 14:16:04 -04:00
parent efb1576cb5
commit fce4dbc8b3
13 changed files with 28 additions and 369 deletions

View File

@@ -125,7 +125,7 @@ class Applications
//Filters
if (!empty($sort)) {
if ($sort === 'APP_NUMBER') {
if ($sort === 'APP_NUMBER' || $sort === 'APPLICATION.APP_NUMBER') {
$sort = 'APP_DELEGATION.APP_NUMBER';
}
$sqlWhere .= " ORDER BY " . $sort;

View File

@@ -1900,7 +1900,7 @@ class Cases
{
try {
$appThread = new AppThread();
$result = $appThread->createAppThread($sAppUid, $iNewDelIndex, $iAppParent, $appNumber);
$result = $appThread->createAppThread($sAppUid, $iNewDelIndex, $iAppParent);
//update searchindex
if ($this->appSolr != null) {
$this->appSolr->updateApplicationSearchIndex($sAppUid);
@@ -2092,7 +2092,7 @@ class Cases
//appThread
$AppThread = new AppThread;
$iAppThreadIndex = $AppThread->createAppThread($sAppUid, $iDelIndex, 0, $Application->getAppNumber());
$iAppThreadIndex = $AppThread->createAppThread($sAppUid, $iDelIndex, 0);
G::LoadClass('derivation');
$oDerivation = new Derivation();
@@ -2139,7 +2139,7 @@ class Cases
);
//appThread
$AppThread = new AppThread;
$iAppThreadIndex = $AppThread->createAppThread($sAppUid, $iDelIndex1, 0, $Application->getAppNumber());
$iAppThreadIndex = $AppThread->createAppThread($sAppUid, $iDelIndex1, 0);
//Save Information
$aUserFields[$count] = $rowUser;
$aUserFields[$count]["DEL_INDEX"] = $iDelIndex1;

View File

@@ -1348,7 +1348,7 @@ class Derivation
$nextDel['TAS_ID']
);
$iNewThreadIndex = $this->case->newAppThread( $currentDelegation['APP_UID'], $iMIDelIndex, $iAppThreadIndex, $appFields['APP_NUMBER'] );
$iNewThreadIndex = $this->case->newAppThread( $currentDelegation['APP_UID'], $iMIDelIndex, $iAppThreadIndex);
//Setting the del Index for Updating the AppThread delIndex
if ($key == 0) {

View File

@@ -3513,62 +3513,6 @@ class workspaceTools
$this->initPropel(true);
$con = Propel::getConnection(AppDelegationPeer::DATABASE_NAME);
// Populating APP_THREAD.APP_NUMBER
CLI::logging("-> Populating APP_THREAD.APP_NUMBER \n");
$con->begin();
$stmt = $con->createStatement();
$rs = $stmt->executeQuery("UPDATE APP_THREAD AS AT
INNER JOIN (
SELECT APPLICATION.APP_UID, APPLICATION.APP_NUMBER
FROM APPLICATION
) AS APP
ON (AT.APP_UID = APP.APP_UID)
SET AT.APP_NUMBER = APP.APP_NUMBER
WHERE AT.APP_NUMBER = 0");
$con->commit();
// Populating APP_THREAD.DELEGATION_ID
CLI::logging("-> Populating APP_THREAD.DELEGATION_ID \n");
$con->begin();
$stmt = $con->createStatement();
$rs = $stmt->executeQuery("UPDATE APP_THREAD AS AT
INNER JOIN (
SELECT APP_DELEGATION.APP_UID, APP_DELEGATION.DEL_INDEX, APP_DELEGATION.DELEGATION_ID
FROM APP_DELEGATION
) AS APPDEL
ON (AT.APP_UID = APPDEL.APP_UID AND AT.DEL_INDEX = APPDEL.DEL_INDEX)
SET AT.DELEGATION_ID = APPDEL.DELEGATION_ID
WHERE AT.DELEGATION_ID = 0");
$con->commit();
// Populating APP_DELAY.APP_NUMBER
CLI::logging("-> Populating APP_DELAY.APP_NUMBER \n");
$con->begin();
$stmt = $con->createStatement();
$rs = $stmt->executeQuery("UPDATE APP_DELAY AS AD
INNER JOIN (
SELECT APPLICATION.APP_UID, APPLICATION.APP_NUMBER
FROM APPLICATION
) AS APP
ON (AD.APP_UID = APP.APP_UID)
SET AD.APP_NUMBER = APP.APP_NUMBER
WHERE AD.APP_NUMBER = 0");
$con->commit();
// Populating APP_DELAY.DELEGATION_ID
CLI::logging("-> Populating APP_DELAY.DELEGATION_ID \n");
$con->begin();
$stmt = $con->createStatement();
$rs = $stmt->executeQuery("UPDATE APP_DELAY AS AD
INNER JOIN (
SELECT APP_DELEGATION.APP_UID, APP_DELEGATION.DEL_INDEX, APP_DELEGATION.DELEGATION_ID
FROM APP_DELEGATION
) AS APPDEL
ON (AD.APP_UID = APPDEL.APP_UID AND AD.APP_DEL_INDEX = APPDEL.DEL_INDEX)
SET AD.DELEGATION_ID = APPDEL.DELEGATION_ID
WHERE AD.DELEGATION_ID = 0");
$con->commit();
// Populating APP_DELEGATION.APP_NUMBER
CLI::logging("-> Populating APP_DELEGATION.APP_NUMBER \n");
$con->begin();

View File

@@ -40,7 +40,7 @@
*/
class AppThread extends BaseAppThread
{
public function createAppThread ($sAppUid, $iDelIndex, $iParent, $appNumber = 0)
public function createAppThread ($sAppUid, $iDelIndex, $iParent)
{
if (!isset($sAppUid) || strlen($sAppUid ) == 0 ) {
throw ( new Exception ( 'Column "APP_UID" cannot be null.' ) );
@@ -68,7 +68,6 @@ class AppThread extends BaseAppThread
$this->setAppThreadParent ( $iParent );
$this->setAppThreadStatus ( 'OPEN' );
$this->setDelIndex ( $iDelIndex );
$this->setAppNumber($appNumber);
if ($this->validate() ) {
try {

View File

@@ -93,10 +93,6 @@ class AppDelayMapBuilder
$tMap->addColumn('APP_AUTOMATIC_DISABLED_DATE', 'AppAutomaticDisabledDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('DELEGATION_ID', 'DelegationId', 'int', CreoleTypes::INTEGER, false, null);
} // doBuild()
} // AppDelayMapBuilder

View File

@@ -75,10 +75,6 @@ class AppThreadMapBuilder
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('DELEGATION_ID', 'DelegationId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addValidator('APP_THREAD_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'CLOSED|OPEN', 'Please select a valid status.');
} // doBuild()

View File

@@ -111,18 +111,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
*/
protected $app_automatic_disabled_date;
/**
* The value for the app_number field.
* @var int
*/
protected $app_number = 0;
/**
* The value for the delegation_id field.
* @var int
*/
protected $delegation_id = 0;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -354,28 +342,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
}
}
/**
* Get the [app_number] column value.
*
* @return int
*/
public function getAppNumber()
{
return $this->app_number;
}
/**
* Get the [delegation_id] column value.
*
* @return int
*/
public function getDelegationId()
{
return $this->delegation_id;
}
/**
* Set the value of [app_delay_uid] column.
*
@@ -705,50 +671,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
} // setAppAutomaticDisabledDate()
/**
* Set the value of [app_number] column.
*
* @param int $v new value
* @return void
*/
public function setAppNumber($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->app_number !== $v || $v === 0) {
$this->app_number = $v;
$this->modifiedColumns[] = AppDelayPeer::APP_NUMBER;
}
} // setAppNumber()
/**
* Set the value of [delegation_id] column.
*
* @param int $v new value
* @return void
*/
public function setDelegationId($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->delegation_id !== $v || $v === 0) {
$this->delegation_id = $v;
$this->modifiedColumns[] = AppDelayPeer::DELEGATION_ID;
}
} // setDelegationId()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -794,16 +716,12 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
$this->app_automatic_disabled_date = $rs->getTimestamp($startcol + 13, null);
$this->app_number = $rs->getInt($startcol + 14);
$this->delegation_id = $rs->getInt($startcol + 15);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 16; // 16 = AppDelayPeer::NUM_COLUMNS - AppDelayPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 14; // 14 = AppDelayPeer::NUM_COLUMNS - AppDelayPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating AppDelay object", $e);
@@ -1049,12 +967,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
case 13:
return $this->getAppAutomaticDisabledDate();
break;
case 14:
return $this->getAppNumber();
break;
case 15:
return $this->getDelegationId();
break;
default:
return null;
break;
@@ -1089,8 +1001,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
$keys[11] => $this->getAppDisableActionUser(),
$keys[12] => $this->getAppDisableActionDate(),
$keys[13] => $this->getAppAutomaticDisabledDate(),
$keys[14] => $this->getAppNumber(),
$keys[15] => $this->getDelegationId(),
);
return $result;
}
@@ -1164,12 +1074,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
case 13:
$this->setAppAutomaticDisabledDate($value);
break;
case 14:
$this->setAppNumber($value);
break;
case 15:
$this->setDelegationId($value);
break;
} // switch()
}
@@ -1249,14 +1153,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
$this->setAppAutomaticDisabledDate($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setAppNumber($arr[$keys[14]]);
}
if (array_key_exists($keys[15], $arr)) {
$this->setDelegationId($arr[$keys[15]]);
}
}
/**
@@ -1324,14 +1220,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
$criteria->add(AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE, $this->app_automatic_disabled_date);
}
if ($this->isColumnModified(AppDelayPeer::APP_NUMBER)) {
$criteria->add(AppDelayPeer::APP_NUMBER, $this->app_number);
}
if ($this->isColumnModified(AppDelayPeer::DELEGATION_ID)) {
$criteria->add(AppDelayPeer::DELEGATION_ID, $this->delegation_id);
}
return $criteria;
}
@@ -1412,10 +1300,6 @@ abstract class BaseAppDelay extends BaseObject implements Persistent
$copyObj->setAppAutomaticDisabledDate($this->app_automatic_disabled_date);
$copyObj->setAppNumber($this->app_number);
$copyObj->setDelegationId($this->delegation_id);
$copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseAppDelayPeer
const CLASS_DEFAULT = 'classes.model.AppDelay';
/** The total number of columns. */
const NUM_COLUMNS = 16;
const NUM_COLUMNS = 14;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -73,12 +73,6 @@ abstract class BaseAppDelayPeer
/** the column name for the APP_AUTOMATIC_DISABLED_DATE field */
const APP_AUTOMATIC_DISABLED_DATE = 'APP_DELAY.APP_AUTOMATIC_DISABLED_DATE';
/** the column name for the APP_NUMBER field */
const APP_NUMBER = 'APP_DELAY.APP_NUMBER';
/** the column name for the DELEGATION_ID field */
const DELEGATION_ID = 'APP_DELAY.DELEGATION_ID';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -90,10 +84,10 @@ abstract class BaseAppDelayPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppDelayUid', 'ProUid', 'AppUid', 'AppThreadIndex', 'AppDelIndex', 'AppType', 'AppStatus', 'AppNextTask', 'AppDelegationUser', 'AppEnableActionUser', 'AppEnableActionDate', 'AppDisableActionUser', 'AppDisableActionDate', 'AppAutomaticDisabledDate', 'AppNumber', 'DelegationId', ),
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID, AppDelayPeer::PRO_UID, AppDelayPeer::APP_UID, AppDelayPeer::APP_THREAD_INDEX, AppDelayPeer::APP_DEL_INDEX, AppDelayPeer::APP_TYPE, AppDelayPeer::APP_STATUS, AppDelayPeer::APP_NEXT_TASK, AppDelayPeer::APP_DELEGATION_USER, AppDelayPeer::APP_ENABLE_ACTION_USER, AppDelayPeer::APP_ENABLE_ACTION_DATE, AppDelayPeer::APP_DISABLE_ACTION_USER, AppDelayPeer::APP_DISABLE_ACTION_DATE, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE, AppDelayPeer::APP_NUMBER, AppDelayPeer::DELEGATION_ID, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID', 'PRO_UID', 'APP_UID', 'APP_THREAD_INDEX', 'APP_DEL_INDEX', 'APP_TYPE', 'APP_STATUS', 'APP_NEXT_TASK', 'APP_DELEGATION_USER', 'APP_ENABLE_ACTION_USER', 'APP_ENABLE_ACTION_DATE', 'APP_DISABLE_ACTION_USER', 'APP_DISABLE_ACTION_DATE', 'APP_AUTOMATIC_DISABLED_DATE', 'APP_NUMBER', 'DELEGATION_ID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
BasePeer::TYPE_PHPNAME => array ('AppDelayUid', 'ProUid', 'AppUid', 'AppThreadIndex', 'AppDelIndex', 'AppType', 'AppStatus', 'AppNextTask', 'AppDelegationUser', 'AppEnableActionUser', 'AppEnableActionDate', 'AppDisableActionUser', 'AppDisableActionDate', 'AppAutomaticDisabledDate', ),
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID, AppDelayPeer::PRO_UID, AppDelayPeer::APP_UID, AppDelayPeer::APP_THREAD_INDEX, AppDelayPeer::APP_DEL_INDEX, AppDelayPeer::APP_TYPE, AppDelayPeer::APP_STATUS, AppDelayPeer::APP_NEXT_TASK, AppDelayPeer::APP_DELEGATION_USER, AppDelayPeer::APP_ENABLE_ACTION_USER, AppDelayPeer::APP_ENABLE_ACTION_DATE, AppDelayPeer::APP_DISABLE_ACTION_USER, AppDelayPeer::APP_DISABLE_ACTION_DATE, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID', 'PRO_UID', 'APP_UID', 'APP_THREAD_INDEX', 'APP_DEL_INDEX', 'APP_TYPE', 'APP_STATUS', 'APP_NEXT_TASK', 'APP_DELEGATION_USER', 'APP_ENABLE_ACTION_USER', 'APP_ENABLE_ACTION_DATE', 'APP_DISABLE_ACTION_USER', 'APP_DISABLE_ACTION_DATE', 'APP_AUTOMATIC_DISABLED_DATE', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
@@ -103,10 +97,10 @@ abstract class BaseAppDelayPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppDelayUid' => 0, 'ProUid' => 1, 'AppUid' => 2, 'AppThreadIndex' => 3, 'AppDelIndex' => 4, 'AppType' => 5, 'AppStatus' => 6, 'AppNextTask' => 7, 'AppDelegationUser' => 8, 'AppEnableActionUser' => 9, 'AppEnableActionDate' => 10, 'AppDisableActionUser' => 11, 'AppDisableActionDate' => 12, 'AppAutomaticDisabledDate' => 13, 'AppNumber' => 14, 'DelegationId' => 15, ),
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID => 0, AppDelayPeer::PRO_UID => 1, AppDelayPeer::APP_UID => 2, AppDelayPeer::APP_THREAD_INDEX => 3, AppDelayPeer::APP_DEL_INDEX => 4, AppDelayPeer::APP_TYPE => 5, AppDelayPeer::APP_STATUS => 6, AppDelayPeer::APP_NEXT_TASK => 7, AppDelayPeer::APP_DELEGATION_USER => 8, AppDelayPeer::APP_ENABLE_ACTION_USER => 9, AppDelayPeer::APP_ENABLE_ACTION_DATE => 10, AppDelayPeer::APP_DISABLE_ACTION_USER => 11, AppDelayPeer::APP_DISABLE_ACTION_DATE => 12, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE => 13, AppDelayPeer::APP_NUMBER => 14, AppDelayPeer::DELEGATION_ID => 15, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID' => 0, 'PRO_UID' => 1, 'APP_UID' => 2, 'APP_THREAD_INDEX' => 3, 'APP_DEL_INDEX' => 4, 'APP_TYPE' => 5, 'APP_STATUS' => 6, 'APP_NEXT_TASK' => 7, 'APP_DELEGATION_USER' => 8, 'APP_ENABLE_ACTION_USER' => 9, 'APP_ENABLE_ACTION_DATE' => 10, 'APP_DISABLE_ACTION_USER' => 11, 'APP_DISABLE_ACTION_DATE' => 12, 'APP_AUTOMATIC_DISABLED_DATE' => 13, 'APP_NUMBER' => 14, 'DELEGATION_ID' => 15, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
BasePeer::TYPE_PHPNAME => array ('AppDelayUid' => 0, 'ProUid' => 1, 'AppUid' => 2, 'AppThreadIndex' => 3, 'AppDelIndex' => 4, 'AppType' => 5, 'AppStatus' => 6, 'AppNextTask' => 7, 'AppDelegationUser' => 8, 'AppEnableActionUser' => 9, 'AppEnableActionDate' => 10, 'AppDisableActionUser' => 11, 'AppDisableActionDate' => 12, 'AppAutomaticDisabledDate' => 13, ),
BasePeer::TYPE_COLNAME => array (AppDelayPeer::APP_DELAY_UID => 0, AppDelayPeer::PRO_UID => 1, AppDelayPeer::APP_UID => 2, AppDelayPeer::APP_THREAD_INDEX => 3, AppDelayPeer::APP_DEL_INDEX => 4, AppDelayPeer::APP_TYPE => 5, AppDelayPeer::APP_STATUS => 6, AppDelayPeer::APP_NEXT_TASK => 7, AppDelayPeer::APP_DELEGATION_USER => 8, AppDelayPeer::APP_ENABLE_ACTION_USER => 9, AppDelayPeer::APP_ENABLE_ACTION_DATE => 10, AppDelayPeer::APP_DISABLE_ACTION_USER => 11, AppDelayPeer::APP_DISABLE_ACTION_DATE => 12, AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE => 13, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DELAY_UID' => 0, 'PRO_UID' => 1, 'APP_UID' => 2, 'APP_THREAD_INDEX' => 3, 'APP_DEL_INDEX' => 4, 'APP_TYPE' => 5, 'APP_STATUS' => 6, 'APP_NEXT_TASK' => 7, 'APP_DELEGATION_USER' => 8, 'APP_ENABLE_ACTION_USER' => 9, 'APP_ENABLE_ACTION_DATE' => 10, 'APP_DISABLE_ACTION_USER' => 11, 'APP_DISABLE_ACTION_DATE' => 12, 'APP_AUTOMATIC_DISABLED_DATE' => 13, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
@@ -235,10 +229,6 @@ abstract class BaseAppDelayPeer
$criteria->addSelectColumn(AppDelayPeer::APP_AUTOMATIC_DISABLED_DATE);
$criteria->addSelectColumn(AppDelayPeer::APP_NUMBER);
$criteria->addSelectColumn(AppDelayPeer::DELEGATION_ID);
}
const COUNT = 'COUNT(APP_DELAY.APP_DELAY_UID)';

View File

@@ -57,18 +57,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
*/
protected $del_index = 0;
/**
* The value for the app_number field.
* @var int
*/
protected $app_number = 0;
/**
* The value for the delegation_id field.
* @var int
*/
protected $delegation_id = 0;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -138,28 +126,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
return $this->del_index;
}
/**
* Get the [app_number] column value.
*
* @return int
*/
public function getAppNumber()
{
return $this->app_number;
}
/**
* Get the [delegation_id] column value.
*
* @return int
*/
public function getDelegationId()
{
return $this->delegation_id;
}
/**
* Set the value of [app_uid] column.
*
@@ -270,50 +236,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
} // setDelIndex()
/**
* Set the value of [app_number] column.
*
* @param int $v new value
* @return void
*/
public function setAppNumber($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->app_number !== $v || $v === 0) {
$this->app_number = $v;
$this->modifiedColumns[] = AppThreadPeer::APP_NUMBER;
}
} // setAppNumber()
/**
* Set the value of [delegation_id] column.
*
* @param int $v new value
* @return void
*/
public function setDelegationId($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->delegation_id !== $v || $v === 0) {
$this->delegation_id = $v;
$this->modifiedColumns[] = AppThreadPeer::DELEGATION_ID;
}
} // setDelegationId()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -341,16 +263,12 @@ abstract class BaseAppThread extends BaseObject implements Persistent
$this->del_index = $rs->getInt($startcol + 4);
$this->app_number = $rs->getInt($startcol + 5);
$this->delegation_id = $rs->getInt($startcol + 6);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 7; // 7 = AppThreadPeer::NUM_COLUMNS - AppThreadPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 5; // 5 = AppThreadPeer::NUM_COLUMNS - AppThreadPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating AppThread object", $e);
@@ -569,12 +487,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
case 4:
return $this->getDelIndex();
break;
case 5:
return $this->getAppNumber();
break;
case 6:
return $this->getDelegationId();
break;
default:
return null;
break;
@@ -600,8 +512,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
$keys[2] => $this->getAppThreadParent(),
$keys[3] => $this->getAppThreadStatus(),
$keys[4] => $this->getDelIndex(),
$keys[5] => $this->getAppNumber(),
$keys[6] => $this->getDelegationId(),
);
return $result;
}
@@ -648,12 +558,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
case 4:
$this->setDelIndex($value);
break;
case 5:
$this->setAppNumber($value);
break;
case 6:
$this->setDelegationId($value);
break;
} // switch()
}
@@ -697,14 +601,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
$this->setDelIndex($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setAppNumber($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
$this->setDelegationId($arr[$keys[6]]);
}
}
/**
@@ -736,14 +632,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
$criteria->add(AppThreadPeer::DEL_INDEX, $this->del_index);
}
if ($this->isColumnModified(AppThreadPeer::APP_NUMBER)) {
$criteria->add(AppThreadPeer::APP_NUMBER, $this->app_number);
}
if ($this->isColumnModified(AppThreadPeer::DELEGATION_ID)) {
$criteria->add(AppThreadPeer::DELEGATION_ID, $this->delegation_id);
}
return $criteria;
}
@@ -816,10 +704,6 @@ abstract class BaseAppThread extends BaseObject implements Persistent
$copyObj->setDelIndex($this->del_index);
$copyObj->setAppNumber($this->app_number);
$copyObj->setDelegationId($this->delegation_id);
$copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseAppThreadPeer
const CLASS_DEFAULT = 'classes.model.AppThread';
/** The total number of columns. */
const NUM_COLUMNS = 7;
const NUM_COLUMNS = 5;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -46,12 +46,6 @@ abstract class BaseAppThreadPeer
/** the column name for the DEL_INDEX field */
const DEL_INDEX = 'APP_THREAD.DEL_INDEX';
/** the column name for the APP_NUMBER field */
const APP_NUMBER = 'APP_THREAD.APP_NUMBER';
/** the column name for the DELEGATION_ID field */
const DELEGATION_ID = 'APP_THREAD.DELEGATION_ID';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -63,10 +57,10 @@ abstract class BaseAppThreadPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppUid', 'AppThreadIndex', 'AppThreadParent', 'AppThreadStatus', 'DelIndex', 'AppNumber', 'DelegationId', ),
BasePeer::TYPE_COLNAME => array (AppThreadPeer::APP_UID, AppThreadPeer::APP_THREAD_INDEX, AppThreadPeer::APP_THREAD_PARENT, AppThreadPeer::APP_THREAD_STATUS, AppThreadPeer::DEL_INDEX, AppThreadPeer::APP_NUMBER, AppThreadPeer::DELEGATION_ID, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'APP_THREAD_INDEX', 'APP_THREAD_PARENT', 'APP_THREAD_STATUS', 'DEL_INDEX', 'APP_NUMBER', 'DELEGATION_ID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('AppUid', 'AppThreadIndex', 'AppThreadParent', 'AppThreadStatus', 'DelIndex', ),
BasePeer::TYPE_COLNAME => array (AppThreadPeer::APP_UID, AppThreadPeer::APP_THREAD_INDEX, AppThreadPeer::APP_THREAD_PARENT, AppThreadPeer::APP_THREAD_STATUS, AppThreadPeer::DEL_INDEX, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'APP_THREAD_INDEX', 'APP_THREAD_PARENT', 'APP_THREAD_STATUS', 'DEL_INDEX', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
);
/**
@@ -76,10 +70,10 @@ abstract class BaseAppThreadPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'AppThreadIndex' => 1, 'AppThreadParent' => 2, 'AppThreadStatus' => 3, 'DelIndex' => 4, 'AppNumber' => 5, 'DelegationId' => 6, ),
BasePeer::TYPE_COLNAME => array (AppThreadPeer::APP_UID => 0, AppThreadPeer::APP_THREAD_INDEX => 1, AppThreadPeer::APP_THREAD_PARENT => 2, AppThreadPeer::APP_THREAD_STATUS => 3, AppThreadPeer::DEL_INDEX => 4, AppThreadPeer::APP_NUMBER => 5, AppThreadPeer::DELEGATION_ID => 6, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'APP_THREAD_INDEX' => 1, 'APP_THREAD_PARENT' => 2, 'APP_THREAD_STATUS' => 3, 'DEL_INDEX' => 4, 'APP_NUMBER' => 5, 'DELEGATION_ID' => 6, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'AppThreadIndex' => 1, 'AppThreadParent' => 2, 'AppThreadStatus' => 3, 'DelIndex' => 4, ),
BasePeer::TYPE_COLNAME => array (AppThreadPeer::APP_UID => 0, AppThreadPeer::APP_THREAD_INDEX => 1, AppThreadPeer::APP_THREAD_PARENT => 2, AppThreadPeer::APP_THREAD_STATUS => 3, AppThreadPeer::DEL_INDEX => 4, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'APP_THREAD_INDEX' => 1, 'APP_THREAD_PARENT' => 2, 'APP_THREAD_STATUS' => 3, 'DEL_INDEX' => 4, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
);
/**
@@ -190,10 +184,6 @@ abstract class BaseAppThreadPeer
$criteria->addSelectColumn(AppThreadPeer::DEL_INDEX);
$criteria->addSelectColumn(AppThreadPeer::APP_NUMBER);
$criteria->addSelectColumn(AppThreadPeer::DELEGATION_ID);
}
const COUNT = 'COUNT(APP_THREAD.APP_UID)';

View File

@@ -1651,14 +1651,6 @@
<column name="APP_THREAD_PARENT" type="INTEGER" required="true" default="0"/>
<column name="APP_THREAD_STATUS" type="VARCHAR" size="32" required="true" default="OPEN"/>
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
<column name="APP_NUMBER" type="INTEGER" required="false" default="0"/>
<column name="DELEGATION_ID" type="INTEGER" required="false" default="0"/>
<index name="INDEX_APP_NUMBER">
<index-column name="APP_NUMBER"/>
</index>
<index name="INDEX_DELEGATION_ID">
<index-column name="DELEGATION_ID"/>
</index>
<validator column="APP_THREAD_STATUS">
<rule name="validValues" value="CLOSED|OPEN" message="Please select a valid status."/>
</validator>
@@ -1698,8 +1690,6 @@
<column name="APP_DISABLE_ACTION_USER" type="VARCHAR" size="32" default="0"/>
<column name="APP_DISABLE_ACTION_DATE" type="TIMESTAMP"/>
<column name="APP_AUTOMATIC_DISABLED_DATE" type="TIMESTAMP"/>
<column name="APP_NUMBER" type="INTEGER" required="false" default="0"/>
<column name="DELEGATION_ID" type="INTEGER" required="false" default="0"/>
<index name="indexAppDelay">
<index-column name="PRO_UID"/>
<index-column name="APP_UID"/>
@@ -1726,12 +1716,6 @@
<index name="indexAppUid">
<index-column name="APP_UID"/>
</index>
<index name="INDEX_APP_NUMBER">
<index-column name="APP_NUMBER"/>
</index>
<index name="INDEX_DELEGATION_ID">
<index-column name="DELEGATION_ID"/>
</index>
</table>
<table name="PROCESS_USER">
<vendor type="mysql">

View File

@@ -811,11 +811,7 @@ CREATE TABLE `APP_THREAD`
`APP_THREAD_PARENT` INTEGER default 0 NOT NULL,
`APP_THREAD_STATUS` VARCHAR(32) default 'OPEN' NOT NULL,
`DEL_INDEX` INTEGER default 0 NOT NULL,
`APP_NUMBER` INTEGER default 0,
`DELEGATION_ID` INTEGER default 0,
PRIMARY KEY (`APP_UID`,`APP_THREAD_INDEX`),
KEY `INDEX_APP_NUMBER`(`APP_NUMBER`),
KEY `INDEX_DELEGATION_ID`(`DELEGATION_ID`)
PRIMARY KEY (`APP_UID`,`APP_THREAD_INDEX`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='APP_THREAD';
#-----------------------------------------------------------------------------
#-- APP_DELAY
@@ -840,13 +836,9 @@ CREATE TABLE `APP_DELAY`
`APP_DISABLE_ACTION_USER` VARCHAR(32) default '0',
`APP_DISABLE_ACTION_DATE` DATETIME,
`APP_AUTOMATIC_DISABLED_DATE` DATETIME,
`APP_NUMBER` INTEGER default 0,
`DELEGATION_ID` INTEGER default 0,
PRIMARY KEY (`APP_DELAY_UID`),
KEY `indexAppDelay`(`PRO_UID`, `APP_UID`, `APP_THREAD_INDEX`, `APP_DEL_INDEX`, `APP_NEXT_TASK`, `APP_DELEGATION_USER`, `APP_DISABLE_ACTION_USER`),
KEY `indexAppUid`(`APP_UID`),
KEY `INDEX_APP_NUMBER`(`APP_NUMBER`),
KEY `INDEX_DELEGATION_ID`(`DELEGATION_ID`)
KEY `indexAppUid`(`APP_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='APP_DELAY';
#-----------------------------------------------------------------------------
#-- PROCESS_USER