Class LocalTimeCalendarConverter
java.lang.Object
com.sap.cloud.sdk.typeconverter.AbstractTypeConverter<LocalTime,Calendar>
com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.LocalTimeCalendarConverter
- All Implemented Interfaces:
TypeConverter<LocalTime,
Calendar>
Converts between the deprecated
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromDomainNonNull
(Calendar domainObject) Actual converter implementation from a domain-specific object to an arbitrary type.Getter for an class object of the domain-specific type.getType()
Getter for an class object of the type to convert from/to the domain-specific counterpart.toDomainNonNull
(LocalTime object) Actual converter implementation from an arbitrary object to its domain-specific counterpart.Methods inherited from class com.sap.cloud.sdk.typeconverter.AbstractTypeConverter
fromDomain, toDomain
-
Constructor Details
-
LocalTimeCalendarConverter
public LocalTimeCalendarConverter()
-
-
Method Details
-
toDomainNonNull
Description copied from class:AbstractTypeConverter
Actual converter implementation from an arbitrary object to its domain-specific counterpart.- Specified by:
toDomainNonNull
in classAbstractTypeConverter<LocalTime,
Calendar> - Parameters:
object
- The object to transform to its domain-specific counterpart.- Returns:
- A wrapper containing the domain-specific counterpart.
-
fromDomainNonNull
Description copied from class:AbstractTypeConverter
Actual converter implementation from a domain-specific object to an arbitrary type.- Specified by:
fromDomainNonNull
in classAbstractTypeConverter<LocalTime,
Calendar> - Parameters:
domainObject
- The domain-specific object to transform.- Returns:
- A wrapper containing the converted object.
-
getType
Description copied from interface:TypeConverter
Getter for an class object of the type to convert from/to the domain-specific counterpart.- Returns:
- The class object of
T
.
-
getDomainType
Description copied from interface:TypeConverter
Getter for an class object of the domain-specific type.- Returns:
- The class object of
DomainT
.
-