|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JDBCConfiguration
Configuration that defines the properties necessary to configure runtime and connect to a JDBC DataSource.
Field Summary | |
---|---|
static String |
LOG_JDBC
Name of the logger for JDBC-related messages: openjpa.jdbc.JDBC . |
static String |
LOG_SCHEMA
Name of the logger for schema-related messages: openjpa.jdbc.Schema . |
static String |
LOG_SQL
Name of the logger for SQL execution messages: openjpa.jdbc.SQL . |
Fields 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 |
Fields inherited from interface java.beans.BeanInfo |
---|
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
Method Summary | |
---|---|
ConnectionDecorator[] |
getConnectionDecoratorInstances()
The ConnectionDecorator s to use. |
String |
getConnectionDecorators()
A comma-separated list of the ConnectionDecorator for adding
functionality to JDBC connections. |
DataSource |
getDataSource(StoreContext ctx)
Return the primary data source to use. |
DataSource |
getDataSource2(StoreContext ctx)
Return the non-enlisted data source to use. |
String |
getDBDictionary()
The DBDictionary to use to define the RDBMS SQL information. |
DBDictionary |
getDBDictionaryInstance()
The DBDictionary to use. |
String |
getDriverDataSource()
The DriverDataSource to use for creating a DataSource
from a JDBC Driver . |
String |
getEagerFetchMode()
Specifies the default eager fetch mode to use. |
int |
getEagerFetchModeConstant()
Return the eager fetch mode as one of the following symbolic constants: EagerFetchModes.EAGER_NONE
EagerFetchModes.EAGER_JOIN
EagerFetchModes.EAGER_PARALLEL
|
String |
getFetchDirection()
The JDBC fetch direction. |
int |
getFetchDirectionConstant()
Return the result set constant for the fetch direction. |
JDBCListener[] |
getJDBCListenerInstances()
The JDBCListener s to use. |
String |
getJDBCListeners()
A comma-separated list of the JDBCListener plugins for
listening to JDBCEvent s. |
String |
getLRSSize()
How to obtain the size of large result sets. |
int |
getLRSSizeConstant()
Return the LRSSizes constant for the large result set size
setting. |
String |
getMappingDefaults()
A plugin string describing the MappingDefaults to use. |
MappingDefaults |
getMappingDefaultsInstance()
The MappingDefaults to use with a repository. |
String |
getMappingFactory()
A plugin string describing the MetaDataFactory to use for
loading and storing object-relational mapping data. |
MappingRepository |
getMappingRepositoryInstance()
Return the mapping repository. |
String |
getResultSetType()
The JDBC result set type. |
int |
getResultSetTypeConstant()
Return the result set constant for the result set type. |
String |
getSchema()
Default schema for unqualified tables. |
String |
getSchemaFactory()
The plugin string for the SchemaFactory to use to provide
schema information during system initialization. |
SchemaFactory |
getSchemaFactoryInstance()
The SchemaFactory to use for schema information. |
String |
getSchemas()
Comma-separated list of modifiable schemas for persistent instances. |
String[] |
getSchemasList()
Modificable schema components. |
String |
getSQLFactory()
The SQL factory to use for SQL constructs. |
SQLFactory |
getSQLFactoryInstance()
The SQL factory to use for SQL constructs. |
String |
getSubclassFetchMode()
Specifies the default subclass fetch mode to use. |
int |
getSubclassFetchModeConstant()
Return the subclass fetch mode as one of the following symbolic constants: EagerFetchModes.EAGER_NONE
EagerFetchModes.EAGER_JOIN
EagerFetchModes.EAGER_PARALLEL
|
String |
getSynchronizeMappings()
Whether OpenJPA should try to automatically refresh O/R mapping information and the database schema. |
String |
getTransactionIsolation()
The transaction isolation level to use at the database level. |
int |
getTransactionIsolationConstant()
Return the proper transaction isolation level constant from Connection , or -1 for the default level. |
String |
getUpdateManager()
The UpdateManager to use for managing SQL updates. |
UpdateManager |
getUpdateManagerInstance()
The UpdateManager for runtime data store interaction. |
DriverDataSource |
newDriverDataSourceInstance()
Create an instance of the DriverDataSource to use
for creating a DataSource from a JDBC Driver . |
MappingRepository |
newMappingRepositoryInstance()
Return a new empty mapping repository of the configured type. |
void |
setConnectionDecorators(ConnectionDecorator[] decorators)
The ConnectionDecorator s to use. |
void |
setConnectionDecorators(String decorators)
A comma-separated list of the ConnectionDecorator for
adding functionality to JDBC connections. |
void |
setDBDictionary(DBDictionary dbdictionary)
The DBDictionary to use. |
void |
setDBDictionary(String dbdictionary)
The DBDictionary to use to define the RDBMS SQL information. |
void |
setDriverDataSource(String driverDataSource)
The DriverDataSource to use for creating a DataSource
from a JDBC Driver . |
void |
setEagerFetchMode(int eagerFetchMode)
Set the eager fetch mode as one of the following symbolic constants: EagerFetchModes.EAGER_NONE
EagerFetchModes.EAGER_JOIN
EagerFetchModes.EAGER_PARALLEL
|
void |
setEagerFetchMode(String mode)
Specifies the default eager fetch mode to use. |
void |
setFetchDirection(int direction)
Set the result set fetch direction constant. |
void |
setFetchDirection(String direction)
The JDBC fetch direction. |
void |
setJDBCListeners(JDBCListener[] jdbcListeners)
The JDBCListener s to use. |
void |
setJDBCListeners(String jdbcListeners)
A comma-separated list of the JDBCListener plugins for
listening to JDBCEvent s. |
void |
setLRSSize(int size)
Set the fetch configuration large result set size constant. |
void |
setLRSSize(String lrsSize)
How to obtain the size of large result sets. |
void |
setMappingDefaults(MappingDefaults map)
The MappingDefaults to use with a repository. |
void |
setMappingDefaults(String map)
A plugin string describing the MappingDefaults to use. |
void |
setMappingFactory(String mappingFactory)
A plugin string describing the MetaDataFactory to use for
loading and storing object-relational mapping data. |
void |
setResultSetType(int type)
Set the result set constant type. |
void |
setResultSetType(String type)
The JDBC result set type. |
void |
setSchema(String schema)
Default schema for unqualified tables. |
void |
setSchemaFactory(SchemaFactory schemaFactory)
The SchemaFactory to use for schema information. |
void |
setSchemaFactory(String schemaFactory)
The plugin string for the SchemaFactory to use to provide
schema information during system initialization. |
void |
setSchemas(String schemas)
Comma-separated list of modifiable schemas for persistent instances. |
void |
setSchemas(String[] schemas)
Modifiable schema components. |
void |
setSQLFactory(SQLFactory sqlFactory)
The SQL factory to use for SQL constructs. |
void |
setSQLFactory(String sqlFactory)
The SQL factory to use for SQL constructs. |
void |
setSubclassFetchMode(int subclassFetchMode)
Set the subclass fetch mode as one of the following symbolic constants: EagerFetchModes.EAGER_NONE
EagerFetchModes.EAGER_JOIN
EagerFetchModes.EAGER_PARALLEL
|
void |
setSubclassFetchMode(String mode)
Specifies the default subclass fetch mode to use. |
void |
setSynchronizeMappings(String synchronizeMappings)
Whether OpenJPA should try to automatically refresh O/R mapping information and the database schema. |
void |
setTransactionIsolation(int level)
Set the proper transaction isolation level constant from Connection , or -1 for the default level. |
void |
setTransactionIsolation(String level)
The transaction isolation level to use at the database level. |
void |
setUpdateManager(String updateManager)
The UpdateManager to use for managing SQL updates. |
void |
setUpdateManager(UpdateManager updateManager)
The UpdateManager for runtime data store interaction. |
Methods inherited from interface org.apache.openjpa.lib.conf.Configuration |
---|
addPropertyChangeListener, addValue, clone, close, fromProperties, getConfigurationLog, getId, getLog, getLog, getLogFactory, getProductName, getValue, getValues, instantiateAll, isReadOnly, removePropertyChangeListener, removeValue, setId, setLog, setLogFactory, setProductName, setReadOnly, toProperties |
Methods inherited from interface java.beans.BeanInfo |
---|
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getPropertyDescriptors |
Field Detail |
---|
static final String LOG_SQL
openjpa.jdbc.SQL
.
static final String LOG_JDBC
openjpa.jdbc.JDBC
.
static final String LOG_SCHEMA
openjpa.jdbc.Schema
.
Method Detail |
---|
String getSchema()
void setSchema(String schema)
String getSchemas()
void setSchemas(String schemas)
String[] getSchemasList()
void setSchemas(String[] schemas)
String getTransactionIsolation()
default
: The JDBC driver's default isolation level.none
: The standard JDBC
Connection.TRANSACTION_NONE
level.read-committed
: The standard JDBC
Connection.TRANSACTION_READ_COMMITTED
level.read-uncommitted
: The standard JDBC
Connection.TRANSACTION_READ_UNCOMMITTED
level.repeatable-read
: The standard JDBC
Connection.TRANSACTION_REPEATABLE_READ
level.serializable
: The standard JDBC
Connection.TRANSACTION_SERIALIZABLE
level.
void setTransactionIsolation(String level)
default
: The JDBC driver's default isolation level.none
: The standard JDBC
Connection.TRANSACTION_NONE
level.read-committed
: The standard JDBC
Connection.TRANSACTION_READ_COMMITTED
level.read-uncommitted
: The standard JDBC
Connection.TRANSACTION_READ_UNCOMMITTED
level.repeatable-read
: The standard JDBC
Connection.TRANSACTION_REPEATABLE_READ
level.serializable
: The standard JDBC
Connection.TRANSACTION_SERIALIZABLE
level.
int getTransactionIsolationConstant()
Connection
, or -1 for the default level.
void setTransactionIsolation(int level)
Connection
, or -1 for the default level.
String getResultSetType()
forward-only
.
forward-only
: The standard JDBC
ResultSet.TYPE_FORWARD_ONLY
type.scroll-sensitive
: The standard JDBC
ResultSet.TYPE_SCROLL_SENSITIVE
type.scroll-insensitive
: The standard JDBC
ResultSet.TYPE_SCROLL_INSENSITIVE
type.
int getResultSetTypeConstant()
void setResultSetType(String type)
forward-only
.
forward-only
: The standard JDBC
ResultSet.TYPE_FORWARD_ONLY
type.scroll-sensitive
: The standard JDBC
ResultSet.TYPE_SCROLL_SENSITIVE
type.scroll-insensitive
: The standard JDBC
ResultSet.TYPE_SCROLL_INSENSITIVE
type.
void setResultSetType(int type)
String getFetchDirection()
forward
.
forward
: The standard JDBC
ResultSet.FETCH_FORWARD
direction.reverse
: The standard JDBC
ResultSet.FETCH_REVERSE
direction.unknown
: The standard JDBC
ResultSet.FETCH_UNKNOWN
direction.
int getFetchDirectionConstant()
void setFetchDirection(String direction)
forward
.
forward
: The standard JDBC
ResultSet.FETCH_FORWARD
direction.reverse
: The standard JDBC
ResultSet.FETCH_REVERSE
direction.unknown
: The standard JDBC
ResultSet.FETCH_UNKNOWN
direction.
void setFetchDirection(int direction)
String getEagerFetchMode()
parallel
unless the query is by-oid. Possible values are:
none
: When querying for an object, do not try to
select for related objects at the same time.join
: When querying for objects, also select for
1-1 relations in the configured fetch groups using joins.parallel
: When querying for objects, also select for
both 1-1 relations using joins and to-many relations using batched
selects.
void setEagerFetchMode(String mode)
parallel
unless the query is by-oid. Possible values are:
none
: When querying for an object, do not try to
select for related objects at the same time.join
: When querying for objects, also select for
1-1 relations in the configured fetch groups using joins.parallel
: When querying for objects, also select for
both 1-1 relations using joins and to-many relations using batched
selects.
int getEagerFetchModeConstant()
void setEagerFetchMode(int eagerFetchMode)
String getSubclassFetchMode()
join
unless the query is by-oid. Possible values are:
none
: Only select base class data.join
: Select both base class and all possible subclass
data using joins.parallel
: Select for each possible subclass
separately.
void setSubclassFetchMode(String mode)
join
unless the query is by-oid. Possible values are:
none
: Only select base class data.join
: Select both base class and all possible subclass
data using joins.parallel
: Select for each possible subclass
separately.
int getSubclassFetchModeConstant()
void setSubclassFetchMode(int subclassFetchMode)
String getLRSSize()
unknown
.
unknown
: Do not attempt to calculate the size of
large result sets; return Integer.MAX_VALUE
.last
: For result sets that support random access,
calculate the size using ResultSet.last()
.query
: Use a separate COUNT query to calculate the
size of the results.
int getLRSSizeConstant()
LRSSizes
constant for the large result set size
setting.
void setLRSSize(String lrsSize)
unknown
.
unknown
: Do not attempt to calculate the size of
large result sets; return Integer.MAX_VALUE
.last
: For result sets that support random access,
calculate the size using ResultSet.last()
.query
: Use a separate COUNT query to calculate the
size of the results.
void setLRSSize(int size)
String getSynchronizeMappings()
void setSynchronizeMappings(String synchronizeMappings)
String getJDBCListeners()
JDBCListener
plugins for
listening to JDBCEvent
s.
void setJDBCListeners(String jdbcListeners)
JDBCListener
plugins for
listening to JDBCEvent
s.
JDBCListener[] getJDBCListenerInstances()
JDBCListener
s to use.
void setJDBCListeners(JDBCListener[] jdbcListeners)
JDBCListener
s to use.
String getConnectionDecorators()
ConnectionDecorator
for adding
functionality to JDBC connections.
void setConnectionDecorators(String decorators)
ConnectionDecorator
for
adding functionality to JDBC connections.
ConnectionDecorator[] getConnectionDecoratorInstances()
ConnectionDecorator
s to use.
void setConnectionDecorators(ConnectionDecorator[] decorators)
ConnectionDecorator
s to use.
String getDBDictionary()
DBDictionary
to use to define the RDBMS SQL information.
void setDBDictionary(String dbdictionary)
DBDictionary
to use to define the RDBMS SQL information.
DBDictionary getDBDictionaryInstance()
DBDictionary
to use.
void setDBDictionary(DBDictionary dbdictionary)
DBDictionary
to use.
String getUpdateManager()
UpdateManager
to use for managing SQL updates.
void setUpdateManager(String updateManager)
UpdateManager
to use for managing SQL updates.
UpdateManager getUpdateManagerInstance()
UpdateManager
for runtime data store interaction.
void setUpdateManager(UpdateManager updateManager)
UpdateManager
for runtime data store interaction.
String getDriverDataSource()
DriverDataSource
to use for creating a DataSource
from a JDBC Driver
.
void setDriverDataSource(String driverDataSource)
DriverDataSource
to use for creating a DataSource
from a JDBC Driver
.
DriverDataSource newDriverDataSourceInstance()
DriverDataSource
to use
for creating a DataSource
from a JDBC Driver
.
String getSchemaFactory()
SchemaFactory
to use to provide
schema information during system initialization.
void setSchemaFactory(String schemaFactory)
SchemaFactory
to use to provide
schema information during system initialization.
SchemaFactory getSchemaFactoryInstance()
SchemaFactory
to use for schema information.
void setSchemaFactory(SchemaFactory schemaFactory)
SchemaFactory
to use for schema information.
String getSQLFactory()
SQLFactory getSQLFactoryInstance()
void setSQLFactory(String sqlFactory)
void setSQLFactory(SQLFactory sqlFactory)
String getMappingFactory()
MetaDataFactory
to use for
loading and storing object-relational mapping data.
void setMappingFactory(String mappingFactory)
MetaDataFactory
to use for
loading and storing object-relational mapping data.
String getMappingDefaults()
MappingDefaults
to use.
void setMappingDefaults(String map)
MappingDefaults
to use.
MappingDefaults getMappingDefaultsInstance()
MappingDefaults
to use with a repository.
void setMappingDefaults(MappingDefaults map)
MappingDefaults
to use with a repository.
MappingRepository getMappingRepositoryInstance()
MappingRepository newMappingRepositoryInstance()
DataSource getDataSource(StoreContext ctx)
DataSource.getConnection()
. If the given context is null, the
data source will use the configuration's default connection user name
and password. If those too are null and the first context has been
obtained already, then the user name and password for that context
will be used, as we know they represent a valid combination. This
method avoids casting the result of
OpenJPAConfiguration.getConnectionFactory()
, and avoids having to
pass in the user name and password to obtain connections.
DataSource getDataSource2(StoreContext ctx)
DataSource.getConnection()
will be the specificed connection 2
user name and password. If those are null and the given context is
non-null, its user name password will be used instead. If the context
is null too, then the user name and password used to retrieve the first
context will be used. If there is no second connection factory the
primary connection factory is used.
getDataSource(org.apache.openjpa.kernel.StoreContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |