net.craftforge.essential.example.persistence
Class EntityManagerProvider
java.lang.Object
net.craftforge.essential.example.persistence.EntityManagerProvider
public class EntityManagerProvider
- extends Object
This class provides the entity managers associated to the
in-memory database manager responsible for the example
database.
- Since:
- 15.08.11
- Author:
- Christian Bick
|
Method Summary |
static org.hibernate.ejb.Ejb3Configuration |
createConfiguration()
Creates an EJB3 configuration holding the class bindings and naming strategy. |
static javax.persistence.EntityManager |
createEntityManager(String databaseName)
Creates an entity manager for the given database name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityManagerProvider
public EntityManagerProvider()
createEntityManager
public static javax.persistence.EntityManager createEntityManager(String databaseName)
- Creates an entity manager for the given database name. Uses an in-memory
database manager to obtain the entity manager of the associated database.
- Parameters:
databaseName - The database name
- Returns:
- The entity manager
createConfiguration
public static org.hibernate.ejb.Ejb3Configuration createConfiguration()
- Creates an EJB3 configuration holding the class bindings and naming strategy.
- Returns:
- The EJB3 configuration
Copyright © 2011. All Rights Reserved.