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 void
execute
(Connection connection) Default implementation that obtains metadata from the connection and passes it to theexecute(DatabaseMetaData)
method.void
execute
(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:
execute
in 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.
-