|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.portlets.user.tdw.server.datasource.util.GridJSonBuilder
public class GridJSonBuilder
| Nested Class Summary | |
|---|---|
protected static class |
GridJSonBuilder.JGridSonWriterState
|
| Field Summary | |
|---|---|
protected int |
fieldsCount
|
protected boolean |
firstColumn
|
protected boolean |
firstField
|
protected boolean |
firstRow
|
protected StringBuilder |
json
|
protected boolean |
offsetDeclared
|
protected int |
rowsCount
|
protected boolean |
rowsDeclared
|
protected GridJSonBuilder.JGridSonWriterState |
state
|
protected boolean |
totalLengthDeclared
|
| Constructor Summary | |
|---|---|
GridJSonBuilder()
|
|
| Method Summary | |
|---|---|
protected void |
addKey(String key)
|
void |
addValue(String id,
Boolean value)
Adds a new value in the row. |
void |
addValue(String id,
Date value)
Adds a new value in the row. |
void |
addValue(String id,
Double value)
Adds a new value in the row. |
void |
addValue(String id,
Float value)
Adds a new value in the row. |
void |
addValue(String id,
Integer value)
Adds a new value in the row. |
void |
addValue(String id,
Long value)
Adds a new value in the row. |
void |
addValue(String id,
String value)
Adds a new value in the row. |
protected void |
addValueKey(String key)
|
protected void |
appendQuoted(String value)
Produce a string in double quotes with backslash sequences in all the right places. |
protected void |
checkFirstField()
|
protected void |
checkState(GridJSonBuilder.JGridSonWriterState expectedState)
|
void |
clean()
|
void |
close()
|
void |
endRow()
Ends the data row. |
void |
endRows()
Ends the data field. |
protected void |
resetState()
|
void |
setOffset(String offsetField,
int offset)
|
void |
setTotalLength(String totalLengthField,
int length)
Set the total length field. |
void |
startRow()
Starts a new data row. |
void |
startRows(String dataField)
Starts the data field. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected GridJSonBuilder.JGridSonWriterState state
protected boolean rowsDeclared
protected boolean totalLengthDeclared
protected boolean offsetDeclared
protected StringBuilder json
protected boolean firstField
protected boolean firstRow
protected boolean firstColumn
protected int rowsCount
protected int fieldsCount
| Constructor Detail |
|---|
public GridJSonBuilder()
| Method Detail |
|---|
protected void resetState()
public void clean()
protected void checkState(GridJSonBuilder.JGridSonWriterState expectedState)
protected void checkFirstField()
public void startRows(String dataField)
dataField - the data field name.public void startRow()
protected void addKey(String key)
protected void addValueKey(String key)
public void addValue(String id,
Boolean value)
id - the value id.value - the value to insert.
public void addValue(String id,
Date value)
id - the value id.value - the value to insert.
public void addValue(String id,
Double value)
id - the value id.value - the value to insert.
public void addValue(String id,
Float value)
id - the value id.value - the value to insert.
public void addValue(String id,
Long value)
id - the value id.value - the value to insert.
public void addValue(String id,
Integer value)
id - the value id.value - the value to insert.
public void addValue(String id,
String value)
id - the value id.value - the value to insert.public void endRow()
public void endRows()
public void setTotalLength(String totalLengthField,
int length)
totalLengthField - length -
public void setOffset(String offsetField,
int offset)
public void close()
public String toString()
toString in class Objectprotected void appendQuoted(String value)
value - A String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||