com.google.gwt.valuestore.client
Class DeltaValueStoreJsonImpl

java.lang.Object
  extended by com.google.gwt.valuestore.client.DeltaValueStoreJsonImpl
All Implemented Interfaces:
DeltaValueStore, ValueStore

public class DeltaValueStoreJsonImpl
extends java.lang.Object
implements DeltaValueStore

Experimental API: This class is still under rapid development, and is very likely to be deleted. Use it at your own risk.

DeltaValueStore implementation based on ValuesImpl.


Method Summary
 void addValidation()
          Most validations are per field or per id and set via annotation.
 void clearUsed()
          Enable a DeltaValueStore to be reused again.
 java.util.Set<SyncResult> commit(java.lang.String response)
           
 Record create(java.lang.Class token)
           
 void delete(Record record)
           
 boolean isChanged()
          Return true if there are outstanding changes that have not been communicated to the server yet.
<V> void
set(Property<V> property, Record record, V value)
           
 DeltaValueStore spawnDeltaView()
           
 java.lang.String toJson()
           
 boolean validate()
          Returns true if all validations have passed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addValidation

public void addValidation()
Description copied from interface: ValueStore
Most validations are per field or per id and set via annotation. Note that validations are only actually enforced by in DeltaValueStore instances spawned by #forEditContext(Object)

Specified by:
addValidation in interface ValueStore

clearUsed

public void clearUsed()
Description copied from interface: DeltaValueStore
Enable a DeltaValueStore to be reused again. For example, when the edit fails on the server.

Specified by:
clearUsed in interface DeltaValueStore

commit

public java.util.Set<SyncResult> commit(java.lang.String response)

create

public Record create(java.lang.Class token)
Specified by:
create in interface DeltaValueStore

delete

public void delete(Record record)
Specified by:
delete in interface DeltaValueStore

isChanged

public boolean isChanged()
Description copied from interface: DeltaValueStore
Return true if there are outstanding changes that have not been communicated to the server yet. Note that it is illegal to call this method after a request using it has been fired.

Specified by:
isChanged in interface DeltaValueStore

set

public <V> void set(Property<V> property,
                    Record record,
                    V value)
Specified by:
set in interface DeltaValueStore

spawnDeltaView

public DeltaValueStore spawnDeltaView()
Specified by:
spawnDeltaView in interface ValueStore

toJson

public java.lang.String toJson()

validate

public boolean validate()
Description copied from interface: DeltaValueStore
Returns true if all validations have passed. May notify subscribers that implement HasErrors of new validation errors.

Specified by:
validate in interface DeltaValueStore