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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomainType, getType
@Nonnull public final ConvertedObject<DomainT> toDomain(@Nullable T object)
toDomain
in interface TypeConverter<T,DomainT>
object
- The object to transform.ConvertedObject
wrapping the domain-specific object.@Nonnull public final ConvertedObject<T> fromDomain(@Nullable DomainT domainObject)
fromDomain
in interface TypeConverter<T,DomainT>
domainObject
- The domain-specific object to transform.ConvertedObject
wrapping the general object.@Nonnull 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.@Nonnull 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 © 2020 SAP SE. All rights reserved.