Package com.sap.cloud.sdk.typeconverter
Interface TypeConverter<T,DomainT>
- Type Parameters:
T- The type to convert from/to the domain-specific counterpart.DomainT- The domain-specific type.
- All Known Implementing Classes:
AbstractTypeConverter
public interface TypeConverter<T,DomainT>
Type converter for converting types to and from their domain-specific counterparts.
-
Method Summary
Modifier and TypeMethodDescriptionfromDomain(DomainT domainObject) Transforms the given domain-specific object to the general object.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.Transforms the given object to its domain-specific counterpart.
-
Method Details
-
getType
Getter for an class object of the type to convert from/to the domain-specific counterpart.- Returns:
- The class object of
T.
-
getDomainType
Getter for an class object of the domain-specific type.- Returns:
- The class object of
DomainT.
-
toDomain
Transforms the given object to its domain-specific counterpart.- Parameters:
object- The object to transform.- Returns:
- A
ConvertedObjectwrapping the domain-specific object.
-
fromDomain
Transforms the given domain-specific object to the general object.- Parameters:
domainObject- The domain-specific object to transform.- Returns:
- A
ConvertedObjectwrapping the general object.
-