Module org.eclipse.persistence.jpa
Class EntityManagerFactoryProvider
java.lang.Object
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider
This is a helper/impl class for the EclipseLink EJB 3.0 provider
 The default constructor can be used to build the provider by reflection, after which it can
 be used to create EntityManagerFactories
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Map<String, EntityManagerSetupImpl> protected static final String[][]
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidaddEntityManagerSetupImpl(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 sessionprotected static voidCalls the appropriate create,replace or alter SchemaManager api.protected static ObjectgetConfigProperty(String propertyKey, Map overrides) protected static ObjectgetConfigProperty(String propertyKey, Map overrides, boolean useSystemAsDefault) protected static ObjectgetConfigProperty(String propertyKey, Map overrides, Object defaultObj) static StringgetConfigPropertyAsString(String propertyKey, Map overrides) Get configurationSystemproperty indicated by the specifiedpropertyKey.static StringgetConfigPropertyAsString(String propertyKey, Map overrides, String defaultValue) Check the provided map for an object with the given key.protected static StringgetConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, String defaultValue, AbstractSession session) protected static StringgetConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, AbstractSession session) protected static StringgetConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, AbstractSession session, boolean useSystemAsDefault) protected static ObjectgetConfigPropertyLogDebug(String propertyKey, Map overrides, AbstractSession session) protected static ObjectgetConfigPropertyLogDebug(String propertyKey, Map overrides, AbstractSession session, boolean useSystemAsDefault) static Map<String, EntityManagerSetupImpl> static EntityManagerSetupImplgetEntityManagerSetupImpl(String emName) Return the setup class for a given entity manager namestatic booleanhasConfigProperty(String propertyKey, Map overrides) static <K,V> Map <K, V> keepSpecifiedProperties(Map<K, V> source, Collection<K> keysToBeKept) target contains the entries from source with keysToBeKept.protected static voidlogin(DatabaseSessionImpl session, Map properties, boolean requiresConnection) Logs in to given session.static <K,V> Map <K, V> Merge the properties from the source object into the target object.static <K,V> Map <K, V> removeSpecifiedProperties(Map<K, V> source, Collection<K> keysToBeRemoved) Copies source into target, removes from target all keysToBeRemoved.static <K,V> Map<K, V>[] splitProperties(Map<K, V> source, Collection<K>[] keys) Source Map is divided between Map[] in target.static <K,V> Map<K, V>[] splitSpecifiedProperties(Map<K, V> source, Collection<K> keysToBeKept) target is a array of two Maps the first one contains specified properties; the second all the rest.protected static voidtranslateOldProperties(Map m, AbstractSession session) This is a TEMPORARY method that will be removed.protected static voidwarnOldProperties(Map m, AbstractSession session) 
- 
Field Details- 
emSetupImpls
- 
oldPropertyNames
 
- 
- 
Constructor Details- 
EntityManagerFactoryProviderpublic EntityManagerFactoryProvider()Default constructor to allow reflection.
 
- 
- 
Method Details- 
addEntityManagerSetupImplAdd an EntityManagerSetupImpl to the cached list These are used to ensure all persistence units that are the same get the same underlying session
- 
generateDefaultTablesprotected static void generateDefaultTables(SchemaManager mgr, EntityManagerSetupImpl.TableCreationType ddlType) Calls the appropriate create,replace or alter SchemaManager api.- Parameters:
- ddlType- - ddl operation to be performed
 
- 
getConfigPropertyAsString
- 
getConfigPropertyAsStringpublic static String getConfigPropertyAsString(String propertyKey, Map overrides, String defaultValue) Check the provided map for an object with the given key. If that object is not available, check the System properties. If it is not available from either location, return the default value.
- 
getConfigPropertyAsStringLogDebugprotected static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, AbstractSession session) 
- 
getConfigPropertyAsStringLogDebugprotected static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, AbstractSession session, boolean useSystemAsDefault) 
- 
getConfigPropertyAsStringLogDebugprotected static String getConfigPropertyAsStringLogDebug(String propertyKey, Map overrides, String defaultValue, AbstractSession session) 
- 
getConfigPropertyLogDebugprotected static Object getConfigPropertyLogDebug(String propertyKey, Map overrides, AbstractSession session) 
- 
getConfigPropertyLogDebugprotected static Object getConfigPropertyLogDebug(String propertyKey, Map overrides, AbstractSession session, boolean useSystemAsDefault) 
- 
hasConfigProperty
- 
getConfigProperty
- 
getConfigProperty
- 
getConfigProperty
- 
getEntityManagerSetupImplReturn the setup class for a given entity manager name
- 
getEmSetupImpls
- 
loginprotected static void login(DatabaseSessionImpl session, Map properties, boolean requiresConnection) Logs in to given session. If user has not specifiedTARGET_DATABASEthe platform would be auto detected- Parameters:
- session- The session to login to.
- properties- User specified properties for the persistence unit
 
- 
mergeMapsMerge the properties from the source object into the target object. If the property exists in both objects, use the one from the target- Returns:
- the target object
 
- 
removeSpecifiedPropertiespublic static <K,V> Map<K,V> removeSpecifiedProperties(Map<K, V> source, Collection<K> keysToBeRemoved) Copies source into target, removes from target all keysToBeRemoved.- Returns:
- the target object
 
- 
keepSpecifiedPropertiestarget contains the entries from source with keysToBeKept.- Returns:
- the target object
 
- 
splitSpecifiedPropertiespublic static <K,V> Map<K,V>[] splitSpecifiedProperties(Map<K, V> source, Collection<K> keysToBeKept) target is a array of two Maps the first one contains specified properties; the second all the rest.- Returns:
- the target object
 
- 
splitPropertiesSource Map is divided between Map[] in target. Target's i-th member contains all source's Map.Entries keys for which are in keys[i] Collection. Target's size equals keys' size + 1: all the source's Map.Entries not found in any of keys Collections go into the last target's map.- Parameters:
- keys- is array of Maps of size n
- Returns:
- the target object is array of Maps of size n+1
 
- 
translateOldPropertiesThis is a TEMPORARY method that will be removed. DON'T USE THIS METHOD - for internal use only.
- 
warnOldProperties
 
-