}
private InvestmentTxactionList filterTxactions(List<InvestmentAccount> accounts,
List<InvestmentTxaction> investmentTxactions, IntegerParam limit,
IntegerParam offset, Set<String> investmentSecurityNames) {
final InvestmentTxactionListBuilder investmentTxactionListBuilder = builderProvider.get();
investmentTxactionListBuilder.setAccounts(accounts);
if (!investmentSecurityNames.isEmpty()) {
investmentTxactionListBuilder.setInvestmentSecurityNames(investmentSecurityNames);
}
if (limit != null) {
investmentTxactionListBuilder.setLimit(limit.getValue());
}
if (offset != null) {
investmentTxactionListBuilder.setOffset(offset.getValue());
}
final InvestmentTxactionList filteredTxactions = investmentTxactionListBuilder.build(investmentTxactions);
return filteredTxactions;
}