Author: hsanchez Date: 2007-01-15 16:27:19 -0300 (Mon, 15 Jan 2007) New Revision: 4024 Modified: prosistem/alba/trunk/alba/config/schema.xml prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php Log: Nuevo modelo con observacion en el responsable Modified: prosistem/alba/trunk/alba/config/schema.xml =================================================================== --- prosistem/alba/trunk/alba/config/schema.xml 2007-01-15 19:25:49 UTC (rev 4023) +++ prosistem/alba/trunk/alba/config/schema.xml 2007-01-15 19:27:19 UTC (rev 4024) @@ -1,4 +1,4 @@ - <?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <!--Autogenerated by CreoleToXMLSchema!--> <!-- $Id$ --> <database name="alba"> Modified: prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php 2007-01-15 19:25:49 UTC (rev 4023) +++ prosistem/alba/trunk/alba/lib/model/map/ResponsableMapBuilder.php 2007-01-15 19:27:19 UTC (rev 4024) @@ -92,6 +92,8 @@ $tMap->addColumn('RELACION', 'Relacion', 'string', CreoleTypes::VARCHAR, true); + $tMap->addColumn('OBSERVACION', 'Observacion', 'string', CreoleTypes::VARCHAR, false); + $tMap->addColumn('AUTORIZACION_RETIRO', 'AutorizacionRetiro', 'boolean', CreoleTypes::BOOLEAN, true); $tMap->addForeignKey('FK_CUENTA_ID', 'FkCuentaId', 'int', CreoleTypes::INTEGER, 'cuenta', 'ID', true, null); Modified: prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php 2007-01-15 19:25:49 UTC (rev 4023) +++ prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php 2007-01-15 19:27:19 UTC (rev 4024) @@ -127,6 +127,13 @@ /** + * The value for the observacion field. + * @var string + */ + protected $observacion = ''; + + + /** * The value for the autorizacion_retiro field. * @var boolean */ @@ -323,6 +330,17 @@ } /** + * Get the [observacion] column value. + * + * @return string + */ + public function getObservacion() + { + + return $this->observacion; + } + + /** * Get the [autorizacion_retiro] column value. * * @return boolean @@ -577,6 +595,22 @@ } // setRelacion() /** + * Set the value of [observacion] column. + * + * @param string $v new value + * @return void + */ + public function setObservacion($v) + { + + if ($this->observacion !== $v || $v === '') { + $this->observacion = $v; + $this->modifiedColumns[] = ResponsablePeer::OBSERVACION; + } + + } // setObservacion() + + /** * Set the value of [autorizacion_retiro] column. * * @param boolean $v new value @@ -657,16 +691,18 @@ $this->relacion = $rs->getString($startcol + 13); - $this->autorizacion_retiro = $rs->getBoolean($startcol + 14); + $this->observacion = $rs->getString($startcol + 14); - $this->fk_cuenta_id = $rs->getInt($startcol + 15); + $this->autorizacion_retiro = $rs->getBoolean($startcol + 15); + $this->fk_cuenta_id = $rs->getInt($startcol + 16); + $this->resetModified(); $this->setNew(false); // FIXME - using NUM_COLUMNS may be clearer. - return $startcol + 16; // 16 = ResponsablePeer::NUM_COLUMNS - ResponsablePeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 17; // 17 = ResponsablePeer::NUM_COLUMNS - ResponsablePeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating Responsable object", $e); @@ -965,9 +1001,12 @@ return $this->getRelacion(); break; case 14: + return $this->getObservacion(); + break; + case 15: return $this->getAutorizacionRetiro(); break; - case 15: + case 16: return $this->getFkCuentaId(); break; default: @@ -1004,8 +1043,9 @@ $keys[11] => $this->getSexo(), $keys[12] => $this->getEmail(), $keys[13] => $this->getRelacion(), - $keys[14] => $this->getAutorizacionRetiro(), - $keys[15] => $this->getFkCuentaId(), + $keys[14] => $this->getObservacion(), + $keys[15] => $this->getAutorizacionRetiro(), + $keys[16] => $this->getFkCuentaId(), ); return $result; } @@ -1080,9 +1120,12 @@ $this->setRelacion($value); break; case 14: + $this->setObservacion($value); + break; + case 15: $this->setAutorizacionRetiro($value); break; - case 15: + case 16: $this->setFkCuentaId($value); break; } // switch() @@ -1122,8 +1165,9 @@ if (array_key_exists($keys[11], $arr)) $this->setSexo($arr[$keys[11]]); if (array_key_exists($keys[12], $arr)) $this->setEmail($arr[$keys[12]]); if (array_key_exists($keys[13], $arr)) $this->setRelacion($arr[$keys[13]]); - if (array_key_exists($keys[14], $arr)) $this->setAutorizacionRetiro($arr[$keys[14]]); - if (array_key_exists($keys[15], $arr)) $this->setFkCuentaId($arr[$keys[15]]); + if (array_key_exists($keys[14], $arr)) $this->setObservacion($arr[$keys[14]]); + if (array_key_exists($keys[15], $arr)) $this->setAutorizacionRetiro($arr[$keys[15]]); + if (array_key_exists($keys[16], $arr)) $this->setFkCuentaId($arr[$keys[16]]); } /** @@ -1149,6 +1193,7 @@ if ($this->isColumnModified(ResponsablePeer::SEXO)) $criteria->add(ResponsablePeer::SEXO, $this->sexo); if ($this->isColumnModified(ResponsablePeer::EMAIL)) $criteria->add(ResponsablePeer::EMAIL, $this->email); if ($this->isColumnModified(ResponsablePeer::RELACION)) $criteria->add(ResponsablePeer::RELACION, $this->relacion); + if ($this->isColumnModified(ResponsablePeer::OBSERVACION)) $criteria->add(ResponsablePeer::OBSERVACION, $this->observacion); if ($this->isColumnModified(ResponsablePeer::AUTORIZACION_RETIRO)) $criteria->add(ResponsablePeer::AUTORIZACION_RETIRO, $this->autorizacion_retiro); if ($this->isColumnModified(ResponsablePeer::FK_CUENTA_ID)) $criteria->add(ResponsablePeer::FK_CUENTA_ID, $this->fk_cuenta_id); @@ -1231,6 +1276,8 @@ $copyObj->setRelacion($this->relacion); + $copyObj->setObservacion($this->observacion); + $copyObj->setAutorizacionRetiro($this->autorizacion_retiro); $copyObj->setFkCuentaId($this->fk_cuenta_id); Modified: prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php 2007-01-15 19:25:49 UTC (rev 4023) +++ prosistem/alba/trunk/alba/lib/model/om/BaseResponsablePeer.php 2007-01-15 19:27:19 UTC (rev 4024) @@ -24,7 +24,7 @@ const CLASS_DEFAULT = 'model.Responsable'; /** The total number of columns. */ - const NUM_COLUMNS = 16; + const NUM_COLUMNS = 17; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -72,6 +72,9 @@ /** the column name for the RELACION field */ const RELACION = 'responsable.RELACION'; + /** the column name for the OBSERVACION field */ + const OBSERVACION = 'responsable.OBSERVACION'; + /** the column name for the AUTORIZACION_RETIRO field */ const AUTORIZACION_RETIRO = 'responsable.AUTORIZACION_RETIRO'; @@ -89,10 +92,10 @@ * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Apellido', 'Direccion', 'Ciudad', 'CodigoPostal', 'FkProvinciaId', 'Telefono', 'TelefonoMovil', 'NroDocumento', 'FkTipodocumentoId', 'Sexo', 'Email', 'Relacion', 'AutorizacionRetiro', 'FkCuentaId', ), - BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID, ResponsablePeer::NOMBRE, ResponsablePeer::APELLIDO, ResponsablePeer::DIRECCION, ResponsablePeer::CIUDAD, ResponsablePeer::CODIGO_POSTAL, ResponsablePeer::FK_PROVINCIA_ID, ResponsablePeer::TELEFONO, ResponsablePeer::TELEFONO_MOVIL, ResponsablePeer::NRO_DOCUMENTO, ResponsablePeer::FK_TIPODOCUMENTO_ID, ResponsablePeer::SEXO, ResponsablePeer::EMAIL, ResponsablePeer::RELACION, ResponsablePeer::AUTORIZACION_RETIRO, ResponsablePeer::FK_CUENTA_ID, ), - BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'apellido', 'direccion', 'ciudad', 'codigo_postal', 'fk_provincia_id', 'telefono', 'telefono_movil', 'nro_documento', 'fk_tipodocumento_id', 'sexo', 'email', 'relacion', 'autorizacion_retiro', 'fk_cuenta_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 ('Id', 'Nombre', 'Apellido', 'Direccion', 'Ciudad', 'CodigoPostal', 'FkProvinciaId', 'Telefono', 'TelefonoMovil', 'NroDocumento', 'FkTipodocumentoId', 'Sexo', 'Email', 'Relacion', 'Observacion', 'AutorizacionRetiro', 'FkCuentaId', ), + BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID, ResponsablePeer::NOMBRE, ResponsablePeer::APELLIDO, ResponsablePeer::DIRECCION, ResponsablePeer::CIUDAD, ResponsablePeer::CODIGO_POSTAL, ResponsablePeer::FK_PROVINCIA_ID, ResponsablePeer::TELEFONO, ResponsablePeer::TELEFONO_MOVIL, ResponsablePeer::NRO_DOCUMENTO, ResponsablePeer::FK_TIPODOCUMENTO_ID, ResponsablePeer::SEXO, ResponsablePeer::EMAIL, ResponsablePeer::RELACION, ResponsablePeer::OBSERVACION, ResponsablePeer::AUTORIZACION_RETIRO, ResponsablePeer::FK_CUENTA_ID, ), + BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'apellido', 'direccion', 'ciudad', 'codigo_postal', 'fk_provincia_id', 'telefono', 'telefono_movil', 'nro_documento', 'fk_tipodocumento_id', 'sexo', 'email', 'relacion', 'observacion', 'autorizacion_retiro', 'fk_cuenta_id', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ) ); /** @@ -102,10 +105,10 @@ * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Apellido' => 2, 'Direccion' => 3, 'Ciudad' => 4, 'CodigoPostal' => 5, 'FkProvinciaId' => 6, 'Telefono' => 7, 'TelefonoMovil' => 8, 'NroDocumento' => 9, 'FkTipodocumentoId' => 10, 'Sexo' => 11, 'Email' => 12, 'Relacion' => 13, 'AutorizacionRetiro' => 14, 'FkCuentaId' => 15, ), - BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID => 0, ResponsablePeer::NOMBRE => 1, ResponsablePeer::APELLIDO => 2, ResponsablePeer::DIRECCION => 3, ResponsablePeer::CIUDAD => 4, ResponsablePeer::CODIGO_POSTAL => 5, ResponsablePeer::FK_PROVINCIA_ID => 6, ResponsablePeer::TELEFONO => 7, ResponsablePeer::TELEFONO_MOVIL => 8, ResponsablePeer::NRO_DOCUMENTO => 9, ResponsablePeer::FK_TIPODOCUMENTO_ID => 10, ResponsablePeer::SEXO => 11, ResponsablePeer::EMAIL => 12, ResponsablePeer::RELACION => 13, ResponsablePeer::AUTORIZACION_RETIRO => 14, ResponsablePeer::FK_CUENTA_ID => 15, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'apellido' => 2, 'direccion' => 3, 'ciudad' => 4, 'codigo_postal' => 5, 'fk_provincia_id' => 6, 'telefono' => 7, 'telefono_movil' => 8, 'nro_documento' => 9, 'fk_tipodocumento_id' => 10, 'sexo' => 11, 'email' => 12, 'relacion' => 13, 'autorizacion_retiro' => 14, 'fk_cuenta_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 ('Id' => 0, 'Nombre' => 1, 'Apellido' => 2, 'Direccion' => 3, 'Ciudad' => 4, 'CodigoPostal' => 5, 'FkProvinciaId' => 6, 'Telefono' => 7, 'TelefonoMovil' => 8, 'NroDocumento' => 9, 'FkTipodocumentoId' => 10, 'Sexo' => 11, 'Email' => 12, 'Relacion' => 13, 'Observacion' => 14, 'AutorizacionRetiro' => 15, 'FkCuentaId' => 16, ), + BasePeer::TYPE_COLNAME => array (ResponsablePeer::ID => 0, ResponsablePeer::NOMBRE => 1, ResponsablePeer::APELLIDO => 2, ResponsablePeer::DIRECCION => 3, ResponsablePeer::CIUDAD => 4, ResponsablePeer::CODIGO_POSTAL => 5, ResponsablePeer::FK_PROVINCIA_ID => 6, ResponsablePeer::TELEFONO => 7, ResponsablePeer::TELEFONO_MOVIL => 8, ResponsablePeer::NRO_DOCUMENTO => 9, ResponsablePeer::FK_TIPODOCUMENTO_ID => 10, ResponsablePeer::SEXO => 11, ResponsablePeer::EMAIL => 12, ResponsablePeer::RELACION => 13, ResponsablePeer::OBSERVACION => 14, ResponsablePeer::AUTORIZACION_RETIRO => 15, ResponsablePeer::FK_CUENTA_ID => 16, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'apellido' => 2, 'direccion' => 3, 'ciudad' => 4, 'codigo_postal' => 5, 'fk_provincia_id' => 6, 'telefono' => 7, 'telefono_movil' => 8, 'nro_documento' => 9, 'fk_tipodocumento_id' => 10, 'sexo' => 11, 'email' => 12, 'relacion' => 13, 'observacion' => 14, 'autorizacion_retiro' => 15, 'fk_cuenta_id' => 16, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ) ); /** @@ -234,6 +237,8 @@ $criteria->addSelectColumn(ResponsablePeer::RELACION); + $criteria->addSelectColumn(ResponsablePeer::OBSERVACION); + $criteria->addSelectColumn(ResponsablePeer::AUTORIZACION_RETIRO); $criteria->addSelectColumn(ResponsablePeer::FK_CUENTA_ID);