public interface CallMetaDataProvider
This is intended for internal use by Spring's
SimpleJdbcCall
.
Modifier and Type | Method and Description |
---|---|
boolean |
byPassReturnParameter(String parameterName)
Should we bypass the return parameter with the specified name?
|
String |
catalogNameToUse(String catalogName)
Provide any modification of the catalog name passed in to match the meta-data currently used.
|
SqlParameter |
createDefaultInOutParameter(String parameterName,
CallParameterMetaData meta)
Create a default in/out parameter based on the provided meta-data.
|
SqlParameter |
createDefaultInParameter(String parameterName,
CallParameterMetaData meta)
Create a default in parameter based on the provided meta-data.
|
SqlParameter |
createDefaultOutParameter(String parameterName,
CallParameterMetaData meta)
Create a default out parameter based on the provided meta-data.
|
List<CallParameterMetaData> |
getCallParameterMetaData()
Get the call parameter meta-data that is currently used.
|
int |
getRefCursorSqlType()
Get the
Types type for columns that return ResultSets as ref cursors
if this feature is supported. |
String |
getUserName()
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 |
isProcedureColumnMetaDataUsed()
Are we using the meta-data for the procedure columns?
|
boolean |
isRefCursorSupported()
Does this database support returning ResultSets as ref cursors to be retrieved with
CallableStatement.getObject(int) for the specified column? |
boolean |
isReturnResultSetSupported()
Does this database support returning ResultSets that should be retrieved with the JDBC call:
Statement.getResultSet() ? |
boolean |
isSupportsCatalogsInProcedureCalls()
Does the database support the use of catalog name in procedure calls?
|
boolean |
isSupportsSchemasInProcedureCalls()
Does the database support the use of schema name in procedure calls?
|
String |
metaDataCatalogNameToUse(String catalogName)
Provide any modification of the catalog name passed in to match the meta-data currently used.
|
String |
metaDataSchemaNameToUse(String schemaName)
Provide any modification of the schema name passed in to match the meta-data currently used.
|
String |
parameterNameToUse(String parameterName)
Provide any modification of the column name passed in to match the meta-data currently used.
|
String |
procedureNameToUse(String procedureName)
Provide any modification of the procedure name passed in to match the meta-data currently used.
|
String |
schemaNameToUse(String schemaName)
Provide any modification of the schema name passed in to match the meta-data currently used.
|
void initializeWithMetaData(DatabaseMetaData databaseMetaData) throws SQLException
databaseMetaData
- used to retrieve database specific informationSQLException
- in case of initialization failurevoid initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, @Nullable String catalogName, @Nullable String schemaName, @Nullable String procedureName) throws SQLException
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.
databaseMetaData
- used to retrieve database specific informationcatalogName
- name of catalog to use (or null
if none)schemaName
- name of schema name to use (or null
if none)procedureName
- name of the stored procedureSQLException
- in case of initialization failureSimpleJdbcCall.withoutProcedureColumnMetaDataAccess()
List<CallParameterMetaData> getCallParameterMetaData()
CallParameterMetaData
@Nullable String procedureNameToUse(@Nullable String procedureName)
This could include altering the case.
@Nullable String catalogNameToUse(@Nullable String catalogName)
This could include altering the case.
@Nullable String schemaNameToUse(@Nullable String schemaName)
This could include altering the case.
@Nullable String metaDataCatalogNameToUse(@Nullable String catalogName)
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.
@Nullable String metaDataSchemaNameToUse(@Nullable String schemaName)
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.
@Nullable String parameterNameToUse(@Nullable String parameterName)
This could include altering the case.
parameterName
- name of the parameter of columnSqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta)
This is used when no explicit parameter declaration has been made.
parameterName
- the name of the parametermeta
- meta-data used for this callSqlParameter createDefaultInOutParameter(String parameterName, CallParameterMetaData meta)
This is used when no explicit parameter declaration has been made.
parameterName
- the name of the parametermeta
- meta-data used for this callSqlParameter createDefaultInParameter(String parameterName, CallParameterMetaData meta)
This is used when no explicit parameter declaration has been made.
parameterName
- the name of the parametermeta
- meta-data used for this call@Nullable String getUserName()
boolean isReturnResultSetSupported()
Statement.getResultSet()
?boolean isRefCursorSupported()
CallableStatement.getObject(int)
for the specified column?int getRefCursorSqlType()
Types
type for columns that return ResultSets as ref cursors
if this feature is supported.boolean isProcedureColumnMetaDataUsed()
boolean byPassReturnParameter(String parameterName)
This allows the database specific implementation to skip the processing for specific results returned by the database call.
boolean isSupportsCatalogsInProcedureCalls()
boolean isSupportsSchemasInProcedureCalls()