public class EntityManagerFactoryProvider extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<String,EntityManagerSetupImpl> |
emSetupImpls |
protected static String[][] |
oldPropertyNames |
| Constructor and Description |
|---|
EntityManagerFactoryProvider() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addEntityManagerSetupImpl(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 Object |
getConfigProperty(String propertyKey,
Map overrides) |
protected static Object |
getConfigProperty(String propertyKey,
Map overrides,
boolean useSystemAsDefault) |
protected static Object |
getConfigProperty(String propertyKey,
Map overrides,
Object defaultObj) |
static String |
getConfigPropertyAsString(String propertyKey,
Map overrides)
Get configuration
System property indicated by the specified propertyKey. |
static String |
getConfigPropertyAsString(String propertyKey,
Map overrides,
String defaultValue)
Check the provided map for an object with the given key.
|
protected static String |
getConfigPropertyAsStringLogDebug(String propertyKey,
Map overrides,
AbstractSession session) |
protected static String |
getConfigPropertyAsStringLogDebug(String propertyKey,
Map overrides,
AbstractSession session,
boolean useSystemAsDefault) |
protected static String |
getConfigPropertyAsStringLogDebug(String propertyKey,
Map overrides,
String defaultValue,
AbstractSession session) |
protected static Object |
getConfigPropertyLogDebug(String propertyKey,
Map overrides,
AbstractSession session) |
protected static Object |
getConfigPropertyLogDebug(String propertyKey,
Map overrides,
AbstractSession session,
boolean useSystemAsDefault) |
static Map<String,EntityManagerSetupImpl> |
getEmSetupImpls() |
static EntityManagerSetupImpl |
getEntityManagerSetupImpl(String emName)
Return the setup class for a given entity manager name
|
static boolean |
hasConfigProperty(String propertyKey,
Map overrides) |
static Map |
keepSpecifiedProperties(Map source,
Collection keysToBeKept)
target contains the entries from source with keysToBeKept.
|
protected static void |
login(DatabaseSessionImpl session,
Map properties,
boolean requiresConnection)
Logs in to given session.
|
static Map |
mergeMaps(Map target,
Map source)
Merge the properties from the source object into the target object.
|
static Map |
removeSpecifiedProperties(Map source,
Collection keysToBeRemoved)
Copies source into target, removes from target all keysToBeRemoved.
|
static Map[] |
splitProperties(Map source,
Collection[] keys)
Source Map is divided between Map[] in target.
|
static Map[] |
splitSpecifiedProperties(Map source,
Collection keysToBeKept)
target is a array of two Maps
the first one contains specified properties;
the second all the rest.
|
protected static void |
translateOldProperties(Map m,
AbstractSession session)
This is a TEMPORARY method that will be removed.
|
protected static void |
warnOldProperties(Map m,
AbstractSession session) |
public static final Map<String,EntityManagerSetupImpl> emSetupImpls
protected static final String[][] oldPropertyNames
public static void addEntityManagerSetupImpl(String name, EntityManagerSetupImpl setup)
name - setup - protected static void generateDefaultTables(SchemaManager mgr, EntityManagerSetupImpl.TableCreationType ddlType)
mgr - ddlType - - ddl operation to be performedpublic static String getConfigPropertyAsString(String propertyKey, Map overrides)
public static String getConfigPropertyAsString(String propertyKey, Map overrides, String defaultValue)
propertyKey - overrides - defaultValue - protected static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, AbstractSession session)
protected static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, AbstractSession session, boolean useSystemAsDefault)
protected static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, String defaultValue, AbstractSession session)
protected static Object getConfigPropertyLogDebug(String propertyKey, Map overrides, AbstractSession session)
protected static Object getConfigPropertyLogDebug(String propertyKey, Map overrides, AbstractSession session, boolean useSystemAsDefault)
protected static Object getConfigProperty(String propertyKey, Map overrides, boolean useSystemAsDefault)
protected static Object getConfigProperty(String propertyKey, Map overrides, Object defaultObj)
public static EntityManagerSetupImpl getEntityManagerSetupImpl(String emName)
emName - public static Map<String,EntityManagerSetupImpl> getEmSetupImpls()
protected static void login(DatabaseSessionImpl session, 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 Map mergeMaps(Map target, Map source)
target - source - public static Map removeSpecifiedProperties(Map source, Collection keysToBeRemoved)
source - keysToBeRemoved - public static Map keepSpecifiedProperties(Map source, Collection keysToBeKept)
source - keysToBeKept - public static Map[] splitSpecifiedProperties(Map source, Collection keysToBeKept)
source - keysToBeKept - public static Map[] splitProperties(Map source, Collection[] keys)
source - keys - is array of Maps of size nprotected static void translateOldProperties(Map m, AbstractSession session)
m - session - protected static void warnOldProperties(Map m, AbstractSession session)
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.