com.sencha.gxt.data.shared.writer
Interface DataWriter<M,D>

Type Parameters:
M - the source type (starting data format) of the model
D - the target type (data format to be produced), usually to send the data over the wire
All Known Implementing Classes:
AutoBeanWriter, JsonWriter, UrlEncodingWriter, XmlWriter

public interface DataWriter<M,D>

Data writers are a simple abstraction to turn logical objects into a format that can more easily be sent over the wire. In many cases, such as saving user changes, this simply means turning objects back into JSON or XML, the format they were loaded in from the server (effectively the reverse of DataReader). In other cases, this can mean copying properties from load configs into an object format which can be sent via RPC or RequestFactory. In contrast with DataReader, this is not expected to have access to any other context such as a load config, it operates directly on the data as-is. Custom implementations can provide other context, but none is available by default.


Method Summary
 D write(M model)
          Converts a source model to its equivalent target type.
 

Method Detail

write

D write(M model)
Converts a source model to its equivalent target type.

Parameters:
model - the source model
Returns:
the equivalent target type


Copyright © 2012. All Rights Reserved.