/** * Obtener un Software único. * * @param SoftwareDTO &$softwareDTO */ public function getSoftware(SoftwareDTO &$softwareDTO) { $software = SoftwareDTO::toEntity($softwareDTO); # Validamos los campos if (!EntityValidator::validateId($software->getId())) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 4); } # Obtenemos la entidad if (!$this->softwareBean->getSoftware($software)) { throw new Exception(SALAS_COMP_ALERT_E_ENTITY_NOT_FOUND2_FAIL, $this->ID + 5); } $softwareDTO->loadFromEntity($software); }