}
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;
}