com.sencha.gxt.data.shared
Class Store.PropertyChange<M,V>

java.lang.Object
  extended by com.sencha.gxt.data.shared.Store.PropertyChange<M,V>
Type Parameters:
M - the model type
V - the value type (for the changed property in the model)
All Implemented Interfaces:
Store.Change<M,V>
Enclosing class:
Store<M>

public static class Store.PropertyChange<M,V>
extends java.lang.Object
implements Store.Change<M,V>

ValueProvider-based change impl - takes a ValueProvider and the new value to be changed. The ValueProvider instance should be reused, as it will be the objecttag.


Constructor Summary
Store.PropertyChange(ValueProvider<? super M,V> propertyAccess, V value)
          Creates a new property change.
 
Method Summary
 java.lang.Object getChangeTag()
          Gets a tag for this change, so that two changes, both making modifications to the same field, can replace each other, as they must be mutually exclusive
 V getValue()
          Gets the value that will be set on the model in modify(M).
 boolean isCurrentValue(M model)
          Checks to see if the given model already has the change
 void modify(M model)
          Make the change recorded here to the given model
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Store.PropertyChange

public Store.PropertyChange(ValueProvider<? super M,V> propertyAccess,
                            V value)
Creates a new property change.

Parameters:
propertyAccess - the changed property
value - the changed value
Method Detail

getChangeTag

public final java.lang.Object getChangeTag()
Description copied from interface: Store.Change
Gets a tag for this change, so that two changes, both making modifications to the same field, can replace each other, as they must be mutually exclusive

Specified by:
getChangeTag in interface Store.Change<M,V>
Returns:
the tag

getValue

public V getValue()
Description copied from interface: Store.Change
Gets the value that will be set on the model in modify(M).

Specified by:
getValue in interface Store.Change<M,V>
Returns:
the value

isCurrentValue

public boolean isCurrentValue(M model)
Description copied from interface: Store.Change
Checks to see if the given model already has the change

Specified by:
isCurrentValue in interface Store.Change<M,V>
Parameters:
model - the model
Returns:
true if model already has the change

modify

public final void modify(M model)
Description copied from interface: Store.Change
Make the change recorded here to the given model

Specified by:
modify in interface Store.Change<M,V>
Parameters:
model - the model


Copyright © 2012. All Rights Reserved.