Package com.vaadin.flow.templatemodel
Class BasicModelType
- java.lang.Object
-
- com.vaadin.flow.templatemodel.AbstractBasicModelType
-
- com.vaadin.flow.templatemodel.BasicModelType
-
- All Implemented Interfaces:
ModelType,Serializable
@Deprecated public class BasicModelType extends AbstractBasicModelType
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.A model type representing an immutable leaf value, e.g. strings, numbers or booleans.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 Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SerializableapplicationToModel(Object applicationValue, PropertyFilter filter)Deprecated.Creates a model value representation of the provided application value.static Optional<ModelType>get(Class<?> type)Deprecated.Gets the basic model type definition for the given Java class.ObjectmodelToApplication(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
-
-
-
-
Method Detail
-
get
public static Optional<ModelType> 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
-
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.- 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.
- 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.
-
-