org.sourceforge.jemm.database.components
Class DefaultDBRootHandler

java.lang.Object
  extended by org.sourceforge.jemm.database.components.DefaultDBRootHandler
All Implemented Interfaces:
DBRootHandler

public class DefaultDBRootHandler
extends java.lang.Object
implements DBRootHandler

Author:
Rory Graves

Constructor Summary
DefaultDBRootHandler(StorageEngine storageEngine)
           
 
Method Summary
 ID getRoot(java.lang.String rootName)
          Return the current value of the root.
 void setObjectStatusListener(ObjectStatusListener objectStatusListener)
           
 void setRoot(java.lang.String rootName, ID newValue)
           
 ID setRootIfNull(java.lang.String rootName, ID newValue)
          Set the given root, if the current value of the root is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDBRootHandler

public DefaultDBRootHandler(StorageEngine storageEngine)
Method Detail

setObjectStatusListener

public void setObjectStatusListener(ObjectStatusListener objectStatusListener)
Specified by:
setObjectStatusListener in interface DBRootHandler

setRoot

public void setRoot(java.lang.String rootName,
                    ID newValue)
Specified by:
setRoot in interface DBRootHandler
Parameters:
rootName -
newValue -

setRootIfNull

public ID setRootIfNull(java.lang.String rootName,
                        ID newValue)
Set the given root, if the current value of the root is null.

Specified by:
setRootIfNull in interface DBRootHandler
Parameters:
rootName - The name of the root.
newValue - The new value to set
Returns:
The old value of the root, (i.e. the current value if the set fails, or null if it does)

getRoot

public ID getRoot(java.lang.String rootName)
Return the current value of the root.

Specified by:
getRoot in interface DBRootHandler
Parameters:
rootName - The name of the root.
Returns:
The current value of the root reference 'rootName'


Copyright © 2009. All Rights Reserved.