/** * Listar algunos PrestamoBackup dado un rango inferior * * @param $value * @param $performSize * @param $firstResultNumber * @param $numResults */ public function listPrestamoBackupsByPrestamoBackupFechaBackupLowerThan($value, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER) { # Validamos los campos if ($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 189); } if (!EntityValidator::validateGlobalOrderPriority($orderPriority)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 191); } if (!EntityValidator::validateDate($value)) { throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 193); } # Listamos las entidades if ($performSize) { $this->lastRequestSize = $this->prestamoBackupBean->countGetPrestamoBackupsByPrestamoBackupFechaBackupLowerThan($value); } return PrestamoBackupDTO::loadFromEntities($this->prestamoBackupBean->listPrestamoBackupsByPrestamoBackupFechaBackupLowerThan($value, $firstResultNumber, $numResults, $orderBy, $orderPriority)); }
public static function loadFromXML($xmlDaos) { $daos = array(); $doc = new DOMDocument('1.0', 'utf-8'); $doc->loadXML($xmlDaos); $nodes = $doc->getElementsByTagName("PrestamoBackup"); foreach ($nodes as $node) { $dao = new PrestamoBackupDTO(); $data = $node->getElementsByTagName("PrestamoBackup_Id"); if ($data->length > 0) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setId($data); $data = $node->getElementsByTagName("prestamoId"); if ($data->length > 0 && !PrestamoBackupDTO::isEmpty($data->item(0)->nodeValue)) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setPrestamoId($data); $data = $node->getElementsByTagName("prestamoEntradaBackup"); if ($data->length > 0 && !PrestamoBackupDTO::isEmpty($data->item(0)->nodeValue)) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setPrestamoEntradaBackup($data); $data = $node->getElementsByTagName("prestamoSalidaBackup"); if ($data->length > 0 && !PrestamoBackupDTO::isEmpty($data->item(0)->nodeValue)) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setPrestamoSalidaBackup($data); $data = $node->getElementsByTagName("prestamoComentariosBackup"); if ($data->length > 0 && !PrestamoBackupDTO::isEmpty($data->item(0)->nodeValue)) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setPrestamoComentariosBackup($data); $data = $node->getElementsByTagName("prestamoEstudianteBackup"); if ($data->length > 0 && !PrestamoBackupDTO::isEmpty($data->item(0)->nodeValue)) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setPrestamoEstudianteBackup($data); $data = $node->getElementsByTagName("prestamoComputadoraBackup"); if ($data->length > 0 && !PrestamoBackupDTO::isEmpty($data->item(0)->nodeValue)) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setPrestamoComputadoraBackup($data); $data = $node->getElementsByTagName("prestamoBackupFechaBackup"); if ($data->length > 0 && !PrestamoBackupDTO::isEmpty($data->item(0)->nodeValue)) { $data = $data->item(0)->nodeValue; } else { $data = null; } $dao->setPrestamoBackupFechaBackup($data); $daos[] = $dao; } return $daos; }
public function toDTO() { $prestamoBackupDTO = new PrestamoBackupDTO(); $prestamoBackupDTO->setId($this->getId()); $prestamoBackupDTO->setPrestamoId($this->unscapeString($this->getPrestamoId())); $prestamoBackupDTO->setPrestamoEntradaBackup($this->unscapeString($this->getPrestamoEntradaBackup())); $prestamoBackupDTO->setPrestamoSalidaBackup($this->unscapeString($this->getPrestamoSalidaBackup())); $prestamoBackupDTO->setPrestamoComentariosBackup($this->unscapeString($this->getPrestamoComentariosBackup())); $prestamoBackupDTO->setPrestamoEstudianteBackup($this->unscapeString($this->getPrestamoEstudianteBackup())); $prestamoBackupDTO->setPrestamoComputadoraBackup($this->unscapeString($this->getPrestamoComputadoraBackup())); $prestamoBackupDTO->setPrestamoBackupFechaBackup($this->unscapeString($this->getPrestamoBackupFechaBackup())); return $prestamoBackupDTO; }