00001 import java.util.Hashtable;
00002 import java.util.Vector;
00003 import org.jaebi.midlet.bt.btException.BtIOException;
00004 import org.jaebi.midlet.bt.requestProcessing.XRequestProcessor;
00005 import org.jaebi.midlet.bt.responseHandling.XResponseHandler;
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00020 public class SelectXRequestProcessor extends XRequestProcessor {
00021
00022 private String whereNode = "";
00023 private String columnsNode = "";
00024
00026 public SelectXRequestProcessor() {
00027 }
00028
00029 public void setWhereClause(Hashtable whereConditions){
00030
00031 }
00032
00033 public void setSelectedColumns(Vector columns){
00034
00035 }
00036
00037 public void run(){
00038 String xRequest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <xrequest xmlns=\"http://xml.netbeans.org/examples/targetNS\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://xml.netbeans.org/examples/targetNS xrequest.xsd\" type=\"select\">";
00039 String xresponse = "";
00040 String beginMarker = "<xresponse xmlns=\"http://xml.netbeans.org/examples/targetNS\">";
00041 String endMarker = "</xresponse>";
00042 xRequest += this.getTablenode();
00043 xRequest += this.columnsNode;
00044 xRequest += this.whereNode;
00045 xRequest += "</xrequest>";
00046
00047 try{
00048 this.sendRequest(xRequest);
00049
00050 System.out.println("SexlectXRequestProcessor::run - ho mandato");
00051 xresponse = this.getResponseContent(beginMarker, endMarker);
00052 }
00053 catch(BtIOException e){
00054
00055
00056
00057
00058
00059 ((XResponseHandler)this.handler).connectionError();
00060 return;
00061 }
00062
00063 this.columnsNode = "";
00064 this.whereNode = "";
00065 this.setTableName("");
00066 ((XResponseHandler)this.handler).handleMessageResponse(xresponse);
00067 }
00068
00069 }