spring-framework / org.springframework.jdbc.core.metadata / CallMetaDataProvider

CallMetaDataProvider

interface CallMetaDataProvider

Interface specifying the API to be implemented by a class providing call metadata.

This is intended for internal use by Spring's org.springframework.jdbc.core.simple.SimpleJdbcCall.

Author
Thomas Risberg

Since
2.5

Functions

byPassReturnParameter

abstract fun byPassReturnParameter(parameterName: String): Boolean

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.

catalogNameToUse

abstract fun catalogNameToUse(catalogName: String): String

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

createDefaultInOutParameter

abstract fun createDefaultInOutParameter(parameterName: String, meta: CallParameterMetaData): SqlParameter

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

createDefaultInParameter

abstract fun createDefaultInParameter(parameterName: String, meta: CallParameterMetaData): SqlParameter

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

createDefaultOutParameter

abstract fun createDefaultOutParameter(parameterName: String, meta: CallParameterMetaData): SqlParameter

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

getCallParameterMetaData

abstract fun getCallParameterMetaData(): MutableList<CallParameterMetaData>

Get the call parameter metadata that is currently used.

getRefCursorSqlType

abstract fun getRefCursorSqlType(): Int

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

getUserName

abstract fun getUserName(): String

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

initializeWithMetaData

abstract fun initializeWithMetaData(databaseMetaData: DatabaseMetaData): Unit

Initialize using the provided DatabaseMetData.

initializeWithProcedureColumnMetaData

abstract fun initializeWithProcedureColumnMetaData(databaseMetaData: DatabaseMetaData, catalogName: String, schemaName: String, procedureName: String): Unit

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.

isProcedureColumnMetaDataUsed

abstract fun isProcedureColumnMetaDataUsed(): Boolean

Are we using the meta data for the procedure columns?

isRefCursorSupported

abstract fun isRefCursorSupported(): Boolean

Does this database support returning ResultSets as ref cursors to be retrieved with java.sql.CallableStatement#getObject(int) for the specified column.

isReturnResultSetSupported

abstract fun isReturnResultSetSupported(): Boolean

Does this database support returning ResultSets that should be retrieved with the JDBC call. java.sql.Statement#getResultSet()

isSupportsCatalogsInProcedureCalls

abstract fun isSupportsCatalogsInProcedureCalls(): Boolean

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

isSupportsSchemasInProcedureCalls

abstract fun isSupportsSchemasInProcedureCalls(): Boolean

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

metaDataCatalogNameToUse

abstract fun metaDataCatalogNameToUse(catalogName: String): String

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

abstract fun metaDataSchemaNameToUse(schemaName: String): String

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

abstract fun parameterNameToUse(parameterName: String): String

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

procedureNameToUse

abstract fun procedureNameToUse(procedureName: String): String

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

schemaNameToUse

abstract fun schemaNameToUse(schemaName: String): String

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