コード例 #1
0
 /**
  * Listar algunos ObjetoPerdido dado el $objetoPerdidoEstudianteId
  * 
  * @param $objetoPerdidoEstudianteId
  * @param $performSize
  * @param $firstResultNumber
  * @param $numResults
  */
 public function listObjetoPerdidosByObjetoPerdidoEstudianteId($objetoPerdidoEstudianteId, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER)
 {
     $objBean = new EstudianteBean($this->persistenceManager);
     $obj = new Estudiante();
     $obj->setId($objetoPerdidoEstudianteId);
     # Validamos los campos
     if ($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 195);
     }
     if (!EntityValidator::validateGlobalOrderPriority($orderPriority)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 197);
     }
     if (!EntityValidator::validateId($objetoPerdidoEstudianteId)) {
         throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 199);
     }
     # Verificamos que la entidad exista
     if (!$objBean->getEstudiante($obj)) {
         throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 201);
     }
     # Listamos las entidades
     if ($performSize) {
         $this->lastRequestSize = $this->objetoPerdidoBean->countGetObjetoPerdidosByObjetoPerdidoEstudiante($obj);
     }
     return ObjetoPerdidoDTO::loadFromEntities($this->objetoPerdidoBean->listObjetoPerdidosByObjetoPerdidoEstudiante($obj, $firstResultNumber, $numResults, $orderBy, $orderPriority));
 }