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 @Id mapping and the component API or the element API with property synchronization instead. Polymer template support is deprecated - we recommend you to use LitTemplate instead. 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:
  • Method Details

    • 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: 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.
      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: 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.

      Parameters:
      applicationValue - the user value to convert
      filter - the filter to use to determine which properties to include, not null
      Returns:
      a model value representation of the provided user value.