Class PositionDTOConverter
java.lang.Object
com.bluebell.greenhouse.planter.converters.AbstractGenericDTOConverter<Position, PositionDTO>
com.bluebell.greenhouse.planter.converters.AbstractGenericEntityDTOConverter<Position, PositionDTO>
com.bluebell.greenhouse.planter.converters.position.PositionDTOConverter
- All Implemented Interfaces:
GenericDTOConverter<Position, PositionDTO>
@Component("positionDTOConverter")
public class PositionDTOConverter
extends AbstractGenericEntityDTOConverter<Position, PositionDTO>
Converts
Positions into PositionDTOs.- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertAll(Collection<Position> positions, Account account, AccountLedgerSummary summary) Converts positions belonging to one account using an already-resolved ledger summary.protected PositionDTOconvertNonNull(Position entity) Converts aPositioninto aPositionDTO.protected PositionDTOCreates the empty DTO returned for a null source.Methods inherited from class AbstractGenericEntityDTOConverter
afterConvertMethods inherited from class AbstractGenericDTOConverter
convertMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GenericDTOConverter
convertAll
-
Constructor Details
-
PositionDTOConverter
public PositionDTOConverter()
-
-
Method Details
-
convertAll
public List<PositionDTO> convertAll(Collection<Position> positions, Account account, AccountLedgerSummary summary) Converts positions belonging to one account using an already-resolved ledger summary.- Parameters:
positions- positions belonging to the accountaccount-Accountsummary-AccountLedgerSummary- Returns:
ListofPositionDTOs
-
convertNonNull
Converts aPositioninto aPositionDTO.- Specified by:
convertNonNullin classAbstractGenericDTOConverter<Position, PositionDTO>- Parameters:
entity-Position- Returns:
PositionDTO
-
createEmptyDTO
Creates the empty DTO returned for a null source.- Specified by:
createEmptyDTOin classAbstractGenericDTOConverter<Position, PositionDTO>- Returns:
- empty DTO
-