org.postgresql.jdbc3g
Class Jdbc3gConnection

java.lang.Object
  extended by org.postgresql.jdbc2.AbstractJdbc2Connection
      extended by org.postgresql.jdbc3.AbstractJdbc3Connection
          extended by org.postgresql.jdbc3g.AbstractJdbc3gConnection
              extended by org.postgresql.jdbc3g.Jdbc3gConnection
All Implemented Interfaces:
Connection, Wrapper, BaseConnection, PGConnection

public class Jdbc3gConnection
extends AbstractJdbc3gConnection
implements Connection

This class implements the java.sql.Connection interface for JDBC3. However most of the implementation is really done in org.postgresql.jdbc3.AbstractJdbc3Connection or one of it's parents


Field Summary
 
Fields inherited from class org.postgresql.jdbc2.AbstractJdbc2Connection
autoCommit, bindStringAsVarchar, firstWarning, metadata, prepareThreshold, readOnly, typemap
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
Jdbc3gConnection(String host, int port, String user, String database, Properties info, String url)
           
 
Method Summary
 Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
          Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.
 DatabaseMetaData getMetaData()
           
 CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
          Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
 PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
          Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.
 void setTypeMap(Map<String,Class<?>> map)
           
 
Methods inherited from class org.postgresql.jdbc3.AbstractJdbc3Connection
createStatement, getHoldability, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setHoldability, setSavepoint, setSavepoint
 
Methods inherited from class org.postgresql.jdbc2.AbstractJdbc2Connection
addDataType, addDataType, addWarning, cancelQuery, checkClosed, clearWarnings, close, commit, createStatement, createTypeInfo, enableDriverManagerLogging, encodeString, escapeString, execSQLQuery, execSQLQuery, execSQLUpdate, finalize, getAutoCommit, getCatalog, getCopyAPI, getCursorName, getDBVersionNumber, getEncoding, getFastpathAPI, getIsolationLevelName, getLargeObjectAPI, getLogger, getNotifications, getObject, getPrepareThreshold, getProtocolVersion, getQueryExecutor, getServerMajorVersion, getServerMinorVersion, getStandardConformingStrings, getStringVarcharFlag, getTimestampUtils, getTransactionIsolation, getTransactionState, getTypeInfo, getTypeMap, getURL, getUserName, getWarnings, haveMinimumCompatibleVersion, haveMinimumServerVersion, isClosed, isReadOnly, nativeSQL, prepareCall, prepareStatement, rollback, setAutoCommit, setCatalog, setCursorName, setPrepareThreshold, setReadOnly, setTransactionIsolation, setTypeMapImpl
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Connection
clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Constructor Detail

Jdbc3gConnection

public Jdbc3gConnection(String host,
                        int port,
                        String user,
                        String database,
                        Properties info,
                        String url)
                 throws SQLException
Throws:
SQLException
Method Detail

createStatement

public Statement createStatement(int resultSetType,
                                 int resultSetConcurrency,
                                 int resultSetHoldability)
                          throws SQLException
Description copied from class: AbstractJdbc3Connection
Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability. This method is the same as the createStatement method above, but it allows the default result set type, concurrency, and holdability to be overridden.

Specified by:
createStatement in interface Connection
Specified by:
createStatement in class AbstractJdbc3Connection
Parameters:
resultSetType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
Returns:
a new Statement object that will generate ResultSet objects with the given type, concurrency, and holdability
Throws:
SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
See Also:
ResultSet

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          int resultSetType,
                                          int resultSetConcurrency,
                                          int resultSetHoldability)
                                   throws SQLException
Description copied from class: AbstractJdbc3Connection
Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.

This method is the same as the prepareStatement method above, but it allows the default result set type, concurrency, and holdability to be overridden.

Specified by:
prepareStatement in interface Connection
Specified by:
prepareStatement in class AbstractJdbc3Connection
Parameters:
sql - a String object that is the SQL statement to be sent to the database; may contain one or more ? IN parameters
resultSetType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
Returns:
a new PreparedStatement object, containing the pre-compiled SQL statement, that will generate ResultSet objects with the given type, concurrency, and holdability
Throws:
SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
See Also:
ResultSet

prepareCall

public CallableStatement prepareCall(String sql,
                                     int resultSetType,
                                     int resultSetConcurrency,
                                     int resultSetHoldability)
                              throws SQLException
Description copied from class: AbstractJdbc3Connection
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above, but it allows the default result set type, result set concurrency type and holdability to be overridden.

Specified by:
prepareCall in interface Connection
Specified by:
prepareCall in class AbstractJdbc3Connection
Parameters:
sql - a String object that is the SQL statement to be sent to the database; may contain on or more ? parameters
resultSetType - one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency - one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetHoldability - one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
Returns:
a new CallableStatement object, containing the pre-compiled SQL statement, that will generate ResultSet objects with the given type, concurrency, and holdability
Throws:
SQLException - if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
See Also:
ResultSet

getMetaData

public DatabaseMetaData getMetaData()
                             throws SQLException
Specified by:
getMetaData in interface Connection
Specified by:
getMetaData in class AbstractJdbc2Connection
Throws:
SQLException

setTypeMap

public void setTypeMap(Map<String,Class<?>> map)
                throws SQLException
Specified by:
setTypeMap in interface Connection
Throws:
SQLException


Copyright © 2013. All Rights Reserved.