Eshop eshop = eshopDAO.findEagerlyById(Eshop.class, eshopId);
if (eshop == null) {
throw new NotExistingEntityException("E-shop with ID " + eshopId + " does not exist.");
}
Product product = productDAO.findByComplexId(Product.class, productId, Eshop.class, eshopId);
if (product == null) {
throw new NotExistingEntityException("Product with ID " + productId + " does not exist.");
}
Product linkedProduct = productDAO.findByComplexId(Product.class, linkedProductId, Eshop.class, linkedEshopId);
if (linkedProduct == null) {
throw new NotExistingEntityException("Product with ID " + linkedProductId + " does not exist.");
}
if (eshopId.equals(linkedEshopId)) {