站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.2.1 API 英文版文档

HibernateEntityController (JBoss Seam API Documentation) - JBoss Seam 1.2.1 API 英文版文档


org.jboss.seam.framework
Class HibernateEntityController

java.lang.Object
  extended by org.jboss.seam.framework.Controller
      extended by org.jboss.seam.framework.PersistenceController<org.hibernate.Session>
          extended by org.jboss.seam.framework.HibernateEntityController
All Implemented Interfaces:
Serializable

public class HibernateEntityController
extends PersistenceController<org.hibernate.Session>

Base class for controller objects that perform persistence operations using Hibernate. Adds convenience methods for access to the Hibernate Session object.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
HibernateEntityController()
           
 
Method Summary
protected  org.hibernate.Criteria createCriteria(Class clazz)
           
protected  org.hibernate.Query createQuery(String hql)
           
protected  org.hibernate.SQLQuery createSQLQuery(String sql)
           
protected  void delete(Object entity)
           
protected  org.hibernate.Filter enableFilter(String name)
           
protected  void flush()
           
protected
<T> T
get(Class<T> clazz, Serializable id)
           
protected
<T> T
get(Class<T> clazz, Serializable id, org.hibernate.LockMode lockMode)
           
protected  org.hibernate.Query getNamedQuery(String name)
           
protected  String getPersistenceContextName()
           
 org.hibernate.Session getSession()
           
protected
<T> T
load(Class<T> clazz, Serializable id)
           
protected
<T> T
load(Class<T> clazz, Serializable id, org.hibernate.LockMode lockMode)
           
protected  void lock(Object entity, org.hibernate.LockMode lockMode)
           
protected
<T> T
merge(T entity)
           
protected  void persist(Object entity)
           
protected  void refresh(Object entity)
           
protected  void refresh(Object entity, org.hibernate.LockMode lockMode)
           
 void setSession(org.hibernate.Session session)
           
 
Methods inherited from class org.jboss.seam.framework.PersistenceController
getPersistenceContext, setPersistenceContext
 
Methods inherited from class org.jboss.seam.framework.Controller
addCookie, addFacesMessage, addFacesMessageFromResourceBundle, debug, debug, error, error, failValidation, fatal, fatal, getApplicationContext, getBusinessProcessContext, getComponentInstance, getComponentInstance, getConversation, getConversationContext, getCookie, getEventContext, getEvents, getFacesContext, getFacesMessages, getIdentity, getLog, getMessages, getMethodContext, getPageContext, getRedirect, getSessionContext, getValidator, info, info, interpolate, invalidateSession, isTransactionMarkedRollback, raiseAsynchronousEvent, raiseEvent, raiseTransactionSuccessEvent, render, sendHttpError, sendHttpError, trace, trace, validationFailed, validationSucceeded, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateEntityController

public HibernateEntityController()
Method Detail

getSession

public org.hibernate.Session getSession()

setSession

public void setSession(org.hibernate.Session session)

getPersistenceContextName

protected String getPersistenceContextName()
Specified by:
getPersistenceContextName in class PersistenceController<org.hibernate.Session>

createCriteria

protected org.hibernate.Criteria createCriteria(Class clazz)

createQuery

protected org.hibernate.Query createQuery(String hql)
                                   throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

createSQLQuery

protected org.hibernate.SQLQuery createSQLQuery(String sql)
                                         throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

delete

protected void delete(Object entity)
               throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

enableFilter

protected org.hibernate.Filter enableFilter(String name)

flush

protected void flush()
              throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

get

protected <T> T get(Class<T> clazz,
                    Serializable id,
                    org.hibernate.LockMode lockMode)
         throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

get

protected <T> T get(Class<T> clazz,
                    Serializable id)
         throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

getNamedQuery

protected org.hibernate.Query getNamedQuery(String name)
                                     throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

load

protected <T> T load(Class<T> clazz,
                     Serializable id,
                     org.hibernate.LockMode lockMode)
          throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

load

protected <T> T load(Class<T> clazz,
                     Serializable id)
          throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

lock

protected void lock(Object entity,
                    org.hibernate.LockMode lockMode)
             throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

merge

protected <T> T merge(T entity)
           throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

persist

protected void persist(Object entity)
                throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

refresh

protected void refresh(Object entity,
                       org.hibernate.LockMode lockMode)
                throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

refresh

protected void refresh(Object entity)
                throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException