Package com.oorian.data.converter
Class StringToLongConverter
java.lang.Object
com.oorian.data.converter.StringToLongConverter
- Since:
- 2.1
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new converter with the default error message.StringToLongConverter(String errorMessage) Creates a new converter with a custom error message. -
Method Summary
Modifier and TypeMethodDescriptionconvertToModel(String value) Converts a presentation value to its model representation.convertToPresentation(Long value) Converts a model value to its presentation representation.
-
Constructor Details
-
StringToLongConverter
public StringToLongConverter()Creates a new converter with the default error message. -
StringToLongConverter
Creates a new converter with a custom error message.- Parameters:
errorMessage- the error message shown when conversion fails
-
-
Method Details
-
convertToModel
Description copied from interface:ConverterConverts a presentation value to its model representation.- Specified by:
convertToModelin interfaceConverter<String,Long> - Parameters:
value- the presentation value to convert (may be null)- Returns:
- the model value
- Throws:
ConversionException- if conversion fails
-
convertToPresentation
Description copied from interface:ConverterConverts a model value to its presentation representation.- Specified by:
convertToPresentationin interfaceConverter<String,Long> - Parameters:
value- the model value to convert (may be null)- Returns:
- the presentation value
-