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

ManagedPersistenceContext (JBoss Seam API Documentation) - JBoss Seam 1.1.6 API 英文版文档


org.jboss.seam.core
Class ManagedPersistenceContext

java.lang.Object
  extended by org.jboss.seam.core.ManagedPersistenceContext
All Implemented Interfaces:
Serializable, EventListener, javax.servlet.http.HttpSessionActivationListener, Mutable, PersistenceContextManager

@Scope(value=CONVERSATION)
@Intercept(value=NEVER)
@Install(value=false)
public class ManagedPersistenceContext
extends Object
implements Serializable, javax.servlet.http.HttpSessionActivationListener, Mutable, PersistenceContextManager

A Seam component that manages a conversation-scoped extended persistence context that can be shared by arbitrary other components.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
ManagedPersistenceContext()
           
 
Method Summary
 void changeFlushMode(FlushModeType flushMode)
           
 boolean clearDirty()
          Get and clear the dirty flag.
 void create(Component component)
           
 void destroy()
           
 String getComponentName()
           
 javax.persistence.EntityManager getEntityManager()
           
 Expressions.ValueBinding<javax.persistence.EntityManagerFactory> getEntityManagerFactory()
          A value binding expression that returns an EntityManagerFactory, for use of JPA outside of Java EE 5 / Embeddable EJB3.
 javax.persistence.EntityManagerFactory getEntityManagerFactoryFromJndiOrValueBinding()
           
 List<Filter> getFilters()
          Hibernate filters to enable automatically
 String getPersistenceUnitJndiName()
          The JNDI name of the EntityManagerFactory, for use of JPA in Java EE 5 / Embeddable EJB3.
 void sessionDidActivate(javax.servlet.http.HttpSessionEvent event)
           
 void sessionWillPassivate(javax.servlet.http.HttpSessionEvent event)
           
 void setEntityManagerFactory(Expressions.ValueBinding<javax.persistence.EntityManagerFactory> entityManagerFactory)
           
protected  void setEntityManagerFlushMode(FlushModeType flushMode)
           
 void setFilters(List<Filter> filters)
           
 void setPersistenceUnitJndiName(String persistenceUnitName)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagedPersistenceContext

public ManagedPersistenceContext()
Method Detail

clearDirty

public boolean clearDirty()
Description copied from interface: Mutable
Get and clear the dirty flag.

Specified by:
clearDirty in interface Mutable
Returns:
true if the instance is dirty and requires replication

create

@Create
public void create(Component component)

getEntityManager

@Unwrap
public javax.persistence.EntityManager getEntityManager()
                                                 throws NamingException,
                                                        SystemException
Throws:
NamingException
SystemException

sessionWillPassivate

public void sessionWillPassivate(javax.servlet.http.HttpSessionEvent event)
Specified by:
sessionWillPassivate in interface javax.servlet.http.HttpSessionActivationListener

sessionDidActivate

public void sessionDidActivate(javax.servlet.http.HttpSessionEvent event)
Specified by:
sessionDidActivate in interface javax.servlet.http.HttpSessionActivationListener

destroy

@Destroy
public void destroy()

getEntityManagerFactoryFromJndiOrValueBinding

public javax.persistence.EntityManagerFactory getEntityManagerFactoryFromJndiOrValueBinding()

getEntityManagerFactory

public Expressions.ValueBinding<javax.persistence.EntityManagerFactory> getEntityManagerFactory()
A value binding expression that returns an EntityManagerFactory, for use of JPA outside of Java EE 5 / Embeddable EJB3.


setEntityManagerFactory

public void setEntityManagerFactory(Expressions.ValueBinding<javax.persistence.EntityManagerFactory> entityManagerFactory)

getPersistenceUnitJndiName

public String getPersistenceUnitJndiName()
The JNDI name of the EntityManagerFactory, for use of JPA in Java EE 5 / Embeddable EJB3.


setPersistenceUnitJndiName

public void setPersistenceUnitJndiName(String persistenceUnitName)

getComponentName

public String getComponentName()

getFilters

public List<Filter> getFilters()
Hibernate filters to enable automatically


setFilters

public void setFilters(List<Filter> filters)

changeFlushMode

public void changeFlushMode(FlushModeType flushMode)
Specified by:
changeFlushMode in interface PersistenceContextManager

setEntityManagerFlushMode

protected void setEntityManagerFlushMode(FlushModeType flushMode)

toString

public String toString()
Overrides:
toString in class Object