Added column "TAS_UID" in gateway table

This commit is contained in:
girish
2011-01-07 13:18:30 +00:00
parent f0a0e35927
commit 0181f5e87c
5 changed files with 89 additions and 18 deletions

View File

@@ -68,6 +68,8 @@ class GatewayMapBuilder {
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_UID', 'TasUid', '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

@@ -42,6 +42,13 @@ abstract class BaseGateway extends BaseObject implements Persistent {
protected $pro_uid = '';
/**
* The value for the tas_uid field.
* @var string
*/
protected $tas_uid = '';
/**
* The value for the gat_x field.
* @var int
@@ -91,6 +98,17 @@ abstract class BaseGateway extends BaseObject implements Persistent {
return $this->pro_uid;
}
/**
* Get the [tas_uid] column value.
*
* @return string
*/
public function getTasUid()
{
return $this->tas_uid;
}
/**
* Get the [gat_x] column value.
*
@@ -157,6 +175,28 @@ abstract class BaseGateway extends BaseObject implements Persistent {
} // setProUid()
/**
* Set the value of [tas_uid] column.
*
* @param string $v new value
* @return void
*/
public function setTasUid($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->tas_uid !== $v || $v === '') {
$this->tas_uid = $v;
$this->modifiedColumns[] = GatewayPeer::TAS_UID;
}
} // setTasUid()
/**
* Set the value of [gat_x] column.
*
@@ -222,16 +262,18 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$this->pro_uid = $rs->getString($startcol + 1);
$this->gat_x = $rs->getInt($startcol + 2);
$this->tas_uid = $rs->getString($startcol + 2);
$this->gat_y = $rs->getInt($startcol + 3);
$this->gat_x = $rs->getInt($startcol + 3);
$this->gat_y = $rs->getInt($startcol + 4);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 4; // 4 = GatewayPeer::NUM_COLUMNS - GatewayPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 5; // 5 = GatewayPeer::NUM_COLUMNS - GatewayPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating Gateway object", $e);
@@ -441,9 +483,12 @@ abstract class BaseGateway extends BaseObject implements Persistent {
return $this->getProUid();
break;
case 2:
return $this->getGatX();
return $this->getTasUid();
break;
case 3:
return $this->getGatX();
break;
case 4:
return $this->getGatY();
break;
default:
@@ -468,8 +513,9 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$result = array(
$keys[0] => $this->getGatUid(),
$keys[1] => $this->getProUid(),
$keys[2] => $this->getGatX(),
$keys[3] => $this->getGatY(),
$keys[2] => $this->getTasUid(),
$keys[3] => $this->getGatX(),
$keys[4] => $this->getGatY(),
);
return $result;
}
@@ -508,9 +554,12 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$this->setProUid($value);
break;
case 2:
$this->setGatX($value);
$this->setTasUid($value);
break;
case 3:
$this->setGatX($value);
break;
case 4:
$this->setGatY($value);
break;
} // switch()
@@ -538,8 +587,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->setGatX($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setGatY($arr[$keys[3]]);
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]]);
}
/**
@@ -553,6 +603,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_X)) $criteria->add(GatewayPeer::GAT_X, $this->gat_x);
if ($this->isColumnModified(GatewayPeer::GAT_Y)) $criteria->add(GatewayPeer::GAT_Y, $this->gat_y);
@@ -611,6 +662,8 @@ abstract class BaseGateway extends BaseObject implements Persistent {
$copyObj->setProUid($this->pro_uid);
$copyObj->setTasUid($this->tas_uid);
$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 = 4;
const NUM_COLUMNS = 5;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -36,6 +36,9 @@ abstract class BaseGatewayPeer {
/** the column name for the PRO_UID field */
const PRO_UID = 'GATEWAY.PRO_UID';
/** the column name for the TAS_UID field */
const TAS_UID = 'GATEWAY.TAS_UID';
/** the column name for the GAT_X field */
const GAT_X = 'GATEWAY.GAT_X';
@@ -53,10 +56,10 @@ abstract class BaseGatewayPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('GatUid', 'ProUid', 'GatX', 'GatY', ),
BasePeer::TYPE_COLNAME => array (GatewayPeer::GAT_UID, GatewayPeer::PRO_UID, GatewayPeer::GAT_X, GatewayPeer::GAT_Y, ),
BasePeer::TYPE_FIELDNAME => array ('GAT_UID', 'PRO_UID', 'GAT_X', 'GAT_Y', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
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, )
);
/**
@@ -66,10 +69,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, 'GatX' => 2, 'GatY' => 3, ),
BasePeer::TYPE_COLNAME => array (GatewayPeer::GAT_UID => 0, GatewayPeer::PRO_UID => 1, GatewayPeer::GAT_X => 2, GatewayPeer::GAT_Y => 3, ),
BasePeer::TYPE_FIELDNAME => array ('GAT_UID' => 0, 'PRO_UID' => 1, 'GAT_X' => 2, 'GAT_Y' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
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, )
);
/**
@@ -174,6 +177,8 @@ abstract class BaseGatewayPeer {
$criteria->addSelectColumn(GatewayPeer::PRO_UID);
$criteria->addSelectColumn(GatewayPeer::TAS_UID);
$criteria->addSelectColumn(GatewayPeer::GAT_X);
$criteria->addSelectColumn(GatewayPeer::GAT_Y);

View File

@@ -6280,6 +6280,16 @@
<parameter name="Extra" value=""/>
</vendor>
</column>
<column name="TAS_UID" 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

@@ -1029,6 +1029,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_X` INTEGER default 0 NOT NULL,
`GAT_Y` INTEGER default 0 NOT NULL,
PRIMARY KEY (`GAT_UID`)