|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.legacy.client.data.BaseModelData
public class BaseModelData
Default ModelData implementation.
| Constructor Summary | |
|---|---|
BaseModelData()
Creates a new model data instance. |
|
BaseModelData(Map<String,Object> properties)
Creates a new model with the given properties. |
|
| Method Summary | ||
|---|---|---|
|
get(String property)
Returns the named property from this model instance. |
|
|
get(String property,
X valueWhenNull)
Returns a property value. |
|
Map<String,Object> |
getProperties()
Returns the model's properties and values as a map. |
|
Collection<String> |
getPropertyNames()
Returns an collection of the model's property names. |
|
boolean |
isAllowNestedValues()
Returns true if nested values are enabled. |
|
|
remove(String property)
Removes the named property from this model instance. |
|
|
set(String property,
X value)
Sets the property and fires an Update event. |
|
void |
setAllowNestedValues(boolean allowNestedValues)
Sets whether nested properties are enabled (defaults to true). |
|
void |
setProperties(Map<String,Object> properties)
Sets the properties. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseModelData()
public BaseModelData(Map<String,Object> properties)
properties - the initial properties| Method Detail |
|---|
public <X> X get(String property)
ModelData
get in interface ModelDataproperty - the property name
public <X> X get(String property,
X valueWhenNull)
property - the property namevalueWhenNull - the default value to return if the property does not
exist or is null
public Map<String,Object> getProperties()
ModelData
getProperties in interface ModelDatapublic Collection<String> getPropertyNames()
ModelData
getPropertyNames in interface ModelDatapublic boolean isAllowNestedValues()
public <X> X remove(String property)
ModelData
remove in interface ModelDataproperty - the property name
public <X> X set(String property,
X value)
set in interface ModelDataproperty - the property namevalue - the property value
public void setAllowNestedValues(boolean allowNestedValues)
allowNestedValues - true to enable nested propertiespublic void setProperties(Map<String,Object> properties)
properties - the properties
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||