|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider
public class GenericCallMetaDataProvider
Generic implementation for the CallMetaDataProvider
interface.
This class can be extended to provide database specific behavior.
Field Summary | |
---|---|
protected static Log |
logger
Logger available to subclasses |
Constructor Summary | |
---|---|
protected |
GenericCallMetaDataProvider(DatabaseMetaData databaseMetaData)
Constructor used to initialize with provided database meta data. |
Method Summary | |
---|---|
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 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log logger
Constructor Detail |
---|
protected GenericCallMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException
databaseMetaData
- meta data to be used
SQLException
Method Detail |
---|
public void initializeWithMetaData(DatabaseMetaData databaseMetaData) throws SQLException
CallMetaDataProvider
initializeWithMetaData
in interface CallMetaDataProvider
databaseMetaData
- used to retrieve database specific information
SQLException
- in case of initialization failurepublic void initializeWithProcedureColumnMetaData(DatabaseMetaData databaseMetaData, String catalogName, String schemaName, String procedureName) throws SQLException
CallMetaDataProvider
initializeWithProcedureColumnMetaData
in interface CallMetaDataProvider
databaseMetaData
- 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 procedure
SQLException
- in case of initialization failureSimpleJdbcCall.withoutProcedureColumnMetaDataAccess()
public List<CallParameterMetaData> getCallParameterMetaData()
CallMetaDataProvider
getCallParameterMetaData
in interface CallMetaDataProvider
CallParameterMetaData
public String procedureNameToUse(String procedureName)
CallMetaDataProvider
procedureNameToUse
in interface CallMetaDataProvider
public String catalogNameToUse(String catalogName)
CallMetaDataProvider
catalogNameToUse
in interface CallMetaDataProvider
public String schemaNameToUse(String schemaName)
CallMetaDataProvider
schemaNameToUse
in interface CallMetaDataProvider
public String metaDataCatalogNameToUse(String catalogName)
CallMetaDataProvider
metaDataCatalogNameToUse
in interface CallMetaDataProvider
public String metaDataSchemaNameToUse(String schemaName)
CallMetaDataProvider
metaDataSchemaNameToUse
in interface CallMetaDataProvider
public String parameterNameToUse(String parameterName)
CallMetaDataProvider
parameterNameToUse
in interface CallMetaDataProvider
parameterName
- name of the parameter of columnpublic boolean byPassReturnParameter(String parameterName)
CallMetaDataProvider
byPassReturnParameter
in interface CallMetaDataProvider
public SqlParameter createDefaultOutParameter(String parameterName, CallParameterMetaData meta)
CallMetaDataProvider
createDefaultOutParameter
in interface CallMetaDataProvider
parameterName
- the name of the parametermeta
- meta data used for this call
public SqlParameter createDefaultInOutParameter(String parameterName, CallParameterMetaData meta)
CallMetaDataProvider
createDefaultInOutParameter
in interface CallMetaDataProvider
parameterName
- the name of the parametermeta
- meta data used for this call
public SqlParameter createDefaultInParameter(String parameterName, CallParameterMetaData meta)
CallMetaDataProvider
createDefaultInParameter
in interface CallMetaDataProvider
parameterName
- the name of the parametermeta
- meta data used for this call
public String getUserName()
CallMetaDataProvider
getUserName
in interface CallMetaDataProvider
public boolean isReturnResultSetSupported()
CallMetaDataProvider
Statement.getResultSet()
isReturnResultSetSupported
in interface CallMetaDataProvider
public boolean isRefCursorSupported()
CallMetaDataProvider
CallableStatement.getObject(int)
for the specified column.
isRefCursorSupported
in interface CallMetaDataProvider
public int getRefCursorSqlType()
CallMetaDataProvider
Types
type for columns that return resultsets as ref cursors if this feature
is supported.
getRefCursorSqlType
in interface CallMetaDataProvider
public boolean isProcedureColumnMetaDataUsed()
CallMetaDataProvider
isProcedureColumnMetaDataUsed
in interface CallMetaDataProvider
protected void setSupportsCatalogsInProcedureCalls(boolean supportsCatalogsInProcedureCalls)
public boolean isSupportsCatalogsInProcedureCalls()
isSupportsCatalogsInProcedureCalls
in interface CallMetaDataProvider
protected void setSupportsSchemasInProcedureCalls(boolean supportsSchemasInProcedureCalls)
public boolean isSupportsSchemasInProcedureCalls()
isSupportsSchemasInProcedureCalls
in interface CallMetaDataProvider
protected void setStoresUpperCaseIdentifiers(boolean storesUpperCaseIdentifiers)
protected boolean isStoresUpperCaseIdentifiers()
protected void setStoresLowerCaseIdentifiers(boolean storesLowerCaseIdentifiers)
protected boolean isStoresLowerCaseIdentifiers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |