public abstract class BambooHibernateObjectDao extends org.springframework.orm.hibernate5.support.HibernateDaoSupport implements BambooObjectDao
Constructor and Description |
---|
BambooHibernateObjectDao() |
Modifier and Type | Method and Description |
---|---|
List |
findAll()
Find all objects of the class provided by getPersistentClass()
|
List |
findAllSorted(String sortField) |
BambooObject |
findById(long id)
Gets the object from its id
|
<T> T |
findById(long id,
Class<T> persistentClass) |
void |
refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
Update the stat of an object based on the current state of the database.
|
void |
remove(com.atlassian.core.bean.EntityObject objectToRemove)
Remove an object from the database
|
void |
replicate(Object objectToReplicate) |
void |
save(com.atlassian.core.bean.EntityObject objectToSave)
Save an object.
|
void |
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Save the object without updateModificationData being called.
|
void |
setIndexer(com.atlassian.bonnie.Indexer indexer) |
protected void |
updateModificationData(com.atlassian.core.bean.EntityObject objectToSave)
Perform any modifications that need to be done to an object every time it is
saved.
|
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
public BambooObject findById(long id)
BambooObjectDao
findById
in interface BambooObjectDao
BambooObject
. null if not found.public <T> T findById(long id, Class<T> persistentClass)
public void save(com.atlassian.core.bean.EntityObject objectToSave)
save
in interface bucket.core.persistence.ObjectDao
objectToSave
- protected void updateModificationData(com.atlassian.core.bean.EntityObject objectToSave)
objectToSave
- the object that is about to be savedpublic void replicate(Object objectToReplicate)
replicate
in interface bucket.core.persistence.ObjectDao
public void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
saveRaw
in interface bucket.core.persistence.ObjectDao
objectToSave
- object to savepublic void refresh(com.atlassian.core.bean.EntityObject objectToRefresh)
refresh
in interface bucket.core.persistence.ObjectDao
objectToRefresh
- the object to refreshpublic void remove(com.atlassian.core.bean.EntityObject objectToRemove)
remove
in interface bucket.core.persistence.ObjectDao
objectToRemove
- the object to removepublic List findAll()
findAll
in interface bucket.core.persistence.ObjectDao
public List findAllSorted(@Nullable String sortField)
findAllSorted
in interface bucket.core.persistence.ObjectDao
public void setIndexer(com.atlassian.bonnie.Indexer indexer)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.