org.apache.openjpa.jdbc.conf
Class JDBCConfigurationImpl

java.lang.Object
  extended by org.apache.openjpa.lib.conf.ConfigurationImpl
      extended by org.apache.openjpa.conf.OpenJPAConfigurationImpl
          extended by org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl
All Implemented Interfaces:
java.beans.BeanInfo, java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, org.apache.openjpa.conf.OpenJPAConfiguration, JDBCConfiguration, org.apache.openjpa.lib.conf.Configuration, org.apache.openjpa.lib.conf.ValueListener, org.apache.openjpa.lib.util.Closeable

public class JDBCConfigurationImpl
extends org.apache.openjpa.conf.OpenJPAConfigurationImpl
implements JDBCConfiguration

Default implementation of the JDBCConfiguration interface.

Author:
Marc Prud'hommeaux, Abe White
See Also:
Serialized Form

Field Summary
 org.apache.openjpa.lib.conf.ObjectValue connectionDecoratorPlugins
           
 org.apache.openjpa.lib.conf.PluginValue dbdictionaryPlugin
           
 org.apache.openjpa.lib.conf.PluginValue driverDataSourcePlugin
           
 FetchModeValue eagerFetchMode
           
 org.apache.openjpa.lib.conf.IntValue fetchDirection
           
 org.apache.openjpa.lib.conf.ObjectValue jdbcListenerPlugins
           
 org.apache.openjpa.lib.conf.IntValue lrsSize
           
 org.apache.openjpa.lib.conf.ObjectValue mappingDefaultsPlugin
           
 MappingFactoryValue mappingFactoryPlugin
           
 org.apache.openjpa.lib.conf.IntValue resultSetType
           
 org.apache.openjpa.lib.conf.StringValue schema
           
 org.apache.openjpa.lib.conf.ObjectValue schemaFactoryPlugin
           
 org.apache.openjpa.lib.conf.StringListValue schemas
           
 org.apache.openjpa.lib.conf.ObjectValue sqlFactoryPlugin
           
 FetchModeValue subclassFetchMode
           
 org.apache.openjpa.lib.conf.StringValue synchronizeMappings
           
 org.apache.openjpa.lib.conf.IntValue transactionIsolation
           
 org.apache.openjpa.lib.conf.ObjectValue updateManagerPlugin
           
 
Fields inherited from class org.apache.openjpa.conf.OpenJPAConfigurationImpl
aggregateListenerPlugins, autoClear, autoDetach, brokerFactoryPlugin, brokerPlugin, classResolverPlugin, compatibilityPlugin, connection2DriverName, connection2Password, connection2Properties, connection2URL, connection2UserName, connectionDriverName, connectionFactory, connectionFactory2, connectionFactory2Name, connectionFactory2Properties, connectionFactoryMode, connectionFactoryName, connectionFactoryProperties, connectionPassword, connectionProperties, connectionRetainMode, connectionURL, connectionUserName, dataCacheManagerPlugin, dataCachePlugin, dataCacheTimeout, detachStatePlugin, dynamicDataStructs, fetchBatchSize, fetchGroups, filterListenerPlugins, flushBeforeQueries, ignoreChanges, inverseManagerPlugin, lockManagerPlugin, lockTimeout, managedRuntimePlugin, mapping, maxFetchDepth, metaFactoryPlugin, metaRepository, metaRepositoryPlugin, multithreaded, nontransactionalRead, nontransactionalWrite, optimistic, orphanedKeyPlugin, proxyManagerPlugin, queryCachePlugin, queryCompilationCachePlugin, readLockLevel, remoteEventManager, remoteProviderPlugin, restoreState, retainState, retryClassRegistration, runtimeUnenhancedClasses, savepointManagerPlugin, seqPlugin, transactionMode, writeLockLevel
 
Fields inherited from class org.apache.openjpa.lib.conf.ConfigurationImpl
id, logFactoryPlugin
 
Fields inherited from interface org.apache.openjpa.jdbc.conf.JDBCConfiguration
LOG_JDBC, LOG_SCHEMA, LOG_SQL
 
Fields inherited from interface org.apache.openjpa.conf.OpenJPAConfiguration
LOG_DATACACHE, LOG_ENHANCE, LOG_METADATA, LOG_QUERY, LOG_RUNTIME, LOG_TOOL, OPTION_DATASTORE_CONNECTION, OPTION_EMBEDDED_COLLECTION_RELATION, OPTION_EMBEDDED_MAP_RELATION, OPTION_EMBEDDED_RELATION, OPTION_ID_APPLICATION, OPTION_ID_DATASTORE, OPTION_INC_FLUSH, OPTION_JDBC_CONNECTION, OPTION_NONTRANS_READ, OPTION_NULL_CONTAINER, OPTION_OPTIMISTIC, OPTION_QUERY_SQL, OPTION_TYPE_ARRAY, OPTION_TYPE_COLLECTION, OPTION_TYPE_MAP, OPTION_VALUE_AUTOASSIGN, OPTION_VALUE_INCREMENT
 
Fields inherited from interface org.apache.openjpa.lib.conf.Configuration
ATTRIBUTE_ALLOWED_VALUES, ATTRIBUTE_CATEGORY, ATTRIBUTE_INTERFACE, ATTRIBUTE_ORDER, ATTRIBUTE_TYPE, ATTRIBUTE_XML
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
JDBCConfigurationImpl()
          Default constructor.
JDBCConfigurationImpl(boolean loadGlobals)
          Constructor.
JDBCConfigurationImpl(boolean derivations, boolean loadGlobals)
          Constructor.
JDBCConfigurationImpl(JDBCConfiguration conf)
          Copy constructor
 
Method Summary
 org.apache.openjpa.lib.jdbc.ConnectionDecorator[] getConnectionDecoratorInstances()
          The ConnectionDecorators to use.
 java.lang.String getConnectionDecorators()
          A comma-separated list of the ConnectionDecorator for adding functionality to JDBC connections.
 java.lang.Object getConnectionFactory()
           
 java.lang.Object getConnectionFactory2()
           
 javax.sql.DataSource getDataSource(org.apache.openjpa.kernel.StoreContext ctx)
          Return the primary data source to use.
 javax.sql.DataSource getDataSource2(org.apache.openjpa.kernel.StoreContext ctx)
          Return the non-enlisted data source to use.
 java.lang.String getDBDictionary()
          The DBDictionary to use to define the RDBMS SQL information.
 DBDictionary getDBDictionaryInstance()
          The DBDictionary to use.
 java.lang.String getDriverDataSource()
          The DriverDataSource to use for creating a DataSource from a JDBC Driver.
 java.lang.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
 java.lang.String getFetchDirection()
          The JDBC fetch direction.
 int getFetchDirectionConstant()
          Return the result set constant for the fetch direction.
 org.apache.openjpa.lib.jdbc.JDBCListener[] getJDBCListenerInstances()
          The JDBCListeners to use.
 java.lang.String getJDBCListeners()
          A comma-separated list of the JDBCListener plugins for listening to JDBCEvents.
 java.lang.String getLRSSize()
          How to obtain the size of large result sets.
 int getLRSSizeConstant()
          Return the LRSSizes constant for the large result set size setting.
 java.lang.String getMappingDefaults()
          A plugin string describing the MappingDefaults to use.
 MappingDefaults getMappingDefaultsInstance()
          The MappingDefaults to use with a repository.
 java.lang.String getMappingFactory()
          A plugin string describing the MetaDataFactory to use for loading and storing object-relational mapping data.
 MappingRepository getMappingRepositoryInstance()
          Return the mapping repository.
 java.lang.String getResultSetType()
          The JDBC result set type.
 int getResultSetTypeConstant()
          Return the result set constant for the result set type.
 java.lang.String getSchema()
          Default schema for unqualified tables.
 java.lang.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.
 java.lang.String getSchemas()
          Comma-separated list of modifiable schemas for persistent instances.
 java.lang.String[] getSchemasList()
          Modificable schema components.
 java.lang.String getSQLFactory()
          The SQL factory to use for SQL constructs.
 SQLFactory getSQLFactoryInstance()
          The SQL factory to use for SQL constructs.
 java.lang.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
 java.lang.String getSynchronizeMappings()
          Whether OpenJPA should try to automatically refresh O/R mapping information and the database schema.
 java.lang.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.
 java.lang.String getUpdateManager()
          The UpdateManager to use for managing SQL updates.
 UpdateManager getUpdateManagerInstance()
          The UpdateManager for runtime data store interaction.
protected  boolean isInvalidProperty(java.lang.String propName)
           
 org.apache.openjpa.kernel.BrokerImpl newBrokerInstance(java.lang.String user, java.lang.String pass)
           
 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.
 org.apache.openjpa.meta.MetaDataFactory newMetaDataFactoryInstance()
           
protected  void preClose()
          Free the data sources.
 void setConnectionDecorators(org.apache.openjpa.lib.jdbc.ConnectionDecorator[] decorators)
          The ConnectionDecorators to use.
 void setConnectionDecorators(java.lang.String connectionDecorators)
          A comma-separated list of the ConnectionDecorator for adding functionality to JDBC connections.
 void setConnectionFactory(java.lang.Object factory)
           
 void setConnectionFactory2(java.lang.Object factory)
           
 void setDBDictionary(DBDictionary dbdictionary)
          The DBDictionary to use.
 void setDBDictionary(java.lang.String dbdictionary)
          The DBDictionary to use to define the RDBMS SQL information.
 void setDriverDataSource(java.lang.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(java.lang.String eagerFetchMode)
          Specifies the default eager fetch mode to use.
 void setFetchDirection(int fetchDirection)
          Set the result set fetch direction constant.
 void setFetchDirection(java.lang.String fetchDirection)
          The JDBC fetch direction.
 void setJDBCListeners(org.apache.openjpa.lib.jdbc.JDBCListener[] listeners)
          The JDBCListeners to use.
 void setJDBCListeners(java.lang.String jdbcListeners)
          A comma-separated list of the JDBCListener plugins for listening to JDBCEvents.
 void setLRSSize(int lrsSize)
          Set the fetch configuration large result set size constant.
 void setLRSSize(java.lang.String lrsSize)
          How to obtain the size of large result sets.
 void setMappingDefaults(MappingDefaults mapping)
          The MappingDefaults to use with a repository.
 void setMappingDefaults(java.lang.String mapping)
          A plugin string describing the MappingDefaults to use.
 void setMappingFactory(java.lang.String mapping)
          A plugin string describing the MetaDataFactory to use for loading and storing object-relational mapping data.
 void setResultSetType(int resultSetType)
          Set the result set constant type.
 void setResultSetType(java.lang.String resultSetType)
          The JDBC result set type.
 void setSchema(java.lang.String schema)
          Default schema for unqualified tables.
 void setSchemaFactory(SchemaFactory schemaFactory)
          The SchemaFactory to use for schema information.
 void setSchemaFactory(java.lang.String schemaFactory)
          The plugin string for the SchemaFactory to use to provide schema information during system initialization.
 void setSchemas(java.lang.String schemas)
          Comma-separated list of modifiable schemas for persistent instances.
 void setSchemas(java.lang.String[] schemas)
          Modifiable schema components.
 void setSQLFactory(SQLFactory sqlFactory)
          The SQL factory to use for SQL constructs.
 void setSQLFactory(java.lang.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(java.lang.String subclassFetchMode)
          Specifies the default subclass fetch mode to use.
 void setSynchronizeMappings(java.lang.String synchronizeMappings)
          Whether OpenJPA should try to automatically refresh O/R mapping information and the database schema.
 void setTransactionIsolation(int transactionIsolation)
          Set the proper transaction isolation level constant from Connection, or -1 for the default level.
 void setTransactionIsolation(java.lang.String transactionIsolation)
          The transaction isolation level to use at the database level.
 void setUpdateManager(java.lang.String updateManager)
          The UpdateManager to use for managing SQL updates.
 void setUpdateManager(UpdateManager updateManager)
          The UpdateManager for runtime data store interaction.
 
Methods inherited from class org.apache.openjpa.conf.OpenJPAConfigurationImpl
getAggregateListenerInstances, getAggregateListeners, getAutoClear, getAutoClearConstant, getAutoDetach, getAutoDetachConstant, getBrokerFactory, getBrokerFactoryEventManager, getBrokerImpl, getClassResolver, getClassResolverInstance, getCompatibility, getCompatibilityInstance, getConfigurationLog, getConnection2DriverName, getConnection2Password, getConnection2Properties, getConnection2URL, getConnection2UserName, getConnectionDriverName, getConnectionFactory2Name, getConnectionFactory2Properties, getConnectionFactoryMode, getConnectionFactoryName, getConnectionFactoryProperties, getConnectionPassword, getConnectionProperties, getConnectionRetainMode, getConnectionRetainModeConstant, getConnectionURL, getConnectionUserName, getDataCache, getDataCacheManager, getDataCacheManagerInstance, getDataCacheTimeout, getDetachState, getDetachStateInstance, getDynamicDataStructs, getDynamicValues, getFetchBatchSize, getFetchGroups, getFetchGroupsList, getFilterListenerInstances, getFilterListeners, getFlushBeforeQueries, getFlushBeforeQueriesConstant, getIgnoreChanges, getInverseManager, getLockManager, getLockTimeout, getManagedRuntime, getManagedRuntimeInstance, getMapping, getMaxFetchDepth, getMetaDataFactory, getMetaDataRepository, getMetaDataRepositoryInstance, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getOrphanedKeyAction, getOrphanedKeyActionInstance, getProxyManager, getProxyManagerInstance, getQueryCache, getQueryCompilationCache, getQueryCompilationCacheInstance, getReadLockLevel, getReadLockLevelConstant, getRemoteCommitEventManager, getRemoteCommitProvider, getRestoreState, getRestoreStateConstant, getRetainState, getRetryClassRegistration, getRuntimeUnenhancedClasses, getRuntimeUnenhancedClassesConstant, getSavepointManager, getSavepointManagerInstance, getSequence, getSequenceInstance, getSpecification, getStoreFacadeTypeRegistry, getTransactionMode, getWriteLockLevel, getWriteLockLevelConstant, instantiateAll, isConnectionFactoryModeManaged, isTransactionModeManaged, metaDataRepositoryAvailable, newInverseManagerInstance, newLockManagerInstance, newMetaDataRepositoryInstance, newRemoteCommitProviderInstance, setAggregateListeners, setAggregateListeners, setAutoClear, setAutoClear, setAutoDetach, setAutoDetach, setBrokerFactory, setBrokerImpl, setClassResolver, setClassResolver, setCompatibility, setConnection2DriverName, setConnection2Password, setConnection2Properties, setConnection2URL, setConnection2UserName, setConnectionDriverName, setConnectionFactory2Name, setConnectionFactory2Properties, setConnectionFactoryMode, setConnectionFactoryModeManaged, setConnectionFactoryName, setConnectionFactoryProperties, setConnectionPassword, setConnectionProperties, setConnectionRetainMode, setConnectionRetainMode, setConnectionURL, setConnectionUserName, setDataCache, setDataCacheManager, setDataCacheManager, setDataCacheTimeout, setDataCacheTimeout, setDetachState, setDetachState, setDynamicDataStructs, setDynamicDataStructs, setFetchBatchSize, setFetchBatchSize, setFetchGroups, setFetchGroups, setFilterListeners, setFilterListeners, setFlushBeforeQueries, setFlushBeforeQueries, setIgnoreChanges, setIgnoreChanges, setInverseManager, setLockManager, setLockTimeout, setLockTimeout, setManagedRuntime, setManagedRuntime, setMapping, setMaxFetchDepth, setMaxFetchDepth, setMetaDataFactory, setMetaDataRepository, setMetaDataRepository, setMultithreaded, setMultithreaded, setNontransactionalRead, setNontransactionalRead, setNontransactionalWrite, setNontransactionalWrite, setOptimistic, setOptimistic, setOrphanedKeyAction, setOrphanedKeyAction, setProxyManager, setProxyManager, setQueryCache, setQueryCompilationCache, setReadLockLevel, setReadLockLevel, setRemoteCommitEventManager, setRemoteCommitProvider, setRestoreState, setRestoreState, setRetainState, setRetainState, setRetryClassRegistration, setRetryClassRegistration, setRuntimeUnenhancedClasses, setRuntimeUnenhancedClasses, setSavepointManager, setSequence, setSequence, setSpecification, setTransactionMode, setTransactionModeManaged, setWriteLockLevel, setWriteLockLevel, supportedOptions
 
Methods inherited from class org.apache.openjpa.lib.conf.ConfigurationImpl
addBoolean, addDouble, addFile, addInt, addObject, addPlugin, addPluginList, addPropertyChangeListener, addString, addStringList, addValue, assertNotReadOnly, clone, close, equals, fromProperties, getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getId, getLog, getLog, getLogFactory, getMethodDescriptors, getProductName, getPropertiesResource, getPropertyDescriptors, getValue, getValues, hashCode, isDynamic, isReadOnly, loadGlobals, modifyDynamic, readExternal, removePropertyChangeListener, removeValue, setId, setLog, setLogFactory, setProductName, setProperties, setPropertiesFile, setReadOnly, toProperties, toXMLName, valueChanged, writeExternal
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.conf.OpenJPAConfiguration
getAggregateListenerInstances, getAggregateListeners, getAutoClear, getAutoClearConstant, getAutoDetach, getAutoDetachConstant, getBrokerFactory, getBrokerFactoryEventManager, getBrokerImpl, getClassResolver, getClassResolverInstance, getCompatibility, getCompatibilityInstance, getConnection2DriverName, getConnection2Password, getConnection2Properties, getConnection2URL, getConnection2UserName, getConnectionDriverName, getConnectionFactory2Name, getConnectionFactory2Properties, getConnectionFactoryMode, getConnectionFactoryName, getConnectionFactoryProperties, getConnectionPassword, getConnectionProperties, getConnectionRetainMode, getConnectionRetainModeConstant, getConnectionURL, getConnectionUserName, getDataCache, getDataCacheManager, getDataCacheManagerInstance, getDataCacheTimeout, getDetachStateInstance, getDynamicDataStructs, getFetchBatchSize, getFetchGroups, getFetchGroupsList, getFilterListenerInstances, getFilterListeners, getFlushBeforeQueries, getFlushBeforeQueriesConstant, getIgnoreChanges, getInverseManager, getLockManager, getLockTimeout, getManagedRuntime, getManagedRuntimeInstance, getMapping, getMaxFetchDepth, getMetaDataFactory, getMetaDataRepository, getMetaDataRepositoryInstance, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getOrphanedKeyAction, getOrphanedKeyActionInstance, getProxyManager, getProxyManagerInstance, getQueryCache, getQueryCompilationCache, getQueryCompilationCacheInstance, getReadLockLevel, getReadLockLevelConstant, getRemoteCommitEventManager, getRemoteCommitProvider, getRestoreState, getRestoreStateConstant, getRetainState, getRetryClassRegistration, getRuntimeUnenhancedClasses, getRuntimeUnenhancedClassesConstant, getSavepointManager, getSavepointManagerInstance, getSequence, getSequenceInstance, getSpecification, getStoreFacadeTypeRegistry, getTransactionMode, getWriteLockLevel, getWriteLockLevelConstant, isConnectionFactoryModeManaged, isTransactionModeManaged, metaDataRepositoryAvailable, newInverseManagerInstance, newLockManagerInstance, newMetaDataRepositoryInstance, newRemoteCommitProviderInstance, setAggregateListeners, setAggregateListeners, setAutoClear, setAutoClear, setAutoDetach, setAutoDetach, setBrokerFactory, setBrokerImpl, setClassResolver, setClassResolver, setCompatibility, setConnection2DriverName, setConnection2Password, setConnection2Properties, setConnection2URL, setConnection2UserName, setConnectionDriverName, setConnectionFactory2Name, setConnectionFactory2Properties, setConnectionFactoryMode, setConnectionFactoryModeManaged, setConnectionFactoryName, setConnectionFactoryProperties, setConnectionPassword, setConnectionProperties, setConnectionRetainMode, setConnectionRetainMode, setConnectionURL, setConnectionUserName, setDataCache, setDataCacheManager, setDataCacheManager, setDataCacheTimeout, setDataCacheTimeout, setDetachState, setDetachState, setDynamicDataStructs, setDynamicDataStructs, setFetchBatchSize, setFetchBatchSize, setFetchGroups, setFetchGroups, setFilterListeners, setFilterListeners, setFlushBeforeQueries, setFlushBeforeQueries, setIgnoreChanges, setIgnoreChanges, setInverseManager, setLockManager, setLockTimeout, setLockTimeout, setManagedRuntime, setManagedRuntime, setMapping, setMaxFetchDepth, setMaxFetchDepth, setMetaDataFactory, setMetaDataRepository, setMetaDataRepository, setMultithreaded, setMultithreaded, setNontransactionalRead, setNontransactionalRead, setNontransactionalWrite, setNontransactionalWrite, setOptimistic, setOptimistic, setOrphanedKeyAction, setOrphanedKeyAction, setProxyManager, setProxyManager, setQueryCache, setQueryCompilationCache, setReadLockLevel, setReadLockLevel, setRemoteCommitEventManager, setRemoteCommitProvider, setRestoreState, setRestoreState, setRetainState, setRetainState, setRetryClassRegistration, setRetryClassRegistration, setRuntimeUnenhancedClasses, setRuntimeUnenhancedClasses, setSavepointManager, setSequence, setSequence, setSpecification, setTransactionMode, setTransactionModeManaged, setWriteLockLevel, setWriteLockLevel, supportedOptions
 
Methods inherited from interface org.apache.openjpa.lib.conf.Configuration
addPropertyChangeListener, addValue, clone, close, fromProperties, getConfigurationLog, getDynamicValues, getId, getLog, getLog, getLogFactory, getProductName, getValue, getValues, instantiateAll, isDynamic, isReadOnly, modifyDynamic, 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

schema

public org.apache.openjpa.lib.conf.StringValue schema

schemas

public org.apache.openjpa.lib.conf.StringListValue schemas

transactionIsolation

public org.apache.openjpa.lib.conf.IntValue transactionIsolation

resultSetType

public org.apache.openjpa.lib.conf.IntValue resultSetType

fetchDirection

public org.apache.openjpa.lib.conf.IntValue fetchDirection

eagerFetchMode

public FetchModeValue eagerFetchMode

subclassFetchMode

public FetchModeValue subclassFetchMode

lrsSize

public org.apache.openjpa.lib.conf.IntValue lrsSize

synchronizeMappings

public org.apache.openjpa.lib.conf.StringValue synchronizeMappings

jdbcListenerPlugins

public org.apache.openjpa.lib.conf.ObjectValue jdbcListenerPlugins

connectionDecoratorPlugins

public org.apache.openjpa.lib.conf.ObjectValue connectionDecoratorPlugins

dbdictionaryPlugin

public org.apache.openjpa.lib.conf.PluginValue dbdictionaryPlugin

updateManagerPlugin

public org.apache.openjpa.lib.conf.ObjectValue updateManagerPlugin

schemaFactoryPlugin

public org.apache.openjpa.lib.conf.ObjectValue schemaFactoryPlugin

sqlFactoryPlugin

public org.apache.openjpa.lib.conf.ObjectValue sqlFactoryPlugin

mappingDefaultsPlugin

public org.apache.openjpa.lib.conf.ObjectValue mappingDefaultsPlugin

driverDataSourcePlugin

public org.apache.openjpa.lib.conf.PluginValue driverDataSourcePlugin

mappingFactoryPlugin

public MappingFactoryValue mappingFactoryPlugin
Constructor Detail

JDBCConfigurationImpl

public JDBCConfigurationImpl()
Default constructor. Attempts to load default properties.


JDBCConfigurationImpl

public JDBCConfigurationImpl(boolean loadGlobals)
Constructor.

Parameters:
loadGlobals - whether to attempt to load the global properties

JDBCConfigurationImpl

public JDBCConfigurationImpl(boolean derivations,
                             boolean loadGlobals)
Constructor.

Parameters:
derivations - whether to apply product derivations
loadGlobals - whether to attempt to load the global properties

JDBCConfigurationImpl

public JDBCConfigurationImpl(JDBCConfiguration conf)
Copy constructor

Method Detail

setSchema

public void setSchema(java.lang.String schema)
Description copied from interface: JDBCConfiguration
Default schema for unqualified tables.

Specified by:
setSchema in interface JDBCConfiguration

getSchema

public java.lang.String getSchema()
Description copied from interface: JDBCConfiguration
Default schema for unqualified tables.

Specified by:
getSchema in interface JDBCConfiguration

setSchemas

public void setSchemas(java.lang.String schemas)
Description copied from interface: JDBCConfiguration
Comma-separated list of modifiable schemas for persistent instances.

Specified by:
setSchemas in interface JDBCConfiguration

getSchemas

public java.lang.String getSchemas()
Description copied from interface: JDBCConfiguration
Comma-separated list of modifiable schemas for persistent instances.

Specified by:
getSchemas in interface JDBCConfiguration

setSchemas

public void setSchemas(java.lang.String[] schemas)
Description copied from interface: JDBCConfiguration
Modifiable schema components.

Specified by:
setSchemas in interface JDBCConfiguration

getSchemasList

public java.lang.String[] getSchemasList()
Description copied from interface: JDBCConfiguration
Modificable schema components.

Specified by:
getSchemasList in interface JDBCConfiguration

setTransactionIsolation

public void setTransactionIsolation(java.lang.String transactionIsolation)
Description copied from interface: JDBCConfiguration
The transaction isolation level to use at the database level. Possible values are:

Specified by:
setTransactionIsolation in interface JDBCConfiguration

getTransactionIsolation

public java.lang.String getTransactionIsolation()
Description copied from interface: JDBCConfiguration
The transaction isolation level to use at the database level. Possible values are:

Specified by:
getTransactionIsolation in interface JDBCConfiguration

setTransactionIsolation

public void setTransactionIsolation(int transactionIsolation)
Description copied from interface: JDBCConfiguration
Set the proper transaction isolation level constant from Connection, or -1 for the default level.

Specified by:
setTransactionIsolation in interface JDBCConfiguration

getTransactionIsolationConstant

public int getTransactionIsolationConstant()
Description copied from interface: JDBCConfiguration
Return the proper transaction isolation level constant from Connection, or -1 for the default level.

Specified by:
getTransactionIsolationConstant in interface JDBCConfiguration

setResultSetType

public void setResultSetType(java.lang.String resultSetType)
Description copied from interface: JDBCConfiguration
The JDBC result set type. Defaults to forward-only.

Specified by:
setResultSetType in interface JDBCConfiguration

getResultSetType

public java.lang.String getResultSetType()
Description copied from interface: JDBCConfiguration
The JDBC result set type. Defaults to forward-only.

Specified by:
getResultSetType in interface JDBCConfiguration

setResultSetType

public void setResultSetType(int resultSetType)
Description copied from interface: JDBCConfiguration
Set the result set constant type.

Specified by:
setResultSetType in interface JDBCConfiguration

getResultSetTypeConstant

public int getResultSetTypeConstant()
Description copied from interface: JDBCConfiguration
Return the result set constant for the result set type.

Specified by:
getResultSetTypeConstant in interface JDBCConfiguration

setFetchDirection

public void setFetchDirection(java.lang.String fetchDirection)
Description copied from interface: JDBCConfiguration
The JDBC fetch direction. Defaults to forward.

Specified by:
setFetchDirection in interface JDBCConfiguration

getFetchDirection

public java.lang.String getFetchDirection()
Description copied from interface: JDBCConfiguration
The JDBC fetch direction. Defaults to forward.

Specified by:
getFetchDirection in interface JDBCConfiguration

setFetchDirection

public void setFetchDirection(int fetchDirection)
Description copied from interface: JDBCConfiguration
Set the result set fetch direction constant.

Specified by:
setFetchDirection in interface JDBCConfiguration

getFetchDirectionConstant

public int getFetchDirectionConstant()
Description copied from interface: JDBCConfiguration
Return the result set constant for the fetch direction.

Specified by:
getFetchDirectionConstant in interface JDBCConfiguration

setEagerFetchMode

public void setEagerFetchMode(java.lang.String eagerFetchMode)
Description copied from interface: JDBCConfiguration
Specifies the default eager fetch mode to use. Defaults to parallel unless the query is by-oid. Possible values are:

Specified by:
setEagerFetchMode in interface JDBCConfiguration

getEagerFetchMode

public java.lang.String getEagerFetchMode()
Description copied from interface: JDBCConfiguration
Specifies the default eager fetch mode to use. Defaults to parallel unless the query is by-oid. Possible values are:

Specified by:
getEagerFetchMode in interface JDBCConfiguration

setEagerFetchMode

public void setEagerFetchMode(int eagerFetchMode)
Description copied from interface: JDBCConfiguration
Set the eager fetch mode as one of the following symbolic constants:

Specified by:
setEagerFetchMode in interface JDBCConfiguration

getEagerFetchModeConstant

public int getEagerFetchModeConstant()
Description copied from interface: JDBCConfiguration
Return the eager fetch mode as one of the following symbolic constants:

Specified by:
getEagerFetchModeConstant in interface JDBCConfiguration

setSubclassFetchMode

public void setSubclassFetchMode(java.lang.String subclassFetchMode)
Description copied from interface: JDBCConfiguration
Specifies the default subclass fetch mode to use. Defaults to join unless the query is by-oid. Possible values are:

Specified by:
setSubclassFetchMode in interface JDBCConfiguration

getSubclassFetchMode

public java.lang.String getSubclassFetchMode()
Description copied from interface: JDBCConfiguration
Specifies the default subclass fetch mode to use. Defaults to join unless the query is by-oid. Possible values are:

Specified by:
getSubclassFetchMode in interface JDBCConfiguration

setSubclassFetchMode

public void setSubclassFetchMode(int subclassFetchMode)
Description copied from interface: JDBCConfiguration
Set the subclass fetch mode as one of the following symbolic constants:

Specified by:
setSubclassFetchMode in interface JDBCConfiguration

getSubclassFetchModeConstant

public int getSubclassFetchModeConstant()
Description copied from interface: JDBCConfiguration
Return the subclass fetch mode as one of the following symbolic constants:

Specified by:
getSubclassFetchModeConstant in interface JDBCConfiguration

setLRSSize

public void setLRSSize(java.lang.String lrsSize)
Description copied from interface: JDBCConfiguration
How to obtain the size of large result sets. Defaults to unknown.

Specified by:
setLRSSize in interface JDBCConfiguration

getLRSSize

public java.lang.String getLRSSize()
Description copied from interface: JDBCConfiguration
How to obtain the size of large result sets. Defaults to unknown.

Specified by:
getLRSSize in interface JDBCConfiguration

setLRSSize

public void setLRSSize(int lrsSize)
Description copied from interface: JDBCConfiguration
Set the fetch configuration large result set size constant.

Specified by:
setLRSSize in interface JDBCConfiguration

getLRSSizeConstant

public int getLRSSizeConstant()
Description copied from interface: JDBCConfiguration
Return the LRSSizes constant for the large result set size setting.

Specified by:
getLRSSizeConstant in interface JDBCConfiguration

setSynchronizeMappings

public void setSynchronizeMappings(java.lang.String synchronizeMappings)
Description copied from interface: JDBCConfiguration
Whether OpenJPA should try to automatically refresh O/R mapping information and the database schema.

Specified by:
setSynchronizeMappings in interface JDBCConfiguration

getSynchronizeMappings

public java.lang.String getSynchronizeMappings()
Description copied from interface: JDBCConfiguration
Whether OpenJPA should try to automatically refresh O/R mapping information and the database schema.

Specified by:
getSynchronizeMappings in interface JDBCConfiguration

setJDBCListeners

public void setJDBCListeners(java.lang.String jdbcListeners)
Description copied from interface: JDBCConfiguration
A comma-separated list of the JDBCListener plugins for listening to JDBCEvents.

Specified by:
setJDBCListeners in interface JDBCConfiguration

getJDBCListeners

public java.lang.String getJDBCListeners()
Description copied from interface: JDBCConfiguration
A comma-separated list of the JDBCListener plugins for listening to JDBCEvents.

Specified by:
getJDBCListeners in interface JDBCConfiguration

setJDBCListeners

public void setJDBCListeners(org.apache.openjpa.lib.jdbc.JDBCListener[] listeners)
Description copied from interface: JDBCConfiguration
The JDBCListeners to use.

Specified by:
setJDBCListeners in interface JDBCConfiguration

getJDBCListenerInstances

public org.apache.openjpa.lib.jdbc.JDBCListener[] getJDBCListenerInstances()
Description copied from interface: JDBCConfiguration
The JDBCListeners to use.

Specified by:
getJDBCListenerInstances in interface JDBCConfiguration

setConnectionDecorators

public void setConnectionDecorators(java.lang.String connectionDecorators)
Description copied from interface: JDBCConfiguration
A comma-separated list of the ConnectionDecorator for adding functionality to JDBC connections.

Specified by:
setConnectionDecorators in interface JDBCConfiguration

getConnectionDecorators

public java.lang.String getConnectionDecorators()
Description copied from interface: JDBCConfiguration
A comma-separated list of the ConnectionDecorator for adding functionality to JDBC connections.

Specified by:
getConnectionDecorators in interface JDBCConfiguration

setConnectionDecorators

public void setConnectionDecorators(org.apache.openjpa.lib.jdbc.ConnectionDecorator[] decorators)
Description copied from interface: JDBCConfiguration
The ConnectionDecorators to use.

Specified by:
setConnectionDecorators in interface JDBCConfiguration

getConnectionDecoratorInstances

public org.apache.openjpa.lib.jdbc.ConnectionDecorator[] getConnectionDecoratorInstances()
Description copied from interface: JDBCConfiguration
The ConnectionDecorators to use.

Specified by:
getConnectionDecoratorInstances in interface JDBCConfiguration

setDBDictionary

public void setDBDictionary(java.lang.String dbdictionary)
Description copied from interface: JDBCConfiguration
The DBDictionary to use to define the RDBMS SQL information.

Specified by:
setDBDictionary in interface JDBCConfiguration

getDBDictionary

public java.lang.String getDBDictionary()
Description copied from interface: JDBCConfiguration
The DBDictionary to use to define the RDBMS SQL information.

Specified by:
getDBDictionary in interface JDBCConfiguration

setDBDictionary

public void setDBDictionary(DBDictionary dbdictionary)
Description copied from interface: JDBCConfiguration
The DBDictionary to use.

Specified by:
setDBDictionary in interface JDBCConfiguration

getDBDictionaryInstance

public DBDictionary getDBDictionaryInstance()
Description copied from interface: JDBCConfiguration
The DBDictionary to use.

Specified by:
getDBDictionaryInstance in interface JDBCConfiguration

setUpdateManager

public void setUpdateManager(java.lang.String updateManager)
Description copied from interface: JDBCConfiguration
The UpdateManager to use for managing SQL updates.

Specified by:
setUpdateManager in interface JDBCConfiguration

getUpdateManager

public java.lang.String getUpdateManager()
Description copied from interface: JDBCConfiguration
The UpdateManager to use for managing SQL updates.

Specified by:
getUpdateManager in interface JDBCConfiguration

setUpdateManager

public void setUpdateManager(UpdateManager updateManager)
Description copied from interface: JDBCConfiguration
The UpdateManager for runtime data store interaction.

Specified by:
setUpdateManager in interface JDBCConfiguration

getUpdateManagerInstance

public UpdateManager getUpdateManagerInstance()
Description copied from interface: JDBCConfiguration
The UpdateManager for runtime data store interaction.

Specified by:
getUpdateManagerInstance in interface JDBCConfiguration

setDriverDataSource

public void setDriverDataSource(java.lang.String driverDataSource)
Description copied from interface: JDBCConfiguration
The DriverDataSource to use for creating a DataSource from a JDBC Driver.

Specified by:
setDriverDataSource in interface JDBCConfiguration

getDriverDataSource

public java.lang.String getDriverDataSource()
Description copied from interface: JDBCConfiguration
The DriverDataSource to use for creating a DataSource from a JDBC Driver.

Specified by:
getDriverDataSource in interface JDBCConfiguration

newDriverDataSourceInstance

public DriverDataSource newDriverDataSourceInstance()
Description copied from interface: JDBCConfiguration
Create an instance of the DriverDataSource to use for creating a DataSource from a JDBC Driver.

Specified by:
newDriverDataSourceInstance in interface JDBCConfiguration

setSchemaFactory

public void setSchemaFactory(java.lang.String schemaFactory)
Description copied from interface: JDBCConfiguration
The plugin string for the SchemaFactory to use to provide schema information during system initialization.

Specified by:
setSchemaFactory in interface JDBCConfiguration

getSchemaFactory

public java.lang.String getSchemaFactory()
Description copied from interface: JDBCConfiguration
The plugin string for the SchemaFactory to use to provide schema information during system initialization.

Specified by:
getSchemaFactory in interface JDBCConfiguration

setSchemaFactory

public void setSchemaFactory(SchemaFactory schemaFactory)
Description copied from interface: JDBCConfiguration
The SchemaFactory to use for schema information.

Specified by:
setSchemaFactory in interface JDBCConfiguration

getSchemaFactoryInstance

public SchemaFactory getSchemaFactoryInstance()
Description copied from interface: JDBCConfiguration
The SchemaFactory to use for schema information.

Specified by:
getSchemaFactoryInstance in interface JDBCConfiguration

setSQLFactory

public void setSQLFactory(java.lang.String sqlFactory)
Description copied from interface: JDBCConfiguration
The SQL factory to use for SQL constructs.

Specified by:
setSQLFactory in interface JDBCConfiguration

getSQLFactory

public java.lang.String getSQLFactory()
Description copied from interface: JDBCConfiguration
The SQL factory to use for SQL constructs.

Specified by:
getSQLFactory in interface JDBCConfiguration

setSQLFactory

public void setSQLFactory(SQLFactory sqlFactory)
Description copied from interface: JDBCConfiguration
The SQL factory to use for SQL constructs.

Specified by:
setSQLFactory in interface JDBCConfiguration

getSQLFactoryInstance

public SQLFactory getSQLFactoryInstance()
Description copied from interface: JDBCConfiguration
The SQL factory to use for SQL constructs.

Specified by:
getSQLFactoryInstance in interface JDBCConfiguration

getMappingFactory

public java.lang.String getMappingFactory()
Description copied from interface: JDBCConfiguration
A plugin string describing the MetaDataFactory to use for loading and storing object-relational mapping data.

Specified by:
getMappingFactory in interface JDBCConfiguration

setMappingFactory

public void setMappingFactory(java.lang.String mapping)
Description copied from interface: JDBCConfiguration
A plugin string describing the MetaDataFactory to use for loading and storing object-relational mapping data.

Specified by:
setMappingFactory in interface JDBCConfiguration

newMetaDataFactoryInstance

public org.apache.openjpa.meta.MetaDataFactory newMetaDataFactoryInstance()
Specified by:
newMetaDataFactoryInstance in interface org.apache.openjpa.conf.OpenJPAConfiguration
Overrides:
newMetaDataFactoryInstance in class org.apache.openjpa.conf.OpenJPAConfigurationImpl

setMappingDefaults

public void setMappingDefaults(java.lang.String mapping)
Description copied from interface: JDBCConfiguration
A plugin string describing the MappingDefaults to use.

Specified by:
setMappingDefaults in interface JDBCConfiguration

getMappingDefaults

public java.lang.String getMappingDefaults()
Description copied from interface: JDBCConfiguration
A plugin string describing the MappingDefaults to use.

Specified by:
getMappingDefaults in interface JDBCConfiguration

setMappingDefaults

public void setMappingDefaults(MappingDefaults mapping)
Description copied from interface: JDBCConfiguration
The MappingDefaults to use with a repository.

Specified by:
setMappingDefaults in interface JDBCConfiguration

getMappingDefaultsInstance

public MappingDefaults getMappingDefaultsInstance()
Description copied from interface: JDBCConfiguration
The MappingDefaults to use with a repository.

Specified by:
getMappingDefaultsInstance in interface JDBCConfiguration

getMappingRepositoryInstance

public MappingRepository getMappingRepositoryInstance()
Description copied from interface: JDBCConfiguration
Return the mapping repository. Convenience method to cast from the internal metadata repository.

Specified by:
getMappingRepositoryInstance in interface JDBCConfiguration

newMappingRepositoryInstance

public MappingRepository newMappingRepositoryInstance()
Description copied from interface: JDBCConfiguration
Return a new empty mapping repository of the configured type. Convenience method to cast from metadata repository.

Specified by:
newMappingRepositoryInstance in interface JDBCConfiguration

newBrokerInstance

public org.apache.openjpa.kernel.BrokerImpl newBrokerInstance(java.lang.String user,
                                                              java.lang.String pass)
Specified by:
newBrokerInstance in interface org.apache.openjpa.conf.OpenJPAConfiguration
Overrides:
newBrokerInstance in class org.apache.openjpa.conf.OpenJPAConfigurationImpl

getConnectionFactory

public java.lang.Object getConnectionFactory()
Specified by:
getConnectionFactory in interface org.apache.openjpa.conf.OpenJPAConfiguration
Overrides:
getConnectionFactory in class org.apache.openjpa.conf.OpenJPAConfigurationImpl

setConnectionFactory

public void setConnectionFactory(java.lang.Object factory)
Specified by:
setConnectionFactory in interface org.apache.openjpa.conf.OpenJPAConfiguration
Overrides:
setConnectionFactory in class org.apache.openjpa.conf.OpenJPAConfigurationImpl

getConnectionFactory2

public java.lang.Object getConnectionFactory2()
Specified by:
getConnectionFactory2 in interface org.apache.openjpa.conf.OpenJPAConfiguration
Overrides:
getConnectionFactory2 in class org.apache.openjpa.conf.OpenJPAConfigurationImpl

setConnectionFactory2

public void setConnectionFactory2(java.lang.Object factory)
Specified by:
setConnectionFactory2 in interface org.apache.openjpa.conf.OpenJPAConfiguration
Overrides:
setConnectionFactory2 in class org.apache.openjpa.conf.OpenJPAConfigurationImpl

getDataSource

public javax.sql.DataSource getDataSource(org.apache.openjpa.kernel.StoreContext ctx)
Description copied from interface: JDBCConfiguration
Return the primary data source to use. The data source will automatically use the given context's user name and password on calls to 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.

Specified by:
getDataSource in interface JDBCConfiguration

getDataSource2

public javax.sql.DataSource getDataSource2(org.apache.openjpa.kernel.StoreContext ctx)
Description copied from interface: JDBCConfiguration
Return the non-enlisted data source to use. If there is a valid non-xa connection factory configured, then it will be returned. Its default user name and password on calls to 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.

Specified by:
getDataSource2 in interface JDBCConfiguration
See Also:
JDBCConfiguration.getDataSource(org.apache.openjpa.kernel.StoreContext)

preClose

protected void preClose()
Free the data sources.

Overrides:
preClose in class org.apache.openjpa.conf.OpenJPAConfigurationImpl

isInvalidProperty

protected boolean isInvalidProperty(java.lang.String propName)
Overrides:
isInvalidProperty in class org.apache.openjpa.lib.conf.ConfigurationImpl


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.