Set<GenericValue> taxAuthoritySet = FastSet.newInstance();
if (productStore.get("vatTaxAuthPartyId") == null) {
List<GenericValue> taxAuthorityRawList = delegator.findList("TaxAuthority", EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.EQUALS, productStore.get("vatTaxAuthGeoId")), null, null, null, true);
taxAuthoritySet.addAll(taxAuthorityRawList);
} else {
GenericValue taxAuthority = delegator.findByPrimaryKeyCache("TaxAuthority", UtilMisc.toMap("taxAuthGeoId", productStore.get("vatTaxAuthGeoId"), "taxAuthPartyId", productStore.get("vatTaxAuthPartyId")));
taxAuthoritySet.add(taxAuthority);
}
if (taxAuthoritySet.size() == 0) {
throw new IllegalArgumentException("Could not find any Tax Authories for store with ID [" + productStoreId + "] for tax calculation; the store settings may need to be corrected.");