org.springframework.jdbc.support

Interface DatabaseMetaDataCallback

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


    @FunctionalInterface
    public interface DatabaseMetaDataCallback
    A callback interface used by the JdbcUtils class. Implementations of this interface perform the actual work of extracting database meta-data, but don't need to worry about exception handling. SQLExceptions will be caught and handled correctly by the JdbcUtils class.
    Author:
    Thomas Risberg
    See Also:
    JdbcUtils.extractDatabaseMetaData(javax.sql.DataSource, org.springframework.jdbc.support.DatabaseMetaDataCallback)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.Object processMetaData(java.sql.DatabaseMetaData dbmd)
      Implementations must implement this method to process the meta-data passed in.
    • Method Detail

      • processMetaData

        java.lang.Object processMetaData(java.sql.DatabaseMetaData dbmd)
                                  throws java.sql.SQLException,
                                         MetaDataAccessException
        Implementations must implement this method to process the meta-data passed in. Exactly what the implementation chooses to do is up to it.
        Parameters:
        dbmd - the DatabaseMetaData to process
        Returns:
        a result object extracted from the meta-data (can be an arbitrary object, as needed by the implementation)
        Throws:
        java.sql.SQLException - if a SQLException is encountered getting column values (that is, there's no need to catch SQLException)
        MetaDataAccessException - in case of other failures while extracting meta-data (for example, reflection failure)