Package de.hybris.platform.azure.dtu
Interface DatabaseAccessService
- All Known Implementing Classes:
DefaultDatabaseAccessService
public interface DatabaseAccessService
Provides functionality to check the database.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckIfTableExists(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String schemaName, String tableName) Checks for existence of desired table within the given database schema.booleancheckPermission(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String permission) Checks for a permission for the securable class: Database.booleanCheck 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-JdbcTemplateschemaName- The name of the schematableName- 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-JdbcTemplatepermission- 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.
-