public class StreamingDataBuilder extends java.lang.Object implements TGJsonWriter, TreeGridUtil.ITGSerializationHelper
StreamingDataBuilder data = new StreamingDataBuilder(resp.getWriter()); data.beingBody(); data.beginRow(); data.set(TreeGrid.I.id, "ROOT"); data.set("Test", "Root Row"); data.beginItems(); data.beginRow(); data.set(TreeGrid.I.id, 1); data.set("Test", "Row 1"); data.endRow(); data.beginRow(); data.set(TreeGrid.I.id, 2); data.set("Test", "Row 2"); data.endRow(); data.endItems(); data.endRow(); data.endBody();
Constructor and Description |
---|
StreamingDataBuilder(TGJsonWriter writer,
TreeGridUtil.ITGSerializationHelper helper) |
Modifier and Type | Method and Description |
---|---|
TGJsonWriter |
beginArray() |
void |
beginItems() |
TGJsonWriter |
beginObject() |
void |
beginRow() |
void |
beingBody() |
TGJsonWriter |
endArray() |
void |
endBody() |
void |
endItems() |
TGJsonWriter |
endObject() |
void |
endRow() |
UserInfo |
getUserInfo() |
java.util.TimeZone |
getUserTimeZone() |
boolean |
isModelRefresh() |
boolean |
isSerializable(java.lang.String field,
java.lang.Object val)
Helper can help eliminate fields that are not serializable
|
TGJsonWriter |
name(java.lang.String name) |
void |
set(java.lang.String name,
boolean value) |
void |
set(java.lang.String name,
java.util.Date value) |
void |
set(java.lang.String name,
double value) |
void |
set(java.lang.String name,
float value) |
void |
set(java.lang.String name,
int value) |
void |
set(java.lang.String name,
long value) |
void |
set(java.lang.String name,
java.lang.Number value) |
void |
set(java.lang.String name,
java.lang.Object value) |
void |
set(java.lang.String name,
java.lang.String value) |
void |
setModelRefresh(boolean value) |
TGJsonWriter |
value(boolean value) |
TGJsonWriter |
value(double value) |
TGJsonWriter |
value(long value) |
TGJsonWriter |
value(java.lang.Number value) |
TGJsonWriter |
value(java.lang.String value) |
public StreamingDataBuilder(TGJsonWriter writer, TreeGridUtil.ITGSerializationHelper helper)
public void beingBody() throws java.io.IOException
java.io.IOException
public void beginItems() throws java.io.IOException
java.io.IOException
public void endItems() throws java.io.IOException
java.io.IOException
public void beginRow() throws java.io.IOException
java.io.IOException
public void endRow() throws java.io.IOException
java.io.IOException
public void endBody() throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, java.lang.String value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, java.lang.Number value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, int value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, long value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, float value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, double value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, boolean value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, java.util.Date value) throws java.io.IOException
java.io.IOException
public void set(java.lang.String name, java.lang.Object value) throws java.io.IOException
java.io.IOException
public TGJsonWriter beginArray() throws java.io.IOException
beginArray
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter beginObject() throws java.io.IOException
beginObject
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter endArray() throws java.io.IOException
endArray
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter endObject() throws java.io.IOException
endObject
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter name(java.lang.String name) throws java.io.IOException
name
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter value(boolean value) throws java.io.IOException
value
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter value(double value) throws java.io.IOException
value
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter value(long value) throws java.io.IOException
value
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter value(java.lang.Number value) throws java.io.IOException
value
in interface TGJsonWriter
java.io.IOException
public TGJsonWriter value(java.lang.String value) throws java.io.IOException
value
in interface TGJsonWriter
java.io.IOException
public java.util.TimeZone getUserTimeZone()
getUserTimeZone
in interface TreeGridUtil.ITGSerializationHelper
public UserInfo getUserInfo()
getUserInfo
in interface TreeGridUtil.ITGSerializationHelper
public boolean isSerializable(java.lang.String field, java.lang.Object val)
TreeGridUtil.ITGSerializationHelper
isSerializable
in interface TreeGridUtil.ITGSerializationHelper
public boolean isModelRefresh()
isModelRefresh
in interface TreeGridUtil.ITGSerializationHelper
public void setModelRefresh(boolean value)
setModelRefresh
in interface TreeGridUtil.ITGSerializationHelper