01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java,v 1.18 2007/07/27 08:54:54 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.jdbc2;
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 JDBC2.
19: * However most of the implementation is really done in
20: * org.postgresql.jdbc2.AbstractJdbc2ResultSet
21: */
22: public class Jdbc2ResultSet extends
23: org.postgresql.jdbc2.AbstractJdbc2ResultSet implements
24: java.sql.ResultSet {
25: Jdbc2ResultSet(Query originalQuery, BaseStatement statement,
26: Field[] fields, Vector tuples, ResultCursor cursor,
27: int maxRows, int maxFieldSize, int rsType, int rsConcurrency)
28: throws SQLException {
29: super (originalQuery, statement, fields, tuples, cursor,
30: maxRows, maxFieldSize, rsType, rsConcurrency);
31: }
32:
33: public ResultSetMetaData getMetaData() throws SQLException {
34: checkClosed();
35: return new Jdbc2ResultSetMetaData(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 org.postgresql.jdbc2.Jdbc2Clob(connection,
44: getLong(i));
45: }
46:
47: public java.sql.Blob getBlob(int i) throws SQLException {
48: checkResultSet(i);
49: if (wasNullFlag)
50: return null;
51:
52: return new org.postgresql.jdbc2.Jdbc2Blob(connection,
53: getLong(i));
54: }
55:
56: public java.sql.Array createArray(int i) throws SQLException {
57: checkResultSet(i);
58: return new org.postgresql.jdbc2.Jdbc2Array(connection, i,
59: fields[i - 1], this );
60: }
61:
62: public Object getObject(String s, Map map) throws SQLException {
63: return getObjectImpl(s, map);
64: }
65:
66: public Object getObject(int i, Map map) throws SQLException {
67: return getObjectImpl(i, map);
68: }
69:
70: }
|