public interface

CallMetaDataProvider

org.springframework.jdbc.core.metadata.CallMetaDataProvider
Known Indirect Subclasses

Class Overview

Interface specifying the API to be implemented by a class providing call metadata. This is intended for internal use by Spring's SimpleJdbcTemplate.

Summary

Public Methods
abstract boolean byPassReturnParameter(String parameterName)
Should we bypass the return parameter with the specified name.
abstract String catalogNameToUse(String catalogName)
Provide any modification of the catalog name passed in to match the meta data currently used.
abstract SqlParameter createDefaultInOutParameter(String parameterName, CallParameterMetaData meta)
Create a default inout parameter based on the provided meta data.
abstract SqlParameter createDefaultInParameter(String parameterName, CallParameterMetaData meta)
Create a default in parameter based on the provided meta data.
abstract SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta)
Create a default out parameter based on the provided meta data.
abstract List<CallParameterMetaData> getCallParameterMetaData()
Get the call parameter metadata that is currently used.
abstract int getRefCursorSqlType()
Get the java.sql.Types type for columns that return resultsets as ref cursors if this feature is supported.
abstract String getUserName()
Get the name of the current user.
abstract void initializeWithMetaData(DatabaseMetaData databaseMetaData)
Initialize using the provided DatabaseMetData.
abstract void initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String procedureName)
Initialize the database specific management of procedure column meta data.
abstract boolean isProcedureColumnMetaDataUsed()
Are we using the meta data for the procedure columns?
abstract boolean isRefCursorSupported()
Does this database support returning resultsets as ref cursors to be retrieved with getObject(int) for the specified column.
abstract boolean isReturnResultSetSupported()
Does this database support returning resultsets that should be retrieved with the JDBC call getResultSet()
abstract boolean isSupportsCatalogsInProcedureCalls()
Does the database support the use of catalog name in procedure calls
abstract boolean isSupportsSchemasInProcedureCalls()
Does the database support the use of schema name in procedure calls
abstract String metaDataCatalogNameToUse(String catalogName)
Provide any modification of the catalog name passed in to match the meta data currently used.
abstract String metaDataSchemaNameToUse(String schemaName)
Provide any modification of the schema name passed in to match the meta data currently used.
abstract String parameterNameToUse(String parameterName)
Provide any modification of the column name passed in to match the meta data currently used.
abstract String procedureNameToUse(String procedureName)
Provide any modification of the procedure name passed in to match the meta data currently used.
abstract String schemaNameToUse(String schemaName)
Provide any modification of the schema name passed in to match the meta data currently used.

Public Methods

public abstract boolean byPassReturnParameter (String parameterName)

Should we bypass the return parameter with the specified name. This allows the database specific implementation to skip the processing for specific results returned by the database call.

public abstract String catalogNameToUse (String catalogName)

Provide any modification of the catalog name passed in to match the meta data currently used. This could include alterig the case.

public abstract SqlParameter createDefaultInOutParameter (String parameterName, CallParameterMetaData meta)

Create a default inout parameter based on the provided meta data. This is used when no explicit parameter declaration has been made.

Parameters
parameterName the name of the parameter
meta meta data used for this call
Returns
  • the configured SqlInOutParameter

public abstract SqlParameter createDefaultInParameter (String parameterName, CallParameterMetaData meta)

Create a default in parameter based on the provided meta data. This is used when no explicit parameter declaration has been made.

Parameters
parameterName the name of the parameter
meta meta data used for this call
Returns
  • the configured SqlParameter

public abstract SqlParameter createDefaultOutParameter (String parameterName, CallParameterMetaData meta)

Create a default out parameter based on the provided meta data. This is used when no explicit parameter declaration has been made.

Parameters
parameterName the name of the parameter
meta meta data used for this call
Returns
  • the configured SqlOutParameter

public abstract List<CallParameterMetaData> getCallParameterMetaData ()

Get the call parameter metadata that is currently used.

Returns

public abstract int getRefCursorSqlType ()

Get the java.sql.Types type for columns that return resultsets as ref cursors if this feature is supported.

public abstract String getUserName ()

Get the name of the current user. Useful for meta data lookups etc.

Returns
  • current user name from database connection

public abstract void initializeWithMetaData (DatabaseMetaData databaseMetaData)

Initialize using the provided DatabaseMetData.

Parameters
databaseMetaData used to retrieve database specific information
Throws
SQLException in case of initialization failure

public abstract void initializeWithProcedureColumnMetaData (DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String procedureName)

Initialize the database specific management of procedure column meta data. This is only called for databases that are supported. This initalization can be turned off by specifying that column meta data should not be used.

Parameters
databaseMetaData used to retrieve database specific information
catalogName name of catalog to use or null
schemaName name of schema name to use or null
procedureName name of the stored procedure
Throws
SQLException in case of initialization failure

public abstract boolean isProcedureColumnMetaDataUsed ()

Are we using the meta data for the procedure columns?

public abstract boolean isRefCursorSupported ()

Does this database support returning resultsets as ref cursors to be retrieved with getObject(int) for the specified column.

public abstract boolean isReturnResultSetSupported ()

Does this database support returning resultsets that should be retrieved with the JDBC call getResultSet()

public abstract boolean isSupportsCatalogsInProcedureCalls ()

Does the database support the use of catalog name in procedure calls

public abstract boolean isSupportsSchemasInProcedureCalls ()

Does the database support the use of schema name in procedure calls

public abstract String metaDataCatalogNameToUse (String catalogName)

Provide any modification of the catalog name passed in to match the meta data currently used. The reyurned value will be used for meta data lookups. This could include alterig the case used or providing a base catalog if mone provided.

public abstract String metaDataSchemaNameToUse (String schemaName)

Provide any modification of the schema name passed in to match the meta data currently used. The reyurned value will be used for meta data lookups. This could include alterig the case used or providing a base schema if mone provided.

public abstract String parameterNameToUse (String parameterName)

Provide any modification of the column name passed in to match the meta data currently used. This could include altering the case.

Parameters
parameterName name of the parameter of column

public abstract String procedureNameToUse (String procedureName)

Provide any modification of the procedure name passed in to match the meta data currently used. This could include alterig the case.

public abstract String schemaNameToUse (String schemaName)

Provide any modification of the schema name passed in to match the meta data currently used. This could include alterig the case.