public class EntityManagerFactoryProvider
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<java.lang.String,EntityManagerSetupImpl> |
emSetupImpls |
protected static java.lang.String[][] |
oldPropertyNames |
| Constructor and Description |
|---|
EntityManagerFactoryProvider() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addEntityManagerSetupImpl(java.lang.String name,
EntityManagerSetupImpl setup)
Add an EntityManagerSetupImpl to the cached list
These are used to ensure all persistence units that are the same get the same underlying session
|
protected static void |
generateDefaultTables(SchemaManager mgr,
EntityManagerSetupImpl.TableCreationType ddlType)
Calls the appropriate create,replace or alter SchemaManager api.
|
protected static java.lang.Object |
getConfigProperty(java.lang.String propertyKey,
java.util.Map overrides) |
protected static java.lang.Object |
getConfigProperty(java.lang.String propertyKey,
java.util.Map overrides,
boolean useSystemAsDefault) |
protected static java.lang.Object |
getConfigProperty(java.lang.String propertyKey,
java.util.Map overrides,
java.lang.Object defaultObj) |
static java.lang.String |
getConfigPropertyAsString(java.lang.String propertyKey,
java.util.Map overrides)
Get configuration
System property indicated by the specified propertyKey. |
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.
|
protected static java.lang.String |
getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session) |
protected static java.lang.String |
getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session,
boolean useSystemAsDefault) |
protected static java.lang.String |
getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
java.lang.String defaultValue,
AbstractSession session) |
protected static java.lang.Object |
getConfigPropertyLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session) |
protected static java.lang.Object |
getConfigPropertyLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session,
boolean useSystemAsDefault) |
static java.util.Map<java.lang.String,EntityManagerSetupImpl> |
getEmSetupImpls() |
static EntityManagerSetupImpl |
getEntityManagerSetupImpl(java.lang.String emName)
Return the setup class for a given entity manager name
|
static boolean |
hasConfigProperty(java.lang.String propertyKey,
java.util.Map overrides) |
static java.util.Map |
keepSpecifiedProperties(java.util.Map source,
java.util.Collection keysToBeKept)
target contains the entries from source with keysToBeKept.
|
protected static void |
login(DatabaseSessionImpl session,
java.util.Map properties,
boolean requiresConnection)
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 java.util.Map |
removeSpecifiedProperties(java.util.Map source,
java.util.Collection keysToBeRemoved)
Copies source into target, removes from target all keysToBeRemoved.
|
static java.util.Map[] |
splitProperties(java.util.Map source,
java.util.Collection[] keys)
Source Map is divided between Map[] in target.
|
static java.util.Map[] |
splitSpecifiedProperties(java.util.Map source,
java.util.Collection keysToBeKept)
target is a array of two Maps
the first one contains specified properties;
the second all the rest.
|
protected static void |
translateOldProperties(java.util.Map m,
AbstractSession session)
This is a TEMPORARY method that will be removed.
|
protected static void |
warnOldProperties(java.util.Map m,
AbstractSession session) |
public static final java.util.Map<java.lang.String,EntityManagerSetupImpl> emSetupImpls
protected static final java.lang.String[][] oldPropertyNames
public static void addEntityManagerSetupImpl(java.lang.String name,
EntityManagerSetupImpl setup)
name - setup - protected static void generateDefaultTables(SchemaManager mgr,
EntityManagerSetupImpl.TableCreationType ddlType)
mgr - ddlType - - ddl operation to be performedpublic static java.lang.String getConfigPropertyAsString(java.lang.String propertyKey,
java.util.Map overrides)
System property indicated by the specified propertyKey.
Property value may be overridden by overrides Map.propertyKey - The name of the configuration System property.overrides - Map with property overrides.String value of the property from overrides Map or value of configuration
System property or null if property identified by propertyKey does not exist.public static java.lang.String getConfigPropertyAsString(java.lang.String propertyKey,
java.util.Map overrides,
java.lang.String defaultValue)
propertyKey - overrides - defaultValue - protected static java.lang.String getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session)
protected static java.lang.String getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session,
boolean useSystemAsDefault)
protected static java.lang.String getConfigPropertyAsStringLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
java.lang.String defaultValue,
AbstractSession session)
protected static java.lang.Object getConfigPropertyLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session)
protected static java.lang.Object getConfigPropertyLogDebug(java.lang.String propertyKey,
java.util.Map overrides,
AbstractSession session,
boolean useSystemAsDefault)
public static boolean hasConfigProperty(java.lang.String propertyKey,
java.util.Map overrides)
protected static java.lang.Object getConfigProperty(java.lang.String propertyKey,
java.util.Map overrides)
protected static java.lang.Object getConfigProperty(java.lang.String propertyKey,
java.util.Map overrides,
boolean useSystemAsDefault)
protected static java.lang.Object getConfigProperty(java.lang.String propertyKey,
java.util.Map overrides,
java.lang.Object defaultObj)
public static EntityManagerSetupImpl getEntityManagerSetupImpl(java.lang.String emName)
emName - public static java.util.Map<java.lang.String,EntityManagerSetupImpl> getEmSetupImpls()
protected static void login(DatabaseSessionImpl session,
java.util.Map properties,
boolean requiresConnection)
TARGET_DATABASE
the platform would be auto detectedsession - The session to login to.properties - User specified properties for the persistence unitpublic static java.util.Map mergeMaps(java.util.Map target,
java.util.Map source)
target - source - public static java.util.Map removeSpecifiedProperties(java.util.Map source,
java.util.Collection keysToBeRemoved)
source - keysToBeRemoved - public static java.util.Map keepSpecifiedProperties(java.util.Map source,
java.util.Collection keysToBeKept)
source - keysToBeKept - public static java.util.Map[] splitSpecifiedProperties(java.util.Map source,
java.util.Collection keysToBeKept)
source - keysToBeKept - public static java.util.Map[] splitProperties(java.util.Map source,
java.util.Collection[] keys)
source - keys - is array of Maps of size nprotected static void translateOldProperties(java.util.Map m,
AbstractSession session)
Map - mAbstractSession - sessionprotected static void warnOldProperties(java.util.Map m,
AbstractSession session)