Class MultiSelectConverter<T>
java.lang.Object
com.vaadin.featurepack.data.jpacontainer.converter.MultiSelectConverter<T>
- All Implemented Interfaces:
Converter<Collection<Object>,,Collection<T>> com.vaadin.flow.data.converter.Converter<Collection<Object>,,Collection<T>> Serializable
public class MultiSelectConverter<T>
extends Object
implements Converter<Collection<Object>,Collection<T>>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.featurepack.data.converter.Converter
Converter.ConversionException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToModel(Collection<Object> value, Class<? extends Collection<T>> targetType, Locale locale) Converts the given value from target type to source type.convertToPresentation(Collection<T> value, Class<? extends Collection<Object>> targetType, Locale locale) Converts the given value from source type to target type.Class<Collection<T>> The source type of the converter.The target type of the converter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.featurepack.data.converter.Converter
convertToModel, convertToPresentationMethods inherited from interface com.vaadin.flow.data.converter.Converter
chain
-
Constructor Details
-
MultiSelectConverter
-
-
Method Details
-
convertToPresentation
public Collection<Object> convertToPresentation(Collection<T> value, Class<? extends Collection<Object>> targetType, Locale locale) throws Converter.ConversionException Description copied from interface:ConverterConverts the given value from source type to target type.A converter can optionally use locale to do the conversion.
A converter should in most cases be symmetric so chainingConverter.convertToPresentation(Object, Class, Locale)andConverter.convertToModel(Object, Class, Locale)should return the original value.- Specified by:
convertToPresentationin interfaceConverter<Collection<Object>,Collection<T>> - Parameters:
value- The value to convert, compatible with the target type. Can be nulltargetType- The requested type of the return valuelocale- The locale to use for conversion. Can be null.- Returns:
- The converted value compatible with the source type
- Throws:
Converter.ConversionException- If the value could not be converted
-
convertToModel
public Collection<T> convertToModel(Collection<Object> value, Class<? extends Collection<T>> targetType, Locale locale) throws Converter.ConversionException Description copied from interface:ConverterConverts the given value from target type to source type.A converter can optionally use locale to do the conversion.
A converter should in most cases be symmetric so chainingConverter.convertToPresentation(Object, Class, Locale)andConverter.convertToModel(Object, Class, Locale)should return the original value.- Specified by:
convertToModelin interfaceConverter<Collection<Object>,Collection<T>> - Parameters:
value- The value to convert, compatible with the target type. Can be nulltargetType- The requested type of the return valuelocale- The locale to use for conversion. Can be null.- Returns:
- The converted value compatible with the source type
- Throws:
Converter.ConversionException- If the value could not be converted
-
getModelType
Description copied from interface:ConverterThe source type of the converter. Values of this type can be passed toConverter.convertToPresentation(Object, Class, Locale).- Specified by:
getModelTypein interfaceConverter<Collection<Object>,Collection<T>> - Returns:
- The source type
-
getPresentationType
Description copied from interface:ConverterThe target type of the converter. Values of this type can be passed toConverter.convertToModel(Object, Class, Locale).- Specified by:
getPresentationTypein interfaceConverter<Collection<Object>,Collection<T>> - Returns:
- The target type
-