public class ModelBean extends Object
ModelGenerator.writeModel(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, ModelBean, OutputFormat, boolean)
or
ModelGenerator.generateJavascript(ModelBean, OutputFormat, boolean).| Constructor and Description |
|---|
ModelBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
addField(ModelFieldBean bean)
Add one instance of
ModelFieldBean to the internal collection of
fields |
void |
addFields(List<ModelFieldBean> modelFields)
Add all provided fields the internal collection of fields
|
boolean |
equals(Object obj) |
String |
getCreateMethod() |
String |
getDestroyMethod() |
ModelFieldBean |
getField(String fieldName)
Looks for the
ModelFieldBean with the provided name and returns
it. |
Map<String,ModelFieldBean> |
getFields() |
String |
getIdProperty() |
String |
getName() |
String |
getReadMethod() |
String |
getUpdateMethod() |
int |
hashCode() |
boolean |
isPaging() |
void |
setCreateMethod(String createMethod)
Specifies the create method.
|
void |
setDestroyMethod(String destroyMethod)
Specifies the destroy method.
|
void |
setFields(Map<String,ModelFieldBean> fields)
Overwrites all fields with the provided map.
|
void |
setIdProperty(String idProperty)
Name of the id property.
|
void |
setName(String name)
"Classname" of the model.
|
void |
setPaging(boolean paging)
If true a reader config with root : 'records' will be added to the model
object.
|
void |
setReadMethod(String readMethod)
Specifies the read method.
|
void |
setUpdateMethod(String updateMethod)
Specifies the update method.
|
public String getName()
public void setName(String name)
name - new name for the model objectpublic String getIdProperty()
public void setIdProperty(String idProperty)
idProperty - new value for the idProperty config optionpublic Map<String,ModelFieldBean> getFields()
public void setFields(Map<String,ModelFieldBean> fields)
fields - new collection of ModelFieldBeanpublic void addFields(List<ModelFieldBean> modelFields)
modelFields - collection of ModelFieldBeanpublic ModelFieldBean getField(String fieldName)
ModelFieldBean with the provided name and returns
it.fieldName - name of a fieldModelFieldBean or null if not foundpublic void addField(ModelFieldBean bean)
ModelFieldBean to the internal collection of
fieldsbean - one ModelFieldBeanpublic boolean isPaging()
public void setPaging(boolean paging)
ExtDirectStoreReadResult
reader : {
root : 'records'
}
paging - new value for pagingpublic String getReadMethod()
public void setReadMethod(String readMethod)
If only the readMethod is specified generator will write property directFn instead.
readMethod - new value for read methodpublic String getCreateMethod()
public void setCreateMethod(String createMethod)
createMethod - new value for create methodpublic String getUpdateMethod()
public void setUpdateMethod(String updateMethod)
updateMethod - new value for update methodpublic String getDestroyMethod()
public void setDestroyMethod(String destroyMethod)
destroyMethod - new value for destroy methodCopyright © 2010-2012. All Rights Reserved.