© 2006-2007 ETH Zurich

org.ximtec.igesture.storage
Interface StorageEngine

All Known Subinterfaces:
IStorageManager
All Known Implementing Classes:
Db4oStorageEngine, DefaultFileStorageEngine, DefaultStorageEngine, StorageManager, XMLStorageEngine, ZipStorageEngine

public interface StorageEngine

Interface for StorageEngines implementations realising access functionality for data sources.

Version:
1.0, Dec 2006
Author:
Ueli Kurmann, igesture@uelikurmann.ch, Beat Signer, signer@inf.ethz.ch

Method Summary
 void commit()
          Commits the Transaction
 void copyTo(File file)
           
 void dispose()
          Disposes the engine.
<T extends DataObject>
List<T>
load(Class<T> clazz)
          Loads a collection of data objects of a given type.
<T extends DataObject>
T
load(Class<T> clazz, String id)
          Loads a data object of a specific type.
<T extends DataObject>
List<T>
load(Class<T> clazz, String fieldName, Object value)
          Loads a collection of data objects
 void remove(DataObject ojb)
          Removes a data object.
 void store(DataObject dataObjects)
          Stores a data object.
 void update(DataObject obj)
          Updates a data object.
 

Method Detail

load

<T extends DataObject> T load(Class<T> clazz,
                              String id)
Loads a data object of a specific type.


load

<T extends DataObject> List<T> load(Class<T> clazz)
Loads a collection of data objects of a given type. In general this method returns all instances of the specific type.


load

<T extends DataObject> List<T> load(Class<T> clazz,
                                    String fieldName,
                                    Object value)
Loads a collection of data objects


store

void store(DataObject dataObjects)
Stores a data object. The engine is responsible to set an unique id to the data object.


update

void update(DataObject obj)
Updates a data object.


remove

void remove(DataObject ojb)
Removes a data object.


commit

void commit()
Commits the Transaction


dispose

void dispose()
Disposes the engine.


copyTo

void copyTo(File file)
Parameters:
file -

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.