CorporateCustomerEntity.class, "corporate_customers").add(
Restrictions.eq("vatRegNo", vatRegNo));
result = (CorporateCustomerEntity) cr.uniqueResult();
if (result == null) {
throw new WrongVatRegNoException(
"Corporate customer with vatRegNo = " + vatRegNo
+ "doesn't exist.");
}
return result;