com.caucho.amber.manager
Class AmberEntityManagerFactory

java.lang.Object
  extended by com.caucho.amber.manager.AmberEntityManagerFactory
All Implemented Interfaces:
HandleAware, java.io.Serializable, EntityManagerFactory

public class AmberEntityManagerFactory
extends java.lang.Object
implements EntityManagerFactory, java.io.Serializable, HandleAware

Amber's EntityManagerFactory container.

See Also:
Serialized Form

Method Summary
 void close()
          Close the factory an any resources.
 EntityManager createEntityManager()
          Create a new EntityManager with TRANSACTION type.
 EntityManager createEntityManager(java.util.Map map)
          Create a new EntityManager with the given properties.
 Cache getCache()
          Returns the entity manager cache
 CriteriaBuilder getCriteriaBuilder()
           
 Metamodel getMetamodel()
           
 PersistenceUnitUtil getPersistenceUnitUtil()
          Returns persistence unit utilities.
 java.util.Map getProperties()
          Returns the properties and values for the factory
 java.util.Set<java.lang.String> getSupportedProperties()
          Returns the supported properties
 boolean isOpen()
          Returns true if the factory is open.
 void setSerializationHandle(java.lang.Object handle)
          Sets the serializable handle
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createEntityManager

public EntityManager createEntityManager()
Create a new EntityManager with TRANSACTION type.

Specified by:
createEntityManager in interface EntityManagerFactory

createEntityManager

public EntityManager createEntityManager(java.util.Map map)
Create a new EntityManager with the given properties.

Specified by:
createEntityManager in interface EntityManagerFactory

close

public void close()
Close the factory an any resources.

Specified by:
close in interface EntityManagerFactory

isOpen

public boolean isOpen()
Returns true if the factory is open.

Specified by:
isOpen in interface EntityManagerFactory

getProperties

public java.util.Map getProperties()
Returns the properties and values for the factory

Specified by:
getProperties in interface EntityManagerFactory
Since:
JPA 2.0

getSupportedProperties

public java.util.Set<java.lang.String> getSupportedProperties()
Returns the supported properties

Since:
JPA 2.0

getCache

public Cache getCache()
Returns the entity manager cache

Specified by:
getCache in interface EntityManagerFactory
Since:
JPA 2.0

setSerializationHandle

public void setSerializationHandle(java.lang.Object handle)
Sets the serializable handle

Specified by:
setSerializationHandle in interface HandleAware

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCriteriaBuilder

public CriteriaBuilder getCriteriaBuilder()
Specified by:
getCriteriaBuilder in interface EntityManagerFactory

getMetamodel

public Metamodel getMetamodel()
Specified by:
getMetamodel in interface EntityManagerFactory

getPersistenceUnitUtil

public PersistenceUnitUtil getPersistenceUnitUtil()
Description copied from interface: EntityManagerFactory
Returns persistence unit utilities.

Specified by:
getPersistenceUnitUtil in interface EntityManagerFactory