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 class
M - 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 @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 ModelType implementation that wraps a model type for performing type conversions on together with a ModelEncoder.

For internal use only. May be renamed or removed in a future release.

Since:
1.0
Author:
Vaadin Ltd
See Also:
  • Method Details

    • 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 interface ModelType
      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.

      Specified by:
      applicationToModel in interface ModelType
      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.
    • 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.
      Specified by:
      accepts in interface ModelType
      Parameters:
      applicationType - the application type to check, not null
      Returns:
      true if the provided type is acceptable, false otherwise
    • getJavaType

      public Type getJavaType()
      Deprecated.
      Description copied from interface: ModelType
      Gets the Java Type that this model encapsulates.
      Specified by:
      getJavaType in interface ModelType
      Returns:
      the java type
    • toJson

      public elemental.json.JsonValue toJson()
      Deprecated.
      Description copied from interface: ModelType
      Creates a JSON representation of this model type.
      Specified by:
      toJson in interface ModelType
      Returns:
      a JSON representation of this model type, not null
    • 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 the node.
      Specified by:
      createInitialValue in interface ModelType
      Parameters:
      node - the node where the initial value should be set the property
      property - the property in the node 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