com.extjs.gxt.ui.client.data
Class MemoryProxy<D>

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.MemoryProxy<D>
Type Parameters:
D - the data type being returned by the proxy
All Implemented Interfaces:
DataProxy<D>

public class MemoryProxy<D>
extends java.lang.Object
implements DataProxy<D>

A DataProxy implementation that simply passes the data specified in the constructor to the reader when its load method is called.


Constructor Summary
MemoryProxy(D data)
          Creates new memory proxy.
 
Method Summary
 D getData()
          Returns the proxy data.
 void load(DataReader<D> reader, java.lang.Object loadConfig, com.google.gwt.user.client.rpc.AsyncCallback<D> callback)
          Data should be retrieved using the specified load config.
 void setData(D data)
          Sets the proxy data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryProxy

public MemoryProxy(D data)
Creates new memory proxy.

Parameters:
data - the local data
Method Detail

getData

public D getData()
Returns the proxy data.

Returns:
the data

load

public void load(DataReader<D> reader,
                 java.lang.Object loadConfig,
                 com.google.gwt.user.client.rpc.AsyncCallback<D> callback)
Description copied from interface: DataProxy
Data should be retrieved using the specified load config.

Specified by:
load in interface DataProxy<D>
Parameters:
reader - the reader instance
loadConfig - the config
callback - the data callback

setData

public void setData(D data)
Sets the proxy data.

Parameters:
data - the data