BUG 000 Add field GRP_LDAP_DN in schema

This commit is contained in:
Julio Cesar Laura
2011-09-20 15:37:44 -04:00
parent 6a7dca0647
commit 109433fd98
5 changed files with 72 additions and 10 deletions

View File

@@ -68,6 +68,8 @@ class GroupwfMapBuilder {
$tMap->addColumn('GRP_STATUS', 'GrpStatus', 'string', CreoleTypes::CHAR, true, 8); $tMap->addColumn('GRP_STATUS', 'GrpStatus', 'string', CreoleTypes::CHAR, true, 8);
$tMap->addColumn('GRP_LDAP_DN', 'GrpLdapDn', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addValidator('GRP_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE', 'Please select a valid status.'); $tMap->addValidator('GRP_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE', 'Please select a valid status.');
$tMap->addValidator('GRP_STATUS', 'required', 'propel.validator.RequiredValidator', '', 'Application Document UID is required.'); $tMap->addValidator('GRP_STATUS', 'required', 'propel.validator.RequiredValidator', '', 'Application Document UID is required.');

View File

@@ -41,6 +41,13 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
*/ */
protected $grp_status = 'ACTIVE'; protected $grp_status = 'ACTIVE';
/**
* The value for the grp_ldap_dn field.
* @var string
*/
protected $grp_ldap_dn = '';
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
@@ -77,6 +84,17 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
return $this->grp_status; return $this->grp_status;
} }
/**
* Get the [grp_ldap_dn] column value.
*
* @return string
*/
public function getGrpLdapDn()
{
return $this->grp_ldap_dn;
}
/** /**
* Set the value of [grp_uid] column. * Set the value of [grp_uid] column.
* *
@@ -121,6 +139,28 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
} // setGrpStatus() } // setGrpStatus()
/**
* Set the value of [grp_ldap_dn] column.
*
* @param string $v new value
* @return void
*/
public function setGrpLdapDn($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->grp_ldap_dn !== $v || $v === '') {
$this->grp_ldap_dn = $v;
$this->modifiedColumns[] = GroupwfPeer::GRP_LDAP_DN;
}
} // setGrpLdapDn()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
* *
@@ -142,12 +182,14 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
$this->grp_status = $rs->getString($startcol + 1); $this->grp_status = $rs->getString($startcol + 1);
$this->grp_ldap_dn = $rs->getString($startcol + 2);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 2; // 2 = GroupwfPeer::NUM_COLUMNS - GroupwfPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 3; // 3 = GroupwfPeer::NUM_COLUMNS - GroupwfPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating Groupwf object", $e); throw new PropelException("Error populating Groupwf object", $e);
@@ -356,6 +398,9 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
case 1: case 1:
return $this->getGrpStatus(); return $this->getGrpStatus();
break; break;
case 2:
return $this->getGrpLdapDn();
break;
default: default:
return null; return null;
break; break;
@@ -378,6 +423,7 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
$result = array( $result = array(
$keys[0] => $this->getGrpUid(), $keys[0] => $this->getGrpUid(),
$keys[1] => $this->getGrpStatus(), $keys[1] => $this->getGrpStatus(),
$keys[2] => $this->getGrpLdapDn(),
); );
return $result; return $result;
} }
@@ -415,6 +461,9 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
case 1: case 1:
$this->setGrpStatus($value); $this->setGrpStatus($value);
break; break;
case 2:
$this->setGrpLdapDn($value);
break;
} // switch() } // switch()
} }
@@ -440,6 +489,7 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
if (array_key_exists($keys[0], $arr)) $this->setGrpUid($arr[$keys[0]]); if (array_key_exists($keys[0], $arr)) $this->setGrpUid($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setGrpStatus($arr[$keys[1]]); if (array_key_exists($keys[1], $arr)) $this->setGrpStatus($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setGrpLdapDn($arr[$keys[2]]);
} }
/** /**
@@ -453,6 +503,7 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
if ($this->isColumnModified(GroupwfPeer::GRP_UID)) $criteria->add(GroupwfPeer::GRP_UID, $this->grp_uid); if ($this->isColumnModified(GroupwfPeer::GRP_UID)) $criteria->add(GroupwfPeer::GRP_UID, $this->grp_uid);
if ($this->isColumnModified(GroupwfPeer::GRP_STATUS)) $criteria->add(GroupwfPeer::GRP_STATUS, $this->grp_status); if ($this->isColumnModified(GroupwfPeer::GRP_STATUS)) $criteria->add(GroupwfPeer::GRP_STATUS, $this->grp_status);
if ($this->isColumnModified(GroupwfPeer::GRP_LDAP_DN)) $criteria->add(GroupwfPeer::GRP_LDAP_DN, $this->grp_ldap_dn);
return $criteria; return $criteria;
} }
@@ -509,6 +560,8 @@ abstract class BaseGroupwf extends BaseObject implements Persistent {
$copyObj->setGrpStatus($this->grp_status); $copyObj->setGrpStatus($this->grp_status);
$copyObj->setGrpLdapDn($this->grp_ldap_dn);
$copyObj->setNew(true); $copyObj->setNew(true);

View File

@@ -24,7 +24,7 @@ abstract class BaseGroupwfPeer {
const CLASS_DEFAULT = 'classes.model.Groupwf'; const CLASS_DEFAULT = 'classes.model.Groupwf';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 2; const NUM_COLUMNS = 3;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -36,6 +36,9 @@ abstract class BaseGroupwfPeer {
/** the column name for the GRP_STATUS field */ /** the column name for the GRP_STATUS field */
const GRP_STATUS = 'GROUPWF.GRP_STATUS'; const GRP_STATUS = 'GROUPWF.GRP_STATUS';
/** the column name for the GRP_LDAP_DN field */
const GRP_LDAP_DN = 'GROUPWF.GRP_LDAP_DN';
/** The PHP to DB Name Mapping */ /** The PHP to DB Name Mapping */
private static $phpNameMap = null; private static $phpNameMap = null;
@@ -47,10 +50,10 @@ abstract class BaseGroupwfPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('GrpUid', 'GrpStatus', ), BasePeer::TYPE_PHPNAME => array ('GrpUid', 'GrpStatus', 'GrpLdapDn', ),
BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID, GroupwfPeer::GRP_STATUS, ), BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID, GroupwfPeer::GRP_STATUS, GroupwfPeer::GRP_LDAP_DN, ),
BasePeer::TYPE_FIELDNAME => array ('GRP_UID', 'GRP_STATUS', ), BasePeer::TYPE_FIELDNAME => array ('GRP_UID', 'GRP_STATUS', 'GRP_LDAP_DN', ),
BasePeer::TYPE_NUM => array (0, 1, ) BasePeer::TYPE_NUM => array (0, 1, 2, )
); );
/** /**
@@ -60,10 +63,10 @@ abstract class BaseGroupwfPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('GrpUid' => 0, 'GrpStatus' => 1, ), BasePeer::TYPE_PHPNAME => array ('GrpUid' => 0, 'GrpStatus' => 1, 'GrpLdapDn' => 2, ),
BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID => 0, GroupwfPeer::GRP_STATUS => 1, ), BasePeer::TYPE_COLNAME => array (GroupwfPeer::GRP_UID => 0, GroupwfPeer::GRP_STATUS => 1, GroupwfPeer::GRP_LDAP_DN => 2, ),
BasePeer::TYPE_FIELDNAME => array ('GRP_UID' => 0, 'GRP_STATUS' => 1, ), BasePeer::TYPE_FIELDNAME => array ('GRP_UID' => 0, 'GRP_STATUS' => 1, 'GRP_LDAP_DN' => 2, ),
BasePeer::TYPE_NUM => array (0, 1, ) BasePeer::TYPE_NUM => array (0, 1, 2, )
); );
/** /**
@@ -168,6 +171,8 @@ abstract class BaseGroupwfPeer {
$criteria->addSelectColumn(GroupwfPeer::GRP_STATUS); $criteria->addSelectColumn(GroupwfPeer::GRP_STATUS);
$criteria->addSelectColumn(GroupwfPeer::GRP_LDAP_DN);
} }
const COUNT = 'COUNT(GROUPWF.GRP_UID)'; const COUNT = 'COUNT(GROUPWF.GRP_UID)';

View File

@@ -436,6 +436,7 @@
</vendor> </vendor>
<column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/> <column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
<column name="GRP_STATUS" type="CHAR" size="8" required="true" default="ACTIVE"/> <column name="GRP_STATUS" type="CHAR" size="8" required="true" default="ACTIVE"/>
<column name="GRP_LDAP_DN" type="VARCHAR" size="255" required="true" default=""/>
<validator column="GRP_STATUS"> <validator column="GRP_STATUS">
<rule name="validValues" value="ACTIVE|INACTIVE" message="Please select a valid status."/> <rule name="validValues" value="ACTIVE|INACTIVE" message="Please select a valid status."/>
<rule name="required" message="Application Document UID is required."/> <rule name="required" message="Application Document UID is required."/>

View File

@@ -210,6 +210,7 @@ CREATE TABLE `GROUPWF`
( (
`GRP_UID` VARCHAR(32) default '' NOT NULL, `GRP_UID` VARCHAR(32) default '' NOT NULL,
`GRP_STATUS` CHAR(8) default 'ACTIVE' NOT NULL, `GRP_STATUS` CHAR(8) default 'ACTIVE' NOT NULL,
`GRP_LDAP_DN` VARCHAR(255) default '' NOT NULL,
PRIMARY KEY (`GRP_UID`) PRIMARY KEY (`GRP_UID`)
)ENGINE=MyISAM DEFAULT CHARSET='utf8'; )ENGINE=MyISAM DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------