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

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


org.jboss.seam.core
Class EntityManagerFactory

java.lang.Object
  extended by org.jboss.seam.core.EntityManagerFactory

@Scope(value=APPLICATION)
@Intercept(value=NEVER)
@Startup(depends="org.jboss.seam.core.microcontainer")
public class EntityManagerFactory
extends Object

A Seam component that boostraps an EntityManagerFactory, for use of JPA outside of Java EE 5 / Embeddable EJB3.

Author:
Gavin King

Constructor Summary
EntityManagerFactory()
           
 
Method Summary
 javax.persistence.EntityManagerFactory getEntityManagerFactory()
           
 String getPersistenceUnitName()
          The persistence unit name
 Map getPersistenceUnitProperties()
          Properties to pass to Persistence.createEntityManagerFactory()
 void setPersistenceUnitName(String persistenceUnitName)
           
 void setPersistenceUnitProperties(Map persistenceUnitProperties)
           
 void shutdown()
           
 void startup(Component component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityManagerFactory

public EntityManagerFactory()
Method Detail

getEntityManagerFactory

@Unwrap
public javax.persistence.EntityManagerFactory getEntityManagerFactory()

startup

@Create
public void startup(Component component)
             throws Exception
Throws:
Exception

shutdown

@Destroy
public void shutdown()

getPersistenceUnitName

public String getPersistenceUnitName()
The persistence unit name


setPersistenceUnitName

public void setPersistenceUnitName(String persistenceUnitName)

getPersistenceUnitProperties

public Map getPersistenceUnitProperties()
Properties to pass to Persistence.createEntityManagerFactory()


setPersistenceUnitProperties

public void setPersistenceUnitProperties(Map persistenceUnitProperties)