public List<Product> getAllProducts() {
return getSession().createQuery("from Product order by name").list();
}
public void deleteProduct(Long productId) {
Product product = getProduct(productId);
if (product != null) {
getSession().delete(product);
}
}