|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dhtmlx.connector.DataItem
public class DataItem
The Class DataItem. Wrapper around the fetched data. Controls how the data transforms into the xml string.
Constructor Summary | |
---|---|
DataItem(java.util.HashMap<java.lang.String,java.lang.String> data,
DataConfig config,
int index)
Instantiates a new data item. |
Method Summary | |
---|---|
java.lang.String |
get_id()
Gets the id of the record |
int |
get_index()
Gets the index of the record |
java.lang.String |
get_value(java.lang.String name)
Gets the value of the field |
int |
has_kids()
Gets the count of child items |
void |
set_id(java.lang.String value)
Sets the new id for the record |
void |
set_kids(int count)
Sets the count of child items |
void |
set_userdata(java.lang.String name,
java.lang.String value)
|
void |
set_value(java.lang.String name,
java.lang.String value)
Sets value of the field |
void |
skip()
Mark current record to be skipped ( not included in xml response ) |
void |
to_json(JSONArray output)
Convert data item to json representation |
void |
to_xml_end(java.lang.StringBuffer out)
Ending part of xml representation. |
void |
to_xml_start(java.lang.StringBuffer out)
Starting part of xml representation |
void |
to_xml(java.lang.StringBuffer out)
Convert data item to xml representation |
java.lang.String |
xmlentities(java.lang.String str)
replace xml unsafe characters |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataItem(java.util.HashMap<java.lang.String,java.lang.String> data, DataConfig config, int index)
data
- the hash of dataconfig
- the configindex
- the index of recordMethod Detail |
---|
public java.lang.String get_value(java.lang.String name)
name
- the name of the field
public void set_value(java.lang.String name, java.lang.String value)
name
- the name of the fieldvalue
- the value of the fieldpublic java.lang.String get_id()
public void set_id(java.lang.String value)
value
- the new id for the recordpublic int get_index()
public int has_kids()
public void set_kids(int count)
count
- the count of child itemspublic void skip()
public void to_xml(java.lang.StringBuffer out)
out
- the output bufferpublic void to_xml_start(java.lang.StringBuffer out)
out
- the output bufferpublic void to_xml_end(java.lang.StringBuffer out)
out
- the output bufferpublic void to_json(JSONArray output)
JSON
- objectpublic java.lang.String xmlentities(java.lang.String str)
string
- string to be escaped
public void set_userdata(java.lang.String name, java.lang.String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |