org.openbandy.io.rms
Class RmsConnection

java.lang.Object
  extended by org.openbandy.io.rms.RmsConnection
All Implemented Interfaces:
StorageConnection

public class RmsConnection
extends java.lang.Object
implements StorageConnection

Wrapper class to access 1 RecordStore.

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

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

Method Summary
 void close()
          TODO comment!
 boolean connect()
          TODO comment!
 boolean executeDELETE(Serializable serializable)
          This method deletes the serializable object in the storage.
 int executeINSERT(ObjectEntry objectEntry)
          This method inserts the objectEntry in the storage and returns the genereated id resp.
 void executeUPDATE(ObjectEntry objectEntry)
          This method updates the objectEntry in the storage.
 java.lang.String getConnectionIdentifier()
          Returns a string that allows the Storage to distinguish different connections in order to avert muliple open connections for the same serializer.
 javax.microedition.rms.RecordStore getRecordStore()
          TODO comment!
 java.lang.String getRecordStoreName()
          TODO comment!
 boolean isConnected()
          TODO comment!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRecordStore

public javax.microedition.rms.RecordStore getRecordStore()
TODO comment!

Returns:

getRecordStoreName

public java.lang.String getRecordStoreName()
TODO comment!

Returns:

connect

public boolean connect()
Description copied from interface: StorageConnection
TODO comment!

Specified by:
connect in interface StorageConnection
Returns:

isConnected

public boolean isConnected()
Description copied from interface: StorageConnection
TODO comment!

Specified by:
isConnected in interface StorageConnection
Returns:

close

public void close()
Description copied from interface: StorageConnection
TODO comment!

Specified by:
close in interface StorageConnection

getConnectionIdentifier

public java.lang.String getConnectionIdentifier()
Description copied from interface: StorageConnection
Returns a string that allows the Storage to distinguish different connections in order to avert muliple open connections for the same serializer.

Specified by:
getConnectionIdentifier in interface StorageConnection
Returns:

executeINSERT

public int executeINSERT(ObjectEntry objectEntry)
Description copied from interface: StorageConnection
This method inserts the objectEntry in the storage and returns the genereated id resp. key.

Specified by:
executeINSERT in interface StorageConnection
Parameters:
objectEntry - Entry to insert
Returns:
newKey The key generated by the database while executing the INSERT.

executeUPDATE

public void executeUPDATE(ObjectEntry objectEntry)
Description copied from interface: StorageConnection
This method updates the objectEntry in the storage.

Specified by:
executeUPDATE in interface StorageConnection
Parameters:
objectEntry - Entry to update

executeDELETE

public boolean executeDELETE(Serializable serializable)
Description copied from interface: StorageConnection
This method deletes the serializable object in the storage.

Specified by:
executeDELETE in interface StorageConnection
Parameters:
serializable - Entry to delete
Returns:
Returns true if the serializable object has been deleted.