Class BasicComplexModelType<T>

java.lang.Object
com.vaadin.flow.templatemodel.AbstractBasicModelType<T>
com.vaadin.flow.templatemodel.BasicComplexModelType<T>
Type Parameters:
T - the (basic) Java type used by this model type
All Implemented Interfaces:
ComplexModelType<T>, ModelType, Serializable

@Deprecated public class BasicComplexModelType<T> extends AbstractBasicModelType<T> implements ComplexModelType<T>
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) to use them in a list.

There is a similar class BasicModelType which do the same but it keeps handles the values as is. This class wraps them into StateNode to be able to use them in side lists.

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<ComplexModelType<?>> 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
    • isBasicType

      public static boolean isBasicType(Type type)
      Deprecated.
      Checks whether the type is a basic supported type.
      Parameters:
      type - type to check
      Returns:
      true is the type is basic supported type, false otherwise
    • modelToApplication

      public T 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 StateNode 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 ComplexModelType<T>
      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.
    • cast

      public <C> ComplexModelType<C> cast(Class<C> proxyType)
      Deprecated.
      Description copied from interface: ComplexModelType
      Checks that this type uses the provided proxy type and returns this type as a model type with that proxy type.
      Specified by:
      cast in interface ComplexModelType<T>
      Type Parameters:
      C - the proxy type
      Parameters:
      proxyType - the proxy type to cast to
      Returns:
      this model type