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

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Abr 25 22:47:42 CEST 2007


Author: hsanchez
Date: 2007-04-25 17:47:36 -0300 (Wed, 25 Apr 2007)
New Revision: 4579

Added:
   prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsable.php
   prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsablePeer.php
   prosistem/alba/trunk/alba/lib/model/map/RelRolresponsableResponsableMapBuilder.php
   prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsable.php
   prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsablePeer.php
Modified:
   prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php
   prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php
Log:
Agregando al modelo nueva tabla relacion rolesresponsables con responsables..

Added: prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsable.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsable.php	2007-04-25 20:46:30 UTC (rev 4578)
+++ prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsable.php	2007-04-25 20:47:36 UTC (rev 4579)
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Subclass for representing a row from the 'rel_rolresponsable_responsable' table.
+ *
+ * 
+ *
+ * @package lib.model
+ */ 
+class RelRolresponsableResponsable extends BaseRelRolresponsableResponsable
+{
+}


Property changes on: prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsable.php
___________________________________________________________________
Name: svn:keywords
   + Id Date Author Rev URL

Added: prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsablePeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsablePeer.php	2007-04-25 20:46:30 UTC (rev 4578)
+++ prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsablePeer.php	2007-04-25 20:47:36 UTC (rev 4579)
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Subclass for performing query and update operations on the 'rel_rolresponsable_responsable' table.
+ *
+ * 
+ *
+ * @package lib.model
+ */ 
+class RelRolresponsableResponsablePeer extends BaseRelRolresponsableResponsablePeer
+{
+}


Property changes on: prosistem/alba/trunk/alba/lib/model/RelRolresponsableResponsablePeer.php
___________________________________________________________________
Name: svn:keywords
   + Id Date Author Rev URL

Added: prosistem/alba/trunk/alba/lib/model/map/RelRolresponsableResponsableMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/RelRolresponsableResponsableMapBuilder.php	2007-04-25 20:46:30 UTC (rev 4578)
+++ prosistem/alba/trunk/alba/lib/model/map/RelRolresponsableResponsableMapBuilder.php	2007-04-25 20:47:36 UTC (rev 4579)
@@ -0,0 +1,44 @@
+<?php
+
+
+	
+class RelRolresponsableResponsableMapBuilder {
+
+	
+	const CLASS_NAME = 'lib.model.map.RelRolresponsableResponsableMapBuilder';	
+
+    
+    private $dbMap;
+
+	
+    public function isBuilt()
+    {
+        return ($this->dbMap !== null);
+    }
+
+	
+    public function getDatabaseMap()
+    {
+        return $this->dbMap;
+    }
+
+    
+    public function doBuild()
+    {
+		$this->dbMap = Propel::getDatabaseMap('alba');
+		
+		$tMap = $this->dbMap->addTable('rel_rolresponsable_responsable');
+		$tMap->setPhpName('RelRolresponsableResponsable');
+
+		$tMap->setUseIdGenerator(true);
+
+		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, 11);
+
+		$tMap->addForeignKey('FK_ROLRESPONSABLE_ID', 'FkRolresponsableId', 'int', CreoleTypes::INTEGER, 'rol_responsable', 'ID', true, 11);
+
+		$tMap->addForeignKey('FK_RESPONSABLE_ID', 'FkResponsableId', 'int', CreoleTypes::INTEGER, 'responsable', 'ID', true, 11);
+
+		$tMap->addColumn('DESCRIPCION', 'Descripcion', 'string', CreoleTypes::VARCHAR, false, 255);
+				
+    } 
+} 
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/lib/model/map/RelRolresponsableResponsableMapBuilder.php
___________________________________________________________________
Name: svn:keywords
   + Id Date Author Rev URL

Added: prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsable.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsable.php	2007-04-25 20:46:30 UTC (rev 4578)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsable.php	2007-04-25 20:47:36 UTC (rev 4579)
@@ -0,0 +1,483 @@
+<?php
+
+
+abstract class BaseRelRolresponsableResponsable extends BaseObject  implements Persistent {
+
+
+	
+	protected static $peer;
+
+
+	
+	protected $id;
+
+
+	
+	protected $fk_rolresponsable_id = 0;
+
+
+	
+	protected $fk_responsable_id = 0;
+
+
+	
+	protected $descripcion = '';
+
+	
+	protected $aRolResponsable;
+
+	
+	protected $aResponsable;
+
+	
+	protected $alreadyInSave = false;
+
+	
+	protected $alreadyInValidation = false;
+
+	
+	public function getId()
+	{
+
+		return $this->id;
+	}
+
+	
+	public function getFkRolresponsableId()
+	{
+
+		return $this->fk_rolresponsable_id;
+	}
+
+	
+	public function getFkResponsableId()
+	{
+
+		return $this->fk_responsable_id;
+	}
+
+	
+	public function getDescripcion()
+	{
+
+		return $this->descripcion;
+	}
+
+	
+	public function setId($v)
+	{
+
+		if ($this->id !== $v) {
+			$this->id = $v;
+			$this->modifiedColumns[] = RelRolresponsableResponsablePeer::ID;
+		}
+
+	} 
+	
+	public function setFkRolresponsableId($v)
+	{
+
+		if ($this->fk_rolresponsable_id !== $v || $v === 0) {
+			$this->fk_rolresponsable_id = $v;
+			$this->modifiedColumns[] = RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID;
+		}
+
+		if ($this->aRolResponsable !== null && $this->aRolResponsable->getId() !== $v) {
+			$this->aRolResponsable = null;
+		}
+
+	} 
+	
+	public function setFkResponsableId($v)
+	{
+
+		if ($this->fk_responsable_id !== $v || $v === 0) {
+			$this->fk_responsable_id = $v;
+			$this->modifiedColumns[] = RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID;
+		}
+
+		if ($this->aResponsable !== null && $this->aResponsable->getId() !== $v) {
+			$this->aResponsable = null;
+		}
+
+	} 
+	
+	public function setDescripcion($v)
+	{
+
+		if ($this->descripcion !== $v || $v === '') {
+			$this->descripcion = $v;
+			$this->modifiedColumns[] = RelRolresponsableResponsablePeer::DESCRIPCION;
+		}
+
+	} 
+	
+	public function hydrate(ResultSet $rs, $startcol = 1)
+	{
+		try {
+
+			$this->id = $rs->getInt($startcol + 0);
+
+			$this->fk_rolresponsable_id = $rs->getInt($startcol + 1);
+
+			$this->fk_responsable_id = $rs->getInt($startcol + 2);
+
+			$this->descripcion = $rs->getString($startcol + 3);
+
+			$this->resetModified();
+
+			$this->setNew(false);
+
+						return $startcol + 4; 
+		} catch (Exception $e) {
+			throw new PropelException("Error populating RelRolresponsableResponsable object", $e);
+		}
+	}
+
+	
+	public function delete($con = null)
+	{
+		if ($this->isDeleted()) {
+			throw new PropelException("This object has already been deleted.");
+		}
+
+		if ($con === null) {
+			$con = Propel::getConnection(RelRolresponsableResponsablePeer::DATABASE_NAME);
+		}
+
+		try {
+			$con->begin();
+			RelRolresponsableResponsablePeer::doDelete($this, $con);
+			$this->setDeleted(true);
+			$con->commit();
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	public function save($con = null)
+	{
+		if ($this->isDeleted()) {
+			throw new PropelException("You cannot save an object that has been deleted.");
+		}
+
+		if ($con === null) {
+			$con = Propel::getConnection(RelRolresponsableResponsablePeer::DATABASE_NAME);
+		}
+
+		try {
+			$con->begin();
+			$affectedRows = $this->doSave($con);
+			$con->commit();
+			return $affectedRows;
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	protected function doSave($con)
+	{
+		$affectedRows = 0; 		if (!$this->alreadyInSave) {
+			$this->alreadyInSave = true;
+
+
+												
+			if ($this->aRolResponsable !== null) {
+				if ($this->aRolResponsable->isModified()) {
+					$affectedRows += $this->aRolResponsable->save($con);
+				}
+				$this->setRolResponsable($this->aRolResponsable);
+			}
+
+			if ($this->aResponsable !== null) {
+				if ($this->aResponsable->isModified()) {
+					$affectedRows += $this->aResponsable->save($con);
+				}
+				$this->setResponsable($this->aResponsable);
+			}
+
+
+						if ($this->isModified()) {
+				if ($this->isNew()) {
+					$pk = RelRolresponsableResponsablePeer::doInsert($this, $con);
+					$affectedRows += 1; 										 										 
+					$this->setId($pk);  
+					$this->setNew(false);
+				} else {
+					$affectedRows += RelRolresponsableResponsablePeer::doUpdate($this, $con);
+				}
+				$this->resetModified(); 			}
+
+			$this->alreadyInSave = false;
+		}
+		return $affectedRows;
+	} 
+	
+	protected $validationFailures = array();
+
+	
+	public function getValidationFailures()
+	{
+		return $this->validationFailures;
+	}
+
+	
+	public function validate($columns = null)
+	{
+		$res = $this->doValidate($columns);
+		if ($res === true) {
+			$this->validationFailures = array();
+			return true;
+		} else {
+			$this->validationFailures = $res;
+			return false;
+		}
+	}
+
+	
+	protected function doValidate($columns = null)
+	{
+		if (!$this->alreadyInValidation) {
+			$this->alreadyInValidation = true;
+			$retval = null;
+
+			$failureMap = array();
+
+
+												
+			if ($this->aRolResponsable !== null) {
+				if (!$this->aRolResponsable->validate($columns)) {
+					$failureMap = array_merge($failureMap, $this->aRolResponsable->getValidationFailures());
+				}
+			}
+
+			if ($this->aResponsable !== null) {
+				if (!$this->aResponsable->validate($columns)) {
+					$failureMap = array_merge($failureMap, $this->aResponsable->getValidationFailures());
+				}
+			}
+
+
+			if (($retval = RelRolresponsableResponsablePeer::doValidate($this, $columns)) !== true) {
+				$failureMap = array_merge($failureMap, $retval);
+			}
+
+
+
+			$this->alreadyInValidation = false;
+		}
+
+		return (!empty($failureMap) ? $failureMap : true);
+	}
+
+	
+	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
+	{
+		$pos = RelRolresponsableResponsablePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+		return $this->getByPosition($pos);
+	}
+
+	
+	public function getByPosition($pos)
+	{
+		switch($pos) {
+			case 0:
+				return $this->getId();
+				break;
+			case 1:
+				return $this->getFkRolresponsableId();
+				break;
+			case 2:
+				return $this->getFkResponsableId();
+				break;
+			case 3:
+				return $this->getDescripcion();
+				break;
+			default:
+				return null;
+				break;
+		} 	}
+
+	
+	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
+	{
+		$keys = RelRolresponsableResponsablePeer::getFieldNames($keyType);
+		$result = array(
+			$keys[0] => $this->getId(),
+			$keys[1] => $this->getFkRolresponsableId(),
+			$keys[2] => $this->getFkResponsableId(),
+			$keys[3] => $this->getDescripcion(),
+		);
+		return $result;
+	}
+
+	
+	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
+	{
+		$pos = RelRolresponsableResponsablePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+		return $this->setByPosition($pos, $value);
+	}
+
+	
+	public function setByPosition($pos, $value)
+	{
+		switch($pos) {
+			case 0:
+				$this->setId($value);
+				break;
+			case 1:
+				$this->setFkRolresponsableId($value);
+				break;
+			case 2:
+				$this->setFkResponsableId($value);
+				break;
+			case 3:
+				$this->setDescripcion($value);
+				break;
+		} 	}
+
+	
+	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
+	{
+		$keys = RelRolresponsableResponsablePeer::getFieldNames($keyType);
+
+		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
+		if (array_key_exists($keys[1], $arr)) $this->setFkRolresponsableId($arr[$keys[1]]);
+		if (array_key_exists($keys[2], $arr)) $this->setFkResponsableId($arr[$keys[2]]);
+		if (array_key_exists($keys[3], $arr)) $this->setDescripcion($arr[$keys[3]]);
+	}
+
+	
+	public function buildCriteria()
+	{
+		$criteria = new Criteria(RelRolresponsableResponsablePeer::DATABASE_NAME);
+
+		if ($this->isColumnModified(RelRolresponsableResponsablePeer::ID)) $criteria->add(RelRolresponsableResponsablePeer::ID, $this->id);
+		if ($this->isColumnModified(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID)) $criteria->add(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, $this->fk_rolresponsable_id);
+		if ($this->isColumnModified(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID)) $criteria->add(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, $this->fk_responsable_id);
+		if ($this->isColumnModified(RelRolresponsableResponsablePeer::DESCRIPCION)) $criteria->add(RelRolresponsableResponsablePeer::DESCRIPCION, $this->descripcion);
+
+		return $criteria;
+	}
+
+	
+	public function buildPkeyCriteria()
+	{
+		$criteria = new Criteria(RelRolresponsableResponsablePeer::DATABASE_NAME);
+
+		$criteria->add(RelRolresponsableResponsablePeer::ID, $this->id);
+
+		return $criteria;
+	}
+
+	
+	public function getPrimaryKey()
+	{
+		return $this->getId();
+	}
+
+	
+	public function setPrimaryKey($key)
+	{
+		$this->setId($key);
+	}
+
+	
+	public function copyInto($copyObj, $deepCopy = false)
+	{
+
+		$copyObj->setFkRolresponsableId($this->fk_rolresponsable_id);
+
+		$copyObj->setFkResponsableId($this->fk_responsable_id);
+
+		$copyObj->setDescripcion($this->descripcion);
+
+
+		$copyObj->setNew(true);
+
+		$copyObj->setId(NULL); 
+	}
+
+	
+	public function copy($deepCopy = false)
+	{
+				$clazz = get_class($this);
+		$copyObj = new $clazz();
+		$this->copyInto($copyObj, $deepCopy);
+		return $copyObj;
+	}
+
+	
+	public function getPeer()
+	{
+		if (self::$peer === null) {
+			self::$peer = new RelRolresponsableResponsablePeer();
+		}
+		return self::$peer;
+	}
+
+	
+	public function setRolResponsable($v)
+	{
+
+
+		if ($v === null) {
+			$this->setFkRolresponsableId('0');
+		} else {
+			$this->setFkRolresponsableId($v->getId());
+		}
+
+
+		$this->aRolResponsable = $v;
+	}
+
+
+	
+	public function getRolResponsable($con = null)
+	{
+				include_once 'lib/model/om/BaseRolResponsablePeer.php';
+
+		if ($this->aRolResponsable === null && ($this->fk_rolresponsable_id !== null)) {
+
+			$this->aRolResponsable = RolResponsablePeer::retrieveByPK($this->fk_rolresponsable_id, $con);
+
+			
+		}
+		return $this->aRolResponsable;
+	}
+
+	
+	public function setResponsable($v)
+	{
+
+
+		if ($v === null) {
+			$this->setFkResponsableId('0');
+		} else {
+			$this->setFkResponsableId($v->getId());
+		}
+
+
+		$this->aResponsable = $v;
+	}
+
+
+	
+	public function getResponsable($con = null)
+	{
+				include_once 'lib/model/om/BaseResponsablePeer.php';
+
+		if ($this->aResponsable === null && ($this->fk_responsable_id !== null)) {
+
+			$this->aResponsable = ResponsablePeer::retrieveByPK($this->fk_responsable_id, $con);
+
+			
+		}
+		return $this->aResponsable;
+	}
+
+} 
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsable.php
___________________________________________________________________
Name: svn:keywords
   + Id Date Author Rev URL

Added: prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsablePeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsablePeer.php	2007-04-25 20:46:30 UTC (rev 4578)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsablePeer.php	2007-04-25 20:47:36 UTC (rev 4579)
@@ -0,0 +1,814 @@
+<?php
+
+
+abstract class BaseRelRolresponsableResponsablePeer {
+
+	
+	const DATABASE_NAME = 'alba';
+
+	
+	const TABLE_NAME = 'rel_rolresponsable_responsable';
+
+	
+	const CLASS_DEFAULT = 'lib.model.RelRolresponsableResponsable';
+
+	
+	const NUM_COLUMNS = 4;
+
+	
+	const NUM_LAZY_LOAD_COLUMNS = 0;
+
+
+	
+	const ID = 'rel_rolresponsable_responsable.ID';
+
+	
+	const FK_ROLRESPONSABLE_ID = 'rel_rolresponsable_responsable.FK_ROLRESPONSABLE_ID';
+
+	
+	const FK_RESPONSABLE_ID = 'rel_rolresponsable_responsable.FK_RESPONSABLE_ID';
+
+	
+	const DESCRIPCION = 'rel_rolresponsable_responsable.DESCRIPCION';
+
+	
+	private static $phpNameMap = null;
+
+
+	
+	private static $fieldNames = array (
+		BasePeer::TYPE_PHPNAME => array ('Id', 'FkRolresponsableId', 'FkResponsableId', 'Descripcion', ),
+		BasePeer::TYPE_COLNAME => array (RelRolresponsableResponsablePeer::ID, RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, RelRolresponsableResponsablePeer::DESCRIPCION, ),
+		BasePeer::TYPE_FIELDNAME => array ('id', 'fk_rolresponsable_id', 'fk_responsable_id', 'descripcion', ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+	);
+
+	
+	private static $fieldKeys = array (
+		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkRolresponsableId' => 1, 'FkResponsableId' => 2, 'Descripcion' => 3, ),
+		BasePeer::TYPE_COLNAME => array (RelRolresponsableResponsablePeer::ID => 0, RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID => 1, RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID => 2, RelRolresponsableResponsablePeer::DESCRIPCION => 3, ),
+		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_rolresponsable_id' => 1, 'fk_responsable_id' => 2, 'descripcion' => 3, ),
+		BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
+	);
+
+	
+	public static function getMapBuilder()
+	{
+		include_once 'lib/model/map/RelRolresponsableResponsableMapBuilder.php';
+		return BasePeer::getMapBuilder('lib.model.map.RelRolresponsableResponsableMapBuilder');
+	}
+	
+	public static function getPhpNameMap()
+	{
+		if (self::$phpNameMap === null) {
+			$map = RelRolresponsableResponsablePeer::getTableMap();
+			$columns = $map->getColumns();
+			$nameMap = array();
+			foreach ($columns as $column) {
+				$nameMap[$column->getPhpName()] = $column->getColumnName();
+			}
+			self::$phpNameMap = $nameMap;
+		}
+		return self::$phpNameMap;
+	}
+	
+	static public function translateFieldName($name, $fromType, $toType)
+	{
+		$toNames = self::getFieldNames($toType);
+		$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
+		if ($key === null) {
+			throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
+		}
+		return $toNames[$key];
+	}
+
+	
+
+	static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
+	{
+		if (!array_key_exists($type, self::$fieldNames)) {
+			throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
+		}
+		return self::$fieldNames[$type];
+	}
+
+	
+	public static function alias($alias, $column)
+	{
+		return str_replace(RelRolresponsableResponsablePeer::TABLE_NAME.'.', $alias.'.', $column);
+	}
+
+	
+	public static function addSelectColumns(Criteria $criteria)
+	{
+
+		$criteria->addSelectColumn(RelRolresponsableResponsablePeer::ID);
+
+		$criteria->addSelectColumn(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID);
+
+		$criteria->addSelectColumn(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID);
+
+		$criteria->addSelectColumn(RelRolresponsableResponsablePeer::DESCRIPCION);
+
+	}
+
+	const COUNT = 'COUNT(rel_rolresponsable_responsable.ID)';
+	const COUNT_DISTINCT = 'COUNT(DISTINCT rel_rolresponsable_responsable.ID)';
+
+	
+	public static function doCount(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT);
+		}
+
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$rs = RelRolresponsableResponsablePeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+	
+	public static function doSelectOne(Criteria $criteria, $con = null)
+	{
+		$critcopy = clone $criteria;
+		$critcopy->setLimit(1);
+		$objects = RelRolresponsableResponsablePeer::doSelect($critcopy, $con);
+		if ($objects) {
+			return $objects[0];
+		}
+		return null;
+	}
+	
+	public static function doSelect(Criteria $criteria, $con = null)
+	{
+		return RelRolresponsableResponsablePeer::populateObjects(RelRolresponsableResponsablePeer::doSelectRS($criteria, $con));
+	}
+	
+	public static function doSelectRS(Criteria $criteria, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		if (!$criteria->getSelectColumns()) {
+			$criteria = clone $criteria;
+			RelRolresponsableResponsablePeer::addSelectColumns($criteria);
+		}
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+						return BasePeer::doSelect($criteria, $con);
+	}
+	
+	public static function populateObjects(ResultSet $rs)
+	{
+		$results = array();
+	
+				$cls = RelRolresponsableResponsablePeer::getOMClass();
+		$cls = Propel::import($cls);
+				while($rs->next()) {
+		
+			$obj = new $cls();
+			$obj->hydrate($rs);
+			$results[] = $obj;
+			
+		}
+		return $results;
+	}
+
+	
+	public static function doCountJoinRolResponsable(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+		
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT);
+		}
+		
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
+		$rs = RelRolresponsableResponsablePeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
+	public static function doCountJoinResponsable(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+		
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT);
+		}
+		
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, ResponsablePeer::ID);
+
+		$rs = RelRolresponsableResponsablePeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
+	public static function doSelectJoinRolResponsable(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+				if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		RelRolresponsableResponsablePeer::addSelectColumns($c);
+		$startcol = (RelRolresponsableResponsablePeer::NUM_COLUMNS - RelRolresponsableResponsablePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+		RolResponsablePeer::addSelectColumns($c);
+
+		$c->addJoin(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+
+		while($rs->next()) {
+
+			$omClass = RelRolresponsableResponsablePeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);
+
+			$omClass = RolResponsablePeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj2 = new $cls();
+			$obj2->hydrate($rs, $startcol);
+
+			$newObject = true;
+			foreach($results as $temp_obj1) {
+				$temp_obj2 = $temp_obj1->getRolResponsable(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+										$temp_obj2->addRelRolresponsableResponsable($obj1); 					break;
+				}
+			}
+			if ($newObject) {
+				$obj2->initRelRolresponsableResponsables();
+				$obj2->addRelRolresponsableResponsable($obj1); 			}
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+
+	
+	public static function doSelectJoinResponsable(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+				if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		RelRolresponsableResponsablePeer::addSelectColumns($c);
+		$startcol = (RelRolresponsableResponsablePeer::NUM_COLUMNS - RelRolresponsableResponsablePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+		ResponsablePeer::addSelectColumns($c);
+
+		$c->addJoin(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, ResponsablePeer::ID);
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+
+		while($rs->next()) {
+
+			$omClass = RelRolresponsableResponsablePeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);
+
+			$omClass = ResponsablePeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj2 = new $cls();
+			$obj2->hydrate($rs, $startcol);
+
+			$newObject = true;
+			foreach($results as $temp_obj1) {
+				$temp_obj2 = $temp_obj1->getResponsable(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+										$temp_obj2->addRelRolresponsableResponsable($obj1); 					break;
+				}
+			}
+			if ($newObject) {
+				$obj2->initRelRolresponsableResponsables();
+				$obj2->addRelRolresponsableResponsable($obj1); 			}
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+
+	
+	public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
+	{
+		$criteria = clone $criteria;
+
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT);
+		}
+		
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
+		$criteria->addJoin(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, ResponsablePeer::ID);
+
+		$rs = RelRolresponsableResponsablePeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
+	public static function doSelectJoinAll(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+				if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		RelRolresponsableResponsablePeer::addSelectColumns($c);
+		$startcol2 = (RelRolresponsableResponsablePeer::NUM_COLUMNS - RelRolresponsableResponsablePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+		RolResponsablePeer::addSelectColumns($c);
+		$startcol3 = $startcol2 + RolResponsablePeer::NUM_COLUMNS;
+
+		ResponsablePeer::addSelectColumns($c);
+		$startcol4 = $startcol3 + ResponsablePeer::NUM_COLUMNS;
+
+		$c->addJoin(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
+		$c->addJoin(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, ResponsablePeer::ID);
+
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+		
+		while($rs->next()) {
+
+			$omClass = RelRolresponsableResponsablePeer::getOMClass();
+
+			
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);
+
+				
+					
+			$omClass = RolResponsablePeer::getOMClass();
+
+	
+			$cls = Propel::import($omClass);
+			$obj2 = new $cls();
+			$obj2->hydrate($rs, $startcol2);
+			
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj2 = $temp_obj1->getRolResponsable(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj2->addRelRolresponsableResponsable($obj1); 					break;
+				}
+			}
+			
+			if ($newObject) {
+				$obj2->initRelRolresponsableResponsables();
+				$obj2->addRelRolresponsableResponsable($obj1);
+			}
+
+				
+					
+			$omClass = ResponsablePeer::getOMClass();
+
+	
+			$cls = Propel::import($omClass);
+			$obj3 = new $cls();
+			$obj3->hydrate($rs, $startcol3);
+			
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj3 = $temp_obj1->getResponsable(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj3->addRelRolresponsableResponsable($obj1); 					break;
+				}
+			}
+			
+			if ($newObject) {
+				$obj3->initRelRolresponsableResponsables();
+				$obj3->addRelRolresponsableResponsable($obj1);
+			}
+
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+
+	
+	public static function doCountJoinAllExceptRolResponsable(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+		
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT);
+		}
+		
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, ResponsablePeer::ID);
+
+		$rs = RelRolresponsableResponsablePeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
+	public static function doCountJoinAllExceptResponsable(Criteria $criteria, $distinct = false, $con = null)
+	{
+				$criteria = clone $criteria;
+		
+				$criteria->clearSelectColumns()->clearOrderByColumns();
+		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT_DISTINCT);
+		} else {
+			$criteria->addSelectColumn(RelRolresponsableResponsablePeer::COUNT);
+		}
+		
+				foreach($criteria->getGroupByColumns() as $column)
+		{
+			$criteria->addSelectColumn($column);
+		}
+
+		$criteria->addJoin(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
+		$rs = RelRolresponsableResponsablePeer::doSelectRS($criteria, $con);
+		if ($rs->next()) {
+			return $rs->getInt(1);
+		} else {
+						return 0;
+		}
+	}
+
+
+	
+	public static function doSelectJoinAllExceptRolResponsable(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+								if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		RelRolresponsableResponsablePeer::addSelectColumns($c);
+		$startcol2 = (RelRolresponsableResponsablePeer::NUM_COLUMNS - RelRolresponsableResponsablePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+		ResponsablePeer::addSelectColumns($c);
+		$startcol3 = $startcol2 + ResponsablePeer::NUM_COLUMNS;
+
+		$c->addJoin(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, ResponsablePeer::ID);
+
+
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+		
+		while($rs->next()) {
+
+			$omClass = RelRolresponsableResponsablePeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);		
+
+			$omClass = ResponsablePeer::getOMClass();
+
+	
+			$cls = Propel::import($omClass);
+			$obj2  = new $cls();
+			$obj2->hydrate($rs, $startcol2);
+			
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj2 = $temp_obj1->getResponsable(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj2->addRelRolresponsableResponsable($obj1);
+					break;
+				}
+			}
+			
+			if ($newObject) {
+				$obj2->initRelRolresponsableResponsables();
+				$obj2->addRelRolresponsableResponsable($obj1);
+			}
+
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+
+	
+	public static function doSelectJoinAllExceptResponsable(Criteria $c, $con = null)
+	{
+		$c = clone $c;
+
+								if ($c->getDbName() == Propel::getDefaultDB()) {
+			$c->setDbName(self::DATABASE_NAME);
+		}
+
+		RelRolresponsableResponsablePeer::addSelectColumns($c);
+		$startcol2 = (RelRolresponsableResponsablePeer::NUM_COLUMNS - RelRolresponsableResponsablePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
+
+		RolResponsablePeer::addSelectColumns($c);
+		$startcol3 = $startcol2 + RolResponsablePeer::NUM_COLUMNS;
+
+		$c->addJoin(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, RolResponsablePeer::ID);
+
+
+		$rs = BasePeer::doSelect($c, $con);
+		$results = array();
+		
+		while($rs->next()) {
+
+			$omClass = RelRolresponsableResponsablePeer::getOMClass();
+
+			$cls = Propel::import($omClass);
+			$obj1 = new $cls();
+			$obj1->hydrate($rs);		
+
+			$omClass = RolResponsablePeer::getOMClass();
+
+	
+			$cls = Propel::import($omClass);
+			$obj2  = new $cls();
+			$obj2->hydrate($rs, $startcol2);
+			
+			$newObject = true;
+			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
+				$temp_obj1 = $results[$j];
+				$temp_obj2 = $temp_obj1->getRolResponsable(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
+					$newObject = false;
+					$temp_obj2->addRelRolresponsableResponsable($obj1);
+					break;
+				}
+			}
+			
+			if ($newObject) {
+				$obj2->initRelRolresponsableResponsables();
+				$obj2->addRelRolresponsableResponsable($obj1);
+			}
+
+			$results[] = $obj1;
+		}
+		return $results;
+	}
+
+	
+	public static function getTableMap()
+	{
+		return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
+	}
+
+	
+	public static function getOMClass()
+	{
+		return RelRolresponsableResponsablePeer::CLASS_DEFAULT;
+	}
+
+	
+	public static function doInsert($values, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		if ($values instanceof Criteria) {
+			$criteria = clone $values; 		} else {
+			$criteria = $values->buildCriteria(); 		}
+
+		$criteria->remove(RelRolresponsableResponsablePeer::ID); 
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+		try {
+									$con->begin();
+			$pk = BasePeer::doInsert($criteria, $con);
+			$con->commit();
+		} catch(PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+
+		return $pk;
+	}
+
+	
+	public static function doUpdate($values, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		$selectCriteria = new Criteria(self::DATABASE_NAME);
+
+		if ($values instanceof Criteria) {
+			$criteria = clone $values; 
+			$comparison = $criteria->getComparison(RelRolresponsableResponsablePeer::ID);
+			$selectCriteria->add(RelRolresponsableResponsablePeer::ID, $criteria->remove(RelRolresponsableResponsablePeer::ID), $comparison);
+
+		} else { 			$criteria = $values->buildCriteria(); 			$selectCriteria = $values->buildPkeyCriteria(); 		}
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+		return BasePeer::doUpdate($selectCriteria, $criteria, $con);
+	}
+
+	
+	public static function doDeleteAll($con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+		$affectedRows = 0; 		try {
+									$con->begin();
+			$affectedRows += BasePeer::doDeleteAll(RelRolresponsableResponsablePeer::TABLE_NAME, $con);
+			$con->commit();
+			return $affectedRows;
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	 public static function doDelete($values, $con = null)
+	 {
+		if ($con === null) {
+			$con = Propel::getConnection(RelRolresponsableResponsablePeer::DATABASE_NAME);
+		}
+
+		if ($values instanceof Criteria) {
+			$criteria = clone $values; 		} elseif ($values instanceof RelRolresponsableResponsable) {
+
+			$criteria = $values->buildPkeyCriteria();
+		} else {
+						$criteria = new Criteria(self::DATABASE_NAME);
+			$criteria->add(RelRolresponsableResponsablePeer::ID, (array) $values, Criteria::IN);
+		}
+
+				$criteria->setDbName(self::DATABASE_NAME);
+
+		$affectedRows = 0; 
+		try {
+									$con->begin();
+			
+			$affectedRows += BasePeer::doDelete($criteria, $con);
+			$con->commit();
+			return $affectedRows;
+		} catch (PropelException $e) {
+			$con->rollback();
+			throw $e;
+		}
+	}
+
+	
+	public static function doValidate(RelRolresponsableResponsable $obj, $cols = null)
+	{
+		$columns = array();
+
+		if ($cols) {
+			$dbMap = Propel::getDatabaseMap(RelRolresponsableResponsablePeer::DATABASE_NAME);
+			$tableMap = $dbMap->getTable(RelRolresponsableResponsablePeer::TABLE_NAME);
+
+			if (! is_array($cols)) {
+				$cols = array($cols);
+			}
+
+			foreach($cols as $colName) {
+				if ($tableMap->containsColumn($colName)) {
+					$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
+					$columns[$colName] = $obj->$get();
+				}
+			}
+		} else {
+
+		}
+
+		$res =  BasePeer::doValidate(RelRolresponsableResponsablePeer::DATABASE_NAME, RelRolresponsableResponsablePeer::TABLE_NAME, $columns);
+    if ($res !== true) {
+        $request = sfContext::getInstance()->getRequest();
+        foreach ($res as $failed) {
+            $col = RelRolresponsableResponsablePeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME);
+            $request->setError($col, $failed->getMessage());
+        }
+    }
+
+    return $res;
+	}
+
+	
+	public static function retrieveByPK($pk, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		$criteria = new Criteria(RelRolresponsableResponsablePeer::DATABASE_NAME);
+
+		$criteria->add(RelRolresponsableResponsablePeer::ID, $pk);
+
+
+		$v = RelRolresponsableResponsablePeer::doSelect($criteria, $con);
+
+		return !empty($v) > 0 ? $v[0] : null;
+	}
+
+	
+	public static function retrieveByPKs($pks, $con = null)
+	{
+		if ($con === null) {
+			$con = Propel::getConnection(self::DATABASE_NAME);
+		}
+
+		$objs = null;
+		if (empty($pks)) {
+			$objs = array();
+		} else {
+			$criteria = new Criteria();
+			$criteria->add(RelRolresponsableResponsablePeer::ID, $pks, Criteria::IN);
+			$objs = RelRolresponsableResponsablePeer::doSelect($criteria, $con);
+		}
+		return $objs;
+	}
+
+} 
+if (Propel::isInit()) {
+			try {
+		BaseRelRolresponsableResponsablePeer::getMapBuilder();
+	} catch (Exception $e) {
+		Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
+	}
+} else {
+			require_once 'lib/model/map/RelRolresponsableResponsableMapBuilder.php';
+	Propel::registerMapBuilder('lib.model.map.RelRolresponsableResponsableMapBuilder');
+}


Property changes on: prosistem/alba/trunk/alba/lib/model/om/BaseRelRolresponsableResponsablePeer.php
___________________________________________________________________
Name: svn:keywords
   + Id Date Author Rev URL

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php	2007-04-25 20:46:30 UTC (rev 4578)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseResponsable.php	2007-04-25 20:47:36 UTC (rev 4579)
@@ -85,6 +85,12 @@
 	protected $aTipodocumento;
 
 	
+	protected $collRelRolresponsableResponsables;
+
+	
+	protected $lastRelRolresponsableResponsableCriteria = null;
+
+	
 	protected $alreadyInSave = false;
 
 	
@@ -525,6 +531,14 @@
 				}
 				$this->resetModified(); 			}
 
+			if ($this->collRelRolresponsableResponsables !== null) {
+				foreach($this->collRelRolresponsableResponsables as $referrerFK) {
+					if (!$referrerFK->isDeleted()) {
+						$affectedRows += $referrerFK->save($con);
+					}
+				}
+			}
+
 			$this->alreadyInSave = false;
 		}
 		return $affectedRows;
@@ -586,7 +600,15 @@
 			}
 
 
+				if ($this->collRelRolresponsableResponsables !== null) {
+					foreach($this->collRelRolresponsableResponsables as $referrerFK) {
+						if (!$referrerFK->validate($columns)) {
+							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+						}
+					}
+				}
 
+
 			$this->alreadyInValidation = false;
 		}
 
@@ -859,6 +881,15 @@
 		$copyObj->setFkCuentaId($this->fk_cuenta_id);
 
 
+		if ($deepCopy) {
+									$copyObj->setNew(false);
+
+			foreach($this->getRelRolresponsableResponsables() as $relObj) {
+				$copyObj->addRelRolresponsableResponsable($relObj->copy($deepCopy));
+			}
+
+		} 
+
 		$copyObj->setNew(true);
 
 		$copyObj->setId(NULL); 
@@ -972,4 +1003,109 @@
 		return $this->aTipodocumento;
 	}
 
+	
+	public function initRelRolresponsableResponsables()
+	{
+		if ($this->collRelRolresponsableResponsables === null) {
+			$this->collRelRolresponsableResponsables = array();
+		}
+	}
+
+	
+	public function getRelRolresponsableResponsables($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelRolresponsableResponsablePeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelRolresponsableResponsables === null) {
+			if ($this->isNew()) {
+			   $this->collRelRolresponsableResponsables = array();
+			} else {
+
+				$criteria->add(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, $this->getId());
+
+				RelRolresponsableResponsablePeer::addSelectColumns($criteria);
+				$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelect($criteria, $con);
+			}
+		} else {
+						if (!$this->isNew()) {
+												
+
+				$criteria->add(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, $this->getId());
+
+				RelRolresponsableResponsablePeer::addSelectColumns($criteria);
+				if (!isset($this->lastRelRolresponsableResponsableCriteria) || !$this->lastRelRolresponsableResponsableCriteria->equals($criteria)) {
+					$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelect($criteria, $con);
+				}
+			}
+		}
+		$this->lastRelRolresponsableResponsableCriteria = $criteria;
+		return $this->collRelRolresponsableResponsables;
+	}
+
+	
+	public function countRelRolresponsableResponsables($criteria = null, $distinct = false, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelRolresponsableResponsablePeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		$criteria->add(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, $this->getId());
+
+		return RelRolresponsableResponsablePeer::doCount($criteria, $distinct, $con);
+	}
+
+	
+	public function addRelRolresponsableResponsable(RelRolresponsableResponsable $l)
+	{
+		$this->collRelRolresponsableResponsables[] = $l;
+		$l->setResponsable($this);
+	}
+
+
+	
+	public function getRelRolresponsableResponsablesJoinRolResponsable($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelRolresponsableResponsablePeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelRolresponsableResponsables === null) {
+			if ($this->isNew()) {
+				$this->collRelRolresponsableResponsables = array();
+			} else {
+
+				$criteria->add(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, $this->getId());
+
+				$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(RelRolresponsableResponsablePeer::FK_RESPONSABLE_ID, $this->getId());
+
+			if (!isset($this->lastRelRolresponsableResponsableCriteria) || !$this->lastRelRolresponsableResponsableCriteria->equals($criteria)) {
+				$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelectJoinRolResponsable($criteria, $con);
+			}
+		}
+		$this->lastRelRolresponsableResponsableCriteria = $criteria;
+
+		return $this->collRelRolresponsableResponsables;
+	}
+
 } 
\ No newline at end of file

Modified: prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php	2007-04-25 20:46:30 UTC (rev 4578)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRolResponsable.php	2007-04-25 20:47:36 UTC (rev 4579)
@@ -24,6 +24,12 @@
 	protected $activo = true;
 
 	
+	protected $collRelRolresponsableResponsables;
+
+	
+	protected $lastRelRolresponsableResponsableCriteria = null;
+
+	
 	protected $alreadyInSave = false;
 
 	
@@ -182,6 +188,14 @@
 				}
 				$this->resetModified(); 			}
 
+			if ($this->collRelRolresponsableResponsables !== null) {
+				foreach($this->collRelRolresponsableResponsables as $referrerFK) {
+					if (!$referrerFK->isDeleted()) {
+						$affectedRows += $referrerFK->save($con);
+					}
+				}
+			}
+
 			$this->alreadyInSave = false;
 		}
 		return $affectedRows;
@@ -223,7 +237,15 @@
 			}
 
 
+				if ($this->collRelRolresponsableResponsables !== null) {
+					foreach($this->collRelRolresponsableResponsables as $referrerFK) {
+						if (!$referrerFK->validate($columns)) {
+							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
+						}
+					}
+				}
 
+
 			$this->alreadyInValidation = false;
 		}
 
@@ -353,6 +375,15 @@
 		$copyObj->setActivo($this->activo);
 
 
+		if ($deepCopy) {
+									$copyObj->setNew(false);
+
+			foreach($this->getRelRolresponsableResponsables() as $relObj) {
+				$copyObj->addRelRolresponsableResponsable($relObj->copy($deepCopy));
+			}
+
+		} 
+
 		$copyObj->setNew(true);
 
 		$copyObj->setId(NULL); 
@@ -376,4 +407,109 @@
 		return self::$peer;
 	}
 
+	
+	public function initRelRolresponsableResponsables()
+	{
+		if ($this->collRelRolresponsableResponsables === null) {
+			$this->collRelRolresponsableResponsables = array();
+		}
+	}
+
+	
+	public function getRelRolresponsableResponsables($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelRolresponsableResponsablePeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelRolresponsableResponsables === null) {
+			if ($this->isNew()) {
+			   $this->collRelRolresponsableResponsables = array();
+			} else {
+
+				$criteria->add(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+				RelRolresponsableResponsablePeer::addSelectColumns($criteria);
+				$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelect($criteria, $con);
+			}
+		} else {
+						if (!$this->isNew()) {
+												
+
+				$criteria->add(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+				RelRolresponsableResponsablePeer::addSelectColumns($criteria);
+				if (!isset($this->lastRelRolresponsableResponsableCriteria) || !$this->lastRelRolresponsableResponsableCriteria->equals($criteria)) {
+					$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelect($criteria, $con);
+				}
+			}
+		}
+		$this->lastRelRolresponsableResponsableCriteria = $criteria;
+		return $this->collRelRolresponsableResponsables;
+	}
+
+	
+	public function countRelRolresponsableResponsables($criteria = null, $distinct = false, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelRolresponsableResponsablePeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		$criteria->add(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+		return RelRolresponsableResponsablePeer::doCount($criteria, $distinct, $con);
+	}
+
+	
+	public function addRelRolresponsableResponsable(RelRolresponsableResponsable $l)
+	{
+		$this->collRelRolresponsableResponsables[] = $l;
+		$l->setRolResponsable($this);
+	}
+
+
+	
+	public function getRelRolresponsableResponsablesJoinResponsable($criteria = null, $con = null)
+	{
+				include_once 'lib/model/om/BaseRelRolresponsableResponsablePeer.php';
+		if ($criteria === null) {
+			$criteria = new Criteria();
+		}
+		elseif ($criteria instanceof Criteria)
+		{
+			$criteria = clone $criteria;
+		}
+
+		if ($this->collRelRolresponsableResponsables === null) {
+			if ($this->isNew()) {
+				$this->collRelRolresponsableResponsables = array();
+			} else {
+
+				$criteria->add(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+				$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelectJoinResponsable($criteria, $con);
+			}
+		} else {
+									
+			$criteria->add(RelRolresponsableResponsablePeer::FK_ROLRESPONSABLE_ID, $this->getId());
+
+			if (!isset($this->lastRelRolresponsableResponsableCriteria) || !$this->lastRelRolresponsableResponsableCriteria->equals($criteria)) {
+				$this->collRelRolresponsableResponsables = RelRolresponsableResponsablePeer::doSelectJoinResponsable($criteria, $con);
+			}
+		}
+		$this->lastRelRolresponsableResponsableCriteria = $criteria;
+
+		return $this->collRelRolresponsableResponsables;
+	}
+
 } 
\ No newline at end of file




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