|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.storage.StorageManager
public class StorageManager
The front-end of the storage system. The storage manager uses a storage engine which provides functionality to access different data sources.
| Nested Class Summary | |
|---|---|
static class |
StorageManager.StorageEngineType
|
| Constructor Summary | |
|---|---|
StorageManager(StorageEngine engine)
Instantiates the storage manager with the given storage engine. |
|
| Method Summary | ||
|---|---|---|
void |
commit()
Commits the Transaction |
|
void |
copyTo(File file)
|
|
static StorageEngine |
createStorageEngine(File file)
Creates a new storage engine. |
|
void |
dispose()
Disposes the storage engine. |
|
static String |
generateUUID()
Generates a UUID. |
|
static StorageManager.StorageEngineType |
getEngineType(File file)
|
|
|
load(Class<T> clazz)
Returns a typed list of data objects. |
|
|
load(Class<T> clazz,
String id)
Loads the data object of the given type with the given id. |
|
|
load(Class<T> clazz,
String fieldName,
Object value)
Loads a collection of data objects |
|
void |
remove(DataObject dataObject)
Removes the given data object from the storage. |
|
void |
store(DataObject dataObject)
Stores a data object. |
|
void |
store(List<DataObject> dataObjects)
Stores a list of data objects. |
|
void |
update(DataObject dataObject)
Updates a data object. |
|
void |
update(List<DataObject> dataObjects)
Updates a list of data objects. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StorageManager(StorageEngine engine)
engine - the storage engine to be used.| Method Detail |
|---|
public <T extends DataObject> T load(Class<T> clazz,
String id)
load in interface StorageEngineclazz - the type of the data object to be retrieved.id - the id of the data object.
public <T extends DataObject> List<T> load(Class<T> clazz)
load in interface StorageEngineclazz - the type of the data objects.
public void remove(DataObject dataObject)
remove in interface StorageEnginepublic void store(DataObject dataObject)
store in interface StorageEngineobject - the data object to be stored.public void store(List<DataObject> dataObjects)
store in interface IStorageManagerdataObjects - the data objects to be stored.public void update(DataObject dataObject)
update in interface StorageEnginedataObject - the data object to be updated.public void update(List<DataObject> dataObjects)
update in interface IStorageManagerdataObjects - the list of data objects to be updated.public static String generateUUID()
public static StorageEngine createStorageEngine(File file)
file - the file from which the storage engine is created.
public static StorageManager.StorageEngineType getEngineType(File file)
public void dispose()
dispose in interface StorageEngine
public <T extends DataObject> List<T> load(Class<T> clazz,
String fieldName,
Object value)
StorageEngine
load in interface StorageEnginepublic void commit()
StorageEngine
commit in interface StorageEnginepublic void copyTo(File file)
copyTo in interface StorageEngine
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||