|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.laszlomarket.ProductDAO
Provides an interface used to access Product
objects from the
database using Hibernate.
Field Summary | |
private static ProductDAO |
instance
|
private static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
private |
ProductDAO()
|
Method Summary | |
void |
addProduct(Product product)
addProduct() inserts new Product into the database through Hibernate. |
void |
deleteProduct(Product product)
deleteProduct() delete the specified Product from the database through Hibernate. |
static ProductDAO |
getInstance()
getInstance() returns the instance of the ProductDAO singleton. |
java.util.List |
getProduct(Product product)
getProduct() returns Product object from database with given id. |
java.util.List |
getProducts(Product product)
getProducts() returns list of all matching Product objects stored in the database. |
void |
updateProduct(Product product)
updateProduct() updates specfied Product through Hibernate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static org.apache.commons.logging.Log log
private static ProductDAO instance
Constructor Detail |
private ProductDAO()
Method Detail |
public static ProductDAO getInstance()
ProductDAO
singleton.
ProductDAO
singleton.public java.util.List getProduct(Product product)
Product
object from database with given id. If
the product is not found, then null is returned.
Product
with given id, if it exists. Otherwise, returns null.public void updateProduct(Product product)
Product
through Hibernate.
product
- A new Product
to be added.public java.util.List getProducts(Product product)
Product
objects stored in the database.
List
of Product
objects.public void addProduct(Product product)
Product
into the database through Hibernate.
product
- A new Product
to be added.public void deleteProduct(Product product)
Product
from the database through Hibernate.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |