@@ -0,0 +1,1584 @@
+package goodsbase.qserver;%0A%0Aimport java.sql.Connection;%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0Aimport java.sql.Statement;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;%0A%0A%0A/**Can execute SELECT query%0A * %0A * @author Daria%0A */%0Apublic class QueryTask implements ResultDbTask, AutoCloseable %7B%0A%0A%09public QueryTask(String query) %7B%0A%09%09this.query = query;%0A%09%7D%0A%0A%09@Override%0A%09public void execute(Connection c) %7B%0A%09%09try %7B %09%09%09%0A%09%09%09stat = c.createStatement();%0A%09%09%09result = stat.executeQuery(query);%0A%09%09%7D catch (SQLException e) %7B%0A%09%09%09exceptions.add(e);%0A%09%09%09log.log(Level.WARNING, %22Exception caught while executing query%22, e);%0A%09%09%7D %0A%09%09complete = true;%09%09%0A%09%7D%0A%0A%09@Override%0A%09public ResultSet getResult() %7B%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public boolean isComplete() %7B%0A%09%09return complete;%0A%09%7D%0A%09%0A%09/**Returns the list of exceptions occurred during execution*/%0A%09public List%3CSQLException%3E getExceptions() %7B%0A%09%09return exceptions;%0A%09%7D%0A%09%0A%09/**Closes the task*/%0A%09public void close() throws SQLException %7B%0A%09%09stat.close();%0A%09%7D%0A%09%0A%09protected void setResult(ResultSet res)%7B%0A%09%09this.result = res;%0A%09%7D%0A%09%0A%09protected String getQuery()%7B%0A%09%09return query;%0A%09%7D%0A%09%0A%09protected Statement getStatement()%7B%0A%09%09return stat;%0A%09%7D%0A%09%0A%09protected void addException(SQLException e) %7B%0A%09%09exceptions.add(e);%0A%09%7D%0A%0A%09private static final Logger log = Logger.getLogger(BatchTask.class.getName());%0A%09private String query;%0A%09private List%3CSQLException%3E exceptions = new LinkedList%3CSQLException%3E();%0A%09private boolean complete = false;%0A%09private ResultSet result;%0A%09protected Statement stat;%0A%7D%0A

add task class for execting SELECTs new file: src/goodsbase/qserver/QueryTask.java