コード例 #1
0
 private void assertNote(MobileObject deviceBean, Note note) {
   BeanList deviceNotes = IndexingAPIUtil.readList(deviceBean, "notes");
   for (int j = 0; j < deviceNotes.size(); j++) {
     if (deviceBean.getValue("notes[" + j + "].note").equals(note.getNote())) {
       return;
     }
   }
   assertTrue(
       "Notes(Indexed Property) are not properly synchronized!!! Missing Note=["
           + note.getId()
           + "],["
           + note.getNote()
           + "]",
       false);
 }
コード例 #2
0
 private void assertNote(MobileObject deviceBean, int index, List<Note> notes) {
   if (notes != null) {
     for (Note note : notes) {
       if (deviceBean.getValue("notes[" + index + "].note").equals(note.getNote())) {
         return;
       }
     }
   }
   assertTrue(
       "Notes(Indexed Property) are not properly synchronized!!! Missing Note=["
           + deviceBean.getValue("notes[" + index + "].id")
           + "],["
           + deviceBean.getValue("notes[" + index + "].note")
           + "]",
       false);
 }
コード例 #3
0
  protected void printServerData() throws Exception {
    log.info("Dumping Server Data-----------------------------------------");

    List<Ticket> tickets = this.ticketConnector.getTicketds().readAll();

    for (Ticket ticket : tickets) {
      log.info("Local Bean Id=" + ticket.getTicketId());
      log.info("Ticket Name=" + ticket.getName());

      log.info("Customer DB Id=" + ticket.getCustomerInfo().getId());
      log.info("Customer Id=" + ticket.getCustomerInfo().getCustomerId());
      log.info("Customer Name=" + ticket.getCustomerInfo().getName());
      log.info("Customer Comments=" + ticket.getCustomerInfo().getComments());

      if (ticket.getTechnician() != null) {
        log.info("Technician Id=" + ticket.getTechnician().getId());
        log.info("Employee Id=" + ticket.getTechnician().getEmployeeId());
        log.info("Technician Name=" + ticket.getTechnician().getName());
        log.info("Technician Status=" + ticket.getTechnician().getStatus());
      }

      if (ticket.getEquipment() != null) {
        log.info("Equipment ID=" + ticket.getEquipment().getId());
        log.info("Equipment Name=" + ticket.getEquipment().getName());
      }

      List<Note> notes = ticket.getNotes();
      if (notes != null) {
        for (Note note : notes) {

          log.info("Note ID=" + note.getId());
          log.info("Note=" + note.getNote());
        }
      }

      List<Part> parts = ticket.getParts();
      if (parts != null) {
        for (Part part : parts) {
          log.info("Part ID=" + part.getId());
          log.info("Part=" + part.getName());
        }
      }

      log.info("-----------------------------------------");
    }
  }