[Alba-desarrollo] SVN Alba r4634 - in prosistem/alba/trunk/alba:
config lib/model/map lib/model/om
commits en pressenter.com.ar
commits en pressenter.com.ar
Lun Mayo 28 23:02:20 CEST 2007
Author: hsanchez
Date: 2007-05-28 18:02:17 -0300 (Mon, 28 May 2007)
New Revision: 4634
Modified:
prosistem/alba/trunk/alba/config/schema.xml
prosistem/alba/trunk/alba/lib/model/map/TipoivaMapBuilder.php
prosistem/alba/trunk/alba/lib/model/om/BaseTipoiva.php
prosistem/alba/trunk/alba/lib/model/om/BaseTipoivaPeer.php
Log:
Agregando campo orden al tipo de iva
Modified: prosistem/alba/trunk/alba/config/schema.xml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.xml 2007-05-28 01:15:04 UTC (rev 4633)
+++ prosistem/alba/trunk/alba/config/schema.xml 2007-05-28 21:02:17 UTC (rev 4634)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--Autogenerated by CreoleToXMLSchema!-->
<!-- $Id$ -->
<database package="lib.model" name="alba">
@@ -193,7 +193,7 @@
<column name="id" type="INTEGER" required="true" autoIncrement="false" primaryKey="true"/>
<column name="nombre" type="VARCHAR" size="128" required="true" default=""/>
<column name="descripcion" type="VARCHAR" size="255" required="false" default=""/>
-
+ <column name="orden" type="INTEGER" required="false" default="0"/>
</table>
<table name="provincia" idMethod="native">
<column name="id" type="INTEGER" required="true" autoIncrement="true" primaryKey="true"/>
@@ -764,4 +764,4 @@
<reference local="fk_alumno_id" foreign="id"/>
</foreign-key>
</table>
-</database>
\ No newline at end of file
+</database>
Modified: prosistem/alba/trunk/alba/lib/model/map/TipoivaMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/TipoivaMapBuilder.php 2007-05-28 01:15:04 UTC (rev 4633)
+++ prosistem/alba/trunk/alba/lib/model/map/TipoivaMapBuilder.php 2007-05-28 21:02:17 UTC (rev 4634)
@@ -1,4 +1,4 @@
-<?php
+<?php
@@ -37,6 +37,8 @@
$tMap->addColumn('NOMBRE', 'Nombre', 'string', CreoleTypes::VARCHAR, true, 128);
$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, false, 255);
+
+ $tMap->addColumn('ORDEN', 'Orden', 'int', CreoleTypes::INTEGER, false);
}
}
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseTipoiva.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTipoiva.php 2007-05-28 01:15:04 UTC (rev 4633)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTipoiva.php 2007-05-28 21:02:17 UTC (rev 4634)
@@ -1,4 +1,4 @@
-<?php
+<?php
abstract class BaseTipoiva extends BaseObject implements Persistent {
@@ -19,7 +19,11 @@
protected $descripcion = '';
+
+ protected $orden = 0;
+
+
protected $collOrganizacions;
@@ -59,6 +63,13 @@
}
+ public function getOrden()
+ {
+
+ return $this->orden;
+ }
+
+
public function setId($v)
{
@@ -89,6 +100,16 @@
}
+ public function setOrden($v)
+ {
+
+ if ($this->orden !== $v || $v === 0) {
+ $this->orden = $v;
+ $this->modifiedColumns[] = TipoivaPeer::ORDEN;
+ }
+
+ }
+
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
@@ -99,11 +120,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 Tipoiva object", $e);
}
@@ -270,6 +293,9 @@
case 2:
return $this->getDescripcion();
break;
+ case 3:
+ return $this->getOrden();
+ break;
default:
return null;
break;
@@ -283,6 +309,7 @@
$keys[0] => $this->getId(),
$keys[1] => $this->getNombre(),
$keys[2] => $this->getDescripcion(),
+ $keys[3] => $this->getOrden(),
);
return $result;
}
@@ -307,6 +334,9 @@
case 2:
$this->setDescripcion($value);
break;
+ case 3:
+ $this->setOrden($value);
+ break;
} }
@@ -317,6 +347,7 @@
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setNombre($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]]);
}
@@ -327,6 +358,7 @@
if ($this->isColumnModified(TipoivaPeer::ID)) $criteria->add(TipoivaPeer::ID, $this->id);
if ($this->isColumnModified(TipoivaPeer::NOMBRE)) $criteria->add(TipoivaPeer::NOMBRE, $this->nombre);
if ($this->isColumnModified(TipoivaPeer::DESCRIPCION)) $criteria->add(TipoivaPeer::DESCRIPCION, $this->descripcion);
+ if ($this->isColumnModified(TipoivaPeer::ORDEN)) $criteria->add(TipoivaPeer::ORDEN, $this->orden);
return $criteria;
}
@@ -361,7 +393,9 @@
$copyObj->setDescripcion($this->descripcion);
+ $copyObj->setOrden($this->orden);
+
if ($deepCopy) {
$copyObj->setNew(false);
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseTipoivaPeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseTipoivaPeer.php 2007-05-28 01:15:04 UTC (rev 4633)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseTipoivaPeer.php 2007-05-28 21:02:17 UTC (rev 4634)
@@ -1,4 +1,4 @@
-<?php
+<?php
abstract class BaseTipoivaPeer {
@@ -13,7 +13,7 @@
const CLASS_DEFAULT = 'lib.model.Tipoiva';
- const NUM_COLUMNS = 3;
+ const NUM_COLUMNS = 4;
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -29,23 +29,26 @@
const DESCRIPCION = 'tipoiva.DESCRIPCION';
+ const ORDEN = 'tipoiva.ORDEN';
+
+
private static $phpNameMap = null;
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Descripcion', ),
- BasePeer::TYPE_COLNAME => array (TipoivaPeer::ID, TipoivaPeer::NOMBRE, TipoivaPeer::DESCRIPCION, ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'descripcion', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, )
+ BasePeer::TYPE_PHPNAME => array ('Id', 'Nombre', 'Descripcion', 'Orden', ),
+ BasePeer::TYPE_COLNAME => array (TipoivaPeer::ID, TipoivaPeer::NOMBRE, TipoivaPeer::DESCRIPCION, TipoivaPeer::ORDEN, ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'nombre', 'descripcion', 'orden', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Descripcion' => 2, ),
- BasePeer::TYPE_COLNAME => array (TipoivaPeer::ID => 0, TipoivaPeer::NOMBRE => 1, TipoivaPeer::DESCRIPCION => 2, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'descripcion' => 2, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, )
+ BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nombre' => 1, 'Descripcion' => 2, 'Orden' => 3, ),
+ BasePeer::TYPE_COLNAME => array (TipoivaPeer::ID => 0, TipoivaPeer::NOMBRE => 1, TipoivaPeer::DESCRIPCION => 2, TipoivaPeer::ORDEN => 3, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nombre' => 1, 'descripcion' => 2, 'orden' => 3, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
@@ -105,6 +108,8 @@
$criteria->addSelectColumn(TipoivaPeer::DESCRIPCION);
+ $criteria->addSelectColumn(TipoivaPeer::ORDEN);
+
}
const COUNT = 'COUNT(tipoiva.ID)';
Más información sobre la lista de distribución Alba-desarrollo