class TaxRateServiceImpl extends SalesManagerEntityServiceImpl<Long, TaxRate>
		implements TaxRateService {

	private TaxRateRepository taxRateRepository;
	
	@Inject
	public TaxRateServiceImpl(TaxRateRepository taxRateRepository) {
		super(taxRateRepository);
		this.taxRateRepository = taxRateRepository;
	}

	@Override
	public List<TaxRate> listByStore(MerchantStore store)
			throws ServiceException {
		return taxRateRepository.findByStore(store.getId());
	}
	
	@Override
	public List<TaxRate> listByStore(MerchantStore store, Language language)
			throws ServiceException {
		return taxRateRepository.findByStoreAndLanguage(store.getId(), language.getId());
	}
	
	
	@Override
	public TaxRate getByCode(String code, MerchantStore store)
			throws ServiceException {
		return taxRateRepository.findByStoreAndCode(store.getId(), code);
	}
	
	@Override
	public List<TaxRate> listByCountryZoneAndTaxClass(Country country, Zone zone, TaxClass taxClass, MerchantStore store, Language language) throws ServiceException {
		return taxRateRepository.findByMerchantAndZoneAndCountryAndLanguage(store.getId(), zone.getId(), country.getId(), language.getId());
	}
	
	@Override
	public List<TaxRate> listByCountryStateProvinceAndTaxClass(Country country, String stateProvince, TaxClass taxClass, MerchantStore store, Language language) throws ServiceException {
		return taxRateRepository.findByMerchantAndProvinceAndCountryAndLanguage(store.getId(), stateProvince, country.getId(), language.getId());
	}
	
	@Override
	public void delete(TaxRate taxRate) throws ServiceException {
		
		taxRateRepository.delete(taxRate);
		
	}
	
	@Override
	public TaxRate saveOrUpdate(TaxRate taxRate) throws ServiceException {<FILL_FUNCTION_BODY>}

	@Override
	public TaxRate getById(Long id, MerchantStore store) throws ServiceException {
		return taxRateRepository.findByStoreAndId(store.getId(), id);
	}
		

	
}

		if(taxRate.getId()!=null && taxRate.getId() > 0) {
			this.update(taxRate);
		} else {
			taxRate = super.saveAndFlush(taxRate);
		}
		return taxRate;
	
<methods>public void <init>(JpaRepository<com.salesmanager.core.model.tax.taxrate.TaxRate,java.lang.Long>) ,public java.lang.Long count() ,public void create(com.salesmanager.core.model.tax.taxrate.TaxRate) throws com.salesmanager.core.business.exception.ServiceException,public void delete(com.salesmanager.core.model.tax.taxrate.TaxRate) throws com.salesmanager.core.business.exception.ServiceException,public void flush() ,public com.salesmanager.core.model.tax.taxrate.TaxRate getById(java.lang.Long) ,public List<com.salesmanager.core.model.tax.taxrate.TaxRate> list() ,public void save(com.salesmanager.core.model.tax.taxrate.TaxRate) throws com.salesmanager.core.business.exception.ServiceException,public void saveAll(Iterable<com.salesmanager.core.model.tax.taxrate.TaxRate>) throws com.salesmanager.core.business.exception.ServiceException,public void update(com.salesmanager.core.model.tax.taxrate.TaxRate) throws com.salesmanager.core.business.exception.ServiceException<variables>private Class<com.salesmanager.core.model.tax.taxrate.TaxRate> objectClass,private JpaRepository<com.salesmanager.core.model.tax.taxrate.TaxRate,java.lang.Long> repository