SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyyMMdd");
String dateTime = yyyyMMdd.format(d);
dateTime += " " + time;
final Iterator<Entry<String, String>> it = event.entrySet().iterator();
TimeStamp ts;
try {
if (dateTime.indexOf("-") != -1)
ts = new TimeStamp(sdf2.parse(dateTime));
else
ts = new TimeStamp(sdf.parse(dateTime));
while (it.hasNext()) {
Entry<String, String> entry = it.next();
String key = entry.getKey();
if (key.toUpperCase().equals("DATE"))
continue;
if (key.toUpperCase().equals("TIME"))
continue;
MarketDataInstrument mdi = mdiDao.findByProvId(mdprovider, key);
if (mdi == null)
continue;
if (entry.getValue().equals("#"))
continue;
System.out.println("Importing : " + ts.getDate() + " - " + key + " - " + entry.getValue());
iaw.write(mdi.getId(), ts, "PX_SETTLE", Double.parseDouble(entry.getValue()));
if (lineCounter++ > 100) {
lineCounter = 0;
try {
iaw.commit();