com.vaadin.flow.templatemodel.
Class ConvertedModelType<A,M extends Serializable>
- java.lang.Object
-
- com.vaadin.flow.templatemodel.ConvertedModelType<A,M>
-
Type Parameters:
A
- application type of the converter used by this classM
- model type of the converter used by this classAll Implemented Interfaces:
@Deprecated public class ConvertedModelType<A,M extends Serializable> extends Object implements ModelType
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
ModelType
implementation that wraps a model type for performing type conversions on together with aModelEncoder
.For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
-
Method Summary
All Methods Modifier and Type Method Description boolean
accepts(Type applicationType)
Deprecated.
Checks whether this type can accept application values of the given type.
Serializable
applicationToModel(Object applicationValue, PropertyFilter filter)
Deprecated.
Creates a model value representation of the provided application value.
void
createInitialValue(StateNode node, String property)
Deprecated.
Create initial value for the given
property
and set it for thenode
.Type
getJavaType()
Deprecated.
Gets the Java
Type
that this model encapsulates.ModelType
getWrappedModelType()
Deprecated.
Gets the model type describing the data actually stored in the model.
Object
modelToApplication(Serializable modelValue)
Deprecated.
Creates a representation of the provided model value that is intended for use in application code.
elemental.json.JsonValue
toJson()
Deprecated.
Creates a JSON representation of this model type.
-
-
-
Method Detail
-
modelToApplication
public Object 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 convertReturns:
a user-friendly representation of the provided model value
-
applicationToModel
public Serializable 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 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.
-
accepts
public boolean accepts(Type applicationType)
Deprecated.Description copied from interface:
ModelType
Checks whether this type can accept application values of the given type. The method only considers this actual type, not the types of sub properties or list items.
-
getJavaType
public Type getJavaType()
Deprecated.Description copied from interface:
ModelType
Gets the Java
Type
that this model encapsulates.Specified by:
getJavaType
in interfaceModelType
Returns:
the java type
-
toJson
public elemental.json.JsonValue toJson()
Deprecated.Description copied from interface:
ModelType
Creates a JSON representation of this model type.
-
createInitialValue
public void createInitialValue(StateNode node, String property)
Deprecated.Description copied from interface:
ModelType
Create initial value for the given
property
and set it for thenode
.Specified by:
createInitialValue
in interfaceModelType
Parameters:
node
- the node where the initial value should be set theproperty
property
- the property in thenode
whose initial value needs to be created
-
getWrappedModelType
public ModelType getWrappedModelType()
Deprecated.Gets the model type describing the data actually stored in the model.
Returns:
the wrapped model type
-
-