T
- The type to convert from/to the domain-specific counterpart.DomainT
- The domain-specific type.public abstract class AbstractTypeConverter<T,DomainT> extends Object implements TypeConverter<T,DomainT>
Constructor and Description |
---|
AbstractTypeConverter() |
Modifier and Type | Method and Description |
---|---|
ConvertedObject<T> |
fromDomain(DomainT domainObject)
Transforms the given domain-specific object to the general object.
|
abstract ConvertedObject<T> |
fromDomainNonNull(DomainT domainObject)
Actual converter implementation from a domain-specific object to an arbitrary type.
|
ConvertedObject<DomainT> |
toDomain(T object)
Transforms the given object to its domain-specific counterpart.
|
abstract ConvertedObject<DomainT> |
toDomainNonNull(T object)
Actual converter implementation from an arbitrary object to its domain-specific counterpart.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomainType, getType
public final ConvertedObject<DomainT> toDomain(@Nullable T object)
TypeConverter
toDomain
in interface TypeConverter<T,DomainT>
object
- The object to transform.ConvertedObject
wrapping the domain-specific object.public final ConvertedObject<T> fromDomain(@Nullable DomainT domainObject)
TypeConverter
fromDomain
in interface TypeConverter<T,DomainT>
domainObject
- The domain-specific object to transform.ConvertedObject
wrapping the general object.public abstract ConvertedObject<DomainT> toDomainNonNull(@NonNull T object) throws Exception
object
- The object to transform to its domain-specific counterpart.Exception
- If an error occurred during the transformation.public abstract ConvertedObject<T> fromDomainNonNull(@NonNull DomainT domainObject) throws Exception
domainObject
- The domain-specific object to transform.Exception
- If an error occurred during the transformation.Copyright © 2018 SAP SE. All rights reserved.