public class ZonedDateTimeCalendarConverter extends AbstractTypeConverter<ZonedDateTime,Calendar>
Calendar
type and the new ZonedDateTime
.
In combination with the ODataField
annotation this can be used to expose fields of OData value which would be
exposed as Calendar
as ZonedDateTime
.
Constructor and Description |
---|
ZonedDateTimeCalendarConverter() |
Modifier and Type | Method and Description |
---|---|
ConvertedObject<ZonedDateTime> |
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<ZonedDateTime> |
getType()
Getter for an class object of the type to convert from/to the domain-specific counterpart.
|
ConvertedObject<Calendar> |
toDomainNonNull(ZonedDateTime object)
Actual converter implementation from an arbitrary object to its domain-specific counterpart.
|
fromDomain, toDomain
@Nonnull public ConvertedObject<Calendar> toDomainNonNull(@Nonnull ZonedDateTime object)
AbstractTypeConverter
toDomainNonNull
in class AbstractTypeConverter<ZonedDateTime,Calendar>
object
- The object to transform to its domain-specific counterpart.@Nonnull public ConvertedObject<ZonedDateTime> fromDomainNonNull(@Nonnull Calendar domainObject)
AbstractTypeConverter
fromDomainNonNull
in class AbstractTypeConverter<ZonedDateTime,Calendar>
domainObject
- The domain-specific object to transform.@Nonnull public Class<ZonedDateTime> getType()
TypeConverter
T
.@Nonnull public Class<Calendar> getDomainType()
TypeConverter
DomainT
.Copyright © 2021 SAP SE. All rights reserved.