|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jenkov.mrpersister.impl.PersistenceConfigurationFactory
public class PersistenceConfigurationFactory
Field Summary | |
---|---|
protected java.util.Map |
configurations
|
protected PersistenceManager |
persistenceManager
|
Constructor Summary | |
---|---|
PersistenceConfigurationFactory(PersistenceManager persistenceManager)
|
Method Summary | |
---|---|
IPersistenceConfiguration |
createConfiguration()
Creates a new persistence configuration targeted at the default database (any JDBC compliant database). |
IPersistenceConfiguration |
createConfiguration(Database database)
Creates a new persistence configuration. |
IPersistenceConfiguration |
getConfiguration(java.lang.Object configurationKey)
Returns the IPersistenceConfiguration stored by the given key. |
IPersistenceConfiguration |
getOrCreateConfiguration(java.lang.Object configurationKey)
Returns the IPersistenceConfiguration instance stored by
the given key. |
IPersistenceConfiguration |
getOrCreateConfiguration(java.lang.Object configurationKey,
Database database)
Returns the IPersistenceConfiguration instance stored by
the given key. |
void |
removeConfiguration(java.lang.Object configurationKey)
Removes the IPersistenceConfiguration stored by the given key. |
void |
storeConfiguration(java.lang.Object configurationKey,
IPersistenceConfiguration configuration)
Stores the IPersistenceConfiguration by given key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map configurations
protected PersistenceManager persistenceManager
Constructor Detail |
---|
public PersistenceConfigurationFactory(PersistenceManager persistenceManager)
Method Detail |
---|
public IPersistenceConfiguration createConfiguration()
IPersistenceConfigurationFactory
createConfiguration
in interface IPersistenceConfigurationFactory
public IPersistenceConfiguration createConfiguration(Database database)
IPersistenceConfigurationFactory
createConfiguration
in interface IPersistenceConfigurationFactory
database
- The database is the database the configuration should be targeted at.
public IPersistenceConfiguration getOrCreateConfiguration(java.lang.Object configurationKey)
IPersistenceConfigurationFactory
IPersistenceConfiguration
instance stored by
the given key. If none is stored a new will be created and stored by
the key for later use.
getOrCreateConfiguration
in interface IPersistenceConfigurationFactory
configurationKey
- The key of the persistence configuration to get,
or to store it by if a new instance is created.
public IPersistenceConfiguration getOrCreateConfiguration(java.lang.Object configurationKey, Database database)
IPersistenceConfigurationFactory
IPersistenceConfiguration
instance stored by
the given key. If none is stored a new will be created and stored by
the key for later use.
getOrCreateConfiguration
in interface IPersistenceConfigurationFactory
configurationKey
- The key of the persistence configuration to get,
or to store it by if a new instance is created.database
- The database to target this configuration for.
public IPersistenceConfiguration getConfiguration(java.lang.Object configurationKey)
IPersistenceConfigurationFactory
IPersistenceConfiguration
stored by the given key.
getConfiguration
in interface IPersistenceConfigurationFactory
configurationKey
- The key of the configuration instance to get.
IPersistenceConfiguration
stored by the given key.public void storeConfiguration(java.lang.Object configurationKey, IPersistenceConfiguration configuration)
IPersistenceConfigurationFactory
IPersistenceConfiguration
by given key.
storeConfiguration
in interface IPersistenceConfigurationFactory
configurationKey
- The key to store the configuration instance by.configuration
- The configuration to store.public void removeConfiguration(java.lang.Object configurationKey)
IPersistenceConfigurationFactory
IPersistenceConfiguration
stored by the given key.
removeConfiguration
in interface IPersistenceConfigurationFactory
configurationKey
- The key of the persistence configuration to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |