@Override public Supplier getSupplierById(long id) { return supplierRepository.findSupplierById(id); }
/** * Get supplier for given group * * @param group * @return list of suppliers */ @Override public List<Supplier> getAllSuppliersForGroup(Group group) { return supplierRepository.findSuppliersForGroup(group.getId()); }
@Override public void deleteSupplier(long supplierId) { Supplier supplier = supplierRepository.findSupplierById(supplierId); supplierRepository.delete(supplier); }
/** * Get all suppliers in the system * * @return list of suppliers */ @Override public List<Supplier> getAllSuppliers() { return supplierRepository.findAllAuppliers(); }
@Override public Supplier saveSupplier(Supplier supplier) { return supplierRepository.save(supplier); }