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

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

public interface ValueChangedPlugIn
extends DataManagerPlugIn

Note: this is a first draft! - does not work if an indexed nodes is asked or it is in the recursion - is comparator the right thing? We need only an equals, not an order (int)


Method Summary
 BooleanState getValueChangedState(java.lang.String key)
          Returns the state that is true if the value of the given node has changed (according to the comparator) from the time saveReferenceValues(String) was called last for the node.
 BooleanState getValuesChangedState(java.lang.String startKey)
          Returns the state that is true if any value in the subtree starting at the given node has changed (according to the comparator) from the time saveReferenceValues(String) was called last for the nodes.
 void notifyExternalChange(java.lang.String key)
          Notify the node that its value has been changed by means outside the control of the data store.
 void saveReferenceValues(java.lang.String startKey)
          Saves the reference values for the subtree starting at the given node.
 void setComparator(java.lang.String key, java.util.Comparator comparator)
          Sets the comparator to be used
 void setDefaultComparator(java.util.Comparator defaultComparator)
          Sets the default comparator to be used, if no comparator has been specified for the node.
 
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

saveReferenceValues

public void saveReferenceValues(java.lang.String startKey)
Saves the reference values for the subtree starting at the given node.

Parameters:
startKey -

getValueChangedState

public BooleanState getValueChangedState(java.lang.String key)
Returns the state that is true if the value of the given node has changed (according to the comparator) from the time saveReferenceValues(String) was called last for the node.

Parameters:
key -
Returns:

getValuesChangedState

public BooleanState getValuesChangedState(java.lang.String startKey)
Returns the state that is true if any value in the subtree starting at the given node has changed (according to the comparator) from the time saveReferenceValues(String) was called last for the nodes.

Parameters:
startKey -
Returns:

notifyExternalChange

public void notifyExternalChange(java.lang.String key)
Notify the node that its value has been changed by means outside the control of the data store.


setComparator

public void setComparator(java.lang.String key,
                          java.util.Comparator comparator)
Sets the comparator to be used

Parameters:
key -

setDefaultComparator

public void setDefaultComparator(java.util.Comparator defaultComparator)
Sets the default comparator to be used, if no comparator has been specified for the node. If not set, the default is an equals from the reference value to the current value

Parameters:
defaultComparator -