|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.persistence3.HibernateDaoUtils
public class HibernateDaoUtils
A variety of methods useful when interacting with DAO objects.
Method Summary | ||
---|---|---|
static void |
bindQueryParameters(org.hibernate.Query query,
Map<String,Object> params)
Binds named parameters to the Query . |
|
static
|
execute(org.springframework.orm.hibernate3.support.HibernateDaoSupport dao,
org.springframework.orm.hibernate3.HibernateCallback action)
Deprecated. since 5.9, use HibernateTemplate.execute(HibernateCallback) |
|
static boolean |
exists(org.springframework.orm.hibernate3.support.HibernateDaoSupport dao,
org.springframework.orm.hibernate3.HibernateCallback action)
|
|
static void |
save(org.springframework.orm.hibernate3.HibernateOperations hibernateOperations,
Object object,
Serializable id)
Deprecated. since 5.8 |
|
static void |
save(org.hibernate.Session session,
Object object,
Serializable id)
Deprecated. since 5.8 |
|
static void |
saveAll(org.springframework.orm.hibernate3.support.HibernateDaoSupport dao,
Collection<? extends BambooObject> entities)
|
|
static void |
saveOrUpdate(org.springframework.orm.hibernate3.support.HibernateDaoSupport dao,
BambooObject entity)
|
|
static void |
saveOrUpdateAll(org.springframework.orm.hibernate3.HibernateOperations hibernateTemplate,
Iterable<?> entities)
|
|
static
|
saveOrUpdateFunction(org.springframework.orm.hibernate3.HibernateTemplate hibernateTemplate)
|
|
static void |
updateTimestamp(BambooObject bambooObject)
|
|
static
|
updateTimestampFunction()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void updateTimestamp(BambooObject bambooObject)
public static void saveOrUpdate(@NotNull org.springframework.orm.hibernate3.support.HibernateDaoSupport dao, BambooObject entity)
public static void saveAll(@NotNull org.springframework.orm.hibernate3.support.HibernateDaoSupport dao, Collection<? extends BambooObject> entities)
public static void saveOrUpdateAll(org.springframework.orm.hibernate3.HibernateOperations hibernateTemplate, Iterable<?> entities) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
@Deprecated @Nullable public static <E extends BambooObject> E execute(@NotNull org.springframework.orm.hibernate3.support.HibernateDaoSupport dao, @NotNull org.springframework.orm.hibernate3.HibernateCallback action) throws org.springframework.dao.DataAccessException
HibernateTemplate.execute(HibernateCallback)
org.springframework.dao.DataAccessException
public static boolean exists(@NotNull org.springframework.orm.hibernate3.support.HibernateDaoSupport dao, @NotNull org.springframework.orm.hibernate3.HibernateCallback action) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
@Deprecated public static void save(org.springframework.orm.hibernate3.HibernateOperations hibernateOperations, Object object, Serializable id)
@Deprecated public static void save(org.hibernate.Session session, Object object, Serializable id)
public static <T extends BambooObject> com.google.common.base.Function<T,T> saveOrUpdateFunction(@NotNull org.springframework.orm.hibernate3.HibernateTemplate hibernateTemplate)
public static <T extends BambooObject> com.google.common.base.Function<T,T> updateTimestampFunction()
public static void bindQueryParameters(@NotNull org.hibernate.Query query, @NotNull Map<String,Object> params) throws org.hibernate.HibernateException
Query
. For each Map.Entry
, the key would be the parameter name and
the value would be the value to bind.
If the value is a Collection
, it will be bound using Query.setParameterList(String, Collection)
.
If the value is a Date
, it will be bound using Query.setDate(String, Date)
.
In any other case Query.setParameter(String, Object)
will be used.
query
- the queryparams
- params to bind (values mapped by parameter names)
org.hibernate.HibernateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |