public class BambooHibernateUtils extends Object
Modifier and Type | Field and Description |
---|---|
static AtomicInteger |
counter |
Modifier and Type | Method and Description |
---|---|
static <T> T |
createObjectWithId(Class<T> aClass,
long id) |
static void |
disableSqlLogging()
For debugging only
|
static void |
enableSqlLogging()
For debugging only
|
static int |
getConcurrentPoolSize(com.atlassian.config.db.HibernateConfig hibernateConfig)
Tries to get the maximum # of connections available in the connection pool and returns the lower of that and the
total number of processors available
|
static int |
getMaxConnectionPoolSize(com.atlassian.config.db.HibernateConfig hibernateConfig)
Tries to get the maximum # of connections available in the connection pool and returns the lower of that and the
total number of processors available
|
static List |
listWithSqlLogged(org.hibernate.Criteria criteria,
String message)
For debugging only
|
static org.hibernate.Session |
timed(org.hibernate.Session session) |
static <T> T |
timed(T objectToTime) |
static <T> T |
withSqlLogged(Callable<T> callable,
String message)
For debugging only
|
public static final AtomicInteger counter
public static void enableSqlLogging()
public static void disableSqlLogging()
public static <T> T withSqlLogged(@NotNull Callable<T> callable, @Nullable String message) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public static List listWithSqlLogged(@NotNull org.hibernate.Criteria criteria, @Nullable String message) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public static int getMaxConnectionPoolSize(@NotNull com.atlassian.config.db.HibernateConfig hibernateConfig)
hibernateConfig
- public static int getConcurrentPoolSize(@NotNull com.atlassian.config.db.HibernateConfig hibernateConfig)
hibernateConfig
- public static <T> T createObjectWithId(Class<T> aClass, long id)
public static <T> T timed(T objectToTime)
public static org.hibernate.Session timed(org.hibernate.Session session)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.