类 GenericCallMetaDataProvider
- java.lang.Object
- org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider
- 所有已实现的接口:
CallMetaDataProvider
- 直接已知子类:
Db2CallMetaDataProvider
,DerbyCallMetaDataProvider
,HanaCallMetaDataProvider
,OracleCallMetaDataProvider
,PostgresCallMetaDataProvider
,SqlServerCallMetaDataProvider
,SybaseCallMetaDataProvider
public class GenericCallMetaDataProvider extends Object implements CallMetaDataProvider
A generic implementation of theCallMetaDataProvider
interface. This class can be extended to provide database specific behavior.- 从以下版本开始:
- 2.5
- 作者:
- Thomas Risberg, Juergen Hoeller
构造器概要
构造器 限定符 构造器 说明 protected
GenericCallMetaDataProvider(DatabaseMetaData databaseMetaData)
Constructor used to initialize with provided database meta-data.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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 inout 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 theTypes
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 withCallableStatement.getObject(int)
for the specified column.boolean
isReturnResultSetSupported()
Does this database support returning ResultSets that should be retrieved with the JDBC call:Statement.getResultSet()
?protected boolean
isStoresLowerCaseIdentifiers()
Does the database use lower case for identifiers?protected boolean
isStoresUpperCaseIdentifiers()
Does the database use upper case for identifiers?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.protected void
setStoresLowerCaseIdentifiers(boolean storesLowerCaseIdentifiers)
Specify whether the database uses lower case for identifiers.protected void
setStoresUpperCaseIdentifiers(boolean storesUpperCaseIdentifiers)
Specify whether the database uses upper case for identifiers.protected void
setSupportsCatalogsInProcedureCalls(boolean supportsCatalogsInProcedureCalls)
Specify whether the database supports the use of catalog name in procedure calls.protected void
setSupportsSchemasInProcedureCalls(boolean supportsSchemasInProcedureCalls)
Specify whether the database supports the use of schema name in procedure calls.
构造器详细资料
GenericCallMetaDataProvider
protected GenericCallMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException
Constructor used to initialize with provided database meta-data.- 参数:
databaseMetaData
- meta-data to be used- 抛出:
SQLException
方法详细资料
initializeWithMetaData
public void initializeWithMetaData(DatabaseMetaData databaseMetaData) throws SQLException
从接口复制的说明:CallMetaDataProvider
Initialize using the provided DatabaseMetData.- 指定者:
initializeWithMetaData
在接口中CallMetaDataProvider
- 参数:
databaseMetaData
- used to retrieve database specific information- 抛出:
SQLException
- in case of initialization failure
initializeWithProcedureColumnMetaData
public void initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String procedureName) throws SQLException
从接口复制的说明:CallMetaDataProvider
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.- 指定者:
initializeWithProcedureColumnMetaData
在接口中CallMetaDataProvider
- 参数:
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- 抛出:
SQLException
- in case of initialization failure- 另请参阅:
SimpleJdbcCall.withoutProcedureColumnMetaDataAccess()
getCallParameterMetaData
public List<CallParameterMetaData> getCallParameterMetaData()
从接口复制的说明:CallMetaDataProvider
Get the call parameter meta-data that is currently used.- 指定者:
getCallParameterMetaData
在接口中CallMetaDataProvider
- 返回:
- List of
CallParameterMetaData
procedureNameToUse
public String procedureNameToUse(String procedureName)
从接口复制的说明:CallMetaDataProvider
Provide any modification of the procedure name passed in to match the meta-data currently used. This could include altering the case.- 指定者:
procedureNameToUse
在接口中CallMetaDataProvider
catalogNameToUse
public String catalogNameToUse(String catalogName)
从接口复制的说明:CallMetaDataProvider
Provide any modification of the catalog name passed in to match the meta-data currently used. This could include altering the case.- 指定者:
catalogNameToUse
在接口中CallMetaDataProvider
schemaNameToUse
public String schemaNameToUse(String schemaName)
从接口复制的说明:CallMetaDataProvider
Provide any modification of the schema name passed in to match the meta-data currently used. This could include altering the case.- 指定者:
schemaNameToUse
在接口中CallMetaDataProvider
metaDataCatalogNameToUse
public String metaDataCatalogNameToUse(String catalogName)
从接口复制的说明:CallMetaDataProvider
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
public String metaDataSchemaNameToUse(String schemaName)
从接口复制的说明:CallMetaDataProvider
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
public String parameterNameToUse(String parameterName)
从接口复制的说明:CallMetaDataProvider
Provide any modification of the column name passed in to match the meta-data currently used. This could include altering the case.- 指定者:
parameterNameToUse
在接口中CallMetaDataProvider
- 参数:
parameterName
- name of the parameter of column
byPassReturnParameter
public boolean byPassReturnParameter(String parameterName)
从接口复制的说明:CallMetaDataProvider
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.
createDefaultOutParameter
public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta)
从接口复制的说明:CallMetaDataProvider
Create a default out parameter based on the provided meta-data. This is used when no explicit parameter declaration has been made.- 指定者:
createDefaultOutParameter
在接口中CallMetaDataProvider
- 参数:
parameterName
- the name of the parametermeta
- meta-data used for this call- 返回:
- the configured SqlOutParameter
createDefaultInOutParameter
public SqlParameter createDefaultInOutParameter(String parameterName, CallParameterMetaData meta)
从接口复制的说明:CallMetaDataProvider
Create a default inout parameter based on the provided meta-data. This is used when no explicit parameter declaration has been made.- 指定者:
createDefaultInOutParameter
在接口中CallMetaDataProvider
- 参数:
parameterName
- the name of the parametermeta
- meta-data used for this call- 返回:
- the configured SqlInOutParameter
createDefaultInParameter
public SqlParameter createDefaultInParameter(String parameterName, CallParameterMetaData meta)
从接口复制的说明:CallMetaDataProvider
Create a default in parameter based on the provided meta-data. This is used when no explicit parameter declaration has been made.- 指定者:
createDefaultInParameter
在接口中CallMetaDataProvider
- 参数:
parameterName
- the name of the parametermeta
- meta-data used for this call- 返回:
- the configured SqlParameter
getUserName
public String getUserName()
从接口复制的说明:CallMetaDataProvider
Get the name of the current user. Useful for meta-data lookups etc.- 指定者:
getUserName
在接口中CallMetaDataProvider
- 返回:
- current user name from database connection
isReturnResultSetSupported
public boolean isReturnResultSetSupported()
从接口复制的说明:CallMetaDataProvider
Does this database support returning ResultSets that should be retrieved with the JDBC call:Statement.getResultSet()
?
isRefCursorSupported
public boolean isRefCursorSupported()
从接口复制的说明:CallMetaDataProvider
Does this database support returning ResultSets as ref cursors to be retrieved withCallableStatement.getObject(int)
for the specified column.- 指定者:
isRefCursorSupported
在接口中CallMetaDataProvider
getRefCursorSqlType
public int getRefCursorSqlType()
从接口复制的说明:CallMetaDataProvider
Get theTypes
type for columns that return ResultSets as ref cursors if this feature is supported.- 指定者:
getRefCursorSqlType
在接口中CallMetaDataProvider
isProcedureColumnMetaDataUsed
public boolean isProcedureColumnMetaDataUsed()
从接口复制的说明:CallMetaDataProvider
Are we using the meta-data for the procedure columns?
setSupportsCatalogsInProcedureCalls
protected void setSupportsCatalogsInProcedureCalls(boolean supportsCatalogsInProcedureCalls)
Specify whether the database supports the use of catalog name in procedure calls.
isSupportsCatalogsInProcedureCalls
public boolean isSupportsCatalogsInProcedureCalls()
Does the database support the use of catalog name in procedure calls?
setSupportsSchemasInProcedureCalls
protected void setSupportsSchemasInProcedureCalls(boolean supportsSchemasInProcedureCalls)
Specify whether the database supports the use of schema name in procedure calls.
isSupportsSchemasInProcedureCalls
public boolean isSupportsSchemasInProcedureCalls()
Does the database support the use of schema name in procedure calls?
setStoresUpperCaseIdentifiers
protected void setStoresUpperCaseIdentifiers(boolean storesUpperCaseIdentifiers)
Specify whether the database uses upper case for identifiers.
isStoresUpperCaseIdentifiers
protected boolean isStoresUpperCaseIdentifiers()
Does the database use upper case for identifiers?
setStoresLowerCaseIdentifiers
protected void setStoresLowerCaseIdentifiers(boolean storesLowerCaseIdentifiers)
Specify whether the database uses lower case for identifiers.
isStoresLowerCaseIdentifiers
protected boolean isStoresLowerCaseIdentifiers()
Does the database use lower case for identifiers?