Interface DatabaseMetaDataCallback
- All Superinterfaces:
ConnectionCallback
Provides a connection callback specifically for database metadata.
This interface safely retrieves the database metadata from a connection
and closes the connection after execution.
- Author:
- jbanes
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidexecute(Connection connection) Default implementation that obtains metadata from the connection and passes it to theexecute(DatabaseMetaData)method.voidexecute(DatabaseMetaData metadata) Executes operations using the database metadata.
-
Method Details
-
execute
Default implementation that obtains metadata from the connection and passes it to theexecute(DatabaseMetaData)method.- Specified by:
executein interfaceConnectionCallback- Parameters:
connection- the JDBC connection to use.- Throws:
SQLException- if a database access error occurs.
-
execute
Executes operations using the database metadata. Implementations should perform their metadata operations within this method/lambda.- Parameters:
metadata- the database metadata object to use.- Throws:
SQLException- if a database access error occurs.
-