|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.data.ModelType
public class ModelType
Describes the fields and structure of a Model
. Used by
DataReaders
when parsing raw data.
Constructor Summary | |
---|---|
ModelType()
Creates a new instance. |
Method Summary | |
---|---|
void |
addField(DataField field)
Adds a field to the model. |
void |
addField(java.lang.String name)
Adds a field to the model. |
void |
addField(java.lang.String name,
java.lang.String map)
Adds a field to the model. |
DataField |
getField(int index)
Returns the field at the given index or null if the index is out of bounds. |
DataField |
getField(java.lang.String name)
Returns the field with the given name. |
int |
getFieldCount()
Returns the number of fields. |
java.lang.String |
getRecordName()
Returns the record name. |
java.lang.String |
getRoot()
Returns the root name. |
java.lang.String |
getTotalName()
Returns the total name. |
void |
setRecordName(java.lang.String recordName)
Sets the record name. |
void |
setRoot(java.lang.String root)
Sets the root element name. |
void |
setTotalName(java.lang.String totalName)
Sets name of the property that contains the 'total number of records' value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelType()
Method Detail |
---|
public void addField(DataField field)
field
- the field to be addedpublic void addField(java.lang.String name)
name
- the field namepublic void addField(java.lang.String name, java.lang.String map)
name
- the field namemap
- the map namepublic DataField getField(int index)
index
- the index of the field to return
public DataField getField(java.lang.String name)
name
- the name of the field to return
null
if no matchpublic int getFieldCount()
public java.lang.String getRecordName()
public java.lang.String getRoot()
public java.lang.String getTotalName()
public void setRecordName(java.lang.String recordName)
recordName
- the record namepublic void setRoot(java.lang.String root)
JsonReader
, the root
is the name of the property with the array of data. When used by
XmlReader
, the root is the name of the element in which the
total count will be retrieved from use setTotalName(String)
.
root
- the root namepublic void setTotalName(java.lang.String totalName)
totalName
- the total name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |