T - the proxy type used by the bean type of this typepublic class ListModelType<T> extends Object implements ComplexModelType<T>
For internal use only. May be renamed or removed in a future release.
| Constructor and Description |
|---|
ListModelType(ComplexModelType<T> itemType)
Creates a new list model type with the given bean model type.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Type applicationType)
Checks whether this type can accept application values of the given type.
|
StateNode |
applicationToModel(Object applicationValue,
PropertyFilter filter)
Creates a model value representation of the provided application value.
|
<C> ComplexModelType<C> |
cast(Class<C> proxyType)
Checks that this type uses the provided proxy type and returns this type
as a model type with that proxy type.
|
void |
createInitialValue(StateNode node,
String property)
Create initial value for the given
property and set it for the
node. |
ComplexModelType<T> |
getItemType()
Gets the item type.
|
Type |
getJavaType()
Gets the Java
Type that this model encapsulates. |
void |
importBeans(ModelList modelList,
List<T> beans,
PropertyFilter propertyFilter)
Imports beans into a model list based on the properties in the item type
of this model type.
|
static boolean |
isList(Type type)
Checks if the given type will be handled as a list of beans in the model.
|
List<T> |
modelToApplication(Serializable modelValue)
Creates a representation of the provided model value that is intended for
use in application code.
|
elemental.json.JsonValue |
toJson()
Creates a JSON representation of this model type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedTypesStringpublic ListModelType(ComplexModelType<T> itemType)
itemType - the model type of the list itemspublic ComplexModelType<T> getItemType()
nullpublic List<T> modelToApplication(Serializable modelValue)
ModelTypemodelToApplication in interface ModelTypemodelValue - the model value to convertpublic StateNode applicationToModel(Object applicationValue, PropertyFilter filter)
ModelTypeFor application values that contain properties (i.e. beans), the provided filter is used to determine which properties from the bean should be included in the model representation.
applicationToModel in interface ComplexModelType<T>applicationToModel in interface ModelTypeapplicationValue - the user value to convertfilter - the filter to use to determine which properties to include,
not nullpublic <C> ComplexModelType<C> cast(Class<C> proxyType)
ComplexModelTypecast in interface ComplexModelType<T>C - the proxy typeproxyType - the proxy type to cast topublic static boolean isList(Type type)
type - the type to checktrue if the given type will be handled as a list of
beans, false otherwisepublic void importBeans(ModelList modelList, List<T> beans, PropertyFilter propertyFilter)
modelList - the model list to import beans intobeans - the list of beans to importpropertyFilter - defines which properties from the item model type to importpublic boolean accepts(Type applicationType)
ModelTypepublic Type getJavaType()
ModelTypeType that this model encapsulates.getJavaType in interface ModelTypepublic elemental.json.JsonValue toJson()
ModelTypepublic void createInitialValue(StateNode node, String property)
ModelTypeproperty and set it for the
node.createInitialValue in interface ModelTypenode - the node where the initial value should be set the
propertyproperty - the property in the node whose initial value needs to
be createdCopyright © 2025. All rights reserved.