public final class DbUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DbUtils.StatementCallback |
static class |
DbUtils.UpdateCallback |
| Constructor and Description |
|---|
DbUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
checkSqlExecuted(EntityManager em,
Callable<T> callable) |
static <E extends RawEntity<?>> |
checkSqlExecutedWhenSaving(EntityManager em,
E entity) |
static <T> T |
checkSqlNotExecuted(EntityManager em,
Callable<T> callable) |
static void |
executeStatement(EntityManager em,
String sql,
DbUtils.StatementCallback callback) |
static void |
executeUpdate(EntityManager em,
String sql,
DbUtils.UpdateCallback callback) |
static boolean |
isHsql(EntityManager em) |
static boolean |
isNuoDB(EntityManager em) |
static boolean |
isOracle(EntityManager em) |
public static boolean isOracle(EntityManager em)
public static boolean isHsql(EntityManager em)
public static boolean isNuoDB(EntityManager em)
public static <T> T checkSqlExecuted(EntityManager em, Callable<T> callable) throws Exception
Exceptionpublic static <T> T checkSqlNotExecuted(EntityManager em, Callable<T> callable) throws Exception
Exceptionpublic static <E extends RawEntity<?>> E checkSqlExecutedWhenSaving(EntityManager em, E entity) throws Exception
Exceptionpublic static void executeUpdate(EntityManager em, String sql, DbUtils.UpdateCallback callback) throws Exception
Exceptionpublic static void executeStatement(EntityManager em, String sql, DbUtils.StatementCallback callback) throws Exception
ExceptionCopyright © 2007-2016. All Rights Reserved.