© 2006-2007 ETH Zurich

org.ximtec.igesture.storage
Class Db4oStorageEngine

java.lang.Object
  extended by org.ximtec.igesture.storage.DefaultStorageEngine
      extended by org.ximtec.igesture.storage.Db4oStorageEngine
All Implemented Interfaces:
StorageEngine

public class Db4oStorageEngine
extends DefaultStorageEngine

Storage engine implementation for db4o.

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

Constructor Summary
Db4oStorageEngine(String filename)
          Constructs a new db4o engine.
 
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.
 void remove(DataObject dataObject)
          Removes a data object.
 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
 

Constructor Detail

Db4oStorageEngine

public Db4oStorageEngine(String filename)
Constructs a new db4o engine.

Parameters:
filename - the database file.
Method Detail

dispose

public void dispose()
Description copied from interface: StorageEngine
Disposes the engine.


load

public <T extends DataObject> T load(Class<T> clazz,
                                     String id)
Description copied from interface: StorageEngine
Loads a data object of a specific type.


load

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


store

public void store(DataObject dataObject)
Description copied from interface: StorageEngine
Stores a data object. The engine is responsible to set an unique id to the data object.


update

public void update(DataObject dataObject)
Description copied from interface: StorageEngine
Updates a data object.


remove

public void remove(DataObject dataObject)
Description copied from interface: StorageEngine
Removes a data object.


commit

public void commit()
Description copied from interface: StorageEngine
Commits the Transaction


copyTo

public void copyTo(File file)

© 2006-2007 ETH Zurich

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