[Alba-desarrollo] SVN Alba r5356 - in prosistem/alba/trunk/alba: config lib/model/map lib/model/om

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Dic 26 21:31:30 CET 2007


Author: hsanchez
Date: 2007-12-26 17:31:30 -0300 (Wed, 26 Dec 2007)
New Revision: 5356

Modified:
   prosistem/alba/trunk/alba/config/schema.yml
   prosistem/alba/trunk/alba/lib/model/map/AnioMapBuilder.php
   prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php
   prosistem/alba/trunk/alba/lib/model/om/BaseAnioPeer.php
Log:
Cambiando el modelo para anio

Modified: prosistem/alba/trunk/alba/config/schema.yml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.yml	2007-12-26 20:19:46 UTC (rev 5355)
+++ prosistem/alba/trunk/alba/config/schema.yml	2007-12-26 20:31:30 UTC (rev 5356)
@@ -1287,6 +1287,10 @@
       type: varchar
       size: 255
       required: true
+    orden: 
+      type: INTEGER
+      required: false
+      default: 0
   division: 
     _attributes: 
       idMethod: native
@@ -1889,4 +1893,4 @@
     descripcion: 
       type: VARCHAR
       size: 255
-      required: false
\ No newline at end of file
+      required: false

Modified: prosistem/alba/trunk/alba/lib/model/map/AnioMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/AnioMapBuilder.php	2007-12-26 20:19:46 UTC (rev 5355)
+++ prosistem/alba/trunk/alba/lib/model/map/AnioMapBuilder.php	2007-12-26 20:31:30 UTC (rev 5356)
@@ -38,5 +38,7 @@
 
 		$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, true, 255);
 
+		$tMap->addColumn('ORDEN', 'Orden', 'int', CreoleTypes::INTEGER, false, null);
+
 	} 
 } 
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php	2007-12-26 20:19:46 UTC (rev 5355)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseAnio.php	2007-12-26 20:31:30 UTC (rev 5356)
@@ -19,7 +19,11 @@
 	
 	protected $descripcion;
 
+
 	
+	protected $orden = 0;
+
+	
 	protected $aEstablecimiento;
 
 	
@@ -62,6 +66,13 @@
 	}
 
 	
+	public function getOrden()
+	{
+
+		return $this->orden;
+	}
+
+	
 	public function setId($v)
 	{
 
@@ -108,6 +119,20 @@
 
 	} 
 	
+	public function setOrden($v)
+	{
+
+						if ($v !== null && !is_int($v) && is_numeric($v)) {
+			$v = (int) $v;
+		}
+
+		if ($this->orden !== $v || $v === 0) {
+			$this->orden = $v;
+			$this->modifiedColumns[] = AnioPeer::ORDEN;
+		}
+
+	} 
+	
 	public function hydrate(ResultSet $rs, $startcol = 1)
 	{
 		try {
@@ -118,11 +143,13 @@
 
 			$this->descripcion = $rs->getString($startcol + 2);
 
+			$this->orden = $rs->getInt($startcol + 3);
+
 			$this->resetModified();
 
 			$this->setNew(false);
 
-						return $startcol + 3; 
+						return $startcol + 4; 
 		} catch (Exception $e) {
 			throw new PropelException("Error populating Anio object", $e);
 		}
@@ -307,6 +334,9 @@
 			case 2:
 				return $this->getDescripcion();
 				break;
+			case 3:
+				return $this->getOrden();
+				break;
 			default:
 				return null;
 				break;
@@ -320,6 +350,7 @@
 			$keys[0] => $this->getId(),
 			$keys[1] => $this->getFkEstablecimientoId(),
 			$keys[2] => $this->getDescripcion(),
+			$keys[3] => $this->getOrden(),
 		);
 		return $result;
 	}
@@ -344,6 +375,9 @@
 			case 2:
 				$this->setDescripcion($value);
 				break;
+			case 3:
+				$this->setOrden($value);
+				break;
 		} 	}
 
 	
@@ -354,6 +388,7 @@
 		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
 		if (array_key_exists($keys[1], $arr)) $this->setFkEstablecimientoId($arr[$keys[1]]);
 		if (array_key_exists($keys[2], $arr)) $this->setDescripcion($arr[$keys[2]]);
+		if (array_key_exists($keys[3], $arr)) $this->setOrden($arr[$keys[3]]);
 	}
 
 	
@@ -364,6 +399,7 @@
 		if ($this->isColumnModified(AnioPeer::ID)) $criteria->add(AnioPeer::ID, $this->id);
 		if ($this->isColumnModified(AnioPeer::FK_ESTABLECIMIENTO_ID)) $criteria->add(AnioPeer::FK_ESTABLECIMIENTO_ID, $this->fk_establecimiento_id);
 		if ($this->isColumnModified(AnioPeer::DESCRIPCION)) $criteria->add(AnioPeer::DESCRIPCION, $this->descripcion);
+		if ($this->isColumnModified(AnioPeer::ORDEN)) $criteria->add(AnioPeer::ORDEN, $this->orden);
 
 		return $criteria;
 	}
@@ -398,7 +434,9 @@
 
 		$copyObj->setDescripcion($this->descripcion);
 
+		$copyObj->setOrden($this->orden);
 
+
 		if ($deepCopy) {
 									$copyObj->setNew(false);
 

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseAnioPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseAnioPeer.php	2007-12-26 20:19:46 UTC (rev 5355)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseAnioPeer.php	2007-12-26 20:31:30 UTC (rev 5356)
@@ -13,7 +13,7 @@
 	const CLASS_DEFAULT = 'lib.model.Anio';
 
 	
-	const NUM_COLUMNS = 3;
+	const NUM_COLUMNS = 4;
 
 	
 	const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -29,23 +29,26 @@
 	const DESCRIPCION = 'anio.DESCRIPCION';
 
 	
+	const ORDEN = 'anio.ORDEN';
+
+	
 	private static $phpNameMap = null;
 
 
 	
 	private static $fieldNames = array (
-		BasePeer::TYPE_PHPNAME => array ('Id', 'FkEstablecimientoId', 'Descripcion', ),
-		BasePeer::TYPE_COLNAME => array (AnioPeer::ID, AnioPeer::FK_ESTABLECIMIENTO_ID, AnioPeer::DESCRIPCION, ),
-		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_establecimiento_id', 'descripcion', ),
-		BasePeer::TYPE_NUM => array (0, 1, 2, )
+		BasePeer::TYPE_PHPNAME => array ('Id', 'FkEstablecimientoId', 'Descripcion', 'Orden', ),
+		BasePeer::TYPE_COLNAME => array (AnioPeer::ID, AnioPeer::FK_ESTABLECIMIENTO_ID, AnioPeer::DESCRIPCION, AnioPeer::ORDEN, ),
+		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_establecimiento_id', 'descripcion', 'orden', ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
 	);
 
 	
 	private static $fieldKeys = array (
-		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkEstablecimientoId' => 1, 'Descripcion' => 2, ),
-		BasePeer::TYPE_COLNAME => array (AnioPeer::ID => 0, AnioPeer::FK_ESTABLECIMIENTO_ID => 1, AnioPeer::DESCRIPCION => 2, ),
-		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_establecimiento_id' => 1, 'descripcion' => 2, ),
-		BasePeer::TYPE_NUM => array (0, 1, 2, )
+		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkEstablecimientoId' => 1, 'Descripcion' => 2, 'Orden' => 3, ),
+		BasePeer::TYPE_COLNAME => array (AnioPeer::ID => 0, AnioPeer::FK_ESTABLECIMIENTO_ID => 1, AnioPeer::DESCRIPCION => 2, AnioPeer::ORDEN => 3, ),
+		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_establecimiento_id' => 1, 'descripcion' => 2, 'orden' => 3, ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
 	);
 
 	
@@ -105,6 +108,8 @@
 
 		$criteria->addSelectColumn(AnioPeer::DESCRIPCION);
 
+		$criteria->addSelectColumn(AnioPeer::ORDEN);
+
 	}
 
 	const COUNT = 'COUNT(anio.ID)';




Más información sobre la lista de distribución Alba-desarrollo