Package org.apache.openjpa.conf
Interface OpenJPAConfiguration
- All Superinterfaces:
BeanInfo,Cloneable,Closeable,Configuration,Serializable
- All Known Subinterfaces:
DistributedConfiguration,DistributedJDBCConfiguration,JDBCConfiguration
- All Known Implementing Classes:
DistributedJDBCConfigurationImpl,JDBCConfigurationImpl,OpenJPAConfigurationImpl,XMLConfiguration
Defines the properties necessary to configure runtime properties and
connect to a data source. There is a 1-1 relation between a configuration
and a
BrokerFactory.
All setter methods that take primitive parameters also have wrapper
setter with the appropriate primitive wrapper. This is so the interface
can be in accordance with the J2EE Connector Architecture.- Author:
- Marc Prud'hommeaux, Abe White
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of logger for messages from the data cache:openjpa.DataCache.static final StringName of logger for enhancement-related messages:openjpa.Enhance.static final StringName of logger for metadata-related messages:openjpa.MetaData.static final StringName of logger for query logging:openjpa.Query.static final StringName of logger for messages from the runtime system:openjpa.Runtime.static final StringName of logger for messages from the development tools:openjpa.Tool.static final StringOption for runtimes that support returning the datastore connection.static final StringOption for runtimes that support collections of embedded relations to other persistence capable objects.static final StringOption for runtimes that support maps of embedded relations to other persistence capable objects.static final StringOption for runtimes that support embedded relations to other persistence capable objects.static final StringOption for runtimes that support application identity.static final StringOption for runtimes that support application identity.static final StringOption for runtimes that support incremental flushing.static final StringOption for runtimes that support returning the datastore connection that is a JDBC Connection.static final StringOption for runtimes that support nontransactional reads.static final StringOption for runtime that can differentiate between null and empty container fields.static final StringOption for runtimes that support optimistic transactions.static final StringOption for enable fire @PostLoad events on merge operationsstatic final StringOption for SQL support.static final StringOption for runtimes that support persistent array fields.static final StringOption for runtimes that support persistent collection fields.static final StringOption for runtimes that support persistent map fields.static final StringOption to enable TCCL if the result class for select new is not found in the entities classloaderstatic final StringOption for runtimes that the autoassign value strategy.static final StringOption for runtimes that the increment value strategy.Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32Fields inherited from interface org.apache.openjpa.lib.conf.Configuration
ATTRIBUTE_ALLOWED_VALUES, ATTRIBUTE_CATEGORY, ATTRIBUTE_INTERFACE, ATTRIBUTE_ORDER, ATTRIBUTE_TYPE, ATTRIBUTE_XML, INIT_STATE_FREEZING, INIT_STATE_FROZEN, INIT_STATE_LIQUID -
Method Summary
Modifier and TypeMethodDescriptionReturn the query function listeners.A comma-separted list of the plugin strings of the queryAggregateListeners to use.Gets the plug-in string ofAuditorspecified in this configuration.Gets the singular instance ofAuditorassociated with this configuration.Whether instances clear their state when entering a transaction.intReturn theAutoClearconstant.A comma-separated list of events which trigger auto-detachment in place of managed states.intTheAutoDetachflags.TheBrokerFactoryclass to use.Return theBrokerFactoryEventManagerassociated with this configuration.The plugin string of theBrokerImplextension to create.Gets the plug-in string that described the policy to distribute cached instances across named partitions of L2 data cache.Gets the policy object that determines distribution of cached instances across named partitions of L2 data cache.Return the cache marshaller listeners.A comma-separted list of the plugin strings specifying theCacheMarshallers to use.Options for configuring callbacks as a String.Options for configuring callbacks.The plugin string for theClassResolverto use for custom class loading.TheClassResolverto use.Backwards compatibility options.Backwards compatibility options.Class name of the non-XA connection driver.The password for the non-XA data store connection.These properties provide any additional information needed to establish non-XA connections.The URL for the non-XA data store connection.The user name for the non-XA data store connection.Class name of the connection driver.The connection factory, possibly from JNDI.The non-XA connection factory.The name for the second data store connection factory.Configuration properties for the non-XA connection factory.The mode of the connection factory in use.The name for the data store connection factory.Configuration properties for the connection factory.The password for the data store connection.These properties provide any additional information needed to establish connections.Specifies the behavior of the broker with respect to data store connections.intReturn the connection retain mode as one of the following symbolic constants:ConnectionRetainModes.CONN_RETAIN_ALWAYSConnectionRetainModes.CONN_RETAIN_TRANSConnectionRetainModes.CONN_RETAIN_DEMANDThe URL for the data store connection.The user name for the data store connection.Optional run a DB action before accessing the database.intdatabase action from the persistence unit.intTheDataCacheto use for level-2 data store caching.The data cache manager manages this configuration's cache instances.The data cache manager manages this configuration's cache instances.Return the String constant that matches theDataCacheModeintDefault data cache timeout.Return the instance specified by the detach state plugin.Similar togetCreateSource()but for dropping the database schema and content.intbooleanReturn whether to generate dynamic data structures where possible for cache and runtime usage.booleanWhether OpenJPA will attempt to dynamically load the enhancement agent.Gets theEncryptionProvider.intGet the size of the batch that will be pre-selected when accessing elements in a query or relationship.Comma-separated list of fetch group names that will be pre-set for all newFetchConfigurations.String[]List of fetch group names that will be pre-set for all newFetchConfigurations.Return the query filter listeners.A comma-separted list of the plugin strings of the queryFilterListeners to use.Get the string configuration of the finder cache.Get the cache of finder queries.Returns whether or not OpenJPA should automatically flush modifications to the data store before executing queries.intReturns one ofQueryFlushModes.FLUSH_TRUE,QueryFlushModes.FLUSH_FALSE, orQueryFlushModes.FLUSH_WITH_CONNECTION, as determined by parsing the string returned bygetFlushBeforeQueries().booleanWhether changes in the current transaction are taken into account when executing queries and iterating extents.Gets the plug-in string that defines instrumentation providers and what they instrument.Gets an instance of the instrumentation manager.The plugin to use for managing inverse relations.Gets the lifecycle event manager instance classname.Gets the lifecycle event manager instance.Can be used to load a set of initial data into the database.The plugin to use for datastore lock management.intThe time to wait for an object lock in milliseconds, or -1 for no timeout.The plugin string for theManagedRuntimeto use for managed environments.The plugin to use for integrating with a managed runtime.The name mapping to use for this data store.intThe maximum relation depth to traverse when eager fetching.A plugin string describing theMetaDataFactoryto use.A plugin string describing theMetaDataRepositoryto use.The metadata repository of managed class information.booleanWhether brokers or their managed objects will be used by multiple concurrent threads.booleanWhether persistent state is accessible outside a transaction by default.booleanWhether persistent state can be modified outside a transaction by default.booleanWhether to use optimistic transactions by default.booleanWhether to attempt to optimize id class copy operations during the enhancement process.The action to take when an orphaned key is detected.The action to take when an orphaned key is detected.booleanWhether to send @PostLoad events on a merge operation.The plugin string for theProxyManagerto use for second class object proxies.TheProxyManagerto use.The plugin to use for level-2 data store query caching.Configuration settings for the query compilation cache to use.Configuration settings for the query compilation cache to use.Gets the configuration of QuerySQLCache.Return PreparedQueryCache used for caching datastore queries.intThe time to wait for a query to execute in milliseconds, or -1 for no timeout.The default read lock level to use during non-optimistic transactions.intThe numeric read lock level.booleanGets whether entity state is to be refreshed fromDataCache.The remote event manager that manages this configuration's remote event listeners.The plugin to use for remote commit notification.Whether to restore initial state on rollback by default.intReturn theRestoreStateconstant.booleanWhether to retain state after a transaction by default.booleanWhether to warn and defer registration instead of throwing an exception when a registered persistent class cannot be processed.Specifies how OpenJPA handles unenhanced types.intReturn the runtime class optimization setting as one of the following symbolic constants:RuntimeUnenhancedClassesModes.SUPPORTEDRuntimeUnenhancedClassesModes.UNSUPPORTEDRuntimeUnenhancedClassesModes.WARNThe plugin to use for savepoint management.Return the configured savepoint manager instance.Similar togetDatabaseAction()but write the generated SQL to files.intPlugin string for the default systemSeq.The default system sequence.Get a name of the Specification.Get the Specification.Return theStoreFacadeTypeRegistryinstance associated with this configuration.Specifies the behavior of the transaction model.Collection<Class<?>>booleanIndicates if theThread#contextClassLoadershould be used as fallback if the result class forselect newis not found by the classloader of the entity.The ValidatorFactory provided by the container or application.Gets the validation groups for pre-persistGets the validation groups for pre-removeGets the validation groups for pre-updateThe bean validation mode to use for managed classes.The Validator provided by the container or created by the runtime.The default write lock level to use during non-optimistic transactions.intThe numeric write lock level.booleanWhether connections are automatically enlisted in global transactions.booleanAffirms if all configured elements are initialized eagerly as opposed to lazily on-demand.booleanReturn whether managed transactions are being used.booleanReturns true if a metaDataRepository has been created for this configuration.newBrokerInstance(String user, String pass) Create a new broker instance with the configured plugin data.Return a new inverse manager instance using the configured plugin settings.Return a new lock manager instance using the configured plugin settings.Create a newMetaDataFactoryto use with a repository.Create a new empty metadata repository of the configured type.Create a remote commit provider from the configured plugin.voidsetAggregateListeners(String listeners) A comma-separted list of the plugin strings of the queryAggregateListeners to use.voidsetAggregateListeners(AggregateListener[] listeners) Set the query function listeners.voidsetAuditor(String s) Sets the plug-in string ofAuditorspecified in this configuration.voidsetAuditorInstance(Auditor auditor) Sets the singular instance ofAuditorassociated with this configuration.voidsetAutoClear(int clear) Whether instances clear their state when entering a transaction.voidsetAutoClear(String clear) Whether instances clear their state when entering a transaction.voidsetAutoDetach(int flags) TheAutoDetachflags.voidsetAutoDetach(String detach) A comma-separated list of events which trigger auto-detachment in place of managed states.voidsetBrokerFactory(String factory) TheBrokerFactoryclass to use.voidsetBrokerImpl(String broker) The plugin string of theBrokerImplextension to create.voidsetCacheDistributionPolicy(String policyPlugin) Sets the plug-in string that describes the policy to distribute cached instances across named partitions of L2 data cache.voidSets the policy object that determines distribution of cached instances across named partitions of L2 data cache.voidsetCacheMarshallers(String marshallers) A comma-separated list of the plugin strings specifying theCacheMarshallers to use.voidsetCallbackOptions(String options) Options for configuring callbacks set as a comma-separated string value pair.voidsetClassResolver(String classResolver) The plugin string for theClassResolverto use for custom class loading.voidsetClassResolver(ClassResolver classResolver) TheClassResolverto use.voidsetCompatibility(String compatibility) Backwards compatibility options.voidsetConnection2DriverName(String driverName) Class name of the non-XA connection driver.voidsetConnection2Password(String connectionPassword) The password for the non-XA data store connection.voidsetConnection2Properties(String props) These properties provide any additional information needed to establish non-XA connections.voidsetConnection2URL(String connectionURL) The URL for the non-XA data store connection.voidsetConnection2UserName(String connectionUserName) The user name for the non-XA data store connection.voidsetConnectionDriverName(String driverName) Class name of the connection driver.voidsetConnectionFactory(Object factory) The connection factory.voidsetConnectionFactory2(Object factory) The non-XA connection factory.voidsetConnectionFactory2Name(String cf2Name) The name for the second data store connection factory.voidConfiguration properties for the non-XA connection factory.voidThe mode of the connection factory in use.voidsetConnectionFactoryModeManaged(boolean managed) Whether connections are automatically enlisted in global transactions.voidsetConnectionFactoryName(String cfName) The name for the data store connection factory.voidConfiguration properties for the connection factory.voidsetConnectionPassword(String connectionPassword) The password for the data store connection.voidsetConnectionProperties(String props) These properties provide any additional information needed to establish connections.voidsetConnectionRetainMode(int mode) Set the connection retain mode as one of the following symbolic constants:ConnectionRetainModes.CONN_RETAIN_ALWAYSConnectionRetainModes.CONN_RETAIN_TRANSConnectionRetainModes.CONN_RETAIN_DEMANDvoidSpecifies the behavior of the broker with respect to data store connections.voidsetConnectionURL(String connectionURL) The URL for the data store connection.voidsetConnectionUserName(String connectionUserName) The user name for the data store connection.voidsetDataCache(String dataCache) TheDataCacheto use for level-2 data store caching.voidThe data cache manager manages this configuration's cache instances.voidsetDataCacheManager(DataCacheManager manager) The data cache manager manages this configuration's cache instances.voidsetDataCacheMode(String mode) Set theDataCacheModevoidsetDataCacheTimeout(int timeout) Default data cache timeout.voidsetDataCacheTimeout(Integer timeout) Wrapper for JCA usage ofsetDataCacheTimeout(int).voidsetDetachState(String detachState) Which field values to include when detaching.voidsetDetachState(DetachOptions detachState) Return the instance specified by the detach state plugin.voidsetDynamicDataStructs(boolean dynamic) Set whether to generate dynamic data structures where possible for cache and runtime usage.voidsetDynamicDataStructs(Boolean dynamic) Wrapper for JCA usage ofsetDynamicDataStructs(boolean).voidsetDynamicEnhancementAgent(boolean dynamic) Sets whether OpenJPA will attempt to dynamically load the enhancement agent.voidsetEncryptionProvider(String className) Sets theEncryptionProvider.voidsetFetchBatchSize(int size) Set the size of the batch that will be pre-selected when accessing elements in a query or relationship.voidsetFetchBatchSize(Integer size) Wrapper for JCA usage ofsetFetchBatchSize(int).voidsetFetchGroups(String groups) Comma-separated list of fetch group names that will be pre-set for all newFetchConfigurations.voidsetFetchGroups(String[] names) List of fetch group names that will be pre-set for all newFetchConfigurations.voidsetFilterListeners(String listeners) A comma-separted list of the plugin strings of the queryFilterListeners to use.voidsetFilterListeners(FilterListener[] listeners) Set the query filter listeners.voidsetFinderCache(String cache) Set the finder cache from a string configuration.voidsetFlushBeforeQueries(int flushBeforeQueries) voidsetFlushBeforeQueries(String flush) Sets whether or not OpenJPA should automatically flush modifications to the data store before executing queries.voidsetIgnoreChanges(boolean ignoreChanges) Whether changes in the current transaction are taken into account when executing queries and iterating extents.voidsetIgnoreChanges(Boolean ignoreChanges) Wrapper for JCA usage ofsetIgnoreChanges(boolean).voidsetInitializeEagerly(boolean flag) Sets whether all configured elements will be initialized eagerly or lazily on-demand.voidsetInstrumentation(String providers) Sets the plug-in string that defines instrumentation providers and what they instrument.voidsetInverseManager(String inverse) The plugin to use for managing inverse relations.voidsetLifecycleEventManager(String eventMgr) Sets the lifecycle event manager instance classname.voidsetLockManager(String lockManager) The plugin to use for datastore lock management.voidsetLockTimeout(int timeout) The time to wait for an object lock in milliseconds, or -1 for no timeout.voidsetLockTimeout(Integer timeout) Wrapper for JCA usage ofsetLockTimeout(int).voidsetManagedRuntime(String managedRuntime) The plugin string for theManagedRuntimeto use for managed environments.voidsetManagedRuntime(ManagedRuntime runtime) The plugin to use for integrating with a managed runtime.voidsetMapping(String mapping) The name mapping to use for this data store.voidsetMaxFetchDepth(int depth) The maximum relation depth to traverse when eager fetching.voidsetMaxFetchDepth(Integer size) Wrapper for JCA usage ofsetMaxFetchDepth(int).voidsetMetaDataFactory(String meta) A plugin string describing theMetaDataFactoryto use.voidsetMetaDataRepository(String meta) A plugin string describing theMetaDataRepositoryto use.voidsetMetaDataRepository(MetaDataRepository mdRepos) The metadata repository of managed class information.voidsetMultithreaded(boolean multithreaded) Whether brokers or their managed objects will be used by multiple concurrent threads.voidsetMultithreaded(Boolean multithreaded) Wrapper for JCA usage ofsetMultithreaded(boolean).voidsetNontransactionalRead(boolean ntRead) Whether persistent state is accessible outside a transaction by default.voidsetNontransactionalRead(Boolean ntRead) Wrapper for JCA usage ofsetNontransactionalRead(boolean).voidsetNontransactionalWrite(boolean ntWrite) Whether persistent state can be modified outside a transaction by default.voidsetNontransactionalWrite(Boolean ntWrite) Wrapper for JCA usage ofsetNontransactionalWrite(boolean).voidsetOptimistic(boolean optimistic) Whether to use optimistic transactions by default.voidsetOptimistic(Boolean optimistic) Wrapper for JCA usage ofsetOptimistic(boolean).voidsetOptimizeIdCopy(boolean optimizeIds) Whether to attempt to optimize id class copy operations during the enhancement process.voidsetOptimizeIdCopy(Boolean optimizeIds) Whether to attempt to optimize id class copy operations during the enhancement process.voidsetOrphanedKeyAction(String action) The action to take when an orphaned key is detected.voidThe action to take when an orphaned key is detected.voidsetPostLoadOnMerge(boolean postLoadOnMerge) Whether to send @PostLoad events on a merge operation.voidsetPostLoadOnMerge(Boolean postLoadOnMerge) Whether to send @PostLoad events on a merge operation.voidsetProxyManager(String proxyManager) The plugin string for theProxyManagerto use for second class object proxies.voidsetProxyManager(ProxyManager manager) TheProxyManagerto use.voidsetQueryCache(String queryCache) The plugin to use for level-2 data store query caching.voidConfiguration settings for the query compilation cache to use.voidsetQuerySQLCache(String config) Sets QuerySQLCache with the given configuration.voidSets QuerySQLCache with the given cache.voidsetQueryTimeout(int timeout) The time to wait for a query to execute in milliseconds, or -1 for no timeout.voidsetReadLockLevel(int level) The numeric read lock level.voidsetReadLockLevel(String level) The default read lock level to use during non-optimistic transactions.voidsetRefreshFromDataCache(boolean refreshFromDataCache) Sets whether entity state is to be refreshed fromDataCache.voidsetRefreshFromDataCache(Boolean refreshFromDataCache) Sets whether entity state is to be refreshed fromDataCache.voidThe remote event manager that manages this configuration's remote event listeners.voidsetRemoteCommitProvider(String remoteCommitProvider) The plugin to use for remote commit notification.voidsetRestoreState(int restoreState) Whether to restore initial state on rollback by default.voidsetRestoreState(String restoreState) Whether to restore initial state on rollback by default.voidsetRetainState(boolean retainState) Whether to retain state after a transaction by default.voidsetRetainState(Boolean retainState) Wrapper for JCA usage ofsetRetainState(boolean).voidsetRetryClassRegistration(boolean warn) Whether to warn and defer registration instead of throwing an exception when a registered persistent class cannot be processed.voidWrapper for JCA usage ofsetRetryClassRegistration(boolean).voidsetRuntimeUnenhancedClasses(int mode) Set the runtime class optimization setting as one of the following symbolic constants:RuntimeUnenhancedClassesModes.SUPPORTEDRuntimeUnenhancedClassesModes.UNSUPPORTEDRuntimeUnenhancedClassesModes.WARNvoidSpecifies how OpenJPA handles unenhanced types.voidsetSavepointManager(String savepointManager) The plugin to use for savepoint management.voidsetSequence(String sequence) Plugin string for the default systemSeq.voidsetSequence(Seq sequence) The default system sequence.voidsetSpecification(String spec) Set the Specification for this configuration.voidSet the Specification for this configuration.voidsetTransactionMode(String mode) Specifies the behavior of the transaction model.voidsetTransactionModeManaged(boolean managed) Set whether managed transactions are being used.voidsetTypesWithoutEnhancement(Collection<Class<?>> typesWithoutEnhancement) voidsetUseTCCLinSelectNew(boolean useTcclForSelectNew) Indicates if theThread#contextClassLoadershould be used as fallback if the result class forselect newis not found by the classloader of the entity.voidsetUseTCCLinSelectNew(Boolean useTcclForSelectNew) Indicates if theThread#contextClassLoadershould be used as fallback if the result class forselect newis not found by the classloader of the entity.voidsetValidationFactory(Object factory) Set the container or application provided ValidatorFactory instance.voidsetValidationGroupPrePersist(String vgPrePersist) Sets the validation groups for pre-persistvoidsetValidationGroupPreRemove(String vgPreRemove) Sets the validation groups for pre-removevoidsetValidationGroupPreUpdate(String vgPreUpdate) Sets the validation groups for pre-updatevoidsetValidationMode(String mode) Set the bean validation mode to use for managed classes.voidSet the container or application provided Validator instance.voidsetWriteLockLevel(int level) The numeric write lock level.voidsetWriteLockLevel(String level) The default write lock level to use during non-optimistic transactions.Return the set of option strings supported by this runtime.Methods inherited from interface java.beans.BeanInfo
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptorsMethods inherited from interface org.apache.openjpa.lib.conf.Configuration
addPropertyChangeListener, addValue, clone, close, fromProperties, getConfigurationLog, getId, getLog, getLog, getLogFactory, getProductName, getPropertyKeys, getPropertyKeys, getUserClassLoader, getValue, getValues, instantiateAll, isReadOnly, removePropertyChangeListener, removeValue, setId, setLog, setLogFactory, setProductName, setReadOnly, setUserClassLoader, toProperties
-
Field Details
-
LOG_METADATA
Name of logger for metadata-related messages:openjpa.MetaData.- See Also:
-
LOG_ENHANCE
Name of logger for enhancement-related messages:openjpa.Enhance.- See Also:
-
LOG_RUNTIME
Name of logger for messages from the runtime system:openjpa.Runtime.- See Also:
-
LOG_QUERY
Name of logger for query logging:openjpa.Query.- See Also:
-
LOG_DATACACHE
Name of logger for messages from the data cache:openjpa.DataCache.- See Also:
-
LOG_TOOL
Name of logger for messages from the development tools:openjpa.Tool.- See Also:
-
OPTION_NONTRANS_READ
Option for runtimes that support nontransactional reads.- See Also:
-
OPTION_OPTIMISTIC
Option for runtimes that support optimistic transactions.- See Also:
-
OPTION_ID_APPLICATION
Option for runtimes that support application identity.- See Also:
-
OPTION_ID_DATASTORE
Option for runtimes that support application identity.- See Also:
-
OPTION_QUERY_SQL
Option for SQL support.- See Also:
-
OPTION_TYPE_COLLECTION
Option for runtimes that support persistent collection fields.- See Also:
-
OPTION_TYPE_MAP
Option for runtimes that support persistent map fields.- See Also:
-
OPTION_TYPE_ARRAY
Option for runtimes that support persistent array fields.- See Also:
-
OPTION_NULL_CONTAINER
Option for runtime that can differentiate between null and empty container fields.- See Also:
-
OPTION_EMBEDDED_RELATION
Option for runtimes that support embedded relations to other persistence capable objects.- See Also:
-
OPTION_EMBEDDED_COLLECTION_RELATION
Option for runtimes that support collections of embedded relations to other persistence capable objects.- See Also:
-
OPTION_EMBEDDED_MAP_RELATION
Option for runtimes that support maps of embedded relations to other persistence capable objects.- See Also:
-
OPTION_INC_FLUSH
Option for runtimes that support incremental flushing.- See Also:
-
OPTION_VALUE_AUTOASSIGN
Option for runtimes that the autoassign value strategy.- See Also:
-
OPTION_VALUE_INCREMENT
Option for runtimes that the increment value strategy.- See Also:
-
OPTION_DATASTORE_CONNECTION
Option for runtimes that support returning the datastore connection.- See Also:
-
OPTION_JDBC_CONNECTION
Option for runtimes that support returning the datastore connection that is a JDBC Connection.- See Also:
-
OPTION_POSTLOAD_ON_MERGE
Option for enable fire @PostLoad events on merge operations- See Also:
-
OPTION_USE_TCCL_IN_SELECT_NEW
Option to enable TCCL if the result class for select new is not found in the entities classloader- See Also:
-
-
Method Details
-
supportedOptions
Collection<String> supportedOptions()Return the set of option strings supported by this runtime. This set is mutable. -
getSpecification
String getSpecification()Get a name of the Specification. Specification determines various important default behaviors. -
getSpecificationInstance
Specification getSpecificationInstance()Get the Specification. Specification determines various important default behaviors.- Since:
- 2.0.0
-
setSpecification
Set the Specification for this configuration. Specification determines various default properties and behavior. For example,compatibilityoptions during runtime. This change will trigger all registered Product Derivations to mutate other configuration properties.- Parameters:
spec- fullname of the specification that possibly encodes major and minor version information. For encoding format- Since:
- 1.1.0
- See Also:
-
setSpecification
Set the Specification for this configuration. Specification determines various default properties and behavior. For example,compatibilityoptions during runtime. This change will trigger all registered Product Derivations to mutate other configuration properties.- Parameters:
spec- fullname of the specification that possibly encodes major and minor version information. For encoding format- Since:
- 2.0.0
- See Also:
-
getClassResolver
String getClassResolver()The plugin string for theClassResolverto use for custom class loading. -
setClassResolver
The plugin string for theClassResolverto use for custom class loading. -
getClassResolverInstance
ClassResolver getClassResolverInstance()TheClassResolverto use. -
setClassResolver
TheClassResolverto use. -
getBrokerFactory
String getBrokerFactory()TheBrokerFactoryclass to use. -
setBrokerFactory
TheBrokerFactoryclass to use. -
getBrokerImpl
String getBrokerImpl()The plugin string of theBrokerImplextension to create. -
setBrokerImpl
The plugin string of theBrokerImplextension to create. -
newBrokerInstance
Create a new broker instance with the configured plugin data. -
getDataCache
String getDataCache()TheDataCacheto use for level-2 data store caching. -
setDataCache
TheDataCacheto use for level-2 data store caching. -
getDataCacheManager
String getDataCacheManager()The data cache manager manages this configuration's cache instances. -
setDataCacheManager
The data cache manager manages this configuration's cache instances. -
getDataCacheManagerInstance
DataCacheManager getDataCacheManagerInstance()The data cache manager manages this configuration's cache instances. The cache manager is created if it has not been set. Once the cache manager has been set/created, all changes to caching configuration must proceed through the cache manager.- Since:
- 0.3.0
-
setDataCacheManager
The data cache manager manages this configuration's cache instances.- Since:
- 0.3.0
-
getDataCacheTimeout
int getDataCacheTimeout()Default data cache timeout.- Since:
- 0.2.5
-
setDataCacheTimeout
void setDataCacheTimeout(int timeout) Default data cache timeout.- Since:
- 0.2.5
-
setDataCacheTimeout
Wrapper for JCA usage ofsetDataCacheTimeout(int).- Since:
- 0.2.5
-
getRefreshFromDataCache
boolean getRefreshFromDataCache()Gets whether entity state is to be refreshed fromDataCache. The entities are never refreshed from DataCache if lock is being applied (e.g. in a pessimistic transaction) and hence this setting only refers to behavior when not locking. This flag can be used to overwrite RetrieveMode.BYPASS. By default, however, this falg is false.- Since:
- 1.2.0
-
setRefreshFromDataCache
void setRefreshFromDataCache(boolean refreshFromDataCache) Sets whether entity state is to be refreshed fromDataCache. The entities are never refreshed from DataCache if lock is being applied (e.g. in a pessimistic transaction) and hence this setting only refers to behavior when not locking.- Since:
- 1.2.0
-
setRefreshFromDataCache
Sets whether entity state is to be refreshed fromDataCache. The entities are never refreshed from DataCache if lock is being applied (e.g. in a pessimistic transaction) and hence this setting only refers to behavior when not locking.- Since:
- 1.2.0
-
getQueryCache
String getQueryCache()The plugin to use for level-2 data store query caching.- Since:
- 0.2.5
-
setQueryCache
The plugin to use for level-2 data store query caching.- Since:
- 0.2.5
-
getDynamicDataStructs
boolean getDynamicDataStructs()Return whether to generate dynamic data structures where possible for cache and runtime usage.- Since:
- 0.3.3
-
setDynamicDataStructs
void setDynamicDataStructs(boolean dynamic) Set whether to generate dynamic data structures where possible for cache and runtime usage.- Since:
- 0.3.3
-
setDynamicDataStructs
Wrapper for JCA usage ofsetDynamicDataStructs(boolean). -
getLockManager
String getLockManager()The plugin to use for datastore lock management.- Since:
- 0.3.1
-
setLockManager
The plugin to use for datastore lock management.- Since:
- 0.3.1
-
newLockManagerInstance
LockManager newLockManagerInstance()Return a new lock manager instance using the configured plugin settings. -
getInverseManager
String getInverseManager()The plugin to use for managing inverse relations.- Since:
- 0.3.2
-
setInverseManager
The plugin to use for managing inverse relations.- Since:
- 0.3.2
-
newInverseManagerInstance
InverseManager newInverseManagerInstance()Return a new inverse manager instance using the configured plugin settings.- Since:
- 0.3.2
-
getSavepointManager
String getSavepointManager()The plugin to use for savepoint management.- Since:
- 0.3.4
-
setSavepointManager
The plugin to use for savepoint management.- Since:
- 0.3.4
-
getSavepointManagerInstance
SavepointManager getSavepointManagerInstance()Return the configured savepoint manager instance. -
getOrphanedKeyAction
String getOrphanedKeyAction()The action to take when an orphaned key is detected.- Since:
- 0.3.2.2
-
setOrphanedKeyAction
The action to take when an orphaned key is detected.- Since:
- 0.3.2.2
-
getOrphanedKeyActionInstance
OrphanedKeyAction getOrphanedKeyActionInstance()The action to take when an orphaned key is detected.- Since:
- 0.3.2.2
-
setOrphanedKeyAction
The action to take when an orphaned key is detected.- Since:
- 0.3.2.2
-
getRemoteCommitProvider
String getRemoteCommitProvider()The plugin to use for remote commit notification.- Since:
- 0.2.5
-
setRemoteCommitProvider
The plugin to use for remote commit notification.- Since:
- 0.2.5
-
newRemoteCommitProviderInstance
RemoteCommitProvider newRemoteCommitProviderInstance()Create a remote commit provider from the configured plugin.- Since:
- 0.3.0
-
getRemoteCommitEventManager
RemoteCommitEventManager getRemoteCommitEventManager()The remote event manager that manages this configuration's remote event listeners.- Since:
- 0.3.0
-
setRemoteCommitEventManager
The remote event manager that manages this configuration's remote event listeners.- Since:
- 0.3.0
-
getTransactionMode
String getTransactionMode()Specifies the behavior of the transaction model. Possible values are:local: Perform transaction operations locally.managed: Use managed environment's global transactions.
- Since:
- 0.2.5
-
setTransactionMode
Specifies the behavior of the transaction model. Possible values are:local: Perform transaction operations locally.managed: Use managed environment's global transactions.
- Since:
- 0.2.5
-
isTransactionModeManaged
boolean isTransactionModeManaged()Return whether managed transactions are being used. -
setTransactionModeManaged
void setTransactionModeManaged(boolean managed) Set whether managed transactions are being used. -
getManagedRuntime
String getManagedRuntime()The plugin string for theManagedRuntimeto use for managed environments. -
setManagedRuntime
The plugin string for theManagedRuntimeto use for managed environments. -
getManagedRuntimeInstance
ManagedRuntime getManagedRuntimeInstance()The plugin to use for integrating with a managed runtime. -
setManagedRuntime
The plugin to use for integrating with a managed runtime. -
getProxyManager
String getProxyManager()The plugin string for theProxyManagerto use for second class object proxies. -
setProxyManager
The plugin string for theProxyManagerto use for second class object proxies. -
getProxyManagerInstance
ProxyManager getProxyManagerInstance()TheProxyManagerto use. -
setProxyManager
TheProxyManagerto use. -
getMapping
String getMapping()The name mapping to use for this data store. -
setMapping
The name mapping to use for this data store. -
getMetaDataFactory
String getMetaDataFactory()A plugin string describing theMetaDataFactoryto use. -
setMetaDataFactory
A plugin string describing theMetaDataFactoryto use. -
newMetaDataFactoryInstance
MetaDataFactory newMetaDataFactoryInstance()Create a newMetaDataFactoryto use with a repository. -
getMetaDataRepository
String getMetaDataRepository()A plugin string describing theMetaDataRepositoryto use. -
setMetaDataRepository
A plugin string describing theMetaDataRepositoryto use. -
getMetaDataRepositoryInstance
MetaDataRepository getMetaDataRepositoryInstance()The metadata repository of managed class information. If no repository has been set, creates one.- Since:
- 0.3.0
-
metaDataRepositoryAvailable
boolean metaDataRepositoryAvailable()Returns true if a metaDataRepository has been created for this configuration.- Since:
- 1.1.0 1.0.1
-
newMetaDataRepositoryInstance
MetaDataRepository newMetaDataRepositoryInstance()Create a new empty metadata repository of the configured type. -
setMetaDataRepository
The metadata repository of managed class information.- Since:
- 0.3.0
-
getConnectionUserName
String getConnectionUserName()The user name for the data store connection. -
setConnectionUserName
The user name for the data store connection. -
getConnectionPassword
String getConnectionPassword()The password for the data store connection. -
setConnectionPassword
The password for the data store connection. -
getConnectionURL
String getConnectionURL()The URL for the data store connection. -
setConnectionURL
The URL for the data store connection. -
getConnectionDriverName
String getConnectionDriverName()Class name of the connection driver. -
setConnectionDriverName
Class name of the connection driver. -
getConnectionFactoryName
String getConnectionFactoryName()The name for the data store connection factory. -
setConnectionFactoryName
The name for the data store connection factory. -
getConnectionFactory
Object getConnectionFactory()The connection factory, possibly from JNDI. -
setConnectionFactory
The connection factory. -
getConnectionProperties
String getConnectionProperties()These properties provide any additional information needed to establish connections. -
setConnectionProperties
These properties provide any additional information needed to establish connections. -
getConnectionFactoryProperties
String getConnectionFactoryProperties()Configuration properties for the connection factory. -
setConnectionFactoryProperties
Configuration properties for the connection factory. -
getConnectionFactoryMode
String getConnectionFactoryMode()The mode of the connection factory in use. Available options are:- local: OpenJPA controls the connections.
- managed: Connections are automatically enlisted in the current global transaction by an application server.
-
setConnectionFactoryMode
The mode of the connection factory in use. Available options are:- local: OpenJPA controls the connections.
- managed: Connections are automatically enlisted in the current global transaction by an application server.
-
isConnectionFactoryModeManaged
boolean isConnectionFactoryModeManaged()Whether connections are automatically enlisted in global transactions. -
setConnectionFactoryModeManaged
void setConnectionFactoryModeManaged(boolean managed) Whether connections are automatically enlisted in global transactions. -
getConnection2UserName
String getConnection2UserName()The user name for the non-XA data store connection. -
setConnection2UserName
The user name for the non-XA data store connection. -
getConnection2Password
String getConnection2Password()The password for the non-XA data store connection. -
setConnection2Password
The password for the non-XA data store connection. -
getConnection2URL
String getConnection2URL()The URL for the non-XA data store connection. -
setConnection2URL
The URL for the non-XA data store connection. -
getConnection2DriverName
String getConnection2DriverName()Class name of the non-XA connection driver. -
setConnection2DriverName
Class name of the non-XA connection driver. -
getConnectionFactory2Name
String getConnectionFactory2Name()The name for the second data store connection factory. -
setConnectionFactory2Name
The name for the second data store connection factory. -
getConnectionFactory2
Object getConnectionFactory2()The non-XA connection factory. -
setConnectionFactory2
The non-XA connection factory. -
getConnection2Properties
String getConnection2Properties()These properties provide any additional information needed to establish non-XA connections.- Since:
- 0.3.0
-
setConnection2Properties
These properties provide any additional information needed to establish non-XA connections.- Since:
- 0.3.0
-
getConnectionFactory2Properties
String getConnectionFactory2Properties()Configuration properties for the non-XA connection factory.- Since:
- 0.2.5
-
setConnectionFactory2Properties
Configuration properties for the non-XA connection factory.- Since:
- 0.2.5
-
getOptimistic
boolean getOptimistic()Whether to use optimistic transactions by default. -
setOptimistic
void setOptimistic(boolean optimistic) Whether to use optimistic transactions by default. -
setOptimistic
Wrapper for JCA usage ofsetOptimistic(boolean). -
getRetainState
boolean getRetainState()Whether to retain state after a transaction by default. -
setRetainState
void setRetainState(boolean retainState) Whether to retain state after a transaction by default. -
setRetainState
Wrapper for JCA usage ofsetRetainState(boolean). -
getAutoClear
String getAutoClear()Whether instances clear their state when entering a transaction. -
setAutoClear
Whether instances clear their state when entering a transaction. -
getAutoClearConstant
int getAutoClearConstant()Return theAutoClearconstant. -
setAutoClear
void setAutoClear(int clear) Whether instances clear their state when entering a transaction. -
getRestoreState
String getRestoreState()Whether to restore initial state on rollback by default. -
setRestoreState
Whether to restore initial state on rollback by default. -
getRestoreStateConstant
int getRestoreStateConstant()Return theRestoreStateconstant. -
setRestoreState
void setRestoreState(int restoreState) Whether to restore initial state on rollback by default. -
getIgnoreChanges
boolean getIgnoreChanges()Whether changes in the current transaction are taken into account when executing queries and iterating extents. -
setIgnoreChanges
void setIgnoreChanges(boolean ignoreChanges) Whether changes in the current transaction are taken into account when executing queries and iterating extents. -
setIgnoreChanges
Wrapper for JCA usage ofsetIgnoreChanges(boolean). -
getAutoDetach
String getAutoDetach()A comma-separated list of events which trigger auto-detachment in place of managed states. Possible values are:commit: When the current transaction commits.close: When the broker closes.nontx-read: When instances are read non-transactionally.
-
setAutoDetach
A comma-separated list of events which trigger auto-detachment in place of managed states. Possible values are:commit: When the current transaction commits.close: When the broker closes.nontx-read: When instances are read non-transactionally.
-
getAutoDetachConstant
int getAutoDetachConstant()TheAutoDetachflags. -
setAutoDetach
void setAutoDetach(int flags) TheAutoDetachflags. -
setDetachState
Which field values to include when detaching. -
getDetachStateInstance
DetachOptions getDetachStateInstance()Return the instance specified by the detach state plugin. -
setDetachState
Return the instance specified by the detach state plugin. -
getNontransactionalRead
boolean getNontransactionalRead()Whether persistent state is accessible outside a transaction by default. -
setNontransactionalRead
void setNontransactionalRead(boolean ntRead) Whether persistent state is accessible outside a transaction by default. -
setNontransactionalRead
Wrapper for JCA usage ofsetNontransactionalRead(boolean). -
getNontransactionalWrite
boolean getNontransactionalWrite()Whether persistent state can be modified outside a transaction by default. -
setNontransactionalWrite
void setNontransactionalWrite(boolean ntWrite) Whether persistent state can be modified outside a transaction by default. -
setNontransactionalWrite
Wrapper for JCA usage ofsetNontransactionalWrite(boolean). -
getMultithreaded
boolean getMultithreaded()Whether brokers or their managed objects will be used by multiple concurrent threads. -
setMultithreaded
void setMultithreaded(boolean multithreaded) Whether brokers or their managed objects will be used by multiple concurrent threads. -
setMultithreaded
Wrapper for JCA usage ofsetMultithreaded(boolean). -
getFetchBatchSize
int getFetchBatchSize()Get the size of the batch that will be pre-selected when accessing elements in a query or relationship. Use -1 to prefetch all results. -
setFetchBatchSize
void setFetchBatchSize(int size) Set the size of the batch that will be pre-selected when accessing elements in a query or relationship. Use -1 to prefetch all results. -
setFetchBatchSize
Wrapper for JCA usage ofsetFetchBatchSize(int). -
getMaxFetchDepth
int getMaxFetchDepth()The maximum relation depth to traverse when eager fetching. Use -1 for no limit. -
setMaxFetchDepth
void setMaxFetchDepth(int depth) The maximum relation depth to traverse when eager fetching. Use -1 for no limit. -
setMaxFetchDepth
Wrapper for JCA usage ofsetMaxFetchDepth(int). -
getFetchGroups
String getFetchGroups()Comma-separated list of fetch group names that will be pre-set for all newFetchConfigurations.- Since:
- 0.2.5
-
setFetchGroups
Comma-separated list of fetch group names that will be pre-set for all newFetchConfigurations.- Since:
- 0.2.5
-
getFetchGroupsList
String[] getFetchGroupsList()List of fetch group names that will be pre-set for all newFetchConfigurations. -
setFetchGroups
List of fetch group names that will be pre-set for all newFetchConfigurations. -
getFlushBeforeQueries
String getFlushBeforeQueries()Returns whether or not OpenJPA should automatically flush modifications to the data store before executing queries.- Since:
- 0.2.5
-
setFlushBeforeQueries
Sets whether or not OpenJPA should automatically flush modifications to the data store before executing queries.- Since:
- 0.2.5
-
getFlushBeforeQueriesConstant
int getFlushBeforeQueriesConstant()Returns one ofQueryFlushModes.FLUSH_TRUE,QueryFlushModes.FLUSH_FALSE, orQueryFlushModes.FLUSH_WITH_CONNECTION, as determined by parsing the string returned bygetFlushBeforeQueries().- Since:
- 0.2.5
-
setFlushBeforeQueries
void setFlushBeforeQueries(int flushBeforeQueries) Set to one ofQueryFlushModes.FLUSH_TRUE,QueryFlushModes.FLUSH_FALSE, orQueryFlushModes.FLUSH_WITH_CONNECTION.- Since:
- 0.2.5
-
getLockTimeout
int getLockTimeout()The time to wait for an object lock in milliseconds, or -1 for no timeout.- Since:
- 0.3.1
-
setLockTimeout
void setLockTimeout(int timeout) The time to wait for an object lock in milliseconds, or -1 for no timeout.- Since:
- 0.3.1
-
setLockTimeout
Wrapper for JCA usage ofsetLockTimeout(int).- Since:
- 0.3.1
-
getQueryTimeout
int getQueryTimeout()The time to wait for a query to execute in milliseconds, or -1 for no timeout.- Since:
- 2.0.0
-
setQueryTimeout
void setQueryTimeout(int timeout) The time to wait for a query to execute in milliseconds, or -1 for no timeout.- Since:
- 0.3.1
-
getReadLockLevel
String getReadLockLevel()The default read lock level to use during non-optimistic transactions. Defaults toread.- Since:
- 0.3.1
-
setReadLockLevel
The default read lock level to use during non-optimistic transactions. Defaults toread.- Since:
- 0.3.1
-
getReadLockLevelConstant
int getReadLockLevelConstant()The numeric read lock level.- Since:
- 0.3.1
-
setReadLockLevel
void setReadLockLevel(int level) The numeric read lock level.- Since:
- 0.3.1
-
getWriteLockLevel
String getWriteLockLevel()The default write lock level to use during non-optimistic transactions. Defaults towrite.- Since:
- 0.3.1
-
setWriteLockLevel
The default write lock level to use during non-optimistic transactions. Defaults towrite.- Since:
- 0.3.1
-
getWriteLockLevelConstant
int getWriteLockLevelConstant()The numeric write lock level.- Since:
- 0.3.1
-
setWriteLockLevel
void setWriteLockLevel(int level) The numeric write lock level.- Since:
- 0.3.1
-
getSequence
String getSequence()Plugin string for the default systemSeq. -
setSequence
Plugin string for the default systemSeq. -
getSequenceInstance
Seq getSequenceInstance()The default system sequence. -
setSequence
The default system sequence. -
getConnectionRetainMode
String getConnectionRetainMode()Specifies the behavior of the broker with respect to data store connections. Possible values are:always: Each broker obtains a single connection and uses it until the broker is closed.transaction: A connection is obtained when each transaction begins (optimistic or datastore), and is released when the transaction completes.on-demand: Connections are obtained only when needed. This is the default mode. It is equivalent to the previous option when datastore transactions are used. For optimistic transactions, though, it means that a connection will be retained only for the duration of the data store commit process.
- Since:
- 0.2.5
-
setConnectionRetainMode
Specifies the behavior of the broker with respect to data store connections. Possible values are:always: Each broker obtains a single connection and uses it until the broker is closed.transaction: A connection is obtained when each transaction begins (optimistic or datastore), and is released when the transaction completes.on-demand: Connections are obtained only when needed. This is the default mode. It is equivalent to the previous option when datastore transactions are used. For optimistic transactions, though, it means that a connection will be retained only for the duration of the data store commit process.
- Since:
- 0.2.5
-
getConnectionRetainModeConstant
int getConnectionRetainModeConstant()Return the connection retain mode as one of the following symbolic constants: -
setConnectionRetainMode
void setConnectionRetainMode(int mode) Set the connection retain mode as one of the following symbolic constants: -
getFilterListeners
String getFilterListeners()A comma-separted list of the plugin strings of the queryFilterListeners to use. -
setFilterListeners
A comma-separted list of the plugin strings of the queryFilterListeners to use. -
getFilterListenerInstances
FilterListener[] getFilterListenerInstances()Return the query filter listeners. If none have been set explicitly, this method instantiates the listeners from the set plugin list. -
setFilterListeners
Set the query filter listeners. Overrides the list of listener classes. -
getAggregateListeners
String getAggregateListeners()A comma-separted list of the plugin strings of the queryAggregateListeners to use. -
setAggregateListeners
A comma-separted list of the plugin strings of the queryAggregateListeners to use. -
getAggregateListenerInstances
AggregateListener[] getAggregateListenerInstances()Return the query function listeners. If none have been set explicitly, this method instantiates the listeners from the set plugin list. -
setAggregateListeners
Set the query function listeners. Overrides the list of listener classes. -
getRetryClassRegistration
boolean getRetryClassRegistration()Whether to warn and defer registration instead of throwing an exception when a registered persistent class cannot be processed. Should only be set to true in complex classloader topologies. Defaults tofalse.- Since:
- 0.3.2.3
-
setRetryClassRegistration
void setRetryClassRegistration(boolean warn) Whether to warn and defer registration instead of throwing an exception when a registered persistent class cannot be processed. Should only be set to true in complex classloader topologies. Defaults tofalse.- Since:
- 0.3.2.3
-
setRetryClassRegistration
Wrapper for JCA usage ofsetRetryClassRegistration(boolean).- Since:
- 0.3.2.3
-
getCompatibility
String getCompatibility()Backwards compatibility options. -
setCompatibility
Backwards compatibility options. -
getCompatibilityInstance
Compatibility getCompatibilityInstance()Backwards compatibility options. -
getCallbackOptions
String getCallbackOptions()Options for configuring callbacks as a String.- Since:
- 2.0.0
-
getCallbackOptionsInstance
CallbackOptions getCallbackOptionsInstance()Options for configuring callbacks.- Since:
- 2.0.0
-
setCallbackOptions
Options for configuring callbacks set as a comma-separated string value pair.- Since:
- 2.0.0
-
getQueryCompilationCache
String getQueryCompilationCache()Configuration settings for the query compilation cache to use.- Since:
- 0.9.6
- See Also:
-
setQueryCompilationCache
Configuration settings for the query compilation cache to use.- Since:
- 0.9.6
- See Also:
-
getQueryCompilationCacheInstance
Map getQueryCompilationCacheInstance()Configuration settings for the query compilation cache to use.- Since:
- 0.9.6
- See Also:
-
getStoreFacadeTypeRegistry
StoreFacadeTypeRegistry getStoreFacadeTypeRegistry()Return theStoreFacadeTypeRegistryinstance associated with this configuration. -
getBrokerFactoryEventManager
BrokerFactoryEventManager getBrokerFactoryEventManager()Return theBrokerFactoryEventManagerassociated with this configuration.- Since:
- 1.0.0
-
getRuntimeUnenhancedClasses
String getRuntimeUnenhancedClasses()Specifies how OpenJPA handles unenhanced types. Possible values are:supported: Runtime optimization of persistent types is available. This is the defaultunsupported: Runtime optimization of persistent types is not available. An exception will be thrown if the system loads with persistent types that are not enhanced.warn: Runtime optimization of persistent types is not available, but no exception will be thrown initially. A warning will be logged instead. It is likely that the system will fail at a later point. This might be suitable for environments with complex classloader configurations.
- Since:
- 1.0.0
-
setRuntimeUnenhancedClasses
Specifies how OpenJPA handles unenhanced types.- Since:
- 1.0.0
-
getRuntimeUnenhancedClassesConstant
int getRuntimeUnenhancedClassesConstant()Return the runtime class optimization setting as one of the following symbolic constants:- Since:
- 1.0.0
-
setRuntimeUnenhancedClasses
void setRuntimeUnenhancedClasses(int mode) Set the runtime class optimization setting as one of the following symbolic constants:- Since:
- 1.0.0
-
getDynamicEnhancementAgent
boolean getDynamicEnhancementAgent()Whether OpenJPA will attempt to dynamically load the enhancement agent. -
setDynamicEnhancementAgent
void setDynamicEnhancementAgent(boolean dynamic) Sets whether OpenJPA will attempt to dynamically load the enhancement agent. -
getCacheMarshallers
String getCacheMarshallers()A comma-separted list of the plugin strings specifying theCacheMarshallers to use.- Since:
- 1.1.0
-
setCacheMarshallers
A comma-separated list of the plugin strings specifying theCacheMarshallers to use.- Since:
- 1.1.0
-
getCacheMarshallerInstances
Map<String,CacheMarshaller> getCacheMarshallerInstances()Return the cache marshaller listeners.- Since:
- 1.1.0
-
isInitializeEagerly
boolean isInitializeEagerly()Affirms if all configured elements are initialized eagerly as opposed to lazily on-demand.- Since:
- 1.3.0
-
setInitializeEagerly
void setInitializeEagerly(boolean flag) Sets whether all configured elements will be initialized eagerly or lazily on-demand.- Since:
- 1.3.0
-
getQuerySQLCacheInstance
PreparedQueryCache getQuerySQLCacheInstance()Return PreparedQueryCache used for caching datastore queries.- Since:
- 2.0.0
-
getQuerySQLCache
String getQuerySQLCache()Gets the configuration of QuerySQLCache.- Since:
- 2.0.0
-
setQuerySQLCache
Sets QuerySQLCache with the given cache.- Since:
- 2.0.0
-
setQuerySQLCache
Sets QuerySQLCache with the given configuration.- Since:
- 2.0.0
-
getFinderCacheInstance
FinderCache getFinderCacheInstance()Get the cache of finder queries.- Since:
- 2.0.0
-
getFinderCache
String getFinderCache()Get the string configuration of the finder cache.- Since:
- 2.0.0
-
setFinderCache
Set the finder cache from a string configuration.- Since:
- 2.0.0
-
getValidationMode
String getValidationMode()The bean validation mode to use for managed classes. Defaults toAUTO.- Since:
- 2.0.0
-
setValidationMode
Set the bean validation mode to use for managed classes. If not set, defaults toAUTO.- Since:
- 2.0.0
-
getValidationFactoryInstance
Object getValidationFactoryInstance()The ValidatorFactory provided by the container or application. Defaults tonull.- Since:
- 2.0.0
-
setValidationFactory
Set the container or application provided ValidatorFactory instance. If not set, defaults tonull.- Since:
- 2.0.0
-
getValidatorInstance
Object getValidatorInstance()The Validator provided by the container or created by the runtime. Defaults tonull.- Since:
- 2.0.0
-
setValidatorInstance
Set the container or application provided Validator instance. If not set, defaults tonull.- Since:
- 2.0.0
-
getLifecycleEventManager
String getLifecycleEventManager()Gets the lifecycle event manager instance classname.- Since:
- 2.0.0
-
getLifecycleEventManagerInstance
LifecycleEventManager getLifecycleEventManagerInstance()Gets the lifecycle event manager instance.- Since:
- 2.0.0
-
setLifecycleEventManager
Sets the lifecycle event manager instance classname.- Since:
- 2.0.0
-
getValidationGroupPrePersist
String getValidationGroupPrePersist()Gets the validation groups for pre-persist- Since:
- 2.0.0
-
setValidationGroupPrePersist
Sets the validation groups for pre-persist- Since:
- 2.0.0
-
getValidationGroupPreUpdate
String getValidationGroupPreUpdate()Gets the validation groups for pre-update- Since:
- 2.0.0
-
setValidationGroupPreUpdate
Sets the validation groups for pre-update- Since:
- 2.0.0
-
getValidationGroupPreRemove
String getValidationGroupPreRemove()Gets the validation groups for pre-remove- Since:
- 2.0.0
-
setValidationGroupPreRemove
Sets the validation groups for pre-remove- Since:
- 2.0.0
-
setEncryptionProvider
Sets theEncryptionProvider. -
getEncryptionProvider
EncryptionProvider getEncryptionProvider()Gets theEncryptionProvider.- Returns:
- EncryptionProvider
-
setDataCacheMode
Set theDataCacheMode- Parameters:
mode- One of the Sting constants fromDataCacheMode- Since:
- 2.0.0
-
getDataCacheMode
String getDataCacheMode()Return the String constant that matches theDataCacheMode- Returns:
- DataCacheMode
- Since:
- 2.0.0
-
getCacheDistributionPolicyInstance
CacheDistributionPolicy getCacheDistributionPolicyInstance()Gets the policy object that determines distribution of cached instances across named partitions of L2 data cache.- Returns:
- an implementation of
CacheDistributionPolicy. - Since:
- 2.0.0
-
setCacheDistributionPolicyInstance
Sets the policy object that determines distribution of cached instances across named partitions of L2 data cache.- Parameters:
policy- a non-null implementation ofCacheDistributionPolicy.- Since:
- 2.0.0
-
getCacheDistributionPolicy
String getCacheDistributionPolicy()Gets the plug-in string that described the policy to distribute cached instances across named partitions of L2 data cache.- Returns:
- a plug-in string for
CacheDistributionPolicy. - Since:
- 2.0.0
-
setCacheDistributionPolicy
Sets the plug-in string that describes the policy to distribute cached instances across named partitions of L2 data cache.- Parameters:
a- plug-in string forCacheDistributionPolicy.- Since:
- 2.0.0
-
getInstrumentation
String getInstrumentation()Gets the plug-in string that defines instrumentation providers and what they instrument.- Returns:
- a plug-in string for the instrumentation configuration
- Since:
- 2.1.0
-
setInstrumentation
Sets the plug-in string that defines instrumentation providers and what they instrument.- Parameters:
providers- a plug-in string for the instrumentation configuration- Since:
- 2.1.0
-
getInstrumentationManagerInstance
InstrumentationManager getInstrumentationManagerInstance()Gets an instance of the instrumentation manager. The instrumentation provides access to configured instrumentation providers and can be used to manage them at runtime.- Returns:
- an instance of the instrumentation manager
- Since:
- 2.1.0
-
getAuditorInstance
Auditor getAuditorInstance()Gets the singular instance ofAuditorassociated with this configuration.- Since:
- 2.2.0
-
setAuditorInstance
Sets the singular instance ofAuditorassociated with this configuration.- Since:
- 2.2.0
-
getAuditor
String getAuditor()Gets the plug-in string ofAuditorspecified in this configuration.- Since:
- 2.2.0
-
setAuditor
Sets the plug-in string ofAuditorspecified in this configuration.- Since:
- 2.2.0
-
getPostLoadOnMerge
boolean getPostLoadOnMerge()Whether to send @PostLoad events on a merge operation.- Since:
- 2.2.0
-
setPostLoadOnMerge
void setPostLoadOnMerge(boolean postLoadOnMerge) Whether to send @PostLoad events on a merge operation.- Since:
- 2.2.0
-
setPostLoadOnMerge
Whether to send @PostLoad events on a merge operation.- Since:
- 2.2.0
-
getOptimizeIdCopy
boolean getOptimizeIdCopy()Whether to attempt to optimize id class copy operations during the enhancement process. Optimization is only applicable for simple id classes that have a constructor with the proper construction parameters and direct assignments to fields within the id class during construction. If the optimization cannot occur, the enhancer will fallback to the noraml behavior.- Since:
- 2.2.0
-
setOptimizeIdCopy
void setOptimizeIdCopy(boolean optimizeIds) Whether to attempt to optimize id class copy operations during the enhancement process. Optimization is only applicable for simple id classes that have a constructor with the proper construction parameters and direct assignments to fields within the id class during construction. If the optimization cannot occur, the enhancer will fallback to the normal behavior.- Since:
- 2.2.0
-
setOptimizeIdCopy
Whether to attempt to optimize id class copy operations during the enhancement process. Optimization is only applicable for simple id classes that have a constructor with the proper construction parameters and direct assignments to fields within the id class during construction. If the optimization cannot occur, the enhancer will fallback to the normal behavior.- Since:
- 2.2.0
-
getUseTCCLinSelectNew
boolean getUseTCCLinSelectNew()Indicates if theThread#contextClassLoadershould be used as fallback if the result class forselect newis not found by the classloader of the entity.- Since:
- 2.4.2
-
setUseTCCLinSelectNew
void setUseTCCLinSelectNew(boolean useTcclForSelectNew) Indicates if theThread#contextClassLoadershould be used as fallback if the result class forselect newis not found by the classloader of the entity.- Since:
- 2.4.2
-
setUseTCCLinSelectNew
Indicates if theThread#contextClassLoadershould be used as fallback if the result class forselect newis not found by the classloader of the entity.- Since:
- 2.4.2
-
getDatabaseAction
String getDatabaseAction()database action from the persistence unit. See 'jakarta.persistence.schema-generation.database.action'- Returns:
- openjpa internal schemaAction which corresponds to the JPA action.
- Since:
- 3.0.0
-
getDatabaseActionConstant
int getDatabaseActionConstant()- Since:
- 3.0.0
- See Also:
-
getScriptsAction
String getScriptsAction()Similar togetDatabaseAction()but write the generated SQL to files.- Since:
- 3.0.0
- See Also:
-
getScriptsActionConstant
int getScriptsActionConstant()- Since:
- 3.0.0
- See Also:
-
getCreateSource
String getCreateSource()Optional run a DB action before accessing the database. The possible values in the persistence unit are:- metadata
- script - see
getCreateScriptSource() - metadata-then-script
- script-then-metadata
- Since:
- 3.0.0
- See Also:
-
getCreateSourceConstant
int getCreateSourceConstant()- Since:
- 3.0.0
- See Also:
-
getDropSource
String getDropSource()Similar togetCreateSource()but for dropping the database schema and content.- Since:
- 3.0.0
- See Also:
-
getDropSourceConstant
int getDropSourceConstant()- Since:
- 3.0.0
- See Also:
-
getCreateScriptSource
String getCreateScriptSource()- Since:
- 3.0.0
- See Also:
-
getDropScriptSource
String getDropScriptSource()- Since:
- 3.0.0
- See Also:
-
getCreateScriptTarget
String getCreateScriptTarget()- Since:
- 3.0.0
- See Also:
-
getDropScriptTarget
String getDropScriptTarget()- Since:
- 3.0.0
- See Also:
-
getLoadScriptSource
String getLoadScriptSource()Can be used to load a set of initial data into the database.- Since:
- 3.0.0
-
getTypesWithoutEnhancement
Collection<Class<?>> getTypesWithoutEnhancement()- Returns:
- types which should not get enhanced although they are on the included directories.
- Since:
- 3.1.1
-
setTypesWithoutEnhancement
- Since:
- 3.1.1
- See Also:
-