/** * Listar algunos Reserva dado el $reservaSalonId * * @param $reservaSalonId * @param $performSize * @param $firstResultNumber * @param $numResults */ public function listReservasByReservaSalonId($reservaSalonId, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER) { $objBean = new SalonBean($this->persistenceManager); $obj = new Salon(); $obj->setId($reservaSalonId); # Validamos los campos if ($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 111); } if (!EntityValidator::validateGlobalOrderPriority($orderPriority)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 113); } if (!EntityValidator::validateId($reservaSalonId)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 115); } # Verificamos que la entidad exista if (!$objBean->getSalon($obj)) { throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 117); } # Listamos las entidades if ($performSize) { $this->lastRequestSize = $this->reservaBean->countGetReservasByReservaSalon($obj); } return ReservaDTO::loadFromEntities($this->reservaBean->listReservasByReservaSalon($obj, $firstResultNumber, $numResults, $orderBy, $orderPriority)); }