|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.dao.support.DaoSupport org.springframework.orm.hibernate.support.HibernateDaoSupport com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<T>
public abstract class BambooHibernateObjectDao<T extends BambooObject>
Field Summary |
---|
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
BambooHibernateObjectDao()
|
Method Summary | ||
---|---|---|
void |
delete(T t)
Removes the given entity from the database |
|
|
deleteAll(java.util.Collection<E> entities)
Remove all elements in the collection from database |
|
long |
executeReturnLong(org.springframework.orm.hibernate.HibernateCallback callback)
Execute a HibernateCallback and return Long |
|
|
findAll(java.lang.Class<E> aClass)
Finds all the entities 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. |
|
|
saveAll(java.util.Collection<E> entities)
Save all entities in the collection to the database |
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 |
Constructor Detail |
---|
public BambooHibernateObjectDao()
Method Detail |
---|
public void save(@NotNull T t)
BambooObjectDao
BambooEntityObject
this method will:
- update EntityObject.getLastModificationDate()
- set EntityObject.getCreationDate()
if the object has not been saved
save
in interface BambooObjectDao<T extends BambooObject>
t
- entity to be savedpublic <E extends T> void saveAll(@NotNull java.util.Collection<E> entities)
BambooObjectDao
saveAll
in interface BambooObjectDao<T extends BambooObject>
entities
- entities to be saved to databasepublic void delete(@NotNull T t)
BambooObjectDao
delete
in interface BambooObjectDao<T extends BambooObject>
t
- entity to be removedpublic <E extends T> void deleteAll(@NotNull java.util.Collection<E> entities)
BambooObjectDao
deleteAll
in interface BambooObjectDao<T extends BambooObject>
entities
- elements to be removed from database@NotNull public <E extends T> java.util.Collection<E> findAll(@NotNull java.lang.Class<E> aClass)
BambooObjectDao
Class
findAll
in interface BambooObjectDao<T extends BambooObject>
aClass
- class of entity
@Nullable public <E extends T> E findById(long id, @NotNull java.lang.Class<E> aClass)
BambooObjectDao
findById
in interface BambooObjectDao<T extends BambooObject>
id
- id of entityaClass
- class of entity
public long executeReturnLong(@NotNull org.springframework.orm.hibernate.HibernateCallback callback)
BambooObjectDao
HibernateCallback
and return Long
executeReturnLong
in interface BambooObjectDao<T extends BambooObject>
callback
- callback to be executed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |