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>
Direct Known Subclasses:
PagingModelMemoryProxy

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.


Field Summary
protected  java.lang.Object data
           
 
Constructor Summary
MemoryProxy(java.lang.Object data)
          Creates new memory proxy.
 
Method Summary
 java.lang.Object 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(java.lang.Object data)
          Sets the proxy data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected java.lang.Object data
Constructor Detail

MemoryProxy

public MemoryProxy(java.lang.Object data)
Creates new memory proxy.

Parameters:
data - the local data
Method Detail

getData

public java.lang.Object 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(java.lang.Object data)
Sets the proxy data.

Parameters:
data - the data