com.sdm.quasar.client.core.data.plugins
Interface IndexedValuesPlugIn

All Superinterfaces:
DataManagerPlugIn, Disposable
All Known Implementing Classes:
DefaultIndexedValuesPlugIn

public interface IndexedValuesPlugIn
extends DataManagerPlugIn

A plug in for a DataManager that supplies the basic value handler infrastructure needed for managing and storing the values of the type IndexedNode.

Currently values of type List, Map and Arrays are supported.

Additionally, the user may gain additional information and manipulate the structure of an indexed value (e.g. the entries of a list) through this PlugIn.

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

Method Summary
 java.lang.Object getIndexForValue(java.lang.String key, java.lang.Object value)
          Returns the index that would return the given value if used as part of a Context in an indexed access.
 
Methods inherited from interface com.sdm.quasar.client.core.data.DataManagerPlugIn
install
 
Methods inherited from interface com.sdm.quasar.client.core.common.Disposable
dispose
 

Method Detail

getIndexForValue

public java.lang.Object getIndexForValue(java.lang.String key,
                                         java.lang.Object value)
Returns the index that would return the given value if used as part of a Context in an indexed access. If the value cannot be found, null will be returned.

If the value exists more than one time on the collection, the first occurrence is returned. Please note that a second call might not return the same index in this case.

Parameters:
key - the key of the node that is the indexed value
value - the value to be searched for
Returns:
the index or null if the value could not be found