public class GenericCallMetaDataProvider extends Object implements CallMetaDataProvider
CallMetaDataProvider interface.
This class can be extended to provide database specific behavior.| Modifier and Type | Field and Description |
|---|---|
protected static Log |
logger
Logger available to subclasses
|
| Modifier | Constructor and Description |
|---|---|
protected |
GenericCallMetaDataProvider(DatabaseMetaData databaseMetaData)
Constructor used to initialize with provided database meta data.
|
| 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 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 metadata 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.
|
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
|
protected static final Log logger
protected GenericCallMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException
databaseMetaData - meta data to be usedSQLExceptionpublic void initializeWithMetaData(DatabaseMetaData databaseMetaData) throws SQLException
CallMetaDataProviderinitializeWithMetaData in interface CallMetaDataProviderdatabaseMetaData - used to retrieve database specific informationSQLException - in case of initialization failurepublic void initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String procedureName) throws SQLException
CallMetaDataProviderinitializeWithProcedureColumnMetaData in interface CallMetaDataProviderdatabaseMetaData - used to retrieve database specific informationcatalogName - name of catalog to use or nullschemaName - name of schema name to use or nullprocedureName - name of the stored procedureSQLException - in case of initialization failureSimpleJdbcCall.withoutProcedureColumnMetaDataAccess()public List<CallParameterMetaData> getCallParameterMetaData()
CallMetaDataProvidergetCallParameterMetaData in interface CallMetaDataProviderCallParameterMetaDatapublic String procedureNameToUse(String procedureName)
CallMetaDataProviderprocedureNameToUse in interface CallMetaDataProviderpublic String catalogNameToUse(String catalogName)
CallMetaDataProvidercatalogNameToUse in interface CallMetaDataProviderpublic String schemaNameToUse(String schemaName)
CallMetaDataProviderschemaNameToUse in interface CallMetaDataProviderpublic String metaDataCatalogNameToUse(String catalogName)
CallMetaDataProvidermetaDataCatalogNameToUse in interface CallMetaDataProviderpublic String metaDataSchemaNameToUse(String schemaName)
CallMetaDataProvidermetaDataSchemaNameToUse in interface CallMetaDataProviderpublic String parameterNameToUse(String parameterName)
CallMetaDataProviderparameterNameToUse in interface CallMetaDataProviderparameterName - name of the parameter of columnpublic boolean byPassReturnParameter(String parameterName)
CallMetaDataProviderbyPassReturnParameter in interface CallMetaDataProviderpublic SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta)
CallMetaDataProvidercreateDefaultOutParameter in interface CallMetaDataProviderparameterName - the name of the parametermeta - meta data used for this callpublic SqlParameter createDefaultInOutParameter(String parameterName, CallParameterMetaData meta)
CallMetaDataProvidercreateDefaultInOutParameter in interface CallMetaDataProviderparameterName - the name of the parametermeta - meta data used for this callpublic SqlParameter createDefaultInParameter(String parameterName, CallParameterMetaData meta)
CallMetaDataProvidercreateDefaultInParameter in interface CallMetaDataProviderparameterName - the name of the parametermeta - meta data used for this callpublic String getUserName()
CallMetaDataProvidergetUserName in interface CallMetaDataProviderpublic boolean isReturnResultSetSupported()
CallMetaDataProviderStatement.getResultSet()isReturnResultSetSupported in interface CallMetaDataProviderpublic boolean isRefCursorSupported()
CallMetaDataProviderCallableStatement.getObject(int) for the specified column.isRefCursorSupported in interface CallMetaDataProviderpublic int getRefCursorSqlType()
CallMetaDataProviderTypes type for columns that return ResultSets as ref cursors
if this feature is supported.getRefCursorSqlType in interface CallMetaDataProviderpublic boolean isProcedureColumnMetaDataUsed()
CallMetaDataProviderisProcedureColumnMetaDataUsed in interface CallMetaDataProviderprotected void setSupportsCatalogsInProcedureCalls(boolean supportsCatalogsInProcedureCalls)
public boolean isSupportsCatalogsInProcedureCalls()
isSupportsCatalogsInProcedureCalls in interface CallMetaDataProviderprotected void setSupportsSchemasInProcedureCalls(boolean supportsSchemasInProcedureCalls)
public boolean isSupportsSchemasInProcedureCalls()
isSupportsSchemasInProcedureCalls in interface CallMetaDataProviderprotected void setStoresUpperCaseIdentifiers(boolean storesUpperCaseIdentifiers)
protected boolean isStoresUpperCaseIdentifiers()
protected void setStoresLowerCaseIdentifiers(boolean storesLowerCaseIdentifiers)
protected boolean isStoresLowerCaseIdentifiers()