S
- the type of the input objectT
- the type of the domain objectpublic abstract class AbstractModelConverter<S,T> extends java.lang.Object implements ModelConverter<S,T>
ModelConverter
implementation.Constructor and Description |
---|
AbstractModelConverter(java.lang.Class<T> targetType)
Constructs a
AbstractModelConverter . |
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
convert(java.lang.Iterable<? extends S> objects)
Converts all given source objects into target objects.
|
T |
convert(S source)
Converts the given source object into a new instance of target object.
|
protected T |
instantiateTargetObject(S source)
Instantiates the domain object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert
public AbstractModelConverter(java.lang.Class<T> targetType)
AbstractModelConverter
.targetType
- the target typepublic T convert(S source)
convert
in interface ModelConverter<S,T>
source
- the source objectpublic java.util.List<T> convert(java.lang.Iterable<? extends S> objects)
convert
in interface ModelConverter<S,T>
objects
- the object, must not be null.