@@ -0,0 +1,1055 @@
+package goodsbase.qserver;%0A%0Aimport java.io.Serializable;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0A/**%0A * Describes a database request. %0A * @author Daria%0A *%0A */%0Apublic class QRequest implements Serializable%7B%0A%09%0A%09/**SELECT returns result, UPDATE does not*/%0A%09public enum Type implements Serializable%7B%0A%09%09SELECT, UPDATE;%0A%09%7D%0A%09%0A%09/**Creates a new request of specified type*/%0A%09public QRequest(Type type) %7B%0A%09%09this.type = type;%0A%09%09this.body = new LinkedList%3CString%3E();%0A%09%7D%0A%09/**@return number of queries in the request*/%0A%09public int getQueryNumber()%7B%0A%09%09return body.size();%0A%09%7D%0A%09%0A%09/**Adds query to request%0A%09 * @return false if request doesn't allow more queries*/%0A%09public boolean addQuery(String query)%7B%0A%09%09if(type == Type.SELECT&&getQueryNumber()==1)%0A%09%09%09return false;%0A%09%09body.add(query);%0A%09%09return true;%0A%09%7D%0A%09%0A%09/*Returns type of the query*/%0A%09Type getType() %7B%0A%09%09return type;%0A%09%7D%0A%09%0A%09/*Returns queries*/%0A%09List%3CString%3E getBody()%7B%0A%09%09return body;%0A%09%7D%0A%09%0A%09private Type type;%0A%09private List%3CString%3E body;%0A%09%0A%09private static final long serialVersionUID = 931744542496010038L;%0A%7D%0A

add QRequest new file: src/goodsbase/qserver/QRequest.java