Пример #1
0
  private void fillWrappedObject(ReservedItem reservedItem) {

    this.library = reservedItem.getLoanProfileView().getLibraryName();
    this.fromDate = DateFormat.getDefaultInstance(locale).format(reservedItem.getFromDate());
    this.toDate = DateFormat.getDefaultInstance(locale).format(reservedItem.getToDate());
    if (reservedItem.getLoanStatus() == LoanConstants.RESERVE_REQUEST) {
      this.status = MessageFactory.getInstance().getMessage("reserveRequest").getSummary();
    } else if (reservedItem.getLoanStatus() == LoanConstants.CONFIRMED_RESERVE_REQUEST) {
      this.setStatus(
          MessageFactory.getInstance().getMessage("confirmedReserveRequest").getSummary());
    } else if (reservedItem.getLoanStatus() == ReservedItem.REJECTED_RESERVE_REQUEST_BY_STAFF) {
      this.setStatus(
          MessageFactory.getInstance().getMessage("rejectedReserveRequestByStaff").getSummary());
    } else if (reservedItem.getLoanStatus() == ReservedItem.SENT_TO_REPOSITORY_RESERVE_REQUEST) {
      this.setStatus(
          MessageFactory.getInstance().getMessage("sentToCreateLoanRequest").getSummary());
    } else if (reservedItem.getLoanStatus() == ReservedItem.CANCELED_RESERVE_REQUEST_BY_MEMBER) {
      this.setStatus(
          MessageFactory.getInstance().getMessage("canceledReserveRequestByMember").getSummary());
    }

    this.biblioId = reservedItem.getBiblioId();
    this.biblioTitle =
        ((BibliographicRecord)
                NliUnimarcStorageServiceProxy.getInstance()
                    .findById(BibliographicRecord.class, reservedItem.getBiblioId()))
            .getTitle();
    this.volume = reservedItem.getVolume();
    this.sectionAddress = reservedItem.getAddress();
    this.locQualifier = reservedItem.getLocQualifier();
    int intReserveType = reservedItem.getReserveType();
    if (intReserveType == ReservedItem.ONLINE_DELIVERABLE) {
      this.setReserveType(MessageFactory.getInstance().getMessage("remote.reserve").getSummary());
    } else if (intReserveType == ReservedItem.HOURLY_RESERVE) {
      this.setReserveType(MessageFactory.getInstance().getMessage("hourly.reserve").getSummary());
    } else {
      this.setReserveType(MessageFactory.getInstance().getMessage("ordinary.reserve").getSummary());
    }

    this.setProfileTitle(reservedItem.getLoanProfileView().getMemberTitle());
    this.setMembershipNumber(reservedItem.getLoanProfileView().getMembershipNo());
    this.setRequestDate(
        DateFormat.getDefaultInstance(locale).format(reservedItem.getRegisterDate()));
    this.setPriority(reservedItem.getLoanProfileView().getOverallPriority());

    this.reserveStatus = reservedItem.getLoanStatus();
  }
Пример #2
0
 public ReserveRowData(ReservedItem reservedItem, Locale locale) {
   super(locale, reservedItem, reservedItem.getId());
   fillWrappedObject(reservedItem);
 }