01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/jdbc3/Jdbc3Connection.java,v 1.11 2005/01/11 08:25:46 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.jdbc3;
11:
12: import java.util.Map;
13: import java.util.Properties;
14: import java.sql.SQLException;
15:
16: /**
17: * This class implements the java.sql.Connection interface for JDBC3.
18: * However most of the implementation is really done in
19: * org.postgresql.jdbc3.AbstractJdbc3Connection or one of it's parents
20: */
21: public class Jdbc3Connection extends
22: org.postgresql.jdbc3.AbstractJdbc3Connection implements
23: java.sql.Connection {
24: public Jdbc3Connection(String host, int port, String user,
25: String database, Properties info, String url)
26: throws SQLException {
27: super (host, port, user, database, info, url);
28: }
29:
30: public java.sql.Statement createStatement(int resultSetType,
31: int resultSetConcurrency, int resultSetHoldability)
32: throws SQLException {
33: Jdbc3Statement s = new Jdbc3Statement(this , resultSetType,
34: resultSetConcurrency, resultSetHoldability);
35: s.setPrepareThreshold(getPrepareThreshold());
36: return s;
37: }
38:
39: public java.sql.PreparedStatement prepareStatement(String sql,
40: int resultSetType, int resultSetConcurrency,
41: int resultSetHoldability) throws SQLException {
42: Jdbc3PreparedStatement s = new Jdbc3PreparedStatement(this ,
43: sql, resultSetType, resultSetConcurrency,
44: resultSetHoldability);
45: s.setPrepareThreshold(getPrepareThreshold());
46: return s;
47: }
48:
49: public java.sql.CallableStatement prepareCall(String sql,
50: int resultSetType, int resultSetConcurrency,
51: int resultSetHoldability) throws SQLException {
52: Jdbc3CallableStatement s = new Jdbc3CallableStatement(this ,
53: sql, resultSetType, resultSetConcurrency,
54: resultSetHoldability);
55: s.setPrepareThreshold(getPrepareThreshold());
56: return s;
57: }
58:
59: public java.sql.DatabaseMetaData getMetaData() throws SQLException {
60: if (metadata == null)
61: metadata = new Jdbc3DatabaseMetaData(this );
62: return metadata;
63: }
64:
65: public void setTypeMap(Map map) throws SQLException {
66: setTypeMapImpl(map);
67: }
68:
69: }
|