01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/jdbc4/Jdbc4ResultSet.java,v 1.3 2007/07/27 08:54:54 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.jdbc4;
11:
12: import java.sql.*;
13: import java.util.Map;
14: import java.util.Vector;
15: import org.postgresql.core.*;
16:
17: /**
18: * This class implements the java.sql.ResultSet interface for JDBC4.
19: * However most of the implementation is really done in
20: * org.postgresql.jdbc4.AbstractJdbc4ResultSet or one of it's parents
21: */
22: public class Jdbc4ResultSet extends AbstractJdbc4ResultSet implements
23: java.sql.ResultSet {
24: Jdbc4ResultSet(Query originalQuery, BaseStatement statement,
25: Field[] fields, Vector tuples, ResultCursor cursor,
26: int maxRows, int maxFieldSize, int rsType,
27: int rsConcurrency, int rsHoldability) throws SQLException {
28: super (originalQuery, statement, fields, tuples, cursor,
29: maxRows, maxFieldSize, rsType, rsConcurrency,
30: rsHoldability);
31: }
32:
33: public java.sql.ResultSetMetaData getMetaData() throws SQLException {
34: checkClosed();
35: return new Jdbc4ResultSetMetaData(connection, fields);
36: }
37:
38: public java.sql.Clob getClob(int i) throws SQLException {
39: checkResultSet(i);
40: if (wasNullFlag)
41: return null;
42:
43: return new Jdbc4Clob(connection, getLong(i));
44: }
45:
46: public java.sql.Blob getBlob(int i) throws SQLException {
47: checkResultSet(i);
48: if (wasNullFlag)
49: return null;
50:
51: return new Jdbc4Blob(connection, getLong(i));
52: }
53:
54: public Array createArray(int i) throws SQLException {
55: checkResultSet(i);
56: return new Jdbc4Array(connection, i, fields[i - 1], this );
57: }
58:
59: public Object getObject(String s, Map<String, Class<?>> map)
60: throws SQLException {
61: return getObjectImpl(s, map);
62: }
63:
64: public Object getObject(int i, Map<String, Class<?>> map)
65: throws SQLException {
66: return getObjectImpl(i, map);
67: }
68:
69: }
|