Esempio n. 1
0
  public Reader(
      Long id,
      String cardNo,
      String password,
      String barCode,
      String readerName,
      Date birthday,
      String sex,
      Float leftMoney,
      String email,
      String contactTel,
      Date entyDate,
      Date effectiveDate,
      Integer borrowedQuantiy,
      Integer totalBQuantity,
      String readerPic,
      String spell,
      String readerDesc,
      Long unitId,
      String unitCode,
      String unitName,
      String unitShortName,
      String certificateId,
      String certificateCode,
      String certificateName,
      Long readerTypeId,
      String readerTypeCode,
      String readerTypeName,
      Integer maxBorrowDays,
      Integer maxBorrowedQuantity,
      Float rent,
      String cardStateId,
      String cardStateCode,
      String cardStateName) {
    this.id = id;
    this.readerName = readerName;
    this.birthday = birthday;
    this.sex = sex;
    this.email = email;
    this.contactTel = contactTel;
    this.leftMoney = leftMoney;
    this.spell = spell;
    this.cardNo = cardNo;
    this.password = password;
    this.barCode = barCode;
    this.entyDate = entyDate;
    this.effectiveDate = effectiveDate;
    this.borrowedQuantiy = borrowedQuantiy;
    this.totalBQuantity = totalBQuantity;
    this.readerPic = readerPic;
    this.readerDesc = readerDesc;

    ReaderUnits readerUnits = new ReaderUnits();
    readerUnits.setUnitId(unitId);
    readerUnits.setUnitcode(unitCode);
    readerUnits.setUnitName(unitName);
    readerUnits.setUnitShortName(unitShortName);
    this.setReaderUnits(readerUnits);

    Certificate certificate = new Certificate();
    certificate.setItemId(certificateId);
    certificate.setItemCode(certificateCode);
    certificate.setItemName(certificateName);
    this.setCertificate(certificate);

    ReaderType readerType = new ReaderType();
    readerType.setId(readerTypeId);
    readerType.setReaderCateCode(readerTypeCode);
    readerType.setReaderCateName(readerTypeName);
    readerType.setMaxBorrowDays(maxBorrowDays);
    readerType.setMaxBorrowedQuantity(maxBorrowedQuantity);
    readerType.setRent(rent);
    this.setReaderType(readerType);

    CardState cardState = new CardState();
    cardState.setItemId(cardStateId);
    cardState.setItemCode(cardStateCode);
    cardState.setItemName(cardStateName);
    this.setCardState(cardState);
  }