Class ReverseConverter<PRESENTATION,MODEL>
- java.lang.Object
-
- com.vaadin.v7.data.util.converter.ReverseConverter<PRESENTATION,MODEL>
-
- Type Parameters:
MODEL- The source typePRESENTATION- The target type
- All Implemented Interfaces:
Converter<PRESENTATION,MODEL>,Serializable
@Deprecated public class ReverseConverter<PRESENTATION,MODEL> extends Object implements Converter<PRESENTATION,MODEL>
Deprecated.As of 8.0, no direct replacement available.A converter that wraps anotherConverterand reverses source and target types.- Since:
- 7.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.util.converter.Converter
Converter.ConversionException
-
-
Constructor Summary
Constructors Constructor Description ReverseConverter(Converter<MODEL,PRESENTATION> converter)Deprecated.Creates a converter from source to target based on a converter that converts from target to source.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MODELconvertToModel(PRESENTATION value, Class<? extends MODEL> targetType, Locale locale)Deprecated.Converts the given value from target type to source type.PRESENTATIONconvertToPresentation(MODEL value, Class<? extends PRESENTATION> targetType, Locale locale)Deprecated.Converts the given value from source type to target type.Class<MODEL>getModelType()Deprecated.The source type of the converter.Class<PRESENTATION>getPresentationType()Deprecated.The target type of the converter.
-
-
-
Constructor Detail
-
ReverseConverter
public ReverseConverter(Converter<MODEL,PRESENTATION> converter)
Deprecated.Creates a converter from source to target based on a converter that converts from target to source.- Parameters:
converter- The converter to use in a reverse fashion
-
-
Method Detail
-
convertToModel
public MODEL convertToModel(PRESENTATION value, Class<? extends MODEL> targetType, Locale locale) throws Converter.ConversionException
Deprecated.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<PRESENTATION,MODEL>- 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
-
convertToPresentation
public PRESENTATION convertToPresentation(MODEL value, Class<? extends PRESENTATION> targetType, Locale locale) throws Converter.ConversionException
Deprecated.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<PRESENTATION,MODEL>- 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
public Class<MODEL> getModelType()
Deprecated.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<PRESENTATION,MODEL>- Returns:
- The source type
-
getPresentationType
public Class<PRESENTATION> getPresentationType()
Deprecated.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<PRESENTATION,MODEL>- Returns:
- The target type
-
-