Interface DatabaseAccessService

All Known Implementing Classes:
DefaultDatabaseAccessService

public interface DatabaseAccessService
Provides functionality to check the database.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkIfTableExists(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String schemaName, String tableName)
    Checks for existence of desired table within the given database schema.
    boolean
    checkPermission(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String permission)
    Checks for a permission for the securable class: Database.
    boolean
    Check if the database is azure compatible.
  • Method Details

    • checkIfTableExists

      boolean checkIfTableExists(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String schemaName, String tableName) throws SQLException
      Checks for existence of desired table within the given database schema.
      Parameters:
      jdbcTemplate - JdbcTemplate
      schemaName - The name of the schema
      tableName - The name of the view or table to search for
      Returns:
      True if the table or view exists.
      Throws:
      SQLException
    • checkPermission

      boolean checkPermission(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String permission) throws SQLException
      Checks for a permission for the securable class: Database.
      Parameters:
      jdbcTemplate - JdbcTemplate
      permission - The requested permission e.g. VIEW DATABASE STATE
      Returns:
      TRUE if permission is granted and the user has the access to read this information from the database
      Throws:
      SQLException - on connection error
    • isAzureCompatible

      boolean isAzureCompatible()
      Check if the database is azure compatible.
      Returns:
      TRUE for compatibility.