Class DatabaseUtil
java.lang.Object
de.xima.fc.persistence.impl.DatabaseUtil
- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
checkTableExists
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)
-