|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.gotoandplay.smartfoxserver.db.DataRow
public class DataRow
The DataRow class contains data coming from a database query which can be indexed numerically or by field name.
DbManager| Field Summary | |
|---|---|
static int |
DATAROW_INTKEY
constant that identifies a numerically indexed DataRow |
static int |
DATAROW_STRINGKEY
constant that identifies a String key indexed DataRow |
| Constructor Summary | |
|---|---|
DataRow()
Construct the object with the default type = DataRow.DATAROW_INTKEY |
|
DataRow(int type)
Allows to construct the object specifying the type DATAROW_INTKEY: allows to retrieve data by field index (starting at zero) DATAROW_STRINGKEY: allows to retrieve data by |
|
| Method Summary | |
|---|---|
void |
addItem(java.lang.String s)
Add an item to the row in DATAROW_INTKEY mode |
void |
addItem(java.lang.String key,
java.lang.String s)
Add an item to the row in DATAROW_STRINGKEY mode |
java.lang.Object |
getData()
This is a utility method used exclusively by dynamic languages ( Javascript / Python ) |
java.util.List |
getDataAsList()
Get the row data as a List |
java.util.Map |
getDataAsMap()
Get the row data as a Map |
java.lang.String |
getItem(int key)
Get an item from the row using field indexes (starting at zero) |
java.lang.String |
getItem(java.lang.String key)
Get an item from the row using field names |
int |
getType()
Get the type of dataRow. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DATAROW_INTKEY
public static final int DATAROW_STRINGKEY
| Constructor Detail |
|---|
public DataRow()
public DataRow(int type)
type - | Method Detail |
|---|
public void addItem(java.lang.String s)
s - the data
public void addItem(java.lang.String key,
java.lang.String s)
key - the keys - the valuepublic java.lang.String getItem(int key)
key - the index
public java.lang.String getItem(java.lang.String key)
key - the field name
public int getType()
public java.util.Map getDataAsMap()
public java.util.List getDataAsList()
public java.lang.Object getData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||