From 189dc79af9af80df341f44dd207f4d75458eecdc Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Sat, 8 Sep 2012 13:58:33 +0200 Subject: [PATCH] [#1472] Add a Settings.executeDebugging property, and move server-side Console logic to core - Renamed SqlQueryType to QueryType --- .../java/org/jooq/debug/DebugListener.java | 16 ++-- .../jooq/debug/LocalStatementExecutor.java | 2 +- .../java/org/jooq/debug/QueryLoggingData.java | 2 +- .../{SqlQueryType.java => QueryType.java} | 77 +++++++++++++------ .../java/org/jooq/debug/StatementInfo.java | 6 +- .../java/org/jooq/debug/StatementMatcher.java | 6 +- .../jooq/debug/console/BreakpointEditor.java | 28 +++---- .../org/jooq/debug/console/LoggerPane.java | 8 +- .../debug/console/StatementMatcherPane.java | 28 +++---- 9 files changed, 100 insertions(+), 73 deletions(-) rename jOOQ-console/src/main/java/org/jooq/debug/{SqlQueryType.java => QueryType.java} (70%) diff --git a/jOOQ-console/src/main/java/org/jooq/debug/DebugListener.java b/jOOQ-console/src/main/java/org/jooq/debug/DebugListener.java index 1945cd0a1f..4c25060091 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/DebugListener.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/DebugListener.java @@ -135,7 +135,7 @@ public class DebugListener extends DefaultExecuteListener { String parameterDescription = null; if(statementInfo == null) { String[] sql = ctx.batchSQL(); - SqlQueryType sqlQueryType = SqlQueryType.detectType(sql[0]); + QueryType queryType = QueryType.detectType(sql[0]); if(sql.length == 1) { sql_ = sql[0]; PreparedStatement statement = ctx.statement(); @@ -152,7 +152,7 @@ public class DebugListener extends DefaultExecuteListener { } sql_ = sb.toString(); } - statementInfo = new StatementInfo(sqlQueryType, sql, parameterDescription); + statementInfo = new StatementInfo(queryType, sql, parameterDescription); } if(breakpoint.matches(statementInfo, true)) { matchingSQL = sql_; @@ -181,8 +181,8 @@ public class DebugListener extends DefaultExecuteListener { for(Debugger debugger: debuggerList) { LoggingListener loggingListener = debugger.getLoggingListener(); if(loggingListener != null) { - SqlQueryType sqlQueryType = SqlQueryType.detectType(sql); - QueryLoggingData queryLoggingData = new QueryLoggingData(sqlQueryType, new String[] {sql}, null, null, null, subEndExecutionTime - subStartExecutionTime); + QueryType queryType = QueryType.detectType(sql); + QueryLoggingData queryLoggingData = new QueryLoggingData(queryType, new String[] {sql}, null, null, null, subEndExecutionTime - subStartExecutionTime); StatementMatcher[] loggingStatementMatchers = debugger.getLoggingStatementMatchers(); if(loggingStatementMatchers == null) { loggingListener.logQueries(queryLoggingData); @@ -304,7 +304,7 @@ public class DebugListener extends DefaultExecuteListener { } if(hasListener) { String[] sql = ctx.batchSQL(); - SqlQueryType sqlQueryType = SqlQueryType.detectType(sql[0]); + QueryType queryType = QueryType.detectType(sql[0]); String parameterDescription = null; if(sql.length == 1) { PreparedStatement statement = ctx.statement(); @@ -312,7 +312,7 @@ public class DebugListener extends DefaultExecuteListener { parameterDescription = ((UsageTrackingPreparedStatement) statement).getParameterDescription(); } } - QueryLoggingData queryLoggingData = new QueryLoggingData(sqlQueryType, sql, parameterDescription, startPreparationTime == 0? null: aggregatedPreparationDuration, startBindTime == 0? null: endBindTime - startBindTime, endExecutionTime - startExecutionTime); + QueryLoggingData queryLoggingData = new QueryLoggingData(queryType, sql, parameterDescription, startPreparationTime == 0? null: aggregatedPreparationDuration, startBindTime == 0? null: endBindTime - startBindTime, endExecutionTime - startExecutionTime); final List loggingListenerList = new ArrayList(debuggerList.size()); for(Debugger listener: debuggerList) { LoggingListener loggingListener = listener.getLoggingListener(); @@ -369,8 +369,8 @@ public class DebugListener extends DefaultExecuteListener { for(Debugger listener: debuggerList) { LoggingListener loggingListener = listener.getLoggingListener(); if(loggingListener != null) { - SqlQueryType sqlQueryType = SqlQueryType.detectType(sql); - QueryLoggingData queryLoggingData = new QueryLoggingData(sqlQueryType, new String[] {sql}, null, null, null, subEndExecutionTime - subStartExecutionTime); + QueryType queryType = QueryType.detectType(sql); + QueryLoggingData queryLoggingData = new QueryLoggingData(queryType, new String[] {sql}, null, null, null, subEndExecutionTime - subStartExecutionTime); StatementMatcher[] loggingStatementMatchers = listener.getLoggingStatementMatchers(); if(loggingStatementMatchers == null) { loggingListener.logQueries(queryLoggingData); diff --git a/jOOQ-console/src/main/java/org/jooq/debug/LocalStatementExecutor.java b/jOOQ-console/src/main/java/org/jooq/debug/LocalStatementExecutor.java index a415828ed8..66654df05c 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/LocalStatementExecutor.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/LocalStatementExecutor.java @@ -82,7 +82,7 @@ public class LocalStatementExecutor implements StatementExecutor { boolean isAllowed = true; if(executorContext.isReadOnly()) { String simplifiedSql = sql.replaceAll("'[^']*'", ""); - switch(SqlQueryType.detectType(simplifiedSql)) { + switch(QueryType.detectType(simplifiedSql)) { case SELECT: String[] forbiddenWords = new String[] { "INSERT", diff --git a/jOOQ-console/src/main/java/org/jooq/debug/QueryLoggingData.java b/jOOQ-console/src/main/java/org/jooq/debug/QueryLoggingData.java index 0d80b742b2..8353b0f075 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/QueryLoggingData.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/QueryLoggingData.java @@ -53,7 +53,7 @@ public class QueryLoggingData extends StatementInfo { private long executionDuration; private StackTraceElement[] callerStackTraceElements; - public QueryLoggingData(SqlQueryType queryType, String[] queries, String parameterDescription, Long preparationDuration, Long bindingDuration, long executionDuration) { + public QueryLoggingData(QueryType queryType, String[] queries, String parameterDescription, Long preparationDuration, Long bindingDuration, long executionDuration) { super(queryType, queries, parameterDescription); this.id = nextID.getAndIncrement(); this.callerStackTraceElements = Thread.currentThread().getStackTrace(); diff --git a/jOOQ-console/src/main/java/org/jooq/debug/SqlQueryType.java b/jOOQ-console/src/main/java/org/jooq/debug/QueryType.java similarity index 70% rename from jOOQ-console/src/main/java/org/jooq/debug/SqlQueryType.java rename to jOOQ-console/src/main/java/org/jooq/debug/QueryType.java index 9b05340cee..93dcf46007 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/SqlQueryType.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/QueryType.java @@ -41,82 +41,109 @@ import java.util.Locale; /** * @author Christopher Deckers */ -public enum SqlQueryType { +public enum QueryType { + + /** + * SELECT queries + */ SELECT, + + /** + * INSERT queries + */ INSERT, + + /** + * UPDATE queries + */ UPDATE, + + /** + * DELETE queries + */ DELETE, + + /** + * All other queries + */ OTHER, ; - public static SqlQueryType detectType(String sql) { + public static QueryType detectType(String sql) { String queryLC = sql.toLowerCase(Locale.ENGLISH).trim(); - if(queryLC.startsWith("insert ")) { - return SqlQueryType.INSERT; + if (queryLC.startsWith("insert ")) { + return QueryType.INSERT; } - if(queryLC.startsWith("update ")) { - return SqlQueryType.UPDATE; + if (queryLC.startsWith("update ")) { + return QueryType.UPDATE; } - if(queryLC.startsWith("delete ")) { - return SqlQueryType.DELETE; + if (queryLC.startsWith("delete ")) { + return QueryType.DELETE; } - if(queryLC.startsWith("select ")) { - return SqlQueryType.SELECT; + if (queryLC.startsWith("select ")) { + return QueryType.SELECT; } - if(queryLC.startsWith("with ")) { + if (queryLC.startsWith("with ")) { + // Let's skip the table definition to see what action is performed. queryLC = queryLC.replaceAll("[\\t\\n\\x0B\\f\\r]+", " "); queryLC = queryLC.substring("with ".length()); boolean isFindingWithStatementEnd = true; - while(isFindingWithStatementEnd) { + while (isFindingWithStatementEnd) { isFindingWithStatementEnd = false; + // Let's consider the query is properly created, and the "as" is at the right place. int index = queryLC.indexOf(" as "); - if(index == -1) { + if (index == -1) { break; } queryLC = queryLC.substring(index + " as ".length()).trim(); - if(!queryLC.startsWith("(")) { + if (!queryLC.startsWith("(")) { break; } int length = queryLC.length(); boolean isQuote = false; int pCount = 1; - for(int i=1; i queryTypeSet; + private Set queryTypeSet; /** * @param threadNameTextMatcher a text matcher for thread name or null for no text matching. * @param statementTextMatcher a text matcher for statement or null for no text matching. * @param queryTypeSet some types or null for all types. */ - public StatementMatcher(TextMatcher threadNameTextMatcher, TextMatcher statementTextMatcher, Set queryTypeSet, boolean isActive) { + public StatementMatcher(TextMatcher threadNameTextMatcher, TextMatcher statementTextMatcher, Set queryTypeSet, boolean isActive) { this.threadNameTextMatcher = threadNameTextMatcher; this.statementTextMatcher = statementTextMatcher; this.queryTypeSet = queryTypeSet == null? null: EnumSet.copyOf(queryTypeSet); @@ -99,7 +99,7 @@ public class StatementMatcher implements Serializable { return statementTextMatcher; } - public Set getQueryTypeSet() { + public Set getQueryTypeSet() { return queryTypeSet; } diff --git a/jOOQ-console/src/main/java/org/jooq/debug/console/BreakpointEditor.java b/jOOQ-console/src/main/java/org/jooq/debug/console/BreakpointEditor.java index 52ee9e097d..4004b25cdb 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/console/BreakpointEditor.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/console/BreakpointEditor.java @@ -59,7 +59,7 @@ import javax.swing.JFormattedTextField; import javax.swing.JPanel; import org.jooq.debug.Breakpoint; -import org.jooq.debug.SqlQueryType; +import org.jooq.debug.QueryType; import org.jooq.debug.StatementMatcher; import org.jooq.debug.StatementProcessor; import org.jooq.debug.console.misc.TextMatcher; @@ -117,7 +117,7 @@ public class BreakpointEditor extends JPanel { statementTextMatcherPane = new TextMatcherPane(statementTextMatcher); add(statementTextMatcherPane, new GridBagConstraints(1, y, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 0), 0, 0)); y++; - Set queryTypeSet = statementMatcher.getQueryTypeSet(); + Set queryTypeSet = statementMatcher.getQueryTypeSet(); statementTypeCheckBox = new JCheckBox("Type", queryTypeSet != null); statementTypeCheckBox.setOpaque(false); statementTypeCheckBox.addItemListener(new ItemListener() { @@ -129,19 +129,19 @@ public class BreakpointEditor extends JPanel { add(statementTypeCheckBox, new GridBagConstraints(0, y, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); JPanel typesPane = new JPanel(new GridBagLayout()); typesPane.setOpaque(false); - statementTypeSelectCheckBox = new JCheckBox("SELECT", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.SELECT)); + statementTypeSelectCheckBox = new JCheckBox("SELECT", queryTypeSet != null && queryTypeSet.contains(QueryType.SELECT)); statementTypeSelectCheckBox.setOpaque(false); typesPane.add(statementTypeSelectCheckBox, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - statementTypeUpdateCheckBox = new JCheckBox("UPDATE", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.UPDATE)); + statementTypeUpdateCheckBox = new JCheckBox("UPDATE", queryTypeSet != null && queryTypeSet.contains(QueryType.UPDATE)); statementTypeUpdateCheckBox.setOpaque(false); typesPane.add(statementTypeUpdateCheckBox, new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); - statementTypeInsertCheckBox = new JCheckBox("INSERT", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.INSERT)); + statementTypeInsertCheckBox = new JCheckBox("INSERT", queryTypeSet != null && queryTypeSet.contains(QueryType.INSERT)); statementTypeInsertCheckBox.setOpaque(false); typesPane.add(statementTypeInsertCheckBox, new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); - statementTypeDeleteCheckBox = new JCheckBox("DELETE", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.DELETE)); + statementTypeDeleteCheckBox = new JCheckBox("DELETE", queryTypeSet != null && queryTypeSet.contains(QueryType.DELETE)); statementTypeDeleteCheckBox.setOpaque(false); typesPane.add(statementTypeDeleteCheckBox, new GridBagConstraints(3, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); - statementTypeOtherCheckBox = new JCheckBox("OTHER", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.OTHER)); + statementTypeOtherCheckBox = new JCheckBox("OTHER", queryTypeSet != null && queryTypeSet.contains(QueryType.OTHER)); statementTypeOtherCheckBox.setOpaque(false); typesPane.add(statementTypeOtherCheckBox, new GridBagConstraints(4, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); add(typesPane, new GridBagConstraints(1, y, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0)); @@ -289,23 +289,23 @@ public class BreakpointEditor extends JPanel { boolean isActive = true;//activeCheckBox.isSelected(); TextMatcher threadNameTextMatcher = threadNameTextMatcherCheckBox.isSelected()? threadNameTextMatcherPane.getTextMatcher(): null; TextMatcher statementTextMatcher = statementTextMatcherCheckBox.isSelected()? statementTextMatcherPane.getTextMatcher(): null; - Set queryTypeSet; + Set queryTypeSet; if(statementTypeCheckBox.isSelected()) { - List typeList = new ArrayList(); + List typeList = new ArrayList(); if(statementTypeSelectCheckBox.isSelected()) { - typeList.add(SqlQueryType.SELECT); + typeList.add(QueryType.SELECT); } if(statementTypeUpdateCheckBox.isSelected()) { - typeList.add(SqlQueryType.UPDATE); + typeList.add(QueryType.UPDATE); } if(statementTypeInsertCheckBox.isSelected()) { - typeList.add(SqlQueryType.INSERT); + typeList.add(QueryType.INSERT); } if(statementTypeDeleteCheckBox.isSelected()) { - typeList.add(SqlQueryType.DELETE); + typeList.add(QueryType.DELETE); } if(statementTypeOtherCheckBox.isSelected()) { - typeList.add(SqlQueryType.OTHER); + typeList.add(QueryType.OTHER); } queryTypeSet = EnumSet.copyOf(typeList); } else { diff --git a/jOOQ-console/src/main/java/org/jooq/debug/console/LoggerPane.java b/jOOQ-console/src/main/java/org/jooq/debug/console/LoggerPane.java index 65359b4b25..269e034ae3 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/console/LoggerPane.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/console/LoggerPane.java @@ -101,7 +101,7 @@ import org.jooq.debug.Debugger; import org.jooq.debug.LoggingListener; import org.jooq.debug.QueryLoggingData; import org.jooq.debug.ResultSetLoggingData; -import org.jooq.debug.SqlQueryType; +import org.jooq.debug.QueryType; import org.jooq.debug.StatementMatcher; import org.jooq.debug.console.misc.InvisibleSplitPane; import org.jooq.debug.console.misc.JTableX; @@ -456,7 +456,7 @@ public class LoggerPane extends JPanel { public Class getColumnClass(int columnIndex) { switch(columnIndex) { case COLUMN_LINE: return Integer.class; - case COLUMN_TYPE: return SqlQueryType.class; + case COLUMN_TYPE: return QueryType.class; case COLUMN_PS_PREPARATION_DURATION: return Long.class; case COLUMN_PS_BINDING_DURATION: return Long.class; case COLUMN_EXEC_TIME: return Long.class; @@ -485,7 +485,7 @@ public class LoggerPane extends JPanel { table.setColumnSelectionAllowed(true); table.setFillsViewportHeight(true); // ToolTipManager.sharedInstance().registerComponent(table); - table.setDefaultRenderer(SqlQueryType.class, new DefaultTableCellRenderer() { + table.setDefaultRenderer(QueryType.class, new DefaultTableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); @@ -783,7 +783,7 @@ public class LoggerPane extends JPanel { public long getExecutionDuration() { return queryLoggingData.getExecutionDuration(); } - public SqlQueryType getQueryType() { + public QueryType getQueryType() { return queryLoggingData.getQueryType(); } public String[] getQueries() { diff --git a/jOOQ-console/src/main/java/org/jooq/debug/console/StatementMatcherPane.java b/jOOQ-console/src/main/java/org/jooq/debug/console/StatementMatcherPane.java index 7fd962b0bf..0667fb37a7 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/console/StatementMatcherPane.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/console/StatementMatcherPane.java @@ -55,7 +55,7 @@ import javax.swing.JCheckBox; import javax.swing.JPanel; import javax.swing.JToolBar; -import org.jooq.debug.SqlQueryType; +import org.jooq.debug.QueryType; import org.jooq.debug.StatementMatcher; import org.jooq.debug.console.misc.TextMatcher; @@ -119,7 +119,7 @@ public class StatementMatcherPane extends JPanel { statementTextMatcherPane = new TextMatcherPane(statementTextMatcher); add(statementTextMatcherPane, new GridBagConstraints(1, y, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 0), 0, 0)); y++; - Set queryTypeSet = statementMatcher.getQueryTypeSet(); + Set queryTypeSet = statementMatcher.getQueryTypeSet(); statementTypeCheckBox = new JCheckBox("Type", queryTypeSet != null); statementTypeCheckBox.addItemListener(new ItemListener() { @Override @@ -129,15 +129,15 @@ public class StatementMatcherPane extends JPanel { }); add(statementTypeCheckBox, new GridBagConstraints(0, y, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); JPanel typesPane = new JPanel(new GridBagLayout()); - statementTypeSelectCheckBox = new JCheckBox("SELECT", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.SELECT)); + statementTypeSelectCheckBox = new JCheckBox("SELECT", queryTypeSet != null && queryTypeSet.contains(QueryType.SELECT)); typesPane.add(statementTypeSelectCheckBox, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - statementTypeUpdateCheckBox = new JCheckBox("UPDATE", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.UPDATE)); + statementTypeUpdateCheckBox = new JCheckBox("UPDATE", queryTypeSet != null && queryTypeSet.contains(QueryType.UPDATE)); typesPane.add(statementTypeUpdateCheckBox, new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); - statementTypeInsertCheckBox = new JCheckBox("INSERT", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.INSERT)); + statementTypeInsertCheckBox = new JCheckBox("INSERT", queryTypeSet != null && queryTypeSet.contains(QueryType.INSERT)); typesPane.add(statementTypeInsertCheckBox, new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); - statementTypeDeleteCheckBox = new JCheckBox("DELETE", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.DELETE)); + statementTypeDeleteCheckBox = new JCheckBox("DELETE", queryTypeSet != null && queryTypeSet.contains(QueryType.DELETE)); typesPane.add(statementTypeDeleteCheckBox, new GridBagConstraints(3, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); - statementTypeOtherCheckBox = new JCheckBox("OTHER", queryTypeSet != null && queryTypeSet.contains(SqlQueryType.OTHER)); + statementTypeOtherCheckBox = new JCheckBox("OTHER", queryTypeSet != null && queryTypeSet.contains(QueryType.OTHER)); typesPane.add(statementTypeOtherCheckBox, new GridBagConstraints(4, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 0), 0, 0)); add(typesPane, new GridBagConstraints(1, y, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0)); y++; @@ -173,23 +173,23 @@ public class StatementMatcherPane extends JPanel { boolean isActive = activeCheckBox.isSelected(); TextMatcher threadNameTextMatcher = threadNameTextMatcherCheckBox.isSelected()? threadNameTextMatcherPane.getTextMatcher(): null; TextMatcher statementTextMatcher = statementTextMatcherCheckBox.isSelected()? statementTextMatcherPane.getTextMatcher(): null; - Set queryTypeSet; + Set queryTypeSet; if(statementTypeCheckBox.isSelected()) { - List typeList = new ArrayList(); + List typeList = new ArrayList(); if(statementTypeSelectCheckBox.isSelected()) { - typeList.add(SqlQueryType.SELECT); + typeList.add(QueryType.SELECT); } if(statementTypeUpdateCheckBox.isSelected()) { - typeList.add(SqlQueryType.UPDATE); + typeList.add(QueryType.UPDATE); } if(statementTypeInsertCheckBox.isSelected()) { - typeList.add(SqlQueryType.INSERT); + typeList.add(QueryType.INSERT); } if(statementTypeDeleteCheckBox.isSelected()) { - typeList.add(SqlQueryType.DELETE); + typeList.add(QueryType.DELETE); } if(statementTypeOtherCheckBox.isSelected()) { - typeList.add(SqlQueryType.OTHER); + typeList.add(QueryType.OTHER); } queryTypeSet = EnumSet.copyOf(typeList); } else {