1 24 25 package org.objectweb.cjdbc.common.sql; 26 27 import java.io.IOException ; 28 import java.io.Serializable ; 29 import java.sql.SQLException ; 30 31 import org.objectweb.cjdbc.common.sql.schema.DatabaseSchema; 32 import org.objectweb.cjdbc.common.stream.CJDBCInputStream; 33 import org.objectweb.cjdbc.common.stream.CJDBCOutputStream; 34 35 43 public class UnknownRequest extends AbstractRequest implements Serializable 44 { 45 private static final long serialVersionUID = -1990341658455593552L; 46 47 56 public UnknownRequest(String sqlQuery, boolean escapeProcessing, int timeout, 57 String lineSeparator) 58 { 59 super(sqlQuery, escapeProcessing, timeout, lineSeparator, 60 RequestType.UNDEFINED); 61 } 62 63 66 public UnknownRequest(CJDBCInputStream in) throws IOException 67 { 68 super(in, RequestType.UNDEFINED); 69 receiveResultSetParams(in); 70 } 71 72 75 public void sendToStream(CJDBCOutputStream out, boolean needSqlSkeleton) 76 throws IOException 77 { 78 super.sendToStream(out, needSqlSkeleton); 79 sendResultSetParams(out); 80 } 81 82 86 public boolean needsMacroProcessing() 87 { 88 return false; 89 } 90 91 94 public boolean returnsResultSet() 95 { 96 return true; 98 } 99 100 107 public void parse(DatabaseSchema schema, int granularity, 108 boolean isCaseSensitive) throws SQLException 109 { 110 throw new SQLException ("Unable to parse an unknown request"); 111 } 112 113 119 public void cloneParsing(AbstractRequest request) 120 { 121 throw new RuntimeException ( 122 "Unable to clone the parsing of an unknown request"); 123 } 124 } | Popular Tags |