Class AccountDTOConverter
java.lang.Object
com.bluebell.greenhouse.planter.converters.AbstractGenericDTOConverter<Account, AccountDTO>
com.bluebell.greenhouse.planter.converters.AbstractGenericEntityDTOConverter<Account, AccountDTO>
com.bluebell.greenhouse.planter.converters.account.AccountDTOConverter
- All Implemented Interfaces:
GenericDTOConverter<Account, AccountDTO>
@Component("accountDTOConverter")
public class AccountDTOConverter
extends AbstractGenericEntityDTOConverter<Account, AccountDTO>
Converts
Accounts into AccountDTOs.- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(Account account, AccountLedgerSummary summary) Converts an account using ledger figures already resolved by its caller.convertAll(Collection<Account> entities) Converts a page ofAccounts, resolving every ledger figure in one batch.convertAll(Collection<Account> entities, Map<Long, AccountLedgerSummary> summaries) Converts accounts using ledger figures an enclosing conversion already resolved.protected AccountDTOconvertNonNull(Account entity) Converts aAccountinto aAccountDTO.protected AccountDTOCreates the empty DTO returned for a null source.summariseAll(Collection<Account> entities) Resolves the ledger figures for the given accounts in one batch.Methods inherited from class AbstractGenericEntityDTOConverter
afterConvertMethods inherited from class AbstractGenericDTOConverter
convert
-
Constructor Details
-
AccountDTOConverter
public AccountDTOConverter()
-
-
Method Details
-
convert
Converts an account using ledger figures already resolved by its caller.- Parameters:
account-Accountsummary-AccountLedgerSummary- Returns:
AccountDTO
-
convertAll
Converts a page ofAccounts, resolving every ledger figure in one batch.- Parameters:
entities-CollectionofAccounts- Returns:
ListofAccountDTO
-
convertAll
public List<AccountDTO> convertAll(Collection<Account> entities, Map<Long, AccountLedgerSummary> summaries) Converts accounts using ledger figures an enclosing conversion already resolved.- Parameters:
entities-CollectionofAccountssummaries- ledger figures keyed by account id- Returns:
ListofAccountDTO
-
summariseAll
Resolves the ledger figures for the given accounts in one batch.- Parameters:
entities-CollectionofAccounts- Returns:
- ledger figures keyed by account id
-
convertNonNull
Converts aAccountinto aAccountDTO.- Specified by:
convertNonNullin classAbstractGenericDTOConverter<Account, AccountDTO>- Parameters:
entity-Account- Returns:
AccountDTO
-
createEmptyDTO
Creates the empty DTO returned for a null source.- Specified by:
createEmptyDTOin classAbstractGenericDTOConverter<Account, AccountDTO>- Returns:
- empty DTO
-