public class EntityManagerProperties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.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 java.lang.String |
CONNECTION_POLICY
ConnectionPolicy
Allows to specify an entire ConnectionPolicy.
|
static java.lang.String |
EXCLUSIVE_CONNECTION_IS_LAZY
Determines when write connection is acquired lazily.
|
static java.lang.String |
EXCLUSIVE_CONNECTION_MODE
Determines when reads are performed through the write connection.
|
static java.lang.String |
FLUSH_CLEAR_CACHE
Defines EntityManager cache behavior after a call to flush method
followed by a call to clear method.
|
static java.lang.String |
JDBC_DRIVER
JDBC Driver class name.
|
static java.lang.String |
JDBC_PASSWORD
DataSource or JDBC DriverManager password.
|
static java.lang.String |
JDBC_URL
JDBC Connection String.
|
static java.lang.String |
JDBC_USER
DataSource or JDBC DriverManager user name.
|
static java.lang.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 java.lang.String |
JTA_DATASOURCE
JTA DataSource.
|
static java.lang.String |
MULTITENANT_PROPERTY_DEFAULT
The
"eclipselink.tenant-id" property specifies the
default context property used to populate multitenant entities. |
static java.lang.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 java.lang.String |
NON_JTA_DATASOURCE
NON JTA DataSource.
|
static java.lang.String |
ORACLE_PROXY_TYPE
This property is used to specify proxy type that should be passed to OarcleConnection.openProxySession method.
|
static java.lang.String |
ORDER_UPDATES
Deprecated.
since 2.6 replaced by PERSISTENCE_CONTEXT_COMMIT_ORDER
|
static java.lang.String |
PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT
Specifies that the EntityManager will be closed or not used after commit (not extended).
|
static java.lang.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 java.lang.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 java.lang.String |
PERSISTENCE_CONTEXT_FLUSH_MODE
Allows the EntityManager FlushMode to be set as a persistence property.
|
static java.lang.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 java.lang.String |
PERSISTENCE_CONTEXT_REFERENCE_MODE
Specifies whether there should be hard or soft references used within the Persistence Context.
|
static java.lang.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 java.util.Set<java.lang.String> |
getSupportedProperties() |
public static final java.lang.String JOIN_EXISTING_TRANSACTION
public static final java.lang.String PERSISTENCE_CONTEXT_REFERENCE_MODE
ReferenceMode
,
Constant Field Valuespublic static final java.lang.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 java.lang.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 java.lang.String PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT
public static final java.lang.String PERSISTENCE_CONTEXT_PERSIST_ON_COMMIT
public static final java.lang.String PERSISTENCE_CONTEXT_COMMIT_WITHOUT_PERSIST_RULES
public static final java.lang.String PERSISTENCE_CONTEXT_FLUSH_MODE
public static final java.lang.String ORACLE_PROXY_TYPE
public static final java.lang.String EXCLUSIVE_CONNECTION_MODE
ExclusiveConnectionMode
,
Constant Field Valuespublic static final java.lang.String EXCLUSIVE_CONNECTION_IS_LAZY
public static final java.lang.String JTA_DATASOURCE
public static final java.lang.String NON_JTA_DATASOURCE
public static final java.lang.String JDBC_DRIVER
public static final java.lang.String JDBC_URL
public static final java.lang.String JDBC_USER
public static final java.lang.String JDBC_PASSWORD
public static final java.lang.String CONNECTION_POLICY
public static final java.lang.String VALIDATE_EXISTENCE
@Deprecated public static final java.lang.String ORDER_UPDATES
public static final java.lang.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 java.lang.String FLUSH_CLEAR_CACHE
FlushClearCache
,
Constant Field Valuespublic static final java.lang.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",
)
)