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.
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.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.Deprecated.Gets the JavaTypethat this model encapsulates.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, waitMethods inherited from interface com.vaadin.flow.templatemodel.ModelType
applicationToModel, modelToApplication
-
Constructor Details
-
AbstractBasicModelType
Deprecated.
-
-
Method Details
-
accepts
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
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
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
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
-
loadBasicTypes
Deprecated.
-
@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.