|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jenkov.mrpersister.impl.PersistenceConfiguration
public class PersistenceConfiguration
Created by IntelliJ IDEA. User: Administrator Date: 16-02-2004 Time: 15:41:02 To change this template use File | Settings | File Templates.
Field Summary | |
---|---|
protected java.lang.Object |
configurationKey
|
protected ICustomObjectMapper |
customObjectMapper
|
protected Database |
database
|
protected javax.sql.DataSource |
dataSource
|
protected ISqlCache |
deleteSqlCache
|
protected ISqlCache |
insertSqlCache
|
protected IObjectMapper |
mapper
|
protected IObjectMappingCache |
mappingCache
|
protected PersistenceManager |
persistenceManager
|
protected ISqlCache |
readByPrimaryKeySqlCache
|
protected IObjectReader |
reader
|
protected IScopeFactory |
scopeFactory
|
protected ISqlGenerator |
sqlGenerator
|
protected ISqlCache |
updateOptimisticSqlCache
|
protected ISqlCache |
updateSqlCache
|
protected IObjectWriter |
writer
|
Constructor Summary | |
---|---|
PersistenceConfiguration(Database database,
PersistenceManager persistenceManager)
|
|
PersistenceConfiguration(PersistenceManager persistenceManager)
|
Method Summary | |
---|---|
java.lang.Object |
getConfigurationKey()
Returns the key by which this persistence configuration is stored internally in the MrPersister class. |
ICustomObjectMapper |
getCustomObjectMapper()
Returns the custom object mapper of this persistence configuration. |
Database |
getDatabase()
Returns the Database instance representing the database this instance
is specialized for. |
javax.sql.DataSource |
getDataSource()
Gets the data source associated with this persistence configuration. |
ISqlCache |
getDeleteSqlCache()
Returns the SQL cache used to store delete statements in this persistence configuration. |
ISqlCache |
getInsertSqlCache()
Returns the SQL cache used to store insert SQL statements in this persistence configuration. |
IObjectCache |
getObjectCache()
|
IObjectMapper |
getObjectMapper()
Returns the object mapper used in this persistence configuration. |
IObjectMappingCache |
getObjectMappingCache()
Returns the object mapping cache used in this persistence configuration. |
IObjectReader |
getObjectReader()
Returns the object reader used in this persistence configuration. |
IObjectWriter |
getObjectWriter()
Returns the object writer used in this persistence configuration. |
PersistenceManager |
getPersistenceManager()
|
ISqlCache |
getReadByPrimaryKeySqlCache()
Returns the SQL cache used to store read-by-primary-key SQL statements in this persistence configuration. |
IScopeFactory |
getScopeFactory()
Returns the scope factory matching the data source set on this persistence configuration. |
ISqlGenerator |
getSqlGenerator()
Returns the SQL generator used with this persistence configuration. |
ISqlCache |
getUpdateOptimisticSqlCache()
Returns the SQL cache used to store updateOptimistic SQL statements in this persistence configuration. |
ISqlCache |
getUpdateSqlCache()
Returns the SQL cache used to store updateBatch SQL statements in this persistence configuration. |
void |
setConfigurationKey(java.lang.Object configurationKey)
Sets the key by which this persistence configuration is stored internally in the MrPersister class. |
void |
setCustomObjectMapper(ICustomObjectMapper customObjectMapper)
Sets the custom object mapper of this persistence configuration. |
void |
setDatabase(Database database)
Sets the database this configuration is specialized for. |
void |
setDataSource(javax.sql.DataSource dataSource)
Sets the data source associated with this persistence configuration. |
void |
setDeleteSqlCache(ISqlCache cache)
Sets the SQL cache to be used to store delete SQL statements in this persistence configuration. |
void |
setInsertSqlCache(ISqlCache cache)
Sets the SQL cache to be used to store insert SQL statements in this persistence configuration. |
void |
setObjectCache(IObjectCache cache)
|
void |
setObjectMapper(IObjectMapper mapper)
Sets the object mapper to be used with this persistence configuration. |
void |
setObjectMappingCache(IObjectMappingCache cache)
Sets the object mapping cache to be used in this persistence configuration. |
void |
setObjectReader(IObjectReader reader)
Sets the object reader to be used with this persistence configuration. |
void |
setObjectWriter(IObjectWriter writer)
Sets the object writer to use with this persistence configuration. |
void |
setReadByPrimaryKeySqlCache(ISqlCache readByPrimaryKeySqlCache)
Sets the SQL cache to be used to store read-by-primary-key SQL statements in this persistence configuration. |
void |
setScopeFactory(IScopeFactory scopeFactory)
|
void |
setSqlGenerator(ISqlGenerator generator)
Sets the SQL generator to be used with this persistence configuration. |
void |
setUpdateOptimisticSqlCache(ISqlCache cache)
Sets the SQL cache to be used to store updateOptimistic SQL statements in this persistence configuration. |
void |
setUpdateSqlCache(ISqlCache cache)
Sets the SQL cache to be used to store updateBatch SQL statements in this persistence configuration. |
void |
update()
Updates the MrPersister class with any changes made to this IPersistenceConfiguration . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PersistenceManager persistenceManager
protected java.lang.Object configurationKey
protected IObjectReader reader
protected IObjectWriter writer
protected IObjectMapper mapper
protected IObjectMappingCache mappingCache
protected ICustomObjectMapper customObjectMapper
protected ISqlGenerator sqlGenerator
protected ISqlCache readByPrimaryKeySqlCache
protected ISqlCache insertSqlCache
protected ISqlCache updateSqlCache
protected ISqlCache updateOptimisticSqlCache
protected ISqlCache deleteSqlCache
protected Database database
protected javax.sql.DataSource dataSource
protected IScopeFactory scopeFactory
Constructor Detail |
---|
public PersistenceConfiguration(PersistenceManager persistenceManager)
public PersistenceConfiguration(Database database, PersistenceManager persistenceManager)
Method Detail |
---|
public Database getDatabase()
IPersistenceConfiguration
Database
instance representing the database this instance
is specialized for.
getDatabase
in interface IPersistenceConfiguration
Database
instance represeting the database this instance
is specialized for.public void setDatabase(Database database)
IPersistenceConfiguration
setDatabase
in interface IPersistenceConfiguration
public javax.sql.DataSource getDataSource()
IPersistenceConfiguration
getDataSource
in interface IPersistenceConfiguration
public void setDataSource(javax.sql.DataSource dataSource)
IPersistenceConfiguration
setDataSource
in interface IPersistenceConfiguration
public IScopeFactory getScopeFactory()
IPersistenceConfiguration
getScopeFactory
in interface IPersistenceConfiguration
public void setScopeFactory(IScopeFactory scopeFactory)
public java.lang.Object getConfigurationKey()
IPersistenceConfiguration
getConfigurationKey
in interface IPersistenceConfiguration
public void setConfigurationKey(java.lang.Object configurationKey)
IPersistenceConfiguration
IPersistenceConfiguration
instance will not
remap the instance stored in the MrPersister class. You will have to
remove the previously stored IPersistenceConfiguration
yourself.
IPersistenceConfiguration
instance will however store that instance by the new key. But the instance will
remain mapped to the old key as well in the MrPersister class.
setConfigurationKey
in interface IPersistenceConfiguration
configurationKey
- key by which this persistence configuration is stored internally
in the MrPersister class, until you specifically remove that instance
from the MrPersister class.public PersistenceManager getPersistenceManager()
public void update()
IPersistenceConfiguration
IPersistenceConfiguration
. This method must be called whenever
changes have been made to any of the objects stored in this persistence configuration.
This must be done to assure that changes to a persistence configuration by one
thread, are also visible to other threads using it.
This does not include objects inserted or removed from the various caches, as these
are already prepared to handle concurrency. Only changes to the other components, or
if components in this persistence configuraion are replaced by others.
update
in interface IPersistenceConfiguration
public IObjectMapper getObjectMapper()
IPersistenceConfiguration
getObjectMapper
in interface IPersistenceConfiguration
IObjectMapper
instance set in this persistence configuration.public void setObjectMapper(IObjectMapper mapper)
IPersistenceConfiguration
setObjectMapper
in interface IPersistenceConfiguration
mapper
- The IObjectMapper
instance to use with this persistence configuration.public ICustomObjectMapper getCustomObjectMapper()
IPersistenceConfiguration
getCustomObjectMapper
in interface IPersistenceConfiguration
public void setCustomObjectMapper(ICustomObjectMapper customObjectMapper)
IPersistenceConfiguration
setCustomObjectMapper
in interface IPersistenceConfiguration
customObjectMapper
- The custom object mapper to set on this persistence configuration.public IObjectMappingCache getObjectMappingCache()
IPersistenceConfiguration
getObjectMappingCache
in interface IPersistenceConfiguration
IObjectMappingCache
instance set in this persistence configuration.public void setObjectMappingCache(IObjectMappingCache cache)
IPersistenceConfiguration
setObjectMappingCache
in interface IPersistenceConfiguration
cache
- The IObjectMappingCache
instance to use in this persistence configuration.public IObjectCache getObjectCache()
public void setObjectCache(IObjectCache cache)
public IObjectReader getObjectReader()
IPersistenceConfiguration
getObjectReader
in interface IPersistenceConfiguration
IObjectReader
instance set in this persistence configuration.public void setObjectReader(IObjectReader reader)
IPersistenceConfiguration
setObjectReader
in interface IPersistenceConfiguration
reader
- The IObjectReader
instance to use with this persistence configurationpublic IObjectWriter getObjectWriter()
IPersistenceConfiguration
getObjectWriter
in interface IPersistenceConfiguration
IObjectWriter
instance set in this persistence configuration.public void setObjectWriter(IObjectWriter writer)
IPersistenceConfiguration
setObjectWriter
in interface IPersistenceConfiguration
writer
- The IObjectWriter
instance to use with this persistence configuration.public ISqlGenerator getSqlGenerator()
IPersistenceConfiguration
getSqlGenerator
in interface IPersistenceConfiguration
ISqlGenerator
instance set in this persistence configuration.public void setSqlGenerator(ISqlGenerator generator)
IPersistenceConfiguration
setSqlGenerator
in interface IPersistenceConfiguration
generator
- The ISqlGenerator
instance to be used with this persistence configuration.public ISqlCache getInsertSqlCache()
IPersistenceConfiguration
getInsertSqlCache
in interface IPersistenceConfiguration
ISqlCache
instance used to store insert SQL statements in
this persistence configuration.public void setInsertSqlCache(ISqlCache cache)
IPersistenceConfiguration
setInsertSqlCache
in interface IPersistenceConfiguration
cache
- The ISqlCache
instance to be used to store insert SQL statements
in this persistence configuration.public ISqlCache getUpdateSqlCache()
IPersistenceConfiguration
getUpdateSqlCache
in interface IPersistenceConfiguration
ISqlCache
instance used to store updateBatch SQL statements in
this persistence configuration.public ISqlCache getUpdateOptimisticSqlCache()
IPersistenceConfiguration
getUpdateOptimisticSqlCache
in interface IPersistenceConfiguration
ISqlCache
instance used to store updateOptimistic SQL statements in
this persistence configuration.public void setUpdateSqlCache(ISqlCache cache)
IPersistenceConfiguration
setUpdateSqlCache
in interface IPersistenceConfiguration
cache
- The ISqlCache
instance to be used to store updateBatch SQL statements
in this persistence configuration.public void setUpdateOptimisticSqlCache(ISqlCache cache)
IPersistenceConfiguration
setUpdateOptimisticSqlCache
in interface IPersistenceConfiguration
cache
- The ISqlCache
instance to be used to store updateOptimistic SQL statements
in this persistence configuration.public ISqlCache getDeleteSqlCache()
IPersistenceConfiguration
getDeleteSqlCache
in interface IPersistenceConfiguration
ISqlCache
instance used to store delete SQL statements in
this persistence configuration.public void setDeleteSqlCache(ISqlCache cache)
IPersistenceConfiguration
setDeleteSqlCache
in interface IPersistenceConfiguration
cache
- The ISqlCache
instance to be used to store delete SQL statements
in this persistence configuration.public ISqlCache getReadByPrimaryKeySqlCache()
IPersistenceConfiguration
getReadByPrimaryKeySqlCache
in interface IPersistenceConfiguration
ISqlCache
instance used to store read-by-primary-key SQL statements in
this persistence configuration.public void setReadByPrimaryKeySqlCache(ISqlCache readByPrimaryKeySqlCache)
IPersistenceConfiguration
setReadByPrimaryKeySqlCache
in interface IPersistenceConfiguration
readByPrimaryKeySqlCache
- The ISqlCache
instance to be used to store read-by-primary-key SQL statements
in this persistence configuration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |