Level level = (Level) levelBox.getSelectedItem();
String component = componentField.getText().trim();
String className = classField.getText().trim();
String methodName = methodField.getText().trim();
LogQueryBuilder builder = null;
try {
builder = new LogQueryBuilder((PersistentHandler)ServiceManager.getService(PersistentHandler.JIVALO_PERSISTENT_HANDLER_LOOKUP_NAME));
} catch (BaseException ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(LogSearchPanel.this.viewer,
"Error while getting PersistentHandler: " +
ex.getMessage());
return;
}
builder.addConditionStartDate(startDate);
builder.addConditionEndDate(endDate);
if (!level.equals(Level.ALL)) {
builder.addConditionThresholdLevel(level);
}
if (component.length() > 0) {
builder.addConditionComponentID(component);
}
if (className.length() > 0) {
builder.addConditionClassNameContains(className);
}
if (methodName.length() > 0) {
builder.addConditionMethodNameContains(methodName);
}
try {
List records = builder.getLogRecords();
LogSearchPanel.this.viewer.refreshList(records);
LogSearchPanel.this.viewer.recordSelected(null);
}
catch (Exception ex) {
ex.printStackTrace();