Added new column in Swimlanes 'SWI_NEXT_UID'

This commit is contained in:
girish
2011-02-23 06:26:18 +00:00
parent b4c4beaa64
commit 17d3910481
5 changed files with 81 additions and 10 deletions

View File

@@ -78,6 +78,8 @@ class SwimlanesElementsMapBuilder {
$tMap->addColumn('SWI_HEIGHT', 'SwiHeight', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('SWI_NEXT_UID', 'SwiNextUid', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addValidator('SWI_UID', 'maxLength', 'propel.validator.MaxLengthValidator', '32', 'Swimlane Element UID can be no larger than 32 in size');
$tMap->addValidator('SWI_UID', 'required', 'propel.validator.RequiredValidator', '', 'Swimlane Element UID is required.');

View File

@@ -76,6 +76,13 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
*/
protected $swi_height = 0;
/**
* The value for the swi_next_uid field.
* @var string
*/
protected $swi_next_uid = '';
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -167,6 +174,17 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
return $this->swi_height;
}
/**
* Get the [swi_next_uid] column value.
*
* @return string
*/
public function getSwiNextUid()
{
return $this->swi_next_uid;
}
/**
* Set the value of [swi_uid] column.
*
@@ -321,6 +339,28 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
} // setSwiHeight()
/**
* Set the value of [swi_next_uid] column.
*
* @param string $v new value
* @return void
*/
public function setSwiNextUid($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->swi_next_uid !== $v || $v === '') {
$this->swi_next_uid = $v;
$this->modifiedColumns[] = SwimlanesElementsPeer::SWI_NEXT_UID;
}
} // setSwiNextUid()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -352,12 +392,14 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
$this->swi_height = $rs->getInt($startcol + 6);
$this->swi_next_uid = $rs->getString($startcol + 7);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 7; // 7 = SwimlanesElementsPeer::NUM_COLUMNS - SwimlanesElementsPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 8; // 8 = SwimlanesElementsPeer::NUM_COLUMNS - SwimlanesElementsPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating SwimlanesElements object", $e);
@@ -581,6 +623,9 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
case 6:
return $this->getSwiHeight();
break;
case 7:
return $this->getSwiNextUid();
break;
default:
return null;
break;
@@ -608,6 +653,7 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
$keys[4] => $this->getSwiY(),
$keys[5] => $this->getSwiWidth(),
$keys[6] => $this->getSwiHeight(),
$keys[7] => $this->getSwiNextUid(),
);
return $result;
}
@@ -660,6 +706,9 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
case 6:
$this->setSwiHeight($value);
break;
case 7:
$this->setSwiNextUid($value);
break;
} // switch()
}
@@ -690,6 +739,7 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
if (array_key_exists($keys[4], $arr)) $this->setSwiY($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setSwiWidth($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setSwiHeight($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setSwiNextUid($arr[$keys[7]]);
}
/**
@@ -708,6 +758,7 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
if ($this->isColumnModified(SwimlanesElementsPeer::SWI_Y)) $criteria->add(SwimlanesElementsPeer::SWI_Y, $this->swi_y);
if ($this->isColumnModified(SwimlanesElementsPeer::SWI_WIDTH)) $criteria->add(SwimlanesElementsPeer::SWI_WIDTH, $this->swi_width);
if ($this->isColumnModified(SwimlanesElementsPeer::SWI_HEIGHT)) $criteria->add(SwimlanesElementsPeer::SWI_HEIGHT, $this->swi_height);
if ($this->isColumnModified(SwimlanesElementsPeer::SWI_NEXT_UID)) $criteria->add(SwimlanesElementsPeer::SWI_NEXT_UID, $this->swi_next_uid);
return $criteria;
}
@@ -774,6 +825,8 @@ abstract class BaseSwimlanesElements extends BaseObject implements Persistent {
$copyObj->setSwiHeight($this->swi_height);
$copyObj->setSwiNextUid($this->swi_next_uid);
$copyObj->setNew(true);

View File

@@ -24,7 +24,7 @@ abstract class BaseSwimlanesElementsPeer {
const CLASS_DEFAULT = 'classes.model.SwimlanesElements';
/** The total number of columns. */
const NUM_COLUMNS = 7;
const NUM_COLUMNS = 8;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -51,6 +51,9 @@ abstract class BaseSwimlanesElementsPeer {
/** the column name for the SWI_HEIGHT field */
const SWI_HEIGHT = 'SWIMLANES_ELEMENTS.SWI_HEIGHT';
/** the column name for the SWI_NEXT_UID field */
const SWI_NEXT_UID = 'SWIMLANES_ELEMENTS.SWI_NEXT_UID';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -62,10 +65,10 @@ abstract class BaseSwimlanesElementsPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('SwiUid', 'ProUid', 'SwiType', 'SwiX', 'SwiY', 'SwiWidth', 'SwiHeight', ),
BasePeer::TYPE_COLNAME => array (SwimlanesElementsPeer::SWI_UID, SwimlanesElementsPeer::PRO_UID, SwimlanesElementsPeer::SWI_TYPE, SwimlanesElementsPeer::SWI_X, SwimlanesElementsPeer::SWI_Y, SwimlanesElementsPeer::SWI_WIDTH, SwimlanesElementsPeer::SWI_HEIGHT, ),
BasePeer::TYPE_FIELDNAME => array ('SWI_UID', 'PRO_UID', 'SWI_TYPE', 'SWI_X', 'SWI_Y', 'SWI_WIDTH', 'SWI_HEIGHT', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('SwiUid', 'ProUid', 'SwiType', 'SwiX', 'SwiY', 'SwiWidth', 'SwiHeight', 'SwiNextUid', ),
BasePeer::TYPE_COLNAME => array (SwimlanesElementsPeer::SWI_UID, SwimlanesElementsPeer::PRO_UID, SwimlanesElementsPeer::SWI_TYPE, SwimlanesElementsPeer::SWI_X, SwimlanesElementsPeer::SWI_Y, SwimlanesElementsPeer::SWI_WIDTH, SwimlanesElementsPeer::SWI_HEIGHT, SwimlanesElementsPeer::SWI_NEXT_UID, ),
BasePeer::TYPE_FIELDNAME => array ('SWI_UID', 'PRO_UID', 'SWI_TYPE', 'SWI_X', 'SWI_Y', 'SWI_WIDTH', 'SWI_HEIGHT', 'SWI_NEXT_UID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -75,10 +78,10 @@ abstract class BaseSwimlanesElementsPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('SwiUid' => 0, 'ProUid' => 1, 'SwiType' => 2, 'SwiX' => 3, 'SwiY' => 4, 'SwiWidth' => 5, 'SwiHeight' => 6, ),
BasePeer::TYPE_COLNAME => array (SwimlanesElementsPeer::SWI_UID => 0, SwimlanesElementsPeer::PRO_UID => 1, SwimlanesElementsPeer::SWI_TYPE => 2, SwimlanesElementsPeer::SWI_X => 3, SwimlanesElementsPeer::SWI_Y => 4, SwimlanesElementsPeer::SWI_WIDTH => 5, SwimlanesElementsPeer::SWI_HEIGHT => 6, ),
BasePeer::TYPE_FIELDNAME => array ('SWI_UID' => 0, 'PRO_UID' => 1, 'SWI_TYPE' => 2, 'SWI_X' => 3, 'SWI_Y' => 4, 'SWI_WIDTH' => 5, 'SWI_HEIGHT' => 6, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
BasePeer::TYPE_PHPNAME => array ('SwiUid' => 0, 'ProUid' => 1, 'SwiType' => 2, 'SwiX' => 3, 'SwiY' => 4, 'SwiWidth' => 5, 'SwiHeight' => 6, 'SwiNextUid' => 7, ),
BasePeer::TYPE_COLNAME => array (SwimlanesElementsPeer::SWI_UID => 0, SwimlanesElementsPeer::PRO_UID => 1, SwimlanesElementsPeer::SWI_TYPE => 2, SwimlanesElementsPeer::SWI_X => 3, SwimlanesElementsPeer::SWI_Y => 4, SwimlanesElementsPeer::SWI_WIDTH => 5, SwimlanesElementsPeer::SWI_HEIGHT => 6, SwimlanesElementsPeer::SWI_NEXT_UID => 7, ),
BasePeer::TYPE_FIELDNAME => array ('SWI_UID' => 0, 'PRO_UID' => 1, 'SWI_TYPE' => 2, 'SWI_X' => 3, 'SWI_Y' => 4, 'SWI_WIDTH' => 5, 'SWI_HEIGHT' => 6, 'SWI_NEXT_UID' => 7, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
);
/**
@@ -193,6 +196,8 @@ abstract class BaseSwimlanesElementsPeer {
$criteria->addSelectColumn(SwimlanesElementsPeer::SWI_HEIGHT);
$criteria->addSelectColumn(SwimlanesElementsPeer::SWI_NEXT_UID);
}
const COUNT = 'COUNT(SWIMLANES_ELEMENTS.SWI_UID)';