public class TaxRateCacheImpl extends java.lang.Object implements TaxRateCache
Modifier and Type | Field and Description |
---|---|
private com.google.common.cache.LoadingCache<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> |
cache |
Constructor and Description |
---|
TaxRateCacheImpl(com.google.common.cache.LoadingCache<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> cache) |
Modifier and Type | Method and Description |
---|---|
int |
getTaxCodeId(java.lang.String shopId,
java.lang.Double percentage)
Gets the identifier of the tax rate with the passed percentage rate.
|
private com.google.common.cache.LoadingCache<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> cache
@Inject public TaxRateCacheImpl(com.google.common.cache.LoadingCache<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> cache)
public int getTaxCodeId(java.lang.String shopId, java.lang.Double percentage) throws TaxRateNotFoundException
TaxRateCache
getTaxCodeId
in interface TaxRateCache
percentage
- The percentage rate of the tax rate.TaxRateNotFoundException
- in case no tax rate was found for the passed percentage.