Package com.wesabe.api.accounts.entities

Examples of com.wesabe.api.accounts.entities.InvestmentTxactionList


      @QueryParam("end") ISODateParam endDate,
      @QueryParam("account") Set<UriParam> accountUris,
      @QueryParam("investment-security") Set<String> investmentSecurityNames) {
   
    final List<InvestmentAccount> accounts = getAccounts(user, accountUris);
    final InvestmentTxactionList investmentTxactions = filterTxactions(
        accounts,
        getInvestmentTxactions(accounts, startDate, endDate),
        limit, offset, investmentSecurityNames
    );
View Full Code Here


    }
    if (offset != null) {
      investmentTxactionListBuilder.setOffset(offset.getValue());
    }
   
    final InvestmentTxactionList filteredTxactions = investmentTxactionListBuilder.build(investmentTxactions);
    return filteredTxactions;
  }
View Full Code Here

  private int offset = 0;
  private int limit = 0;
  private CurrencyExchangeRateMap exchangeRateMap;
 
  public InvestmentTxactionList build(Collection<InvestmentTxaction> investmentTxactions) {
    InvestmentTxactionList investmentTxactionList = new InvestmentTxactionList();
   
    // remove disabled, deleted, etc, sort them in reverse chronological order
    final List<InvestmentTxaction> resultTxactions = sort(filter(investmentTxactions));
   
    // set the total count to all the ones that could ever be shown
    investmentTxactionList.setTotalCount(resultTxactions.size());
   
    if (resultTxactions.isEmpty()) {
      return investmentTxactionList;
    }
   
    // hack of the end of the list since they are not useful in balance calculation
    applyLimit(resultTxactions);

    for (InvestmentTxaction investmentTxaction : resultTxactions) {
      investmentTxactionList.add(new InvestmentTxactionListItem(investmentTxaction));
    }
   
    // hack off the front of the list we were asked to hide
    applyOffset(investmentTxactionList);
   
View Full Code Here

TOP

Related Classes of com.wesabe.api.accounts.entities.InvestmentTxactionList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.