|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.data.BaseModelData
public class BaseModelData
Default ModelData
implementation.
Field Summary | |
---|---|
protected boolean |
allowNestedValues
|
protected RpcMap |
map
|
Constructor Summary | |
---|---|
BaseModelData()
Creates a new model data instance. |
|
BaseModelData(java.util.Map<java.lang.String,java.lang.Object> properties)
Creates a new model with the given properties. |
Method Summary | ||
---|---|---|
|
get(java.lang.String property)
Returns the named property from this model instance. |
|
|
get(java.lang.String property,
X valueWhenNull)
Returns a property value. |
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns the model's properties and values as a map. |
|
java.util.Collection<java.lang.String> |
getPropertyNames()
Returns an collection of the model's property names. |
|
boolean |
isAllowNestedValues()
Returns true if nested values are enabled. |
|
|
remove(java.lang.String property)
Removes the named property from this model instance. |
|
|
set(java.lang.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(java.util.Map<java.lang.String,java.lang.Object> properties)
Sets the properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RpcMap map
protected boolean allowNestedValues
Constructor Detail |
---|
public BaseModelData()
public BaseModelData(java.util.Map<java.lang.String,java.lang.Object> properties)
properties
- the initial propertiesMethod Detail |
---|
public <X> X get(java.lang.String property)
ModelData
get
in interface ModelData
property
- the property name
public <X> X get(java.lang.String property, X valueWhenNull)
property
- the property namevalueWhenNull
-
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
ModelData
getProperties
in interface ModelData
public java.util.Collection<java.lang.String> getPropertyNames()
ModelData
getPropertyNames
in interface ModelData
public boolean isAllowNestedValues()
public <X> X remove(java.lang.String property)
ModelData
remove
in interface ModelData
property
- the property name
public <X> X set(java.lang.String property, X value)
set
in interface ModelData
property
- the property namevalue
- the property value
public void setAllowNestedValues(boolean allowNestedValues)
allowNestedValues
- true to enable nested propertiespublic void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
properties
- the properties
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |