org.postgresql.jdbc3
Class Jdbc3Connection
java.lang.Object
org.postgresql.jdbc2.AbstractJdbc2Connection
org.postgresql.jdbc3.AbstractJdbc3Connection
org.postgresql.jdbc3.Jdbc3Connection
- All Implemented Interfaces:
- Connection, Wrapper, BaseConnection, PGConnection
public class Jdbc3Connection
- extends AbstractJdbc3Connection
- 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
|
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 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 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 |
Jdbc3Connection
public Jdbc3Connection(String host,
int port,
String user,
String database,
Properties info,
String url)
throws SQLException
- Throws:
SQLException
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_SENSITIVEresultSetConcurrency - one of the following ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEresultSetHoldability - 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
parametersresultSetType - one of the following ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - one of the following ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEresultSetHoldability - 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 ? parametersresultSetType - one of the following ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - one of the following ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEresultSetHoldability - 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 map)
throws SQLException
- Specified by:
setTypeMap in interface Connection
- Throws:
SQLException
Copyright © 2013. All Rights Reserved.