|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.storage.DefaultStorageEngine
org.ximtec.igesture.storage.DefaultFileStorageEngine
public abstract class DefaultFileStorageEngine
| Constructor Summary | |
|---|---|
DefaultFileStorageEngine(File file)
Constructor |
|
| Method Summary | ||
|---|---|---|
void |
commit()
Commits the Transaction |
|
protected abstract HashMap<Class<? extends DataObject>,List<DataObject>> |
deserialize(File storageFile)
Deserializes the objects |
|
void |
dispose()
Disposes the engine. |
|
File |
getStorageFile()
|
|
protected boolean |
isDoChanged()
Returns true, if the data model has changed since the last storage/load operation. |
|
|
load(Class<T> clazz)
Loads a collection of data objects of a given type. |
|
|
load(Class<T> clazz,
String id)
Loads a data object of a specific type. |
|
void |
remove(DataObject dataObject)
Removes a data object. |
|
protected void |
removeDataObject(DataObject dataObject)
Removes a data object from the object container. |
|
protected abstract void |
serialize(HashMap<Class<? extends DataObject>,List<DataObject>> objects,
File file)
Serializes the data objects. |
|
protected void |
setDoChanged(boolean doChanged)
Sets the flag indicating if the data model has changed since the last storage/load operation. |
|
void |
setStorageFile(File storageFile)
|
|
void |
store(DataObject dataObject)
Stores a data object. |
|
void |
update(DataObject dataObject)
Updates a data object. |
|
| Methods inherited from class org.ximtec.igesture.storage.DefaultStorageEngine |
|---|
load |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.ximtec.igesture.storage.StorageEngine |
|---|
copyTo |
| Constructor Detail |
|---|
public DefaultFileStorageEngine(File file)
file - | Method Detail |
|---|
public void commit()
StorageEngine
protected abstract HashMap<Class<? extends DataObject>,List<DataObject>> deserialize(File storageFile)
storageFile -
public void dispose()
StorageEngine
public File getStorageFile()
public <T extends DataObject> List<T> load(Class<T> clazz)
StorageEngine
public <T extends DataObject> T load(Class<T> clazz,
String id)
StorageEngine
public void remove(DataObject dataObject)
StorageEngine
protected void removeDataObject(DataObject dataObject)
dataObject - the data object to be removed.
protected abstract void serialize(HashMap<Class<? extends DataObject>,List<DataObject>> objects,
File file)
objects - file - public void setStorageFile(File storageFile)
public void store(DataObject dataObject)
StorageEngine
public void update(DataObject dataObject)
StorageEngine
protected void setDoChanged(boolean doChanged)
doChanged - protected boolean isDoChanged()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||