be.idamf.sofa.mapper
Interface StrategyMapper<A,B>
- Type Parameters:
A - The value object typeB - The entity type
- All Superinterfaces:
- BidirectionalMapper<A,B>, Mapper<A,B>
- All Known Implementing Classes:
- AbstractBidirectionalStrategyMapper
public interface StrategyMapper<A,B>
- extends BidirectionalMapper<A,B>
Mapper interface defining operations to map B to A objects, using strategies, while the A to B mapping does not need a strategy.
This interface extends the BidirectionalMapper interface, so implementations should also provide a default
selected strategy, which should be used when calling the BidirectionalMapper.mapBToA(Object) method.
mapBToA
A mapBToA(B b,
MapperStrategy<A,B> strategy)
- Map an object of type B to an object of type A, using a given strategy.
- Parameters:
b - the object of type Bstrategy - the strategy
- Returns:
- an object of type A
mapCollectionOfBToCollectionOfA
<C extends Collection<A>> C mapCollectionOfBToCollectionOfA(Collection<B> collectionOfB,
C emptyMutableCollectionOfA,
MapperStrategy<A,B> strategy)
- Maps a collection of objects of type B to a collection of objects of type A, using a strategy.
- Parameters:
collectionOfB - the collection of objects of type Bstrategy - the strategy
- Returns:
- a collection of objects of type A
Copyright © 2013 iDA-MediaFoundry. All Rights Reserved.