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