Class DatabaseUtil


  • public final class DatabaseUtil
    extends Object
    Since:
    8.5.0
    Author:
    Norman Lorenz
    • Method Detail

      • checkTableExists

        public static boolean checkTableExists​(Connection connection,
                                               String tableName)
        Checks if a table with the given name exists in the database connected via the provided connection.
        Parameters:
        connection - the JDBC connection to the database
        tableName - the name of the table to check for existence
        Returns:
        true if the table exists, false otherwise
        Throws:
        IllegalArgumentException - if tableName is blank
      • isEncryptedAttribute

        public static boolean isEncryptedAttribute​(javax.persistence.EntityManagerFactory factory,
                                                   javax.persistence.metamodel.EntityType<?> entityType,
                                                   javax.persistence.metamodel.Attribute<?,​?> attribute)
      • isEncryptedType

        public static boolean isEncryptedType​(javax.persistence.EntityManagerFactory factory,
                                              org.hibernate.type.Type type)