public class EntityManagerProperties extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMPOSITE_UNIT_PROPERTIES
The property may be passed to createEntityManager method of a composite persistence unit
to pass properties to member persistence units.
|
static String |
CONNECTION_POLICY
ConnectionPolicy
Allows to specify an entire ConnectionPolicy.
|
static String |
EXCLUSIVE_CONNECTION_IS_LAZY
Determines when write connection is acquired lazily.
|
static String |
EXCLUSIVE_CONNECTION_MODE
Determines when reads are performed through the write connection.
|
static String |
FLUSH_CLEAR_CACHE
Defines EntityManager cache behavior after a call to flush method
followed by a call to clear method.
|
static String |
JDBC_DRIVER
JDBC Driver class name.
|
static String |
JDBC_PASSWORD
DataSource or JDBC DriverManager password.
|
static String |
JDBC_URL
JDBC Connection String.
|
static String |
JDBC_USER
DataSource or JDBC DriverManager user name.
|
static String |
JOIN_EXISTING_TRANSACTION
Set to "true" this property forces persistence context to read through JTA-managed ("write") connection
in case there is an active transaction.
|
static String |
JTA_DATASOURCE
JTA DataSource.
|
static String |
MULTITENANT_PROPERTY_DEFAULT
The
"eclipselink.tenant-id" property specifies the
default context property used to populate multitenant entities. |
static String |
MULTITENANT_SCHEMA_PROPERTY_DEFAULT
The "
eclipselink.tenant-schema-id " property specifies the
context property used to distinguish tenants when using global schema per tenant
multitenant strategy. |
static String |
NON_JTA_DATASOURCE
NON JTA DataSource.
|
static String |
ORACLE_PROXY_TYPE
This property is used to specify proxy type that should be passed to OarcleConnection.openProxySession method.
|
static String |
ORDER_UPDATES
Deprecated.
since 2.6 replaced by PERSISTENCE_CONTEXT_COMMIT_ORDER
|
static String |
PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT
Specifies that the EntityManager will be closed or not used after commit (not extended).
|
static String |
PERSISTENCE_CONTEXT_COMMIT_ORDER
Defines the ordering of updates and deletes of a set of the same entity type during a commit or flush operation.
|
static String |
PERSISTENCE_CONTEXT_COMMIT_WITHOUT_PERSIST_RULES
Specifies that the EntityManager will search all managed objects and persist any related non-managed
new objects that are found ignoring any absence of CascadeType.PERSIST settings.
|
static String |
PERSISTENCE_CONTEXT_FLUSH_MODE
Allows the EntityManager FlushMode to be set as a persistence property.
|
static String |
PERSISTENCE_CONTEXT_PERSIST_ON_COMMIT
Specifies that the EntityManager will search all managed objects and persist any related non-managed
new objects that are cascade persist.
|
static String |
PERSISTENCE_CONTEXT_REFERENCE_MODE
Specifies whether there should be hard or soft references used within the Persistence Context.
|
static String |
VALIDATE_EXISTENCE
Configures if the existence of an object should be verified on persist(),
otherwise it will assume to be new if not in the persistence context.
|
Constructor and Description |
---|
EntityManagerProperties() |
Modifier and Type | Method and Description |
---|---|
static Set<String> |
getSupportedProperties() |
public static final String JOIN_EXISTING_TRANSACTION
public static final String PERSISTENCE_CONTEXT_REFERENCE_MODE
ReferenceMode
,
Constant Field Valuespublic static final String MULTITENANT_PROPERTY_DEFAULT
"eclipselink.tenant-id"
property specifies the
default context property used to populate multitenant entities.
NOTE: This is merely a default multitenant property than can be used on
its own or with other properties defined by the user. Users are not
obligated to use this property and are free to specify their own.
Example: persistence.xml file
<property name="eclipselink.tenant-id" value="Oracle"/>
Example: property Map
propertiesMap.put(PersistenceUnitProperties.MULTITENANT_PROPERTY_DEFAULT, "Oracle");
public static final String MULTITENANT_SCHEMA_PROPERTY_DEFAULT
eclipselink.tenant-schema-id
" property specifies the
context property used to distinguish tenants when using global schema per tenant
multitenant strategy. It is expected to be set by user when creating an EntityManager
.
Java example:
props.put(PersistenceUnitProperties.MULTITENANT_SCHEMA_PROPERTY_DEFAULT, "Oracle");
public static final String PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT
public static final String PERSISTENCE_CONTEXT_PERSIST_ON_COMMIT
public static final String PERSISTENCE_CONTEXT_COMMIT_WITHOUT_PERSIST_RULES
public static final String PERSISTENCE_CONTEXT_FLUSH_MODE
EntityManager.setFlushMode(javax.persistence.FlushModeType)
,
FlushModeType
,
Constant Field Valuespublic static final String ORACLE_PROXY_TYPE
public static final String EXCLUSIVE_CONNECTION_MODE
ExclusiveConnectionMode
,
Constant Field Valuespublic static final String EXCLUSIVE_CONNECTION_IS_LAZY
public static final String JTA_DATASOURCE
public static final String NON_JTA_DATASOURCE
public static final String JDBC_DRIVER
public static final String JDBC_URL
public static final String JDBC_USER
public static final String JDBC_PASSWORD
public static final String CONNECTION_POLICY
public static final String VALIDATE_EXISTENCE
@Deprecated public static final String ORDER_UPDATES
public static final String PERSISTENCE_CONTEXT_COMMIT_ORDER
By default the commit of a set of the same entity type is ordered by its Id.
Entity type commit order can be modified using a DescriptorCustomizer and the ClassDescriptor.addConstraintDependency() API. Commit order can also be controlled using the EntityManager.flush() API.
Values (case insensitive):
CommitOrderType
,
Constant Field Valuespublic static final String FLUSH_CLEAR_CACHE
FlushClearCache
,
Constant Field Valuespublic static final String COMPOSITE_UNIT_PROPERTIES
"eclipselink.composite-unit.properties" -> (
("memberPu1" -> (
"javax.persistence.jdbc.user" -> "user1",
"javax.persistence.jdbc.password" -> "password1",
"javax.persistence.jdbc.driver" -> "oracle.jdbc.OracleDriver",
"javax.persistence.jdbc.url" -> "jdbc:oracle:thin:@oracle_db_url:1521:db",
) ,
("memberPu2" -> (
"javax.persistence.jdbc.user" -> "user2",
"javax.persistence.jdbc.password" -> "password2"
"javax.persistence.jdbc.driver" -> "com.mysql.jdbc.Driver",
"javax.persistence.jdbc.url" -> "jdbc:mysql://my_sql_db_url:3306/user2",
)
)