Examples of SecuritiesInformation


Examples of gluebooster.demos.finance.fields.SecuritiesInformation

  public void simplePersistenceTest() throws Exception{
    //Unmarshaller u = JAXBContext.newInstance("demo").createUnmarshaller();
    //read the object
    //DemoObject item = (DemoObject) u.unmarshal(new File("\\tmp\\demo.xml"));
    //get JPA Helper to do Object->DB
    SecuritiesInformation info = new SecuritiesInformation();
    info.setAsset("test");
    info.setIsin("123445");
    //JAXBContext context = JAXBContext.newInstance(SecuritiesInformation.class);
   
   
   
    EntityManager em = Persistence.createEntityManagerFactory("test.gluebooster.demos.finance.data").createEntityManager();
View Full Code Here

Examples of gluebooster.demos.finance.fields.SecuritiesInformation

    // subtransactions
    Double priceSum = 0.0;
    Double quantitySum = 0.0;
    Double currentValueSum = 0.0;
   
    SecuritiesInformation information = null;
    SecuritiesCurrentMarketPrice currentMarketPrice = null;


    for (SecuritiesTransaction transaction : subtransactions) {
     
View Full Code Here

Examples of gluebooster.demos.finance.fields.SecuritiesInformation

       
        List<SecuritiesCurrentMarketPrice> priceList =  getAllSecuritiesCurrentMarketPrice();
        HashMap<String, SecuritiesCurrentMarketPrice> priceMap = new HashMap<String, SecuritiesCurrentMarketPrice>();
        for (SecuritiesCurrentMarketPrice price: priceList)
        {
           SecuritiesInformation info = isinInformationMap.get(price.getIsin());
           if (info != null)
              priceMap.put( info.getAsset(), price);
        }
       
       List<SecuritiesTransaction> transactions = getAllEntries(SecuritiesTransaction.class, "order by transactionDate");
      
         ArrayList<SummarizedTransaction<SecuritiesTransaction>> result = new ArrayList<SummarizedTransaction<SecuritiesTransaction>>(transactions.size());
View Full Code Here

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

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

    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

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

  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

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

     
     
      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
Copyright © 2018 www.massapi.com. 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.