com.atlassian.bamboo.persistence3
Class BambooHibernateObjectDao<T extends BambooObject>
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<T>
- All Implemented Interfaces:
- BambooObjectDao<T>, org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
- BuildResultsSummaryHibernateDao, ChainStageHibernateDao, PlanHibernateDao
public abstract class BambooHibernateObjectDao<T extends BambooObject>
- extends org.springframework.orm.hibernate.support.HibernateDaoSupport
- implements BambooObjectDao<T>
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Method Summary |
void |
delete(T t)
Removes the given entity from the database |
long |
executeReturnLong(org.springframework.orm.hibernate.HibernateCallback callback)
Excute a HibernateCallback and return Long |
<E extends T>
java.util.Collection<E> |
|
findAll(java.lang.Class<E> aClass)
Finds all the entitites that implement the given Class |
|
findById(long id,
java.lang.Class<E> aClass)
Find an entity by its id |
void |
save(T t)
Saves the given entity. |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BambooHibernateObjectDao
public BambooHibernateObjectDao()
save
public void save(@NotNull
T t)
- Description copied from interface:
BambooObjectDao
- Saves the given entity.
If the entity implementation is an instance of
BambooEntityObject
this method will:
- update EntityObject.getLastModificationDate()
- set EntityObject.getCreationDate()
if the object has not been saved
- Specified by:
save
in interface BambooObjectDao<T extends BambooObject>
delete
public void delete(@NotNull
T t)
- Description copied from interface:
BambooObjectDao
- Removes the given entity from the database
- Specified by:
delete
in interface BambooObjectDao<T extends BambooObject>
findAll
@NotNull
public <E extends T> java.util.Collection<E> findAll(@NotNull
java.lang.Class<E> aClass)
- Description copied from interface:
BambooObjectDao
- Finds all the entitites that implement the given
Class
- Specified by:
findAll
in interface BambooObjectDao<T extends BambooObject>
- Returns:
- entities
findById
public <E extends T> E findById(long id,
java.lang.Class<E> aClass)
- Description copied from interface:
BambooObjectDao
- Find an entity by its id
- Specified by:
findById
in interface BambooObjectDao<T extends BambooObject>
- Returns:
- entity
executeReturnLong
public long executeReturnLong(@NotNull
org.springframework.orm.hibernate.HibernateCallback callback)
- Description copied from interface:
BambooObjectDao
- Excute a
HibernateCallback
and return Long
- Specified by:
executeReturnLong
in interface BambooObjectDao<T extends BambooObject>
- Returns:
- long
Copyright © 2010 Atlassian. All Rights Reserved.