com.sdm.quasar.client.core.data
Class Context

java.lang.Object
  extended bycom.sdm.quasar.client.core.data.Context

public class Context
extends java.lang.Object

Stores values that may be used to resolve index values while accessing an value using DataManager.getValue(String, Context) and DataManager#setIndexedValue(String, Context, Object).

This object contains an association of keys ({@link String}) of nodes that are indexed values to the values that should be used for indexed access in these nodes ({@link Object}).

Version:
1.0
Author:
Thomas Wolf, sd&m AG, Bernd Olleck, sd&m AG

Constructor Summary
Context()
          Constructor.
 
Method Summary
 void clearContext()
          Clears all index values within this context.
 void clearIndex(java.lang.String key)
          Removes the index value for the given key
 boolean containsIndex(java.lang.String key)
          Returns true iff this context holds a value for the given key
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getIndex(java.lang.String key)
          Returns the value for the given key or null if there is no value associated with the key
 int hashCode()
           
 void setIndex(java.lang.String key, java.lang.Object indexValue)
          Sets a value for the index resolution for the node defined by key
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Context

public Context()
Constructor.

Method Detail

setIndex

public void setIndex(java.lang.String key,
                     java.lang.Object indexValue)
Sets a value for the index resolution for the node defined by key

Parameters:
key - the key of the indexed node
indexValue - the value to be used as index

clearContext

public void clearContext()
Clears all index values within this context.


clearIndex

public void clearIndex(java.lang.String key)
Removes the index value for the given key

Parameters:
key - the key of an indexed node

containsIndex

public boolean containsIndex(java.lang.String key)
Returns true iff this context holds a value for the given key

Parameters:
key - the key of the indexed node
Returns:
true iff this context holds a value for the given key

getIndex

public java.lang.Object getIndex(java.lang.String key)
Returns the value for the given key or null if there is no value associated with the key

Parameters:
key - the key of the indexed node
Returns:
the index value for the given key or null

toString

public java.lang.String toString()
See Also:
Object.toString()

hashCode

public int hashCode()
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)