Package com.vaadin.flow.templatemodel
Class AbstractBasicModelType<T>
- java.lang.Object
-
- com.vaadin.flow.templatemodel.AbstractBasicModelType<T>
-
- Type Parameters:
T- the (basic) Java type used by this model type
- All Implemented Interfaces:
ModelType,Serializable
- Direct Known Subclasses:
BasicComplexModelType,BasicModelType
@Deprecated public abstract class AbstractBasicModelType<T> 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.Common abstract class with generic functionality for basic mode type.For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBasicModelType(Class<T> type)Deprecated.
-
Method Summary
All Methods Static 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.protected ObjectconvertToApplication(Serializable modelValue)Deprecated.Converts the given model value to the application type of this model type.voidcreateInitialValue(StateNode node, String property)Deprecated.Create initial value for the givenpropertyand set it for thenode.Class<T>getJavaType()Deprecated.Gets the JavaTypethat this model encapsulates.protected static <M> Map<Class<?>,M>loadBasicTypes(Function<Class<?>,M> factory)Deprecated.elemental.json.JsonValuetoJson()Deprecated.Creates a JSON representation of this model type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.templatemodel.ModelType
applicationToModel, modelToApplication
-
-
-
-
Method Detail
-
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 Class<T> 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
-
convertToApplication
protected Object convertToApplication(Serializable modelValue)
Deprecated.Converts the given model value to the application type of this model type. The conversion automatically handles default values for primitive types and conversion of client-originated numbers to the expected Java number type.- Parameters:
modelValue- the model value to convert- Returns:
- the converted value, not
nullif the application type is a primitive
-
-