public class LocalTimeCalendarConverter extends AbstractTypeConverter<LocalTime,Calendar>
Calendar
type and the new LocalTime
.
The year, month, and day fields on the Calendar
instance are ignored/cleared, as the LocalTime
does
not contain any values for those
In combination with the ODataField
annotation this can be used to expose fields of OData value which would be
exposed as Calendar
as LocalTime
.
Constructor and Description |
---|
LocalTimeCalendarConverter() |
Modifier and Type | Method and Description |
---|---|
ConvertedObject<LocalTime> |
fromDomainNonNull(Calendar domainObject)
Actual converter implementation from a domain-specific object to an arbitrary type.
|
Class<Calendar> |
getDomainType()
Getter for an class object of the domain-specific type.
|
Class<LocalTime> |
getType()
Getter for an class object of the type to convert from/to the domain-specific counterpart.
|
ConvertedObject<Calendar> |
toDomainNonNull(LocalTime object)
Actual converter implementation from an arbitrary object to its domain-specific counterpart.
|
fromDomain, toDomain
@Nonnull public ConvertedObject<Calendar> toDomainNonNull(@Nonnull LocalTime object)
AbstractTypeConverter
toDomainNonNull
in class AbstractTypeConverter<LocalTime,Calendar>
object
- The object to transform to its domain-specific counterpart.@Nonnull public ConvertedObject<LocalTime> fromDomainNonNull(@Nonnull Calendar domainObject)
AbstractTypeConverter
fromDomainNonNull
in class AbstractTypeConverter<LocalTime,Calendar>
domainObject
- The domain-specific object to transform.@Nonnull public Class<LocalTime> getType()
TypeConverter
T
.@Nonnull public Class<Calendar> getDomainType()
TypeConverter
DomainT
.Copyright © 2019 SAP SE. All rights reserved.