@Override
  public boolean writeAllBankAccount() throws RemoteException {
    IOHelper io = new IOHelper();
    try {
      io.writeToDisk(filename, innerAccountList);
      return true;
    } catch (IOException e) {

      return false;
    }
  }
Esempio n. 2
0
 public boolean writeAllOrder() throws RemoteException {
   try {
     IOHelper io = new IOHelper();
     io.writeToDisk(orderfilepath, orderlist);
     IOHelper io2 = new IOHelper();
     io2.writeToDisk(nextIDfilepath, orderID);
     return true;
   } catch (Exception e) {
     return false;
   }
 }
  public InnerAccountIO() throws RemoteException {
    super();
    IOHelper io = new IOHelper();
    innerAccountList = new ArrayList<InnerAccountPO>();
    try {
      innerAccountList = (ArrayList<InnerAccountPO>) io.readFromDisk(filename);
    } catch (ClassNotFoundException e) {

    } catch (IOException e) {

    }
  }
Esempio n. 4
0
 public OrderIO() throws RemoteException {
   super();
   orderlist = new ArrayList<OrderPO>();
   IOHelper io = new IOHelper();
   IOHelper io2 = new IOHelper();
   try {
     orderlist = (ArrayList<OrderPO>) io.readFromDisk(orderfilepath);
     orderID = Long.valueOf(String.valueOf(io2.readFromDisk(nextIDfilepath))).longValue();
   } catch (ClassNotFoundException e) {
     e.printStackTrace();
   } catch (IOException e) {
     e.printStackTrace();
   }
 }