Package net.java.ao.test
Class DbUtils
java.lang.Object
net.java.ao.test.DbUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TcheckSqlExecuted(EntityManager em, Callable<T> callable) static <E extends RawEntity<?>>
EcheckSqlExecutedWhenSaving(EntityManager em, E entity) static <T> TcheckSqlNotExecuted(EntityManager em, Callable<T> callable) static voidexecuteStatement(EntityManager em, String sql, DbUtils.StatementCallback callback) static voidexecuteUpdate(EntityManager em, String sql, DbUtils.UpdateCallback callback) static booleanisHsql(EntityManager em, int majorVersion) static booleanisNuoDB(EntityManager em) static boolean
-
Constructor Details
-
DbUtils
public DbUtils()
-
-
Method Details
-
isOracle
-
isHsql
-
isNuoDB
-
checkSqlExecuted
- Throws:
Exception
-
checkSqlNotExecuted
- Throws:
Exception
-
checkSqlExecutedWhenSaving
public static <E extends RawEntity<?>> E checkSqlExecutedWhenSaving(EntityManager em, E entity) throws Exception - Throws:
Exception
-
executeUpdate
public static void executeUpdate(EntityManager em, String sql, DbUtils.UpdateCallback callback) throws Exception - Throws:
Exception
-
executeStatement
public static void executeStatement(EntityManager em, String sql, DbUtils.StatementCallback callback) throws Exception - Throws:
Exception
-