// public static void createNewTicket() { // The controller passed the action to HardwarePersistenceMapper // if (isHardwareRepair == true) { // } else { // } // } public static void implementHardwarePersistence( String problemDescription, String customerName, String customerAddress, String resolution, String serialNumber, boolean isHardwareRepair, boolean isHardwareUpgrade) { HardwarePersistenceMapper.getInstance() .addNewTicketToModel( problemDescription, customerName, customerAddress, resolution, null, serialNumber, isHardwareRepair, isHardwareUpgrade); HardwarePersistenceMapper.getInstance().dumpModelData(); }
// Get update of total tickets for display on listener's label public static long getTotalTicketsCount() { long ttc = HardwarePersistenceMapper.getInstance().getTicketCount() + SoftwarePersistenceMapper.getInstance().getTicketCount(); return ttc; }
// Add Listeners to SPM and HOM Observables public static void addListenersToSPMHPM(MyObserver obs) { HardwarePersistenceMapper.getInstance().attach(obs); SoftwarePersistenceMapper.getInstance().attach(obs); }
public static String getReport() { String strReport = SoftwarePersistenceMapper.getInstance().getReport() + HardwarePersistenceMapper.getInstance().getReport(); return strReport; }