Class PostgresCallMetaDataProvider
- java.lang.Object
- org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider
- org.springframework.jdbc.core.metadata.PostgresCallMetaDataProvider
- All Implemented Interfaces:
CallMetaDataProvider
public class PostgresCallMetaDataProvider extends GenericCallMetaDataProvider
Postgres-specific implementation for theCallMetaDataProvider
interface. This class is intended for internal use by the Simple JDBC classes.- Since:
- 2.5
- Author:
- Thomas Risberg
Field Summary
Fields inherited from class org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider
logger
Constructor Summary
Constructors Constructor Description PostgresCallMetaDataProvider(DatabaseMetaData databaseMetaData)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
byPassReturnParameter(String parameterName)
Should we bypass the return parameter with the specified name.SqlParameter
createDefaultOutParameter(String parameterName, CallParameterMetaData meta)
Create a default out parameter based on the provided meta-data.int
getRefCursorSqlType()
Get theTypes
type for columns that return ResultSets as ref cursors if this feature is supported.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()
?String
metaDataSchemaNameToUse(String schemaName)
Provide any modification of the schema name passed in to match the meta-data currently used.Methods inherited from class org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider
catalogNameToUse, createDefaultInOutParameter, createDefaultInParameter, getCallParameterMetaData, getUserName, initializeWithMetaData, initializeWithProcedureColumnMetaData, isProcedureColumnMetaDataUsed, isStoresLowerCaseIdentifiers, isStoresUpperCaseIdentifiers, isSupportsCatalogsInProcedureCalls, isSupportsSchemasInProcedureCalls, metaDataCatalogNameToUse, parameterNameToUse, procedureNameToUse, schemaNameToUse, setStoresLowerCaseIdentifiers, setStoresUpperCaseIdentifiers, setSupportsCatalogsInProcedureCalls, setSupportsSchemasInProcedureCalls
Constructor Detail
PostgresCallMetaDataProvider
public PostgresCallMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException
- Throws:
SQLException
Method Detail
isReturnResultSetSupported
public boolean isReturnResultSetSupported()
Description copied from interface:CallMetaDataProvider
Does this database support returning ResultSets that should be retrieved with the JDBC call:Statement.getResultSet()
?- Specified by:
isReturnResultSetSupported
in interfaceCallMetaDataProvider
- Overrides:
isReturnResultSetSupported
in classGenericCallMetaDataProvider
isRefCursorSupported
public boolean isRefCursorSupported()
Description copied from interface:CallMetaDataProvider
Does this database support returning ResultSets as ref cursors to be retrieved withCallableStatement.getObject(int)
for the specified column.- Specified by:
isRefCursorSupported
in interfaceCallMetaDataProvider
- Overrides:
isRefCursorSupported
in classGenericCallMetaDataProvider
getRefCursorSqlType
public int getRefCursorSqlType()
Description copied from interface:CallMetaDataProvider
Get theTypes
type for columns that return ResultSets as ref cursors if this feature is supported.- Specified by:
getRefCursorSqlType
in interfaceCallMetaDataProvider
- Overrides:
getRefCursorSqlType
in classGenericCallMetaDataProvider
metaDataSchemaNameToUse
public String metaDataSchemaNameToUse(String schemaName)
Description copied from interface: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.- Specified by:
metaDataSchemaNameToUse
in interfaceCallMetaDataProvider
- Overrides:
metaDataSchemaNameToUse
in classGenericCallMetaDataProvider
createDefaultOutParameter
public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta)
Description copied from interface:CallMetaDataProvider
Create a default out parameter based on the provided meta-data. This is used when no explicit parameter declaration has been made.- Specified by:
createDefaultOutParameter
in interfaceCallMetaDataProvider
- Overrides:
createDefaultOutParameter
in classGenericCallMetaDataProvider
- Parameters:
parameterName
- the name of the parametermeta
- meta-data used for this call- Returns:
- the configured SqlOutParameter
byPassReturnParameter
public boolean byPassReturnParameter(String parameterName)
Description copied from interface: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.- Specified by:
byPassReturnParameter
in interfaceCallMetaDataProvider
- Overrides:
byPassReturnParameter
in classGenericCallMetaDataProvider