private void assertPart(MobileObject deviceBean, Part part) { BeanList deviceParts = IndexingAPIUtil.readList(deviceBean, "parts"); for (int j = 0; j < deviceParts.size(); j++) { if (deviceBean.getValue("parts[" + j + "].name").equals(part.getName())) { return; } } assertTrue( "Parts(Indexed Property) are not properly synchronized!!! Missing Part=[" + part.getId() + "],[" + part.getName() + "]", false); }
private void assertPart(MobileObject deviceBean, int index, List<Part> parts) { if (parts != null) { for (Part part : parts) { if (deviceBean.getValue("parts[" + index + "].name").equals(part.getName())) { return; } } } assertTrue( "Parts(Indexed Property) are not properly synchronized!!! Missing Part=[" + deviceBean.getValue("parts[" + index + "].id") + "],[" + deviceBean.getValue("parts[" + index + "].name") + "]", false); }
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("-----------------------------------------"); } }