Top Description Fields Constructors Methods
org.hibernate.engine.jdbc.cursor.internal

public Class StandardRefCursorSupport

extends Object
implements RefCursorSupport
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport, org.hibernate.service.Service, java.io.Serializable
Imports
java.lang.reflect.InvocationTargetException, .Method, java.sql.CallableStatement, .DatabaseMetaData, .ResultSet, .SQLException, .Types, org.hibernate.HibernateException, org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.service.spi.InjectService, org.jboss.logging.Logger

Standard implementation of RefCursorSupport
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private JdbcServices
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ResultSet
getResultSet(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
position
)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.getResultSet.

Given a callable statement previously processed by registerRefCursorParameter(java.sql.CallableStatement, int), extract the java.sql.ResultSet.
public ResultSet
getResultSet(CallableStatement
The callable statement.
statement
,
String
The parameter name (for drivers which support named parameters).
name
)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.getResultSet.

Given a callable statement previously processed by registerRefCursorParameter(java.sql.CallableStatement, String), extract the java.sql.ResultSet.
public void
injectJdbcServices(JdbcServices
The JdbcServices service
jdbcServices
)

Hook for service registry to be able to inject JdbcServices

private int
public void
registerRefCursorParameter(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
position
)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.registerRefCursorParameter.

Register a parameter capable of returning a java.sql.ResultSet *by position*.
public void
registerRefCursorParameter(CallableStatement
The callable statement.
statement
,
String
The parameter name (for drivers which support named parameters).
name
)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.registerRefCursorParameter.

Register a parameter capable of returning a java.sql.ResultSet *by name*.
public static boolean

Returns:

true if the metadata indicates that the driver defines REF_CURSOR support
supportsRefCursors
(DatabaseMetaData
The JDBC metadata
meta
)

Does this JDBC metadata indicate that the driver defines REF_CURSOR support?

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jdbcServicesback to summary
private JdbcServices jdbcServices
logback to summary
private static final Logger log

Constructor Detail

StandardRefCursorSupportback to summary
public StandardRefCursorSupport()

Method Detail

getResultSetback to summary
public ResultSet getResultSet(CallableStatement statement, int position)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.getResultSet.

Doc from org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.getResultSet.

Given a callable statement previously processed by registerRefCursorParameter(java.sql.CallableStatement, int), extract the java.sql.ResultSet.

Parameters
statement:CallableStatement

The callable statement.

position:int

The bind position at which to register the output param.

Returns:ResultSet

The extracted result set.

Annotations
@Override
getResultSetback to summary
public ResultSet getResultSet(CallableStatement statement, String name)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.getResultSet.

Doc from org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.getResultSet.

Given a callable statement previously processed by registerRefCursorParameter(java.sql.CallableStatement, String), extract the java.sql.ResultSet.

Parameters
statement:CallableStatement

The callable statement.

name:String

The parameter name (for drivers which support named parameters).

Returns:ResultSet

The extracted result set.

Annotations
@Override
injectJdbcServicesback to summary
public void injectJdbcServices(JdbcServices jdbcServices)

Hook for service registry to be able to inject JdbcServices

Parameters
jdbcServices:JdbcServices

The JdbcServices service

Annotations
@InjectService
@SuppressWarnings:UnusedDeclaration
refCursorTypeCodeback to summary
private int refCursorTypeCode()
registerRefCursorParameterback to summary
public void registerRefCursorParameter(CallableStatement statement, int position)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.registerRefCursorParameter.

Doc from org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.registerRefCursorParameter.

Register a parameter capable of returning a java.sql.ResultSet *by position*.

Parameters
statement:CallableStatement

The callable statement.

position:int

The bind position at which to register the output param.

Annotations
@Override
registerRefCursorParameterback to summary
public void registerRefCursorParameter(CallableStatement statement, String name)

Implements org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.registerRefCursorParameter.

Doc from org.hibernate.engine.jdbc.cursor.spi.RefCursorSupport.registerRefCursorParameter.

Register a parameter capable of returning a java.sql.ResultSet *by name*.

Parameters
statement:CallableStatement

The callable statement.

name:String

The parameter name (for drivers which support named parameters).

Annotations
@Override
supportsRefCursorsback to summary
public static boolean supportsRefCursors(DatabaseMetaData meta)

Does this JDBC metadata indicate that the driver defines REF_CURSOR support?

Parameters
meta:DatabaseMetaData

The JDBC metadata

Returns:boolean

true if the metadata indicates that the driver defines REF_CURSOR support