|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.data.util.converter.DateToLongConverter
public class DateToLongConverter
A converter that converts from Long to Date and back.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.vaadin.data.util.converter.Converter |
|---|
Converter.ConversionException |
| Constructor Summary | |
|---|---|
DateToLongConverter()
|
|
| Method Summary | |
|---|---|
java.lang.Long |
convertToModel(java.util.Date value,
java.util.Locale locale)
Converts the given value from target type to source type. |
java.util.Date |
convertToPresentation(java.lang.Long value,
java.util.Locale locale)
Converts the given value from source type to target type. |
java.lang.Class<java.lang.Long> |
getModelType()
The source type of the converter. |
java.lang.Class<java.util.Date> |
getPresentationType()
The target type of the converter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateToLongConverter()
| Method Detail |
|---|
public java.lang.Long convertToModel(java.util.Date value,
java.util.Locale locale)
ConverterA converter can optionally use locale to do the conversion.
A converter should in most cases be symmetric so chainingConverter.convertToPresentation(Object, Locale) and
Converter.convertToModel(Object, Locale) should return the original value.
convertToModel in interface Converter<java.util.Date,java.lang.Long>value - The value to convert, compatible with the target type. Can be
nulllocale - The locale to use for conversion. Can be null.
public java.util.Date convertToPresentation(java.lang.Long value,
java.util.Locale locale)
ConverterA converter can optionally use locale to do the conversion.
A converter should in most cases be symmetric so chainingConverter.convertToPresentation(Object, Locale) and
Converter.convertToModel(Object, Locale) should return the original value.
convertToPresentation in interface Converter<java.util.Date,java.lang.Long>value - The value to convert, compatible with the target type. Can be
nulllocale - The locale to use for conversion. Can be null.
public java.lang.Class<java.lang.Long> getModelType()
ConverterConverter.convertToPresentation(Object, Locale).
getModelType in interface Converter<java.util.Date,java.lang.Long>public java.lang.Class<java.util.Date> getPresentationType()
ConverterConverter.convertToModel(Object, Locale).
getPresentationType in interface Converter<java.util.Date,java.lang.Long>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||