Package 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 class
- All Implemented Interfaces:
ModelType,Serializable
@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@Idmapping and the component API or the element API with property synchronization instead. Polymer template support is deprecated - we recommend you to useLitTemplateinstead. Read more details from the Vaadin blog.AModelTypeimplementation 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:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanaccepts(Type applicationType)Deprecated.Checks whether this type can accept application values of the given type.SerializableapplicationToModel(Object applicationValue, PropertyFilter filter)Deprecated.Creates a model value representation of the provided application value.voidcreateInitialValue(StateNode node, String property)Deprecated.Create initial value for the givenpropertyand set it for thenode.TypegetJavaType()Deprecated.Gets the JavaTypethat this model encapsulates.ModelTypegetWrappedModelType()Deprecated.Gets the model type describing the data actually stored in the model.ObjectmodelToApplication(Serializable modelValue)Deprecated.Creates a representation of the provided model value that is intended for use in application code.elemental.json.JsonValuetoJson()Deprecated.Creates a JSON representation of this model type.
-
-
-
Method Detail
-
modelToApplication
public Object modelToApplication(Serializable modelValue)
Deprecated.Description copied from interface:ModelTypeCreates 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:
modelToApplicationin interfaceModelType- Parameters:
modelValue- the model value to convert- Returns:
- a user-friendly representation of the provided model value
-
applicationToModel
public Serializable applicationToModel(Object applicationValue, PropertyFilter filter)
Deprecated.Description copied from interface:ModelTypeCreates 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:
applicationToModelin 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:ModelTypeChecks 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:ModelTypeGets the JavaTypethat this model encapsulates.- Specified by:
getJavaTypein interfaceModelType- Returns:
- the java type
-
toJson
public elemental.json.JsonValue toJson()
Deprecated.Description copied from interface:ModelTypeCreates a JSON representation of this model type.
-
createInitialValue
public void createInitialValue(StateNode node, String property)
Deprecated.Description copied from interface:ModelTypeCreate initial value for the givenpropertyand set it for thenode.- Specified by:
createInitialValuein interfaceModelType- Parameters:
node- the node where the initial value should be set thepropertyproperty- the property in thenodewhose 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
-
-