init();
Vector v = executeSqlQuery(resourceName);
List records = new ArrayList(v.size());
for (Iterator i = v.iterator(); i.hasNext(); ) {
PreparedStatementResult result = (PreparedStatementResult) i.next();
int logID = -1;
try {
logID = ( (Number) result.get(COL_LOG_ID)).intValue();
}
catch (Throwable th) {}
Date logDate = (Date) result.get(COL_LOG_DATE);
Level level = null;
String levelStr = result.get(COL_LOG_LEVEL).toString();
try {
level = Level.parse(levelStr);
}
catch (Exception e) {
Logging.bootstrapLog(Level.WARNING, getClass().getName(),
"getLogRecords",
"Error parsing level: " + levelStr);
}
String transactionID = (String) result.get(COL_TRANSACTION_ID);
String eventID = (String) result.get(COL_EVENT_ID);
String eventType = (String) result.get(COL_EVENT_TYPE);
String componentID = (String) result.get(COL_COMPONENT_ID);
String threadID = (String) result.get(COL_THREAD_ID);
String serverID = (String) result.get(COL_SERVER_ID);
String className = (String) result.get(COL_CLASS_NAME);
String methodName = (String) result.get(COL_METHOD_NAME);
String message = (String) result.get(COL_MESSAGE);
String userID = (String) result.get(COL_USER_ID);
PlatformLogRecord record = new PlatformLogRecord(level, message);
record.setMillis(logDate.getTime());
record.setSourceClassName(className);
record.setSourceMethodName(methodName);