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

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


org.jboss.seam.framework
Class EntityController

java.lang.Object
  extended by org.jboss.seam.framework.Controller
      extended by org.jboss.seam.framework.PersistenceController<javax.persistence.EntityManager>
          extended by org.jboss.seam.framework.EntityController
All Implemented Interfaces:
Serializable

public class EntityController
extends PersistenceController<javax.persistence.EntityManager>

Base class for controller objects that perform persistence operations using JPA. Adds convenience methods for access to the JPA EntityManager.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
EntityController()
           
 
Method Summary
protected  javax.persistence.Query createNamedQuery(String name)
           
protected  javax.persistence.Query createQuery(String ejbql)
           
protected
<T> T
find(Class<T> clazz, Object id)
           
protected  void flush()
           
 javax.persistence.EntityManager getEntityManager()
           
protected  String getPersistenceContextName()
           
protected
<T> T
getReference(Class<T> clazz, Object id)
           
protected  void lock(Object entity, javax.persistence.LockModeType lockMode)
           
protected
<T> T
merge(T entity)
           
protected  void persist(Object entity)
           
protected  void refresh(Object entity)
           
protected  void remove(Object entity)
           
 void setEntityManager(javax.persistence.EntityManager entityManager)
           
 
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

EntityController

public EntityController()
Method Detail

getEntityManager

public javax.persistence.EntityManager getEntityManager()

setEntityManager

public void setEntityManager(javax.persistence.EntityManager entityManager)

getPersistenceContextName

protected String getPersistenceContextName()
Specified by:
getPersistenceContextName in class PersistenceController<javax.persistence.EntityManager>

createNamedQuery

protected javax.persistence.Query createNamedQuery(String name)

createQuery

protected javax.persistence.Query createQuery(String ejbql)

find

protected <T> T find(Class<T> clazz,
                     Object id)

flush

protected void flush()

getReference

protected <T> T getReference(Class<T> clazz,
                             Object id)

lock

protected void lock(Object entity,
                    javax.persistence.LockModeType lockMode)

merge

protected <T> T merge(T entity)

persist

protected void persist(Object entity)

refresh

protected void refresh(Object entity)

remove

protected void remove(Object entity)