public Collection<Bill> getByClientID(int clientID) { Collection<Bill> all = _gateway.getAll(); ArrayList<Bill> results = new ArrayList<Bill>(); Client client; for (Bill q : all) { client = q.getClient(); if (client != null && client.getID() == clientID) { results.add(q); } } return results; }
public void update(Bill bill) { _gateway.update(bill); }
public void delete(Bill bill) { if (bill.getType() == TransactionType.Invoice) bill.cancel(); _gateway.delete(bill); }
public boolean insert(Bill bill) { return _gateway.add(bill); }
public Bill getByID(int id) { return _gateway.getByID(id); }
public Collection<Bill> getAll() { return _gateway.getAll(); }
public void deleteProductPackage(Package productPackage) { _gateway.delete(productPackage); }
public void updateProductPackage(Package productPackage) { _gateway.update(productPackage); }
public void insertProductPackage(Package productPackage) { _gateway.add(productPackage); }
public Package getProductPackage(int id) { return _gateway.getByID(id); }
public Collection<Package> getProductPackageList() { return _gateway.getAll(); }