public class DataManager extends Object
| Constructor and Description |
|---|
DataManager()
Creates a new DataManager using
DefaultIdGenerator and
DefaultStoreFactory |
DataManager(IdGenerator idGenerator)
Creates a new DataManager using the idGenerator parameter and
DefaultStoreFactory |
DataManager(IdGenerator idGenerator,
StoreFactory storeFactory)
Creates a DataManager using the supplied parameters
|
DataManager(StoreFactory storeFactory)
Creates a new DataManager using the storeFactory parameter and
DefaultIdGenerator |
| Modifier and Type | Method and Description |
|---|---|
Store |
encryptedStore(String storeName,
StoreConfig config,
String passphrase,
Class modelClass)
Creates a new Store implementation.
|
Store |
encryptedStore(String storeName,
String passphrase,
Class modelClass)
Creates a new default encrypted (in memory) Store implementation.
|
Store |
get(String storeName)
Loads a given Store implementation, based on the given storeName argument.
|
Store |
remove(String storeName)
Removes a Store implementation from the DataManager.
|
Store |
store(String storeName)
Deprecated.
|
Store |
store(String storeName,
Class modelClass)
Creates a new default (in memory) Store implementation.
|
Store |
store(String storeName,
StoreConfig config)
Creates a new Store implementation.
|
public DataManager()
DefaultIdGenerator and
DefaultStoreFactorypublic DataManager(IdGenerator idGenerator)
DefaultStoreFactoryidGenerator - an idGeneratorIllegalArgumentException - if idGenerator is nullpublic DataManager(StoreFactory storeFactory)
DefaultIdGeneratorstoreFactory - a store factoryIllegalArgumentException - if storeFactory is nullpublic DataManager(IdGenerator idGenerator, StoreFactory storeFactory)
idGenerator - an idGeneratorstoreFactory - a store factoryIllegalArgumentException - if idGenerator is nullIllegalArgumentException - if storeFactory is null@Deprecated public Store store(String storeName)
store(java.lang.String, java.lang.Class)storeName - The name of the actual data store object.public Store store(String storeName, Class modelClass)
storeName - The name of the actual data store object.modelClass - The class for the Storepublic Store store(String storeName, StoreConfig config)
storeName - The name of the actual data store object.config - The config object used to build the storepublic Store encryptedStore(String storeName, String passphrase, Class modelClass) throws InvalidKeySpecException
storeName - The name of the actual data store object.passphrase - The passphrase used to create a KeyStoremodelClass - The model class will be encryptedInvalidKeySpecException - if the key spec is invalidpublic Store encryptedStore(String storeName, StoreConfig config, String passphrase, Class modelClass) throws InvalidKeySpecException
storeName - The name of the actual data store object.config - The config object used to build the storepassphrase - The passphrase used to create a KeyStoremodelClass - The model class will be encryptedInvalidKeySpecException - if encryption is used, this method will
throw an exception if the keys provided on the config object are malformed.public Store remove(String storeName)
storeName - The name of the actual data store object.Copyright © 2014 JBoss by Red Hat. All rights reserved.