Package de.xima.fc.persistence.impl
Class DatabaseUtil
- java.lang.Object
-
- de.xima.fc.persistence.impl.DatabaseUtil
-
public final class DatabaseUtil extends Object
- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckTableExists(Connection connection, String tableName)Checks if a table with the given name exists in the database connected via the provided connection.static booleanisEncryptedAttribute(javax.persistence.EntityManagerFactory factory, javax.persistence.metamodel.EntityType<?> entityType, javax.persistence.metamodel.Attribute<?,?> attribute)static booleanisEncryptedType(javax.persistence.EntityManagerFactory factory, org.hibernate.type.Type type)
-
-
-
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 databasetableName- 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)
-
-