コード例 #1
0
ファイル: Cheque.java プロジェクト: Nandtel/GearService
 /**
  * Method withDiagnosticUser handle current Cheque object filling it with diagnostic's user-owner
  * and return this edited object
  *
  * @param user is owner entity in diagnostic's bidirectional one-to-many relationship
  * @return this Diagnostic object after editing
  */
 public Cheque withDiagnosticUser(User user) {
   this.setDiagnostics(
       SampleDataService.getSetConsistFrom(
           o -> new Diagnostic().withRandomData().withUser(user).withCheque(this)));
   return this;
 }
コード例 #2
0
ファイル: Cheque.java プロジェクト: Nandtel/GearService
 /**
  * Method withNoteUser handle current Cheque object filling it with note's user-owner and return
  * this edited object
  *
  * @param user is owner entity in note's bidirectional one-to-many relationship
  * @return this Diagnostic object after editing
  */
 public Cheque withNoteUser(User user) {
   this.setNotes(
       SampleDataService.getSetConsistFrom(o -> new Note().withRandomData().withUser(user)));
   return this;
 }
コード例 #3
0
ファイル: Cheque.java プロジェクト: Nandtel/GearService
  /**
   * Method withRandomData handle current Cheque object filling it with random data and return this
   * edited object
   *
   * @return this Cheque object after editing
   */
  public Cheque withRandomData() {
    this.setWarrantyStatus(true);
    this.setReadyStatus(true);
    this.setReturnedToClientStatus(true);
    this.setWithoutRepair(true);
    this.setCustomerName(SampleDataService.getRandomName());
    this.setProductName(SampleDataService.getRandomProduct());
    this.setRepairPeriod(SampleDataService.getRepairPeriod());
    this.setReceiptDate(SampleDataService.getRandomDate());
    this.setModelName(SampleDataService.getRandomModel());
    this.setSerialNumber(SampleDataService.getRandomSerialNumber());
    this.setDefect(SampleDataService.getRandomMalfunction());
    this.setSpecialNotes(SampleDataService.getRandomSpecialNotes());
    this.setRepresentativeName(SampleDataService.getRandomName());
    this.setAddress(SampleDataService.getRandomAddress());
    this.setPhoneNumber(SampleDataService.getRandomPhone());
    this.setEmail(SampleDataService.getRandomEmail());

    this.setComponents(SampleDataService.getSetConsistFrom(o -> new Component().withRandomData()));

    this.setWarrantyDate(SampleDataService.getRandomDate());
    this.setReadyDate(SampleDataService.getRandomDate());
    this.setReturnedToClientDate(SampleDataService.getRandomDate());

    return this;
  }