Added GAT_NEXT_TASK column in gateway table

This commit is contained in:
girish
2011-01-18 14:51:47 +00:00
parent 777acd0a37
commit 458b90288c
5 changed files with 89 additions and 18 deletions

View File

@@ -70,6 +70,8 @@ class GatewayMapBuilder {
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('GAT_NEXT_TASK', 'GatNextTask', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('GAT_X', 'GatX', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('GAT_Y', 'GatY', 'int', CreoleTypes::INTEGER, true, null);

View File

@@ -49,6 +49,13 @@ abstract class BaseGateway extends BaseObject implements Persistent {
protected $tas_uid = '';
/**
* The value for the gat_next_task field.
* @var string
*/
protected $gat_next_task = '';
/**
* The value for the gat_x field.
* @var int
@@ -109,6 +116,17 @@ abstract class BaseGateway extends BaseObject implements Persistent {
return $this->tas_uid;
}
/**
* Get the [gat_next_task] column value.
*
* @return string
*/
public function getGatNextTask()
{
return $this->gat_next_task;
}
/**
* Get the [gat_x] column value.
*
@@ -197,6 +215,28 @@ abstract class BaseGateway extends BaseObject implements Persistent {
} // setTasUid()
/**
* Set the value of [gat_next_task] column.
*
* @param string $v new value
* @return void
*/
public function setGatNextTask($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->gat_next_task !== $v || $v === '') {
$this->gat_next_task = $v;
$this->modifiedColumns[] = GatewayPeer::GAT_NEXT_TASK;
}
} // setGatNextTask()
/**
* Set the value of [gat_x] column.
*
@@ -264,16 +304,18 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$this->tas_uid = $rs->getString($startcol + 2);
$this->gat_x = $rs->getInt($startcol + 3);
$this->gat_next_task = $rs->getString($startcol + 3);
$this->gat_y = $rs->getInt($startcol + 4);
$this->gat_x = $rs->getInt($startcol + 4);
$this->gat_y = $rs->getInt($startcol + 5);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 5; // 5 = GatewayPeer::NUM_COLUMNS - GatewayPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 6; // 6 = GatewayPeer::NUM_COLUMNS - GatewayPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating Gateway object", $e);
@@ -486,9 +528,12 @@ abstract class BaseGateway extends BaseObject implements Persistent {
return $this->getTasUid();
break;
case 3:
return $this->getGatX();
return $this->getGatNextTask();
break;
case 4:
return $this->getGatX();
break;
case 5:
return $this->getGatY();
break;
default:
@@ -514,8 +559,9 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$keys[0] => $this->getGatUid(),
$keys[1] => $this->getProUid(),
$keys[2] => $this->getTasUid(),
$keys[3] => $this->getGatX(),
$keys[4] => $this->getGatY(),
$keys[3] => $this->getGatNextTask(),
$keys[4] => $this->getGatX(),
$keys[5] => $this->getGatY(),
);
return $result;
}
@@ -557,9 +603,12 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$this->setTasUid($value);
break;
case 3:
$this->setGatX($value);
$this->setGatNextTask($value);
break;
case 4:
$this->setGatX($value);
break;
case 5:
$this->setGatY($value);
break;
} // switch()
@@ -588,8 +637,9 @@ abstract class BaseGateway extends BaseObject implements Persistent {
if (array_key_exists($keys[0], $arr)) $this->setGatUid($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setProUid($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setTasUid($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setGatX($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setGatY($arr[$keys[4]]);
if (array_key_exists($keys[3], $arr)) $this->setGatNextTask($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setGatX($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setGatY($arr[$keys[5]]);
}
/**
@@ -604,6 +654,7 @@ abstract class BaseGateway extends BaseObject implements Persistent {
if ($this->isColumnModified(GatewayPeer::GAT_UID)) $criteria->add(GatewayPeer::GAT_UID, $this->gat_uid);
if ($this->isColumnModified(GatewayPeer::PRO_UID)) $criteria->add(GatewayPeer::PRO_UID, $this->pro_uid);
if ($this->isColumnModified(GatewayPeer::TAS_UID)) $criteria->add(GatewayPeer::TAS_UID, $this->tas_uid);
if ($this->isColumnModified(GatewayPeer::GAT_NEXT_TASK)) $criteria->add(GatewayPeer::GAT_NEXT_TASK, $this->gat_next_task);
if ($this->isColumnModified(GatewayPeer::GAT_X)) $criteria->add(GatewayPeer::GAT_X, $this->gat_x);
if ($this->isColumnModified(GatewayPeer::GAT_Y)) $criteria->add(GatewayPeer::GAT_Y, $this->gat_y);
@@ -664,6 +715,8 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$copyObj->setTasUid($this->tas_uid);
$copyObj->setGatNextTask($this->gat_next_task);
$copyObj->setGatX($this->gat_x);
$copyObj->setGatY($this->gat_y);

View File

@@ -24,7 +24,7 @@ abstract class BaseGatewayPeer {
const CLASS_DEFAULT = 'classes.model.Gateway';
/** 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;
@@ -39,6 +39,9 @@ abstract class BaseGatewayPeer {
/** the column name for the TAS_UID field */
const TAS_UID = 'GATEWAY.TAS_UID';
/** the column name for the GAT_NEXT_TASK field */
const GAT_NEXT_TASK = 'GATEWAY.GAT_NEXT_TASK';
/** the column name for the GAT_X field */
const GAT_X = 'GATEWAY.GAT_X';
@@ -56,10 +59,10 @@ abstract class BaseGatewayPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('GatUid', 'ProUid', 'TasUid', 'GatX', 'GatY', ),
BasePeer::TYPE_COLNAME => array (GatewayPeer::GAT_UID, GatewayPeer::PRO_UID, GatewayPeer::TAS_UID, GatewayPeer::GAT_X, GatewayPeer::GAT_Y, ),
BasePeer::TYPE_FIELDNAME => array ('GAT_UID', 'PRO_UID', 'TAS_UID', 'GAT_X', 'GAT_Y', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
BasePeer::TYPE_PHPNAME => array ('GatUid', 'ProUid', 'TasUid', 'GatNextTask', 'GatX', 'GatY', ),
BasePeer::TYPE_COLNAME => array (GatewayPeer::GAT_UID, GatewayPeer::PRO_UID, GatewayPeer::TAS_UID, GatewayPeer::GAT_NEXT_TASK, GatewayPeer::GAT_X, GatewayPeer::GAT_Y, ),
BasePeer::TYPE_FIELDNAME => array ('GAT_UID', 'PRO_UID', 'TAS_UID', 'GAT_NEXT_TASK', 'GAT_X', 'GAT_Y', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
@@ -69,10 +72,10 @@ abstract class BaseGatewayPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('GatUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'GatX' => 3, 'GatY' => 4, ),
BasePeer::TYPE_COLNAME => array (GatewayPeer::GAT_UID => 0, GatewayPeer::PRO_UID => 1, GatewayPeer::TAS_UID => 2, GatewayPeer::GAT_X => 3, GatewayPeer::GAT_Y => 4, ),
BasePeer::TYPE_FIELDNAME => array ('GAT_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'GAT_X' => 3, 'GAT_Y' => 4, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
BasePeer::TYPE_PHPNAME => array ('GatUid' => 0, 'ProUid' => 1, 'TasUid' => 2, 'GatNextTask' => 3, 'GatX' => 4, 'GatY' => 5, ),
BasePeer::TYPE_COLNAME => array (GatewayPeer::GAT_UID => 0, GatewayPeer::PRO_UID => 1, GatewayPeer::TAS_UID => 2, GatewayPeer::GAT_NEXT_TASK => 3, GatewayPeer::GAT_X => 4, GatewayPeer::GAT_Y => 5, ),
BasePeer::TYPE_FIELDNAME => array ('GAT_UID' => 0, 'PRO_UID' => 1, 'TAS_UID' => 2, 'GAT_NEXT_TASK' => 3, 'GAT_X' => 4, 'GAT_Y' => 5, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
);
/**
@@ -179,6 +182,8 @@ abstract class BaseGatewayPeer {
$criteria->addSelectColumn(GatewayPeer::TAS_UID);
$criteria->addSelectColumn(GatewayPeer::GAT_NEXT_TASK);
$criteria->addSelectColumn(GatewayPeer::GAT_X);
$criteria->addSelectColumn(GatewayPeer::GAT_Y);

View File

@@ -6290,6 +6290,16 @@
<parameter name="Extra" value=""/>
</vendor>
</column>
<column name="GAT_NEXT_TASK" type="VARCHAR" size="32" required="true" default="">
<vendor type="mysql">
<parameter name="Field" value="PRO_UID"/>
<parameter name="Type" value="varchar(32)"/>
<parameter name="Null" value="NO"/>
<parameter name="Key" value=""/>
<parameter name="Default" value=""/>
<parameter name="Extra" value=""/>
</vendor>
</column>
<column name="GAT_X" type="INTEGER" required="true" default="0">
<vendor type="mysql">
<parameter name="Field" value="SWI_X"/>

View File

@@ -1030,6 +1030,7 @@ CREATE TABLE `GATEWAY`
`GAT_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`GAT_NEXT_TASK` VARCHAR(32) default '' NOT NULL,
`GAT_X` INTEGER default 0 NOT NULL,
`GAT_Y` INTEGER default 0 NOT NULL,
PRIMARY KEY (`GAT_UID`)