Package com.vaadin.flow.templatemodel
Class BasicComplexModelType<T>
- java.lang.Object
-
- com.vaadin.flow.templatemodel.AbstractBasicModelType<T>
-
- com.vaadin.flow.templatemodel.BasicComplexModelType<T>
-
- Type Parameters:
T
- the (basic) Java type used by this model type
- All Implemented Interfaces:
ComplexModelType<T>
,ModelType
,Serializable
@Deprecated public class BasicComplexModelType<T> extends AbstractBasicModelType<T> implements ComplexModelType<T>
Deprecated.Template model and model types are not supported for lit template, but you can use@Id
mapping and the component API or the element API with property synchronization instead. Polymer template support is deprecated - we recommend you to useLitTemplate
instead. Read more details from the Vaadin blog.A model type representing an immutable leaf value (e.g. strings, numbers or booleans) to use them in a list.There is a similar class
BasicModelType
which do the same but it keeps handles the values as is. This class wraps them intoStateNode
to be able to use them in side lists.For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
BasicModelType
, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StateNode
applicationToModel(Object applicationValue, PropertyFilter filter)
Deprecated.Creates a model value representation of the provided application value.<C> ComplexModelType<C>
cast(Class<C> proxyType)
Deprecated.Checks that this type uses the provided proxy type and returns this type as a model type with that proxy type.static Optional<ComplexModelType<?>>
get(Class<?> type)
Deprecated.Gets the basic model type definition for the given Java class.static boolean
isBasicType(Type type)
Deprecated.Checks whether thetype
is a basic supported type.T
modelToApplication(Serializable modelValue)
Deprecated.Creates a representation of the provided model value that is intended for use in application code.-
Methods inherited from class com.vaadin.flow.templatemodel.AbstractBasicModelType
accepts, convertToApplication, createInitialValue, getJavaType, loadBasicTypes, toJson
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.templatemodel.ModelType
accepts, createInitialValue, getJavaType, toJson
-
-
-
-
Method Detail
-
get
public static Optional<ComplexModelType<?>> get(Class<?> type)
Deprecated.Gets the basic model type definition for the given Java class.- Parameters:
type
- the Java class to find a basic model type for- Returns:
- the basic model type, or an empty optional if the provided type is not a basic type
-
isBasicType
public static boolean isBasicType(Type type)
Deprecated.Checks whether thetype
is a basic supported type.- Parameters:
type
- type to check- Returns:
true
is thetype
is basic supported type,false
otherwise
-
modelToApplication
public T modelToApplication(Serializable modelValue)
Deprecated.Description copied from interface:ModelType
Creates a representation of the provided model value that is intended for use in application code. For mutable values, this is typically a proxy that is directly connected to the underlying model value.- Specified by:
modelToApplication
in interfaceModelType
- Parameters:
modelValue
- the model value to convert- Returns:
- a user-friendly representation of the provided model value
-
applicationToModel
public StateNode applicationToModel(Object applicationValue, PropertyFilter filter)
Deprecated.Description copied from interface:ModelType
Creates a model value representation of the provided application value.For 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.
- Specified by:
applicationToModel
in interfaceComplexModelType<T>
- Specified by:
applicationToModel
in interfaceModelType
- Parameters:
applicationValue
- the user value to convertfilter
- the filter to use to determine which properties to include, notnull
- Returns:
- a model value representation of the provided user value.
-
cast
public <C> ComplexModelType<C> cast(Class<C> proxyType)
Deprecated.Description copied from interface:ComplexModelType
Checks that this type uses the provided proxy type and returns this type as a model type with that proxy type.- Specified by:
cast
in interfaceComplexModelType<T>
- Type Parameters:
C
- the proxy type- Parameters:
proxyType
- the proxy type to cast to- Returns:
- this model type
-
-