Example #1
0
 /**
  * Removes a product.
  *
  * @param id the unique reference for the product
  */
 public void deleteProduct(java.lang.Long id) throws GenericBusinessException {
   com.skip.HibernateQueryHelper hibernateTemplate = new com.skip.HibernateQueryHelper();
   try {
     // First get the data.
     Product bean = (Product) hibernateTemplate.get(Product.class, id);
     hibernateTemplate.delete(bean);
   } finally {
     log.debug("finished deleteProduct(java.lang.Long id)");
   }
 }
Example #2
0
 /**
  * Retrieves a data object from the database by its primary key.
  *
  * @param id the unique reference
  * @return Product the data object
  */
 public com.skip.entity.product.Product getProduct(java.lang.Long id)
     throws GenericBusinessException {
   com.skip.HibernateQueryHelper hibernateTemplate = new com.skip.HibernateQueryHelper();
   try {
     Product bean = (Product) hibernateTemplate.get(Product.class, id);
     return bean;
   } finally {
     log.debug("finished getProduct(java.lang.Long id)");
   }
 }