Package com.quantcomponents.core.model.beans

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


    }
    header.dataType = DataType.valueOf(rs.getString(4));
    header.barSize = BarSize.valueOf(rs.getString(5));
    header.includeAfterHours = rs.getBoolean(6);
   
    ContractBean bean = new ContractBean();
    bean.setSymbol(rs.getString(7));
    bean.setSecurityType(SecurityType.valueOf(rs.getString(8)));
    String expiryDateRepr = rs.getString(9);
    if (expiryDateRepr != null) {
      bean.setExpiryDate(new BareDate(expiryDateRepr));
    }
    bean.setStrike(rs.getDouble(10));
    String optRight = rs.getString(11);
    if (optRight != null) {
      bean.setOptionRight(OptionRight.valueOf(optRight));
    }
    bean.setMultiplier(rs.getInt(12));
    bean.setExchange(rs.getString(13));
    bean.setPrimaryExchange(rs.getString(14));
    String curCode = rs.getString(15);
    if (curCode != null) {
      bean.setCurrency(Currency.getInstance(curCode));
    }
    String idType = rs.getString(16);
    if (idType != null) {
      bean.setIdentifierType(IdentifierType.valueOf(idType));
    }
    bean.setIdentifier(rs.getString(17));
    bean.setBrokerID(rs.getString(18));
    String descLongName = rs.getString(19);
    String descTzId = rs.getString(20);
    if (descLongName != null || descTzId != null) {
      ContractDescBean desc = new ContractDescBean();
      desc.setLongName(descLongName);
      if (descTzId != null) {
        desc.setTimeZone(TimeZone.getTimeZone(descTzId));
      }
      bean.setContractDescription(desc);
    }
    header.contract = bean;
     
    return header;
  }
View Full Code Here


  private Date startDateTime;
  private Date endDateTime;
 
  public NewHistoricalData(MarketDataManagerPresentationWrapper marketDataManager) {
    this.marketDataManager = marketDataManager;
    this.contractCriteria = new ContractBean();
  }
View Full Code Here

  }
  public OptionRight optionright(String name) {
    return OptionRight.valueOf(name);
  }
  public ContractBean contract(String symbol, String secTypeCode, String curCode) {
    ContractBean c = new ContractBean();
    c.setSymbol(symbol);
    c.setCurrency(Currency.getInstance(curCode));
    c.setSecurityType(SecurityType.valueOf(secTypeCode));
    return c;
  }
View Full Code Here

        continue;
      }
      if (criteria.getCurrency() != null && !criteria.getCurrency().equals(stockCurrency)) {
        continue;
      }
      ContractBean contract = new ContractBean();
      contract.setSymbol(ticker);
      contract.setExchange(extractExchange(security));
      contract.setSecurityType(decodeSecurityType(extractSecurityType(security)));
      contract.setCurrency(stockCurrency);
      ContractDescBean description = new ContractDescBean();
      description.setLongName(extractDescription(security));
      description.setTimeZone(YAHOO_FINANCE_TIMEZONE);
      contract.setContractDescription(description);
      contract.setBrokerID(YAHOO_BROKER_ID);
      contractList.add(contract);
    }
    return contractList;
  }
View Full Code Here

TOP

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

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.