class ProductDao extends HibernateDao<Product, Long> {

   public Product getProductByUuid(final String uuid)
   {
      return getHibernateTemplate().execute(session -> {
         Query query = session.createQuery("FROM Product WHERE uuid=?");
         query.setParameter(0, uuid, StandardBasicTypes.STRING);
         List list = query.list();
         return (Product) (list.isEmpty() ? null : list.get(0));
      });
   }

}