SVN Alba r4568 - in prosistem/alba/trunk/alba: config data/sql lib/model/map lib/model/om
Author: josx Date: 2007-04-25 13:00:14 -0300 (Wed, 25 Apr 2007) New Revision: 4568 Modified: prosistem/alba/trunk/alba/config/schema.xml prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql prosistem/alba/trunk/alba/data/sql/schema.sql prosistem/alba/trunk/alba/lib/model/map/EventoMapBuilder.php prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php prosistem/alba/trunk/alba/lib/model/om/BaseEventoPeer.php Log: Se agrego campo a la tabla eventos Modified: prosistem/alba/trunk/alba/config/schema.xml =================================================================== --- prosistem/alba/trunk/alba/config/schema.xml 2007-04-25 15:59:15 UTC (rev 4567) +++ prosistem/alba/trunk/alba/config/schema.xml 2007-04-25 16:00:14 UTC (rev 4568) @@ -731,6 +731,7 @@ </table> <table name="evento" idMethod="native"> <column name="id" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"/> + <column name="titulo" type="VARCHAR" size="128" required="true"/> <column name="fecha_inicio" type="TIMESTAMP" required="true"/> <column name="fecha_fin" type="TIMESTAMP" required="true"/> <column name="tipo" type="INTEGER" required="true" default="0"/> Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql =================================================================== --- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-25 15:59:15 UTC (rev 4567) +++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0.sql 2007-04-25 16:00:14 UTC (rev 4568) @@ -27,6 +27,7 @@ CREATE TABLE `evento` ( `id` INTEGER NOT NULL AUTO_INCREMENT, + `titulo` VARCHAR(128) NOT NULL, `fecha_inicio` DATETIME NOT NULL, `fecha_fin` DATETIME NOT NULL, `tipo` INTEGER default 0 NOT NULL, Modified: prosistem/alba/trunk/alba/data/sql/schema.sql =================================================================== --- prosistem/alba/trunk/alba/data/sql/schema.sql 2007-04-25 15:59:15 UTC (rev 4567) +++ prosistem/alba/trunk/alba/data/sql/schema.sql 2007-04-25 16:00:14 UTC (rev 4568) @@ -1401,6 +1401,7 @@ CREATE TABLE `evento` ( `id` INTEGER NOT NULL AUTO_INCREMENT, + `titulo` VARCHAR(128) NOT NULL, `fecha_inicio` DATETIME NOT NULL, `fecha_fin` DATETIME NOT NULL, `tipo` INTEGER default 0 NOT NULL, Modified: prosistem/alba/trunk/alba/lib/model/map/EventoMapBuilder.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/map/EventoMapBuilder.php 2007-04-25 15:59:15 UTC (rev 4567) +++ prosistem/alba/trunk/alba/lib/model/map/EventoMapBuilder.php 2007-04-25 16:00:14 UTC (rev 4568) @@ -34,6 +34,8 @@ $tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null); + $tMap->addColumn('TITULO', 'Titulo', 'string', CreoleTypes::VARCHAR, true, 128); + $tMap->addColumn('FECHA_INICIO', 'FechaInicio', 'int', CreoleTypes::TIMESTAMP, true); $tMap->addColumn('FECHA_FIN', 'FechaFin', 'int', CreoleTypes::TIMESTAMP, true); Modified: prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php 2007-04-25 15:59:15 UTC (rev 4567) +++ prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php 2007-04-25 16:00:14 UTC (rev 4568) @@ -13,6 +13,10 @@ + protected $titulo; + + + protected $fecha_inicio; @@ -57,6 +61,13 @@ } + public function getTitulo() + { + + return $this->titulo; + } + + public function getFechaInicio($format = 'Y-m-d H:i:s') { @@ -153,6 +164,16 @@ } + public function setTitulo($v) + { + + if ($this->titulo !== $v) { + $this->titulo = $v; + $this->modifiedColumns[] = EventoPeer::TITULO; + } + + } + public function setFechaInicio($v) { @@ -253,27 +274,29 @@ $this->id = $rs->getInt($startcol + 0); - $this->fecha_inicio = $rs->getTimestamp($startcol + 1, null); + $this->titulo = $rs->getString($startcol + 1); - $this->fecha_fin = $rs->getTimestamp($startcol + 2, null); + $this->fecha_inicio = $rs->getTimestamp($startcol + 2, null); - $this->tipo = $rs->getInt($startcol + 3); + $this->fecha_fin = $rs->getTimestamp($startcol + 3, null); - $this->frecuencia = $rs->getInt($startcol + 4); + $this->tipo = $rs->getInt($startcol + 4); - $this->frecuencia_intervalo = $rs->getInt($startcol + 5); + $this->frecuencia = $rs->getInt($startcol + 5); - $this->recurrencia_fin = $rs->getString($startcol + 6); + $this->frecuencia_intervalo = $rs->getInt($startcol + 6); - $this->recurrencia_dias = $rs->getInt($startcol + 7); + $this->recurrencia_fin = $rs->getString($startcol + 7); - $this->estado = $rs->getInt($startcol + 8); + $this->recurrencia_dias = $rs->getInt($startcol + 8); + $this->estado = $rs->getInt($startcol + 9); + $this->resetModified(); $this->setNew(false); - return $startcol + 9; + return $startcol + 10; } catch (Exception $e) { throw new PropelException("Error populating Evento object", $e); } @@ -404,27 +427,30 @@ return $this->getId(); break; case 1: + return $this->getTitulo(); + break; + case 2: return $this->getFechaInicio(); break; - case 2: + case 3: return $this->getFechaFin(); break; - case 3: + case 4: return $this->getTipo(); break; - case 4: + case 5: return $this->getFrecuencia(); break; - case 5: + case 6: return $this->getFrecuenciaIntervalo(); break; - case 6: + case 7: return $this->getRecurrenciaFin(); break; - case 7: + case 8: return $this->getRecurrenciaDias(); break; - case 8: + case 9: return $this->getEstado(); break; default: @@ -438,14 +464,15 @@ $keys = EventoPeer::getFieldNames($keyType); $result = array( $keys[0] => $this->getId(), - $keys[1] => $this->getFechaInicio(), - $keys[2] => $this->getFechaFin(), - $keys[3] => $this->getTipo(), - $keys[4] => $this->getFrecuencia(), - $keys[5] => $this->getFrecuenciaIntervalo(), - $keys[6] => $this->getRecurrenciaFin(), - $keys[7] => $this->getRecurrenciaDias(), - $keys[8] => $this->getEstado(), + $keys[1] => $this->getTitulo(), + $keys[2] => $this->getFechaInicio(), + $keys[3] => $this->getFechaFin(), + $keys[4] => $this->getTipo(), + $keys[5] => $this->getFrecuencia(), + $keys[6] => $this->getFrecuenciaIntervalo(), + $keys[7] => $this->getRecurrenciaFin(), + $keys[8] => $this->getRecurrenciaDias(), + $keys[9] => $this->getEstado(), ); return $result; } @@ -465,27 +492,30 @@ $this->setId($value); break; case 1: + $this->setTitulo($value); + break; + case 2: $this->setFechaInicio($value); break; - case 2: + case 3: $this->setFechaFin($value); break; - case 3: + case 4: $this->setTipo($value); break; - case 4: + case 5: $this->setFrecuencia($value); break; - case 5: + case 6: $this->setFrecuenciaIntervalo($value); break; - case 6: + case 7: $this->setRecurrenciaFin($value); break; - case 7: + case 8: $this->setRecurrenciaDias($value); break; - case 8: + case 9: $this->setEstado($value); break; } } @@ -496,14 +526,15 @@ $keys = EventoPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); - if (array_key_exists($keys[1], $arr)) $this->setFechaInicio($arr[$keys[1]]); - if (array_key_exists($keys[2], $arr)) $this->setFechaFin($arr[$keys[2]]); - if (array_key_exists($keys[3], $arr)) $this->setTipo($arr[$keys[3]]); - if (array_key_exists($keys[4], $arr)) $this->setFrecuencia($arr[$keys[4]]); - if (array_key_exists($keys[5], $arr)) $this->setFrecuenciaIntervalo($arr[$keys[5]]); - if (array_key_exists($keys[6], $arr)) $this->setRecurrenciaFin($arr[$keys[6]]); - if (array_key_exists($keys[7], $arr)) $this->setRecurrenciaDias($arr[$keys[7]]); - if (array_key_exists($keys[8], $arr)) $this->setEstado($arr[$keys[8]]); + if (array_key_exists($keys[1], $arr)) $this->setTitulo($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setFechaInicio($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setFechaFin($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setTipo($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setFrecuencia($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setFrecuenciaIntervalo($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setRecurrenciaFin($arr[$keys[7]]); + if (array_key_exists($keys[8], $arr)) $this->setRecurrenciaDias($arr[$keys[8]]); + if (array_key_exists($keys[9], $arr)) $this->setEstado($arr[$keys[9]]); } @@ -512,6 +543,7 @@ $criteria = new Criteria(EventoPeer::DATABASE_NAME); if ($this->isColumnModified(EventoPeer::ID)) $criteria->add(EventoPeer::ID, $this->id); + if ($this->isColumnModified(EventoPeer::TITULO)) $criteria->add(EventoPeer::TITULO, $this->titulo); if ($this->isColumnModified(EventoPeer::FECHA_INICIO)) $criteria->add(EventoPeer::FECHA_INICIO, $this->fecha_inicio); if ($this->isColumnModified(EventoPeer::FECHA_FIN)) $criteria->add(EventoPeer::FECHA_FIN, $this->fecha_fin); if ($this->isColumnModified(EventoPeer::TIPO)) $criteria->add(EventoPeer::TIPO, $this->tipo); @@ -550,6 +582,8 @@ public function copyInto($copyObj, $deepCopy = false) { + $copyObj->setTitulo($this->titulo); + $copyObj->setFechaInicio($this->fecha_inicio); $copyObj->setFechaFin($this->fecha_fin); Modified: prosistem/alba/trunk/alba/lib/model/om/BaseEventoPeer.php =================================================================== --- prosistem/alba/trunk/alba/lib/model/om/BaseEventoPeer.php 2007-04-25 15:59:15 UTC (rev 4567) +++ prosistem/alba/trunk/alba/lib/model/om/BaseEventoPeer.php 2007-04-25 16:00:14 UTC (rev 4568) @@ -13,7 +13,7 @@ const CLASS_DEFAULT = 'lib.model.Evento'; - const NUM_COLUMNS = 9; + const NUM_COLUMNS = 10; const NUM_LAZY_LOAD_COLUMNS = 0; @@ -23,6 +23,9 @@ const ID = 'evento.ID'; + const TITULO = 'evento.TITULO'; + + const FECHA_INICIO = 'evento.FECHA_INICIO'; @@ -52,18 +55,18 @@ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('Id', 'FechaInicio', 'FechaFin', 'Tipo', 'Frecuencia', 'FrecuenciaIntervalo', 'RecurrenciaFin', 'RecurrenciaDias', 'Estado', ), - BasePeer::TYPE_COLNAME => array (EventoPeer::ID, EventoPeer::FECHA_INICIO, EventoPeer::FECHA_FIN, EventoPeer::TIPO, EventoPeer::FRECUENCIA, EventoPeer::FRECUENCIA_INTERVALO, EventoPeer::RECURRENCIA_FIN, EventoPeer::RECURRENCIA_DIAS, EventoPeer::ESTADO, ), - BasePeer::TYPE_FIELDNAME => array ('id', 'fecha_inicio', 'fecha_fin', 'tipo', 'frecuencia', 'frecuencia_intervalo', 'recurrencia_fin', 'recurrencia_dias', 'estado', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, ) + BasePeer::TYPE_PHPNAME => array ('Id', 'Titulo', 'FechaInicio', 'FechaFin', 'Tipo', 'Frecuencia', 'FrecuenciaIntervalo', 'RecurrenciaFin', 'RecurrenciaDias', 'Estado', ), + BasePeer::TYPE_COLNAME => array (EventoPeer::ID, EventoPeer::TITULO, EventoPeer::FECHA_INICIO, EventoPeer::FECHA_FIN, EventoPeer::TIPO, EventoPeer::FRECUENCIA, EventoPeer::FRECUENCIA_INTERVALO, EventoPeer::RECURRENCIA_FIN, EventoPeer::RECURRENCIA_DIAS, EventoPeer::ESTADO, ), + BasePeer::TYPE_FIELDNAME => array ('id', 'titulo', 'fecha_inicio', 'fecha_fin', 'tipo', 'frecuencia', 'frecuencia_intervalo', 'recurrencia_fin', 'recurrencia_dias', 'estado', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) ); private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FechaInicio' => 1, 'FechaFin' => 2, 'Tipo' => 3, 'Frecuencia' => 4, 'FrecuenciaIntervalo' => 5, 'RecurrenciaFin' => 6, 'RecurrenciaDias' => 7, 'Estado' => 8, ), - BasePeer::TYPE_COLNAME => array (EventoPeer::ID => 0, EventoPeer::FECHA_INICIO => 1, EventoPeer::FECHA_FIN => 2, EventoPeer::TIPO => 3, EventoPeer::FRECUENCIA => 4, EventoPeer::FRECUENCIA_INTERVALO => 5, EventoPeer::RECURRENCIA_FIN => 6, EventoPeer::RECURRENCIA_DIAS => 7, EventoPeer::ESTADO => 8, ), - BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fecha_inicio' => 1, 'fecha_fin' => 2, 'tipo' => 3, 'frecuencia' => 4, 'frecuencia_intervalo' => 5, 'recurrencia_fin' => 6, 'recurrencia_dias' => 7, 'estado' => 8, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, ) + BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Titulo' => 1, 'FechaInicio' => 2, 'FechaFin' => 3, 'Tipo' => 4, 'Frecuencia' => 5, 'FrecuenciaIntervalo' => 6, 'RecurrenciaFin' => 7, 'RecurrenciaDias' => 8, 'Estado' => 9, ), + BasePeer::TYPE_COLNAME => array (EventoPeer::ID => 0, EventoPeer::TITULO => 1, EventoPeer::FECHA_INICIO => 2, EventoPeer::FECHA_FIN => 3, EventoPeer::TIPO => 4, EventoPeer::FRECUENCIA => 5, EventoPeer::FRECUENCIA_INTERVALO => 6, EventoPeer::RECURRENCIA_FIN => 7, EventoPeer::RECURRENCIA_DIAS => 8, EventoPeer::ESTADO => 9, ), + BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'titulo' => 1, 'fecha_inicio' => 2, 'fecha_fin' => 3, 'tipo' => 4, 'frecuencia' => 5, 'frecuencia_intervalo' => 6, 'recurrencia_fin' => 7, 'recurrencia_dias' => 8, 'estado' => 9, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) ); @@ -119,6 +122,8 @@ $criteria->addSelectColumn(EventoPeer::ID); + $criteria->addSelectColumn(EventoPeer::TITULO); + $criteria->addSelectColumn(EventoPeer::FECHA_INICIO); $criteria->addSelectColumn(EventoPeer::FECHA_FIN);
participants (1)
-
commits@pressenter.com.ar