|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.data.shared.Store.Record
public class Store.Record
Records wrap model instances and provide specialized editing features, including modification tracking and editing capabilities.
| Constructor Summary | |
|---|---|
Store.Record(M model)
Creates a new record that wraps the given model. |
|
| Method Summary | ||
|---|---|---|
|
addChange(ValueProvider<? super M,V> property,
V value)
Adds a change to the data in this Record. |
|
void |
commit(boolean fireEvent)
Commits the changes to the model tracked by this record. |
|
|
getChange(ValueProvider<? super M,V> property)
Gets the current Change object applied to that property, if any. |
|
Collection<Store.Change<M,?>> |
getChanges()
Returns all changes. |
|
M |
getModel()
Returns the wrapped model instance. |
|
|
getValue(ValueProvider<? super M,V> property)
Gets the current value of this property in the record, whether it is saved or not. |
|
boolean |
isDirty()
Returns true if the record has uncommitted changes. |
|
void |
revert()
Rejects all changes made to the Record since either creation, or the last commit operation. |
|
void |
revert(ValueProvider<? super M,?> property)
Rejects a single change made to the Record since its creation, or since the last commit operation. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Store.Record(M model)
model - the model to be wrapped by this record| Method Detail |
|---|
public <V> void addChange(ValueProvider<? super M,V> property,
V value)
V - the value type (for the changed property in the model)property - the property to changevalue - the changed valuepublic void commit(boolean fireEvent)
public <V> Store.Change<M,V> getChange(ValueProvider<? super M,V> property)
V - the value type (for the changed property in the model)property - the changed property
public Collection<Store.Change<M,?>> getChanges()
public M getModel()
public <V> V getValue(ValueProvider<? super M,V> property)
V - the value type (for the property in the model)property - the property containing the value to get
public boolean isDirty()
public void revert(ValueProvider<? super M,?> property)
StoreUpdateEvent if a change is made.
property - the property of the model to revertpublic void revert()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||