public class EntityManagerFactoryProvider extends Object implements PersistenceProvider
Modifier and Type | Field and Description |
---|---|
static String |
APP_LOCATION |
static String |
CREATE_JDBC_DDL_FILE |
static String |
CREATE_ONLY |
static String |
DDL_BOTH_GENERATION |
static String |
DDL_DATABASE_GENERATION |
static String |
DDL_GENERATION |
static String |
DDL_GENERATION_MODE |
static String |
DDL_SQL_SCRIPT_GENERATION |
static String |
DEFAULT_APP_LOCATION |
static String |
DEFAULT_CREATE_JDBC_FILE_NAME |
static String |
DEFAULT_DDL_GENERATION_MODE |
static String |
DEFAULT_DROP_JDBC_FILE_NAME |
static String |
DROP_AND_CREATE |
static String |
DROP_JDBC_DDL_FILE |
static String |
JAVASE_DB_INTERACTION |
static String |
NONE |
protected static String[][] |
oldPropertyNames |
static String |
TOPLINK_ORM_THROW_EXCEPTIONS |
static 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 String |
addFileSeperator(String appLocation) |
EntityManagerFactory |
createContainerEntityManagerFactory(PersistenceUnitInfo info,
Map properties)
Called by the container when an EntityManagerFactory
is to be created.
|
EntityManagerFactory |
createEntityManagerFactory(String emName,
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,
Map props,
boolean inSEmode) |
static String |
getConfigPropertyAsString(String propertyKey,
Map overrides) |
static String |
getConfigPropertyAsString(String propertyKey,
Map overrides,
String defaultValue)
Check the provided map for an object with the given key.
|
static String |
getConfigPropertyAsStringLogDebug(String propertyKey,
Map overrides,
AbstractSession session) |
static String |
getConfigPropertyAsStringLogDebug(String propertyKey,
Map overrides,
String defaultValue,
AbstractSession session) |
static Object |
getConfigPropertyLogDebug(String propertyKey,
Map overrides,
AbstractSession session) |
static void |
login(ServerSession session,
Map properties)
Logs in to given session.
|
static Map |
mergeMaps(Map target,
Map source)
Merge the properties from the source object into the target object.
|
static void |
runInSEMode(SchemaManager mgr,
boolean shouldDropFirst) |
static void |
translateOldProperties(Map m,
AbstractSession session)
This is a TEMPORARY method that will be removed.
|
static void |
warnOldProperties(Map m,
AbstractSession session) |
static void |
writeDDLsToFiles(SchemaManager mgr,
String appLocation,
String createDDLJdbc,
String dropDDLJdbc) |
public static final String TOPLINK_ORM_THROW_EXCEPTIONS
public static final String TOPLINK_VALIDATION_ONLY_PROPERTY
public static final String DDL_GENERATION
public static final String CREATE_ONLY
public static final String DROP_AND_CREATE
public static final String NONE
public static final String APP_LOCATION
public static final String CREATE_JDBC_DDL_FILE
public static final String DROP_JDBC_DDL_FILE
public static final String DEFAULT_APP_LOCATION
public static final String DEFAULT_CREATE_JDBC_FILE_NAME
public static final String DEFAULT_DROP_JDBC_FILE_NAME
public static final String JAVASE_DB_INTERACTION
public static final String DDL_GENERATION_MODE
public static final String DDL_SQL_SCRIPT_GENERATION
public static final String DDL_DATABASE_GENERATION
public static final String DDL_BOTH_GENERATION
public static final String DEFAULT_DDL_GENERATION_MODE
protected static final String[][] oldPropertyNames
public EntityManagerFactoryProvider()
public EntityManagerFactory createEntityManagerFactory(String emName, Map properties)
createEntityManagerFactory
in interface 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 EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map properties)
createContainerEntityManagerFactory
in interface 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, Map properties)
session
- The session to login to.properties
- User specified properties for the persistence unitpublic static void generateDDLFiles(ServerSession session, Map props, boolean inSEmode)
public static void runInSEMode(SchemaManager mgr, boolean shouldDropFirst)
public static String getConfigPropertyAsString(String propertyKey, Map overrides, String defaultValue)
propertyKey
- map
- defaultValue
- public static String getConfigPropertyAsString(String propertyKey, Map overrides)
public static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, String defaultValue, AbstractSession session)
public static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, AbstractSession session)
public static Object getConfigPropertyLogDebug(String propertyKey, Map overrides, AbstractSession session)
public static void createOrReplaceDefaultTables(SchemaManager mgr, boolean shouldDropFirst)
public static void writeDDLsToFiles(SchemaManager mgr, String appLocation, String createDDLJdbc, String dropDDLJdbc)
public static Map mergeMaps(Map target, Map source)
target
- source
- public static void translateOldProperties(Map m, AbstractSession session)
Map
- mAbstractSession
- sessionpublic static void warnOldProperties(Map m, AbstractSession session)
Copyright © 2023. All rights reserved.