|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbr.com.arsmachina.dao.hibernate.BaseHibernateDAO<T,K>
T - the entity class related to this DAO.K - the type of the field that represents the entity class' primary key.public class BaseHibernateDAO<T,K extends Serializable>
Superclass of both ReadableDAOImpl and WriteableDAOImpl.
| Constructor Summary | |
|---|---|
BaseHibernateDAO(Class<T> clasz,
org.hibernate.SessionFactory sessionFactory)
Constructor that takes a Class and a SessionFactory. |
|
BaseHibernateDAO(org.hibernate.SessionFactory sessionFactory)
Constructor that takes a Class and a SessionFactory. |
|
| Method Summary | |
|---|---|
protected org.hibernate.metadata.ClassMetadata |
getClassMetadata()
Returns the ClassMetadata for the corresponding entity class. |
protected Class<T> |
getEntityClass()
Returns the entity class handled by this DAO. |
protected String |
getPrimaryKeyPropertyName()
Returns the name of the id property. |
protected org.hibernate.classic.Session |
getSession()
Returns a Session. |
protected org.hibernate.SessionFactory |
getSessionFactory()
Returns this DAO's SessionFactory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseHibernateDAO(org.hibernate.SessionFactory sessionFactory)
Class and a SessionFactory.
clasz - a Class.sessionFactory - a SessionFactory. It cannot be null.
public BaseHibernateDAO(Class<T> clasz,
org.hibernate.SessionFactory sessionFactory)
Class and a SessionFactory.
clasz - a Class.sessionFactory - a SessionFactory. It cannot be null.| Method Detail |
|---|
protected final Class<T> getEntityClass()
Class.protected org.hibernate.classic.Session getSession()
Session. This implementation returns
SessionFactory.getCurrentSession() and can be overriden if needed.
Session.protected final org.hibernate.SessionFactory getSessionFactory()
SessionFactory.
SessionFactory.protected final org.hibernate.metadata.ClassMetadata getClassMetadata()
ClassMetadata for the corresponding entity class.
ClassMetadata.protected String getPrimaryKeyPropertyName()
String.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||