Package project.gluebooster.applications.assetManagement.fields

Examples of project.gluebooster.applications.assetManagement.fields.SecuritiesInformation


  public void testUpdateInformation() throws Exception
  {
    BoerseSecuritiesInformationManager manager = new BoerseSecuritiesInformationManager();
  
   
    SecuritiesInformation info = new SecuritiesInformation();
    info.setPriceNotation(new BigDecimal(1));
    SecuritiesMarketPrice marketPrice = new SecuritiesMarketPrice();
    SecuritiesCurrentMarketPrice currentMarketPrice = new SecuritiesCurrentMarketPrice();
    ExchangeRate euro = new ExchangeRate();
    euro.setRate(new BigDecimal(1));
    euro.setSourceCurrency("EUR");
    euro.setTargetCurrency("EUR");
    ArrayList<ExchangeRate> rates = new ArrayList<ExchangeRate>();
    rates.add(euro);
    ExchangeRateManager exchangeRate = new ExchangeRateManager(rates, "EUR");
   
    MessageToWriterTransformer systemErrWriter = new MessageToWriterTransformer(System.err);
   
   
    try
    {
      boolean updateResult;
     
      //info.setIsin("AT0000662275");
      //updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);

           
      info.setIsin("FR0010315770");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);

      info.setIsin("AT0000764865");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
     
      info.setIsin("DE000CG1CMQ4");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
     
      info.setIsin("XS0181557454");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
     
     
      info.setIsin("DE0007100000");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
      //assertTrue(updateResult);//ignore the result, there may be no internet connection

      info.setIsin("DE0008471400");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
      //assertTrue(updateResult);//ignore the result, there may be no internet connection
     
     
View Full Code Here


    List<String> keys = sort(groupedTransactions.keySet());

        ArrayList<SummarizedTransaction<TransactionClass>> result = new ArrayList<SummarizedTransaction<TransactionClass>>();

       BigDecimal currentValue = new BigDecimal(0);
        SecuritiesInformation information = null;
        SecuritiesCurrentMarketPrice currentMarketPrice = null;
        String assetname = null; //no asset yet, "" == different assets, otherwise the same asset
        String currency = null;
       
      for (String key: keys)
View Full Code Here

  public void testUpdateInformation() throws Exception
  {
    FondswebSecuritiesInformationManager manager = new FondswebSecuritiesInformationManager();
  
   
    SecuritiesInformation info = new SecuritiesInformation();
    info.setPriceNotation(new BigDecimal(1));
    SecuritiesMarketPrice marketPrice = new SecuritiesMarketPrice();
    SecuritiesCurrentMarketPrice currentMarketPrice = new SecuritiesCurrentMarketPrice();
    ExchangeRate euro = new ExchangeRate();
    euro.setRate(new BigDecimal(1));
    euro.setSourceCurrency("EUR");
    euro.setTargetCurrency("EUR");
    ExchangeRate cad = new ExchangeRate();
    cad.setRate(new BigDecimal(2));
    cad.setSourceCurrency("EUR");
    cad.setTargetCurrency("CAD");
    ArrayList<ExchangeRate> rates = new ArrayList<ExchangeRate>();
    rates.add(euro);
    rates.add(cad);
    ExchangeRateManager exchangeRate = new ExchangeRateManager(rates, "EUR");
   
    MessageToWriterTransformer systemErrWriter = new MessageToWriterTransformer(System.err);
   
   
    try
    {
      boolean updateResult;

      info.setIsin("LU0149168907");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
     
      info.setIsin("AT0000764865");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);

      info.setIsin("LU0052910469");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
      //assertTrue(updateResult);//ignore the result, there may be no internet connection

      info.setIsin("DE0009805002");
      updateResult =  manager.updateInformation(info, marketPrice, currentMarketPrice, exchangeRate, systemErrWriter);
      //assertTrue(updateResult);//ignore the result, there may be no internet connection
     
     
View Full Code Here

     
     
      HashMap<String, SecuritiesCurrentMarketPrice> priceMap = new HashMap<String, SecuritiesCurrentMarketPrice>();
      for (SecuritiesCurrentMarketPrice price: getAllSecuritiesCurrentMarketPrice())
      {
         SecuritiesInformation info = isinInformationMap.get(price.getIsin());
         if (info != null)
            priceMap.put( info.getAsset(), price);
         else
           getLog().info("no info for ", price.getAssetname(), "  ", price.getIsin(), "  in ", isinInformationMap.keySet());
      }
     
     List<SecuritiesTransaction> transactions = getAllEntries(SecuritiesTransaction.class, "order by transactionDate");
View Full Code Here

TOP

Related Classes of project.gluebooster.applications.assetManagement.fields.SecuritiesInformation

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.