Home | History | Annotate | Download | only in JDBC2z
      1 package SQLite.JDBC2z;
      2 
      3 import java.sql.*;
      4 import java.math.BigDecimal;
      5 import java.util.*;
      6 
      7 class BatchArg {
      8     String arg;
      9     boolean blob;
     10 
     11     BatchArg(String arg, boolean blob) {
     12 	if (arg == null) {
     13 	    this.arg = null;
     14 	} else {
     15 	    this.arg = new String(arg);
     16 	}
     17 	this.blob = blob;
     18     }
     19 }
     20 
     21 public class JDBCPreparedStatement extends JDBCStatement
     22     implements java.sql.PreparedStatement {
     23 
     24     private String sql;
     25     private String args[];
     26     private boolean blobs[];
     27     private ArrayList<BatchArg> batch;
     28     private static final boolean nullrepl =
     29 	SQLite.Database.version().compareTo("2.5.0") < 0;
     30 
     31     public JDBCPreparedStatement(JDBCConnection conn, String sql) {
     32 	super(conn);
     33 	this.args = null;
     34 	this.blobs = null;
     35 	this.batch = null;
     36 	this.sql = fixup(sql);
     37     }
     38 
     39     private String fixup(String sql) {
     40 	StringBuffer sb = new StringBuffer();
     41 	boolean inq = false;
     42 	int nparm = 0;
     43 	for (int i = 0; i < sql.length(); i++) {
     44 	    char c = sql.charAt(i);
     45 	    if (c == '\'') {
     46 		if (inq) {
     47                     char nextChar = 0;
     48                     if(i + 1 < sql.length()) {
     49                         nextChar = sql.charAt(i + 1);
     50                     }
     51 		    if (nextChar == '\'') {
     52                         sb.append(c);
     53                         sb.append(nextChar);
     54                         i++;
     55                     } else {
     56 			inq = false;
     57                         sb.append(c);
     58                     }
     59 		} else {
     60 		    inq = true;
     61                     sb.append(c);
     62 		}
     63 	    } else if (c == '?') {
     64 		if (inq) {
     65 		    sb.append(c);
     66 		} else {
     67 		    ++nparm;
     68 		    sb.append(nullrepl ? "'%q'" : "%Q");
     69 		}
     70 	    } else if (c == ';') {
     71 		if (!inq) {
     72 		    break;
     73 		}
     74 		sb.append(c);
     75 	    } else if (c == '%') {
     76 		sb.append("%%");
     77 	    } else {
     78 		sb.append(c);
     79 	    }
     80 	}
     81 	args = new String[nparm];
     82 	blobs = new boolean[nparm];
     83 	try {
     84 	    clearParameters();
     85 	} catch (SQLException e) {
     86 	}
     87 	return sb.toString();
     88     }
     89 
     90     private String fixup2(String sql) {
     91 	if (!conn.db.is3()) {
     92 	    return sql;
     93 	}
     94 	StringBuffer sb = new StringBuffer();
     95 	int parm = -1;
     96 	for (int i = 0; i < sql.length(); i++) {
     97 	    char c = sql.charAt(i);
     98 	    if (c == '%') {
     99 		sb.append(c);
    100 		++i;
    101 		c = sql.charAt(i);
    102 		if (c == 'Q') {
    103 		    parm++;
    104 		    if (blobs[parm]) {
    105 			c = 's';
    106 		    }
    107 		}
    108 	    }
    109 	    sb.append(c);
    110 	}
    111 	return sb.toString();
    112     }
    113 
    114     public ResultSet executeQuery() throws SQLException {
    115 	return executeQuery(fixup2(sql), args, false);
    116     }
    117 
    118     public int executeUpdate() throws SQLException {
    119 	executeQuery(fixup2(sql), args, true);
    120 	return updcnt;
    121     }
    122 
    123     public void setNull(int parameterIndex, int sqlType) throws SQLException {
    124 	if (parameterIndex < 1 || parameterIndex > args.length) {
    125 	    throw new SQLException("bad parameter index");
    126 	}
    127 	args[parameterIndex - 1] = nullrepl ? "" : null;
    128 	blobs[parameterIndex - 1] = false;
    129     }
    130 
    131     public void setBoolean(int parameterIndex, boolean x)
    132 	throws SQLException {
    133 	if (parameterIndex < 1 || parameterIndex > args.length) {
    134 	    throw new SQLException("bad parameter index");
    135 	}
    136 	args[parameterIndex - 1] = x ? "1" : "0";
    137 	blobs[parameterIndex - 1] = false;
    138     }
    139 
    140     public void setByte(int parameterIndex, byte x) throws SQLException {
    141 	if (parameterIndex < 1 || parameterIndex > args.length) {
    142 	    throw new SQLException("bad parameter index");
    143 	}
    144 	args[parameterIndex - 1] = "" + x;
    145 	blobs[parameterIndex - 1] = false;
    146     }
    147 
    148     public void setShort(int parameterIndex, short x) throws SQLException {
    149 	if (parameterIndex < 1 || parameterIndex > args.length) {
    150 	    throw new SQLException("bad parameter index");
    151 	}
    152 	args[parameterIndex - 1] = "" + x;
    153 	blobs[parameterIndex - 1] = false;
    154     }
    155 
    156     public void setInt(int parameterIndex, int x) throws SQLException {
    157 	if (parameterIndex < 1 || parameterIndex > args.length) {
    158 	    throw new SQLException("bad parameter index");
    159 	}
    160 	args[parameterIndex - 1] = "" + x;
    161 	blobs[parameterIndex - 1] = false;
    162     }
    163 
    164     public void setLong(int parameterIndex, long x) throws SQLException {
    165 	if (parameterIndex < 1 || parameterIndex > args.length) {
    166 	    throw new SQLException("bad parameter index");
    167 	}
    168 	args[parameterIndex - 1] = "" + x;
    169 	blobs[parameterIndex - 1] = false;
    170     }
    171 
    172     public void setFloat(int parameterIndex, float x) throws SQLException {
    173 	if (parameterIndex < 1 || parameterIndex > args.length) {
    174 	    throw new SQLException("bad parameter index");
    175 	}
    176 	args[parameterIndex - 1] = "" + x;
    177 	blobs[parameterIndex - 1] = false;
    178     }
    179 
    180     public void setDouble(int parameterIndex, double x) throws SQLException {
    181 	if (parameterIndex < 1 || parameterIndex > args.length) {
    182 	    throw new SQLException("bad parameter index");
    183 	}
    184 	args[parameterIndex - 1] = "" + x;
    185 	blobs[parameterIndex - 1] = false;
    186     }
    187 
    188     public void setBigDecimal(int parameterIndex, BigDecimal x)
    189 	throws SQLException {
    190 	if (parameterIndex < 1 || parameterIndex > args.length) {
    191 	    throw new SQLException("bad parameter index");
    192 	}
    193 	if (x == null) {
    194 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    195 	} else {
    196 	    args[parameterIndex - 1] = "" + x;
    197 	}
    198 	blobs[parameterIndex - 1] = false;
    199     }
    200 
    201     public void setString(int parameterIndex, String x) throws SQLException {
    202 	if (parameterIndex < 1 || parameterIndex > args.length) {
    203 	    throw new SQLException("bad parameter index");
    204 	}
    205 	if (x == null) {
    206 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    207 	} else {
    208 	    args[parameterIndex - 1] = x;
    209 	}
    210 	blobs[parameterIndex - 1] = false;
    211     }
    212 
    213     public void setBytes(int parameterIndex, byte x[]) throws SQLException {
    214 	if (parameterIndex < 1 || parameterIndex > args.length) {
    215 	    throw new SQLException("bad parameter index");
    216 	}
    217 	blobs[parameterIndex - 1] = false;
    218 	if (x == null) {
    219 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    220 	} else {
    221 	    if (conn.db.is3()) {
    222 		args[parameterIndex - 1] = SQLite.StringEncoder.encodeX(x);
    223 		blobs[parameterIndex - 1] = true;
    224 	    } else {
    225 		args[parameterIndex - 1] = SQLite.StringEncoder.encode(x);
    226 	    }
    227 	}
    228     }
    229 
    230     public void setDate(int parameterIndex, java.sql.Date x)
    231 	throws SQLException {
    232 	if (parameterIndex < 1 || parameterIndex > args.length) {
    233 	    throw new SQLException("bad parameter index");
    234 	}
    235 	if (x == null) {
    236 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    237 	} else {
    238 	    if (conn.useJulian) {
    239 		args[parameterIndex - 1] = java.lang.Double.toString(SQLite.Database.julian_from_long(x.getTime()));
    240 	    } else {
    241 		args[parameterIndex - 1] = x.toString();
    242 	    }
    243 	}
    244 	blobs[parameterIndex - 1] = false;
    245     }
    246 
    247     public void setTime(int parameterIndex, java.sql.Time x)
    248 	throws SQLException {
    249 	if (parameterIndex < 1 || parameterIndex > args.length) {
    250 	    throw new SQLException("bad parameter index");
    251 	}
    252 	if (x == null) {
    253 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    254 	} else {
    255 	    if (conn.useJulian) {
    256 		args[parameterIndex - 1] = java.lang.Double.toString(SQLite.Database.julian_from_long(x.getTime()));
    257 	    } else {
    258 		args[parameterIndex - 1] = x.toString();
    259 	    }
    260 	}
    261 	blobs[parameterIndex - 1] = false;
    262     }
    263 
    264     public void setTimestamp(int parameterIndex, java.sql.Timestamp x)
    265 	throws SQLException {
    266 	if (parameterIndex < 1 || parameterIndex > args.length) {
    267 	    throw new SQLException("bad parameter index");
    268 	}
    269 	if (x == null) {
    270 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    271 	} else {
    272 	    if (conn.useJulian) {
    273 		args[parameterIndex - 1] = java.lang.Double.toString(SQLite.Database.julian_from_long(x.getTime()));
    274 	    } else {
    275 		args[parameterIndex - 1] = x.toString();
    276 	    }
    277 	}
    278 	blobs[parameterIndex - 1] = false;
    279     }
    280 
    281     public void setAsciiStream(int parameterIndex, java.io.InputStream x,
    282 			       int length) throws SQLException {
    283 	throw new SQLException("not supported");
    284     }
    285 
    286     @Deprecated
    287     public void setUnicodeStream(int parameterIndex, java.io.InputStream x,
    288 				 int length) throws SQLException {
    289 	throw new SQLFeatureNotSupportedException();
    290     }
    291 
    292     public void setBinaryStream(int parameterIndex, java.io.InputStream x,
    293 				int length) throws SQLException {
    294 	try {
    295 	    byte[] data = new byte[length];
    296 	    x.read(data, 0, length);
    297 	    setBytes(parameterIndex, data);
    298 	} catch (java.io.IOException e) {
    299 	    throw new SQLException("I/O failed");
    300 	}
    301     }
    302 
    303     public void clearParameters() throws SQLException {
    304 	for (int i = 0; i < args.length; i++) {
    305 	    args[i] = nullrepl ? "" : null;
    306 	    blobs[i] = false;
    307 	}
    308     }
    309 
    310     public void setObject(int parameterIndex, Object x, int targetSqlType,
    311 			  int scale) throws SQLException {
    312 	if (parameterIndex < 1 || parameterIndex > args.length) {
    313 	    throw new SQLException("bad parameter index");
    314 	}
    315 	if (x == null) {
    316 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    317 	} else {
    318 	    if (x instanceof byte[]) {
    319 		byte[] bx = (byte[]) x;
    320 		if (conn.db.is3()) {
    321 		    args[parameterIndex - 1] =
    322 			  SQLite.StringEncoder.encodeX(bx);
    323 		    blobs[parameterIndex - 1] = true;
    324 		    return;
    325 		}
    326 		args[parameterIndex - 1] = SQLite.StringEncoder.encode(bx);
    327 	    } else {
    328 		args[parameterIndex - 1] = x.toString();
    329 	    }
    330 	}
    331 	blobs[parameterIndex - 1] = false;
    332     }
    333 
    334     public void setObject(int parameterIndex, Object x, int targetSqlType)
    335 	throws SQLException {
    336 	if (parameterIndex < 1 || parameterIndex > args.length) {
    337 	    throw new SQLException("bad parameter index");
    338 	}
    339 	if (x == null) {
    340 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    341 	} else {
    342 	    if (x instanceof byte[]) {
    343 		byte[] bx = (byte[]) x;
    344 		if (conn.db.is3()) {
    345 		    args[parameterIndex - 1] =
    346 			SQLite.StringEncoder.encodeX(bx);
    347 		    blobs[parameterIndex - 1] = true;
    348 		    return;
    349 		}
    350 		args[parameterIndex - 1] = SQLite.StringEncoder.encode(bx);
    351 	    } else {
    352 		args[parameterIndex - 1] = x.toString();
    353 	    }
    354 	}
    355 	blobs[parameterIndex - 1] = false;
    356     }
    357 
    358     public void setObject(int parameterIndex, Object x) throws SQLException {
    359 	if (parameterIndex < 1 || parameterIndex > args.length) {
    360 	    throw new SQLException("bad parameter index");
    361 	}
    362 	if (x == null) {
    363 	    args[parameterIndex - 1] = nullrepl ? "" : null;
    364 	} else {
    365 	    if (x instanceof byte[]) {
    366 		byte[] bx = (byte[]) x;
    367 		if (conn.db.is3()) {
    368 		    args[parameterIndex - 1] =
    369 			SQLite.StringEncoder.encodeX(bx);
    370 		    blobs[parameterIndex - 1] = true;
    371 		    return;
    372 		}
    373 		args[parameterIndex - 1] = SQLite.StringEncoder.encode(bx);
    374 	    } else {
    375 		args[parameterIndex - 1] = x.toString();
    376 	    }
    377 	}
    378 	blobs[parameterIndex - 1] = false;
    379     }
    380 
    381     public boolean execute() throws SQLException {
    382 	return executeQuery(fixup2(sql), args, false) != null;
    383     }
    384 
    385     public void addBatch() throws SQLException {
    386 	if (batch == null) {
    387 	    batch = new ArrayList<BatchArg>(args.length);
    388 	}
    389 	for (int i = 0; i < args.length; i++) {
    390 	    batch.add(new BatchArg(args[i], blobs[i]));
    391 	}
    392     }
    393 
    394     public int[] executeBatch() throws SQLException {
    395 	if (batch == null) {
    396 	    return new int[0];
    397 	}
    398 	int[] ret = new int[batch.size() / args.length];
    399 	for (int i = 0; i < ret.length; i++) {
    400 	    ret[i] = EXECUTE_FAILED;
    401 	}
    402 	int errs = 0;
    403 	int index = 0;
    404 	for (int i = 0; i < ret.length; i++) {
    405 	    for (int k = 0; k < args.length; k++) {
    406 		BatchArg b = (BatchArg) batch.get(index++);
    407 
    408 		args[k] = b.arg;
    409 		blobs[k] = b.blob;
    410 	    }
    411 	    try {
    412 		ret[i] = executeUpdate();
    413 	    } catch (SQLException e) {
    414 		++errs;
    415 	    }
    416 	}
    417 	if (errs > 0) {
    418 	    throw new BatchUpdateException("batch failed", ret);
    419 	}
    420 	return ret;
    421     }
    422 
    423     public void clearBatch() throws SQLException {
    424 	if (batch != null) {
    425 	    batch.clear();
    426 	    batch = null;
    427 	}
    428     }
    429 
    430     public void close() throws SQLException {
    431     	clearBatch();
    432 	super.close();
    433     }
    434 
    435     public void setCharacterStream(int parameterIndex,
    436 				   java.io.Reader reader,
    437 				   int length) throws SQLException {
    438 	try {
    439 	    char[] data = new char[length];
    440 	    reader.read(data);
    441 	    setString(parameterIndex, new String(data));
    442 	} catch (java.io.IOException e) {
    443 	    throw new SQLException("I/O failed");
    444 	}
    445     }
    446 
    447     public void setRef(int i, Ref x) throws SQLException {
    448 	throw new SQLFeatureNotSupportedException();
    449     }
    450 
    451     public void setBlob(int i, Blob x) throws SQLException {
    452 	throw new SQLFeatureNotSupportedException();
    453     }
    454 
    455     public void setClob(int i, Clob x) throws SQLException {
    456 	throw new SQLFeatureNotSupportedException();
    457     }
    458 
    459     public void setArray(int i, Array x) throws SQLException {
    460 	throw new SQLFeatureNotSupportedException();
    461     }
    462 
    463     public ResultSetMetaData getMetaData() throws SQLException {
    464 	return rs.getMetaData();
    465     }
    466 
    467     public void setDate(int parameterIndex, java.sql.Date x, Calendar cal)
    468 	throws SQLException {
    469 	setDate(parameterIndex, x);
    470     }
    471 
    472     public void setTime(int parameterIndex, java.sql.Time x, Calendar cal)
    473 	throws SQLException {
    474 	setTime(parameterIndex, x);
    475     }
    476 
    477     public void setTimestamp(int parameterIndex, java.sql.Timestamp x,
    478 			     Calendar cal) throws SQLException {
    479 	setTimestamp(parameterIndex, x);
    480     }
    481 
    482     public void setNull(int parameterIndex, int sqlType, String typeName)
    483 	throws SQLException {
    484 	setNull(parameterIndex, sqlType);
    485     }
    486 
    487     public ParameterMetaData getParameterMetaData() throws SQLException {
    488 	throw new SQLException("not supported");
    489     }
    490 
    491     public void registerOutputParameter(String parameterName, int sqlType)
    492 	throws SQLException {
    493 	throw new SQLException("not supported");
    494     }
    495 
    496     public void registerOutputParameter(String parameterName, int sqlType,
    497 					int scale)
    498 	throws SQLException {
    499 	throw new SQLException("not supported");
    500     }
    501 
    502     public void registerOutputParameter(String parameterName, int sqlType,
    503 					String typeName)
    504 	throws SQLException {
    505 	throw new SQLException("not supported");
    506     }
    507 
    508     public java.net.URL getURL(int parameterIndex) throws SQLException {
    509 	throw new SQLException("not supported");
    510     }
    511 
    512     public void setURL(int parameterIndex, java.net.URL url)
    513 	throws SQLException {
    514 	throw new SQLException("not supported");
    515     }
    516 
    517     public void setNull(String parameterName, int sqlType)
    518 	throws SQLException {
    519 	throw new SQLException("not supported");
    520     }
    521 
    522     public void setBoolean(String parameterName, boolean val)
    523 	throws SQLException {
    524 	throw new SQLException("not supported");
    525     }
    526 
    527     public void setByte(String parameterName, byte val)
    528 	throws SQLException {
    529 	throw new SQLException("not supported");
    530     }
    531 
    532     public void setShort(String parameterName, short val)
    533 	throws SQLException {
    534 	throw new SQLException("not supported");
    535     }
    536 
    537     public void setInt(String parameterName, int val)
    538 	throws SQLException {
    539 	throw new SQLException("not supported");
    540     }
    541 
    542     public void setLong(String parameterName, long val)
    543 	throws SQLException {
    544 	throw new SQLException("not supported");
    545     }
    546 
    547     public void setFloat(String parameterName, float val)
    548 	throws SQLException {
    549 	throw new SQLException("not supported");
    550     }
    551 
    552     public void setDouble(String parameterName, double val)
    553 	throws SQLException {
    554 	throw new SQLException("not supported");
    555     }
    556 
    557     public void setBigDecimal(String parameterName, BigDecimal val)
    558 	throws SQLException {
    559 	throw new SQLException("not supported");
    560     }
    561 
    562     public void setString(String parameterName, String val)
    563 	throws SQLException {
    564 	throw new SQLException("not supported");
    565     }
    566 
    567     public void setBytes(String parameterName, byte val[])
    568 	throws SQLException {
    569 	throw new SQLException("not supported");
    570     }
    571 
    572     public void setDate(String parameterName, java.sql.Date val)
    573 	throws SQLException {
    574 	throw new SQLException("not supported");
    575     }
    576 
    577     public void setTime(String parameterName, java.sql.Time val)
    578 	throws SQLException {
    579 	throw new SQLException("not supported");
    580     }
    581 
    582     public void setTimestamp(String parameterName, java.sql.Timestamp val)
    583 	throws SQLException {
    584 	throw new SQLException("not supported");
    585     }
    586 
    587     public void setAsciiStream(String parameterName,
    588 			       java.io.InputStream s, int length)
    589 	throws SQLException {
    590 	throw new SQLException("not supported");
    591     }
    592 
    593     public void setBinaryStream(String parameterName,
    594 				java.io.InputStream s, int length)
    595 	throws SQLException {
    596 	throw new SQLException("not supported");
    597     }
    598 
    599     public void setObject(String parameterName, Object val, int targetSqlType,
    600 			  int scale)
    601 	throws SQLException {
    602 	throw new SQLException("not supported");
    603     }
    604 
    605     public void setObject(String parameterName, Object val, int targetSqlType)
    606 	throws SQLException {
    607 	throw new SQLException("not supported");
    608     }
    609 
    610     public void setObject(String parameterName, Object val)
    611 	throws SQLException {
    612 	throw new SQLException("not supported");
    613     }
    614 
    615     public void setCharacterStream(String parameterName,
    616 				   java.io.Reader r, int length)
    617 	throws SQLException {
    618 	throw new SQLException("not supported");
    619     }
    620 
    621     public void setDate(String parameterName, java.sql.Date val,
    622 			Calendar cal)
    623 	throws SQLException {
    624 	throw new SQLException("not supported");
    625     }
    626 
    627     public void setTime(String parameterName, java.sql.Time val,
    628 			Calendar cal)
    629 	throws SQLException {
    630 	throw new SQLException("not supported");
    631     }
    632 
    633     public void setTimestamp(String parameterName, java.sql.Timestamp val,
    634 			     Calendar cal)
    635 	throws SQLException {
    636 	throw new SQLException("not supported");
    637     }
    638 
    639     public void setNull(String parameterName, int sqlType, String typeName)
    640 	throws SQLException {
    641 	throw new SQLException("not supported");
    642     }
    643 
    644     public String getString(String parameterName) throws SQLException {
    645 	throw new SQLException("not supported");
    646     }
    647 
    648     public boolean getBoolean(String parameterName) throws SQLException {
    649 	throw new SQLException("not supported");
    650     }
    651 
    652     public byte getByte(String parameterName) throws SQLException {
    653 	throw new SQLException("not supported");
    654     }
    655 
    656     public short getShort(String parameterName) throws SQLException {
    657 	throw new SQLException("not supported");
    658     }
    659 
    660     public int getInt(String parameterName) throws SQLException {
    661 	throw new SQLException("not supported");
    662     }
    663 
    664     public long getLong(String parameterName) throws SQLException {
    665 	throw new SQLException("not supported");
    666     }
    667 
    668     public float getFloat(String parameterName) throws SQLException {
    669 	throw new SQLException("not supported");
    670     }
    671 
    672     public double getDouble(String parameterName) throws SQLException {
    673 	throw new SQLException("not supported");
    674     }
    675 
    676     public byte[] getBytes(String parameterName) throws SQLException {
    677 	throw new SQLException("not supported");
    678     }
    679 
    680     public java.sql.Date getDate(String parameterName) throws SQLException {
    681 	throw new SQLException("not supported");
    682     }
    683 
    684     public java.sql.Time getTime(String parameterName) throws SQLException {
    685 	throw new SQLException("not supported");
    686     }
    687 
    688     public java.sql.Timestamp getTimestamp(String parameterName)
    689 	throws SQLException {
    690 	throw new SQLException("not supported");
    691     }
    692 
    693     public Object getObject(String parameterName) throws SQLException {
    694 	throw new SQLException("not supported");
    695     }
    696 
    697     public Object getObject(int parameterIndex) throws SQLException {
    698 	throw new SQLException("not supported");
    699     }
    700 
    701     public BigDecimal getBigDecimal(String parameterName) throws SQLException {
    702 	throw new SQLException("not supported");
    703     }
    704 
    705     public Object getObject(String parameterName, Map map)
    706 	throws SQLException {
    707 	throw new SQLException("not supported");
    708     }
    709 
    710     public Object getObject(int parameterIndex, Map map)
    711 	throws SQLException {
    712 	throw new SQLException("not supported");
    713     }
    714 
    715     public Ref getRef(int parameterIndex) throws SQLException {
    716 	throw new SQLException("not supported");
    717     }
    718 
    719     public Ref getRef(String parameterName) throws SQLException {
    720 	throw new SQLException("not supported");
    721     }
    722 
    723     public Blob getBlob(String parameterName) throws SQLException {
    724 	throw new SQLException("not supported");
    725     }
    726 
    727     public Blob getBlob(int parameterIndex) throws SQLException {
    728 	throw new SQLException("not supported");
    729     }
    730 
    731     public Clob getClob(String parameterName) throws SQLException {
    732 	throw new SQLException("not supported");
    733     }
    734 
    735     public Clob getClob(int parameterIndex) throws SQLException {
    736 	throw new SQLException("not supported");
    737     }
    738 
    739     public Array getArray(String parameterName) throws SQLException {
    740 	throw new SQLException("not supported");
    741     }
    742 
    743     public Array getArray(int parameterIndex) throws SQLException {
    744 	throw new SQLException("not supported");
    745     }
    746 
    747     public java.sql.Date getDate(String parameterName, Calendar cal)
    748 	throws SQLException {
    749 	throw new SQLException("not supported");
    750     }
    751 
    752     public java.sql.Date getDate(int parameterIndex, Calendar cal)
    753 	throws SQLException {
    754 	throw new SQLException("not supported");
    755     }
    756 
    757     public java.sql.Time getTime(String parameterName, Calendar cal)
    758 	throws SQLException {
    759 	throw new SQLException("not supported");
    760     }
    761 
    762     public java.sql.Time getTime(int parameterIndex, Calendar cal)
    763 	throws SQLException {
    764 	throw new SQLException("not supported");
    765     }
    766 
    767     public java.sql.Timestamp getTimestamp(String parameterName, Calendar cal)
    768 	throws SQLException {
    769 	throw new SQLException("not supported");
    770     }
    771 
    772     public java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal)
    773 	throws SQLException {
    774 	throw new SQLException("not supported");
    775     }
    776 
    777     public java.net.URL getURL(String parameterName) throws SQLException {
    778 	throw new SQLException("not supported");
    779     }
    780 
    781     public void setRowId(int parameterIndex, RowId x) throws SQLException {
    782 	throw new SQLFeatureNotSupportedException();
    783     }
    784 
    785     public void setRowId(String parameterName, RowId x) throws SQLException {
    786 	throw new SQLFeatureNotSupportedException();
    787     }
    788 
    789     public void setNString(int parameterIndex, String value)
    790 	throws SQLException {
    791 	throw new SQLFeatureNotSupportedException();
    792     }
    793 
    794     public void setNString(String parameterName, String value)
    795 	throws SQLException {
    796 	throw new SQLFeatureNotSupportedException();
    797     }
    798 
    799     public void setNCharacterStream(int parameterIndex, java.io.Reader x,
    800 				    long len)
    801 	throws SQLException {
    802 	throw new SQLFeatureNotSupportedException();
    803     }
    804 
    805     public void setNCharacterStream(String parameterName, java.io.Reader x,
    806 				    long len)
    807 	throws SQLException {
    808 	throw new SQLFeatureNotSupportedException();
    809     }
    810 
    811     public void setNClob(int parameterIndex, NClob value)
    812 	throws SQLException {
    813 	throw new SQLFeatureNotSupportedException();
    814     }
    815 
    816     public void setNClob(String parameterName, NClob value)
    817 	throws SQLException {
    818 	throw new SQLFeatureNotSupportedException();
    819     }
    820 
    821     public void setClob(int parameterIndex, java.io.Reader x, long len)
    822 	throws SQLException {
    823 	throw new SQLFeatureNotSupportedException();
    824     }
    825 
    826     public void setClob(String parameterName, java.io.Reader x, long len)
    827 	throws SQLException {
    828 	throw new SQLFeatureNotSupportedException();
    829     }
    830 
    831     public void setBlob(int parameterIndex, java.io.InputStream x, long len)
    832 	throws SQLException {
    833 	throw new SQLFeatureNotSupportedException();
    834     }
    835 
    836     public void setBlob(String parameterName, java.io.InputStream x, long len)
    837 	throws SQLException {
    838 	throw new SQLFeatureNotSupportedException();
    839     }
    840 
    841     public void setNClob(int parameterIndex, java.io.Reader x, long len)
    842 	throws SQLException {
    843 	throw new SQLFeatureNotSupportedException();
    844     }
    845 
    846     public void setNClob(String parameterName, java.io.Reader x, long len)
    847 	throws SQLException {
    848 	throw new SQLFeatureNotSupportedException();
    849     }
    850 
    851     public void setSQLXML(int parameterIndex, SQLXML xml)
    852 	throws SQLException {
    853 	throw new SQLFeatureNotSupportedException();
    854     }
    855 
    856     public void setSQLXML(String parameterName, SQLXML xml)
    857 	throws SQLException {
    858 	throw new SQLFeatureNotSupportedException();
    859     }
    860 
    861     public void setAsciiStream(int parameterIndex, java.io.InputStream x,
    862 			       long len)
    863 	throws SQLException {
    864 	throw new SQLFeatureNotSupportedException();
    865     }
    866 
    867     public void setAsciiStream(String parameterName, java.io.InputStream x,
    868 			       long len)
    869 	throws SQLException {
    870 	throw new SQLFeatureNotSupportedException();
    871     }
    872 
    873     public void setBinaryStream(int parameterIndex, java.io.InputStream x,
    874 				long len)
    875 	throws SQLException {
    876 	throw new SQLFeatureNotSupportedException();
    877     }
    878 
    879     public void setBinaryStream(String parameterName, java.io.InputStream x,
    880 				long len)
    881 	throws SQLException {
    882 	throw new SQLFeatureNotSupportedException();
    883     }
    884 
    885     public void setCharacterStream(int parameterIndex, java.io.Reader x,
    886 				   long len)
    887 	throws SQLException {
    888 	throw new SQLFeatureNotSupportedException();
    889     }
    890 
    891     public void setCharacterStream(String parameterName, java.io.Reader x,
    892 				   long len)
    893 	throws SQLException {
    894 	throw new SQLFeatureNotSupportedException();
    895     }
    896 
    897     public void setAsciiStream(int parameterIndex, java.io.InputStream x)
    898 	throws SQLException {
    899 	throw new SQLFeatureNotSupportedException();
    900     }
    901 
    902     public void setAsciiStream(String parameterName, java.io.InputStream x)
    903 	throws SQLException {
    904 	throw new SQLFeatureNotSupportedException();
    905     }
    906 
    907     public void setBinaryStream(int parameterIndex, java.io.InputStream x)
    908 	throws SQLException {
    909 	throw new SQLFeatureNotSupportedException();
    910     }
    911 
    912     public void setBinaryStream(String parameterName, java.io.InputStream x)
    913 	throws SQLException {
    914 	throw new SQLFeatureNotSupportedException();
    915     }
    916 
    917     public void setCharacterStream(int parameterIndex, java.io.Reader x)
    918 	throws SQLException {
    919 	throw new SQLFeatureNotSupportedException();
    920     }
    921 
    922     public void setCharacterStream(String parameterName, java.io.Reader x)
    923 	throws SQLException {
    924 	throw new SQLFeatureNotSupportedException();
    925     }
    926 
    927     public void setNCharacterStream(int parameterIndex, java.io.Reader x)
    928 	throws SQLException {
    929 	throw new SQLFeatureNotSupportedException();
    930     }
    931 
    932     public void setNCharacterStream(String parameterName, java.io.Reader x)
    933 	throws SQLException {
    934 	throw new SQLFeatureNotSupportedException();
    935     }
    936 
    937     public void setClob(int parameterIndex, java.io.Reader x)
    938 	throws SQLException {
    939 	throw new SQLFeatureNotSupportedException();
    940     }
    941 
    942     public void setClob(String parameterName, java.io.Reader x)
    943 	throws SQLException {
    944 	throw new SQLFeatureNotSupportedException();
    945     }
    946 
    947     public void setBlob(int parameterIndex, java.io.InputStream x)
    948 	throws SQLException {
    949 	throw new SQLFeatureNotSupportedException();
    950     }
    951 
    952     public void setBlob(String parameterName, java.io.InputStream x)
    953 	throws SQLException {
    954 	throw new SQLFeatureNotSupportedException();
    955     }
    956 
    957     public void setNClob(int parameterIndex, java.io.Reader x)
    958 	throws SQLException {
    959 	throw new SQLFeatureNotSupportedException();
    960     }
    961 
    962     public void setNClob(String parameterName, java.io.Reader x)
    963 	throws SQLException {
    964 	throw new SQLFeatureNotSupportedException();
    965     }
    966 
    967 }
    968