/** * Listar algunos Responsable dado el $responsablePersonaId * * @param $responsablePersonaId * @param $performSize * @param $firstResultNumber * @param $numResults */ public function listResponsablesByResponsablePersonaId($responsablePersonaId, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER) { $objBean = new PersonaBean($this->persistenceManager); $obj = new Persona(); $obj->setId($responsablePersonaId); # Validamos los campos if ($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 95); } if (!EntityValidator::validateGlobalOrderPriority($orderPriority)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 97); } if (!EntityValidator::validateId($responsablePersonaId)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 99); } # Verificamos que la entidad exista if (!$objBean->getPersona($obj)) { throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND_FAIL, $this->ID + 101); } # Listamos las entidades if ($performSize) { $this->lastRequestSize = $this->responsableBean->countGetResponsablesByResponsablePersona($obj); } return ResponsableDTO::loadFromEntities($this->responsableBean->listResponsablesByResponsablePersona($obj, $firstResultNumber, $numResults, $orderBy, $orderPriority)); }