org.openbandy.io.rms
Class RmsStorage

java.lang.Object
  extended by org.openbandy.io.storage.Storage
      extended by org.openbandy.io.rms.RmsStorage

public class RmsStorage
extends Storage

Abtstract and encapsule rms knowlegede (id generation etc.) TODO überprüfe alle RmsConnections, wo kann ich sparen ??!!!!! TODO NAMEN vereinfachen und konsequenter verwenden !!

(c) Copyright P. Bolliger 2007, ALL RIGHTS RESERVED.

Version:
1.0
Author:
Philipp Bolliger (philipp@bolliger.name)

Field Summary
static java.lang.String TYPE_POSTFIX
           
 
Method Summary
 RmsConnection addObject(Serializable serializable)
          This method will create a new entry in the RMS for the serializable object.
 boolean deleteShallow(Serializable serializable)
          Deletes the serializable object, but not the reference objects.
 int existsInStorage(Serializable serializable)
          Return 0 if databaseSerializable does not already exist in database.
static RmsConnection getConnection(java.lang.String objectRecordStoreName)
          TODO comment!
static RmsConnection getConnectionForObject(Serializable serializable)
          TODO comment!
static RmsStorage getInstance()
          TODO comment!
static java.util.Vector getObjectAttributes(Serializable serializable)
          TODO comment!
static java.lang.String getRecordStoreName(Serializable serializable)
          TODO comment!
static java.lang.String getTypeRecordStoreName(Serializable serializable)
          TODO comment!
 boolean isEmpty()
          Returns true if no object is contained within the storage.
static int numberOfUsedRecordStores()
          TODO comment!
 void printAllRecordStores()
          TODO comment!
 void reset()
          Reset the storage with all it's meta structures and caches.
 
Methods inherited from class org.openbandy.io.storage.Storage
closeAllConnections, delete, removeConnection, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_POSTFIX

public static final java.lang.String TYPE_POSTFIX
See Also:
Constant Field Values
Method Detail

getInstance

public static RmsStorage getInstance()
TODO comment!

Returns:

existsInStorage

public int existsInStorage(Serializable serializable)
Description copied from class: Storage
Return 0 if databaseSerializable does not already exist in database. If databaseSerializable exist, this method returns the id according to databaseSerializable.getIdName().

Specified by:
existsInStorage in class Storage
Returns:

addObject

public RmsConnection addObject(Serializable serializable)
This method will create a new entry in the RMS for the serializable object. If the object already exists, the connection from the cache will be returned. If a new entry is created, the object will be assigned the corresponding id value.

Parameters:
serializable -
Returns:

getConnectionForObject

public static RmsConnection getConnectionForObject(Serializable serializable)
TODO comment!

Parameters:
serializable -
Returns:

getConnection

public static RmsConnection getConnection(java.lang.String objectRecordStoreName)
TODO comment!

Parameters:
objectRecordStoreName -
Returns:

getRecordStoreName

public static java.lang.String getRecordStoreName(Serializable serializable)
TODO comment!

Parameters:
serializable -
Returns:

getTypeRecordStoreName

public static java.lang.String getTypeRecordStoreName(Serializable serializable)
TODO comment!

Parameters:
serializable -
Returns:

getObjectAttributes

public static java.util.Vector getObjectAttributes(Serializable serializable)
TODO comment!

Parameters:
serializable -
Returns:

reset

public void reset()
Description copied from class: Storage
Reset the storage with all it's meta structures and caches. Use carefully!

Specified by:
reset in class Storage

isEmpty

public boolean isEmpty()
Description copied from class: Storage
Returns true if no object is contained within the storage.

Specified by:
isEmpty in class Storage

numberOfUsedRecordStores

public static int numberOfUsedRecordStores()
TODO comment!

Returns:

deleteShallow

public boolean deleteShallow(Serializable serializable)
Description copied from class: Storage
Deletes the serializable object, but not the reference objects.

Specified by:
deleteShallow in class Storage
Returns:
true if deletion was successful

printAllRecordStores

public void printAllRecordStores()
TODO comment!