예제 #1
0
 /**
  * Función que devuelve una lista con los estados de las tareas que son eventos.
  * @return array, lista de objetos de tipo parametro
  * @version 10-02-09
  * @author Ana Martín
  */
 public static function getAllEstadosEventos()
 {
     $c = new Criteria();
     $c->add(ParametroPeer::TIPOPARAMETRO, '_ESTADO_TAREA_');
     $c->add(ParametroPeer::SI_NO, 1);
     $c->addAscendingOrderByColumn(ParametroPeer::NUMERO);
     $c->addAscendingOrderByColumn(ParametroPeer::NOMBRE);
     $lista = ParametroPeer::doSelect($c);
     return $lista;
 }
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(ParametroPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(ParametroPeer::DATABASE_NAME);
         $criteria->add(ParametroPeer::ID_PARAMETRO, $pks, Criteria::IN);
         $objs = ParametroPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
예제 #3
0
 public static function getTiposUnidadesHtml()
 {
     $c = new Criteria();
     $c->addAnd(ParametroPeer::TIPOPARAMETRO, "_TIPO_UNIDAD_", Criteria::EQUAL);
     $unidades = ParametroPeer::doSelect($c);
     $lista = array();
     foreach ($unidades as $unidad) {
         $lista[$unidad->getIdParametro()] = $unidad->getNombre();
     }
     return $lista;
 }
예제 #4
0
 public static function getCategoriasDocumentos()
 {
     $c = UsuarioPeer::getCriterioNoBorrado(ParametroPeer::FECHABORRADO);
     $c->add(ParametroPeer::TIPOPARAMETRO, "_CATEGORIA_DOCUMENTOS_", Criteria::EQUAL);
     $c->addAscendingOrderByColumn(ParametroPeer::NUMERO);
     return ParametroPeer::doSelect($c);
 }
 /**
  * Gets an array of Parametro objects which contain a foreign key that references this object.
  *
  * If this collection has already been initialized with an identical Criteria, it returns the collection.
  * Otherwise if this ParametroDef has previously been saved, it will retrieve
  * related Parametros from storage. If this ParametroDef is new, it will return
  * an empty collection or the current collection, the criteria is ignored on a new object.
  *
  * @param      PropelPDO $con
  * @param      Criteria $criteria
  * @return     array Parametro[]
  * @throws     PropelException
  */
 public function getParametros($criteria = null, PropelPDO $con = null)
 {
     if ($criteria === null) {
         $criteria = new Criteria(ParametroDefPeer::DATABASE_NAME);
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collParametros === null) {
         if ($this->isNew()) {
             $this->collParametros = array();
         } else {
             $criteria->add(ParametroPeer::TIPOPARAMETRO, $this->tipoparametro);
             ParametroPeer::addSelectColumns($criteria);
             $this->collParametros = ParametroPeer::doSelect($criteria, $con);
         }
     } else {
         // criteria has no effect for a new object
         if (!$this->isNew()) {
             // the following code is to determine if a new query is
             // called for.  If the criteria is the same as the last
             // one, just return the collection.
             $criteria->add(ParametroPeer::TIPOPARAMETRO, $this->tipoparametro);
             ParametroPeer::addSelectColumns($criteria);
             if (!isset($this->lastParametroCriteria) || !$this->lastParametroCriteria->equals($criteria)) {
                 $this->collParametros = ParametroPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastParametroCriteria = $criteria;
     return $this->collParametros;
 }