Package com.quantcomponents.core.model.beans

Examples of com.quantcomponents.core.model.beans.ImmutableContractBean


  public static StockDatabaseHeader fromStockDatabase(IStockDatabase stockDatabase) {
    StockDatabaseHeader bean = new StockDatabaseHeader();
    bean.id = stockDatabase.getPersistentID();
    bean.timestamp = stockDatabase.getTimestamp();
    bean.timeZone = stockDatabase.getTimeZone();
    bean.contract = new ImmutableContractBean(stockDatabase.getContract());
    bean.dataType = stockDatabase.getDataType();
    bean.barSize = stockDatabase.getBarSize();
    bean.includeAfterHours = stockDatabase.isIncludeAfterHours();
    return bean;
  }
View Full Code Here


  public synchronized void addStockDatabase(IStockDatabase stockDatabase) {
    IContract contract = stockDatabase.getContract();
    Set<IStockDatabase> set = stockDbMultiMap.get(contract);
    if (set == null) {
      set = new CopyOnWriteArraySet<IStockDatabase>();
      IContract key = new ImmutableContractBean(contract); // since IContract instances can be mutable, make a snapshot of it
      stockDbMultiMap.put(key, set);
    }
    set.add(stockDatabase);
    stockDbByID.put(stockDatabase.getPersistentID(), stockDatabase);
  }
View Full Code Here

      @Override
      public void contractDetails(int reqId, ContractDetails details) {
        if (reqId == getPendingReqId()) {
          IBContract iBContract = new IBContract(details.m_summary, constantTranslator);
          iBContract.setDetails(details);
          ImmutableContractBean bean = new ImmutableContractBean(iBContract);
          result.add(bean);
        }
      }

      @Override
View Full Code Here

TOP

Related Classes of com.quantcomponents.core.model.beans.ImmutableContractBean

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.