public class EntityManagerFactoryProvider
extends java.lang.Object
implements javax.persistence.spi.PersistenceProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP_LOCATION |
static java.lang.String |
CREATE_JDBC_DDL_FILE |
static java.lang.String |
CREATE_ONLY |
static java.lang.String |
DDL_BOTH_GENERATION |
static java.lang.String |
DDL_DATABASE_GENERATION |
static java.lang.String |
DDL_GENERATION |
static java.lang.String |
DDL_GENERATION_MODE |
static java.lang.String |
DDL_SQL_SCRIPT_GENERATION |
static java.lang.String |
DEFAULT_APP_LOCATION |
static java.lang.String |
DEFAULT_CREATE_JDBC_FILE_NAME |
static java.lang.String |
DEFAULT_DDL_GENERATION_MODE |
static java.lang.String |
DEFAULT_DROP_JDBC_FILE_NAME |
static java.lang.String |
DROP_AND_CREATE |
static java.lang.String |
DROP_JDBC_DDL_FILE |
static java.lang.String |
JAVASE_DB_INTERACTION |
static java.lang.String |
NONE |
protected static java.lang.String[][] |
oldPropertyNames |
static java.lang.String |
TOPLINK_ORM_THROW_EXCEPTIONS |
static java.lang.String |
TOPLINK_VALIDATION_ONLY_PROPERTY |
Constructor and Description |
---|
EntityManagerFactoryProvider()
A default constructor is required by all Providers accoring the the EJB 3.0 specification
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
addFileSeperator(java.lang.String appLocation) |
javax.persistence.EntityManagerFactory |
createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo info,
java.util.Map properties)
Called by the container when an EntityManagerFactory
is to be created.
|
javax.persistence.EntityManagerFactory |
createEntityManagerFactory(java.lang.String emName,
java.util.Map properties)
Called by Persistence class when an EntityManagerFactory
is to be created.
|
static void |
createOrReplaceDefaultTables(SchemaManager mgr,
boolean shouldDropFirst) |
static void |
generateDDLFiles(ServerSession session,
java.util.Map props,
boolean inSEmode) |
static java.lang.String |
getConfigPropertyAsString(java.lang.String propertyKey,
java.util.Map overrides) |
static java.lang.String |
getConfigPropertyAsString(java.lang.String propertyKey,
java.util.Map overrides,
java.lang.String defaultValue)
Check the provided map for an object with the given key.
|
static java.lang.String |
getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session) |
static java.lang.String |
getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
java.lang.String defaultValue,
AbstractSession session) |
static java.lang.Object |
getConfigPropertyLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session) |
static void |
login(ServerSession session,
java.util.Map properties)
Logs in to given session.
|
static java.util.Map |
mergeMaps(java.util.Map target,
java.util.Map source)
Merge the properties from the source object into the target object.
|
static void |
runInSEMode(SchemaManager mgr,
boolean shouldDropFirst) |
static void |
translateOldProperties(java.util.Map m,
AbstractSession session)
This is a TEMPORARY method that will be removed.
|
static void |
warnOldProperties(java.util.Map m,
AbstractSession session) |
static void |
writeDDLsToFiles(SchemaManager mgr,
java.lang.String appLocation,
java.lang.String createDDLJdbc,
java.lang.String dropDDLJdbc) |
public static final java.lang.String TOPLINK_ORM_THROW_EXCEPTIONS
public static final java.lang.String TOPLINK_VALIDATION_ONLY_PROPERTY
public static final java.lang.String DDL_GENERATION
public static final java.lang.String CREATE_ONLY
public static final java.lang.String DROP_AND_CREATE
public static final java.lang.String NONE
public static final java.lang.String APP_LOCATION
public static final java.lang.String CREATE_JDBC_DDL_FILE
public static final java.lang.String DROP_JDBC_DDL_FILE
public static final java.lang.String DEFAULT_APP_LOCATION
public static final java.lang.String DEFAULT_CREATE_JDBC_FILE_NAME
public static final java.lang.String DEFAULT_DROP_JDBC_FILE_NAME
public static final java.lang.String JAVASE_DB_INTERACTION
public static final java.lang.String DDL_GENERATION_MODE
public static final java.lang.String DDL_SQL_SCRIPT_GENERATION
public static final java.lang.String DDL_DATABASE_GENERATION
public static final java.lang.String DDL_BOTH_GENERATION
public static final java.lang.String DEFAULT_DDL_GENERATION_MODE
protected static final java.lang.String[][] oldPropertyNames
public EntityManagerFactoryProvider()
public javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String emName, java.util.Map properties)
createEntityManagerFactory
in interface javax.persistence.spi.PersistenceProvider
emName
- The name of the persistence unitmap
- A Map of properties for use by the
persistence provider. These properties may be used to
override the values of the corresponding elements in
the persistence.xml file or specify values for
properties not specified in the persistence.xml.public javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo info, java.util.Map properties)
createContainerEntityManagerFactory
in interface javax.persistence.spi.PersistenceProvider
info
- Metadata for use by the persistence providermap
- A Map of integration-level properties for use
by the persistence provider.public static void login(ServerSession session, java.util.Map properties)
session
- The session to login to.properties
- User specified properties for the persistence unitpublic static void generateDDLFiles(ServerSession session, java.util.Map props, boolean inSEmode)
public static void runInSEMode(SchemaManager mgr, boolean shouldDropFirst)
public static java.lang.String getConfigPropertyAsString(java.lang.String propertyKey, java.util.Map overrides, java.lang.String defaultValue)
propertyKey
- map
- defaultValue
- public static java.lang.String getConfigPropertyAsString(java.lang.String propertyKey, java.util.Map overrides)
public static java.lang.String getConfigPropertyAsStringLogDebug(java.lang.String propertyKey, java.util.Map overrides, java.lang.String defaultValue, AbstractSession session)
public static java.lang.String getConfigPropertyAsStringLogDebug(java.lang.String propertyKey, java.util.Map overrides, AbstractSession session)
public static java.lang.Object getConfigPropertyLogDebug(java.lang.String propertyKey, java.util.Map overrides, AbstractSession session)
public static void createOrReplaceDefaultTables(SchemaManager mgr, boolean shouldDropFirst)
public static void writeDDLsToFiles(SchemaManager mgr, java.lang.String appLocation, java.lang.String createDDLJdbc, java.lang.String dropDDLJdbc)
public static java.lang.String addFileSeperator(java.lang.String appLocation)
public static java.util.Map mergeMaps(java.util.Map target, java.util.Map source)
target
- source
- public static void translateOldProperties(java.util.Map m, AbstractSession session)
Map
- mAbstractSession
- sessionpublic static void warnOldProperties(java.util.Map m, AbstractSession session)