01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/jdbc4/Jdbc4Statement.java,v 1.1 2006/06/08 10:34:52 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.jdbc4;
11:
12: import java.sql.*;
13: import java.util.Vector;
14: import org.postgresql.core.*;
15:
16: /**
17: * This class implements the java.sql.Statement interface for JDBC4.
18: * However most of the implementation is really done in
19: * org.postgresql.jdbc4.AbstractJdbc4Statement or one of it's parents
20: */
21: class Jdbc4Statement extends AbstractJdbc4Statement implements
22: Statement {
23: Jdbc4Statement(Jdbc4Connection c, int rsType, int rsConcurrency,
24: int rsHoldability) throws SQLException {
25: super (c, rsType, rsConcurrency, rsHoldability);
26: }
27:
28: protected Jdbc4Statement(Jdbc4Connection connection, String sql,
29: boolean isCallable, int rsType, int rsConcurrency,
30: int rsHoldability) throws SQLException {
31: super (connection, sql, isCallable, rsType, rsConcurrency,
32: rsHoldability);
33: }
34:
35: public ResultSet createResultSet(Query originalQuery,
36: Field[] fields, Vector tuples, ResultCursor cursor)
37: throws SQLException {
38: Jdbc4ResultSet newResult = new Jdbc4ResultSet(originalQuery,
39: this , fields, tuples, cursor, getMaxRows(),
40: getMaxFieldSize(), getResultSetType(),
41: getResultSetConcurrency(), getResultSetHoldability());
42: newResult.setFetchSize(getFetchSize());
43: newResult.setFetchDirection(getFetchDirection());
44: return newResult;
45: }
46:
47: public ParameterMetaData createParameterMetaData(
48: BaseConnection conn, int oids[]) throws SQLException {
49: return new Jdbc4ParameterMetaData(conn, oids);
50: }
51:
52: }
|