Interface CallMetaDataProvider
- All Known Implementing Classes:
Db2CallMetaDataProvider
,DerbyCallMetaDataProvider
,GenericCallMetaDataProvider
,HanaCallMetaDataProvider
,OracleCallMetaDataProvider
,PostgresCallMetaDataProvider
,SqlServerCallMetaDataProvider
,SybaseCallMetaDataProvider
This is intended for internal use by Spring's
SimpleJdbcCall
.
- Since:
- 2.5
- Author:
- Thomas Risberg, Juergen Hoeller, Giuseppe Milicia
-
Method Summary
Modifier and TypeMethodDescriptionboolean
byPassReturnParameter
(String parameterName) Should we bypass the return parameter with the specified name?catalogNameToUse
(String catalogName) Provide any modification of the catalog name passed in to match the meta-data currently used.createDefaultInOutParameter
(String parameterName, CallParameterMetaData meta) Create a default in/out parameter based on the provided meta-data.createDefaultInParameter
(String parameterName, CallParameterMetaData meta) Create a default in parameter based on the provided meta-data.createDefaultOutParameter
(String parameterName, CallParameterMetaData meta) Create a default out parameter based on the provided meta-data.Get the call parameter meta-data that is currently used.int
Get theTypes
type for columns that return ResultSets as ref cursors if this feature is supported.Get the name of the current user.void
initializeWithMetaData
(DatabaseMetaData databaseMetaData) Initialize using the provided DatabaseMetData.void
initializeWithProcedureColumnMetaData
(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String procedureName) Initialize the database specific management of procedure column meta-data.boolean
Are we using the meta-data for the procedure columns?boolean
Does this database support returning ResultSets as ref cursors to be retrieved withCallableStatement.getObject(int)
for the specified column?boolean
Does this database support returning ResultSets that should be retrieved with the JDBC call:Statement.getResultSet()
?boolean
Does the database support the use of catalog name in procedure calls?boolean
Does the database support the use of schema name in procedure calls?metaDataCatalogNameToUse
(String catalogName) Provide any modification of the catalog name passed in to match the meta-data currently used.metaDataSchemaNameToUse
(String schemaName) Provide any modification of the schema name passed in to match the meta-data currently used.namedParameterBindingToUse
(String parameterName) Return the name of the named parameter to use for binding the given parameter name.parameterNameToUse
(String parameterName) Provide any modification of the column name passed in to match the meta-data currently used.procedureNameToUse
(String procedureName) Provide any modification of the procedure name passed in to match the meta-data currently used.schemaNameToUse
(String schemaName) Provide any modification of the schema name passed in to match the meta-data currently used.
-
Method Details
-
initializeWithMetaData
Initialize using the provided DatabaseMetData.- Parameters:
databaseMetaData
- used to retrieve database specific information- Throws:
SQLException
- in case of initialization failure
-
initializeWithProcedureColumnMetaData
void initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, @Nullable String catalogName, @Nullable String schemaName, @Nullable String procedureName) throws SQLException Initialize the database specific management of procedure column meta-data.This is only called for databases that are supported. This initialization can be turned off by specifying that column meta-data should not be used.
- Parameters:
databaseMetaData
- used to retrieve database specific informationcatalogName
- name of catalog to use (ornull
if none)schemaName
- name of schema name to use (ornull
if none)procedureName
- name of the stored procedure- Throws:
SQLException
- in case of initialization failure- See Also:
-
getCallParameterMetaData
List<CallParameterMetaData> getCallParameterMetaData()Get the call parameter meta-data that is currently used.- Returns:
- a List of
CallParameterMetaData
-
procedureNameToUse
Provide any modification of the procedure name passed in to match the meta-data currently used.This could include altering the case.
-
catalogNameToUse
Provide any modification of the catalog name passed in to match the meta-data currently used.This could include altering the case.
-
schemaNameToUse
Provide any modification of the schema name passed in to match the meta-data currently used.This could include altering the case.
-
metaDataCatalogNameToUse
Provide any modification of the catalog name passed in to match the meta-data currently used.The returned value will be used for meta-data lookups. This could include altering the case used or providing a base catalog if none is provided.
-
metaDataSchemaNameToUse
Provide any modification of the schema name passed in to match the meta-data currently used.The returned value will be used for meta-data lookups. This could include altering the case used or providing a base schema if none is provided.
-
parameterNameToUse
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
-
namedParameterBindingToUse
Return the name of the named parameter to use for binding the given parameter name.- Parameters:
parameterName
- the name of the parameter to bind- Returns:
- the name of the named parameter to use for binding the given parameter name
- Since:
- 6.1.2
-
createDefaultOutParameter
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 parametermeta
- meta-data used for this call- Returns:
- the configured SqlOutParameter
-
createDefaultInOutParameter
Create a default in/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 parametermeta
- meta-data used for this call- Returns:
- the configured SqlInOutParameter
-
createDefaultInParameter
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 parametermeta
- meta-data used for this call- Returns:
- the configured SqlParameter
-
getUserName
Get the name of the current user. Useful for meta-data lookups etc.- Returns:
- current user name from database connection
-
isProcedureColumnMetaDataUsed
boolean isProcedureColumnMetaDataUsed()Are we using the meta-data for the procedure columns? -
isReturnResultSetSupported
boolean isReturnResultSetSupported()Does this database support returning ResultSets that should be retrieved with the JDBC call:Statement.getResultSet()
? -
isRefCursorSupported
boolean isRefCursorSupported()Does this database support returning ResultSets as ref cursors to be retrieved withCallableStatement.getObject(int)
for the specified column? -
getRefCursorSqlType
int getRefCursorSqlType()Get theTypes
type for columns that return ResultSets as ref cursors if this feature is supported. -
byPassReturnParameter
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.
-
isSupportsCatalogsInProcedureCalls
boolean isSupportsCatalogsInProcedureCalls()Does the database support the use of catalog name in procedure calls? -
isSupportsSchemasInProcedureCalls
boolean isSupportsSchemasInProcedureCalls()Does the database support the use of schema name in procedure calls?
-