@NotThreadSafe public class QuickFilterHibernateDao extends BambooHibernateObjectDao<QuickFilter> implements QuickFilterDao
Constructor and Description |
---|
QuickFilterHibernateDao() |
Modifier and Type | Method and Description |
---|---|
void |
create(QuickFilter quickFilter)
Creates a new quick filter.
|
void |
delete(QuickFilter quickFilter)
Removes the given entity from the database
|
List<QuickFilter> |
findAll()
Returns all quick filters ordered by their
position . |
QuickFilter |
findById(long id) |
QuickFilter |
findByName(String name) |
void |
save(QuickFilter quickFilter)
Saves the given entity.
|
<E extends QuickFilter> |
saveAll(Collection<E> entities)
Save all entities in the collection to the database
|
void |
update(QuickFilter quickFilter,
int previousPosition)
Updates a quick filter.
|
countAll, countWithRestriction, deleteAll, executeCountQuery, findAll, findById, merge
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countAll, countWithRestriction, deleteAll, findAll, findById, merge
@Nullable public QuickFilter findById(long id)
findById
in interface QuickFilterDao
@Nullable public QuickFilter findByName(@NotNull String name)
findByName
in interface QuickFilterDao
@NotNull public List<QuickFilter> findAll()
QuickFilterDao
position
.findAll
in interface QuickFilterDao
public void save(@NotNull QuickFilter quickFilter)
BambooObjectDao
EntityObject
this method will:
- update EntityObject.getLastModificationDate()
- set EntityObject.getCreationDate()
if the object has not been savedsave
in interface BambooObjectDao<QuickFilter>
save
in interface QuickFilterDao
save
in class BambooHibernateObjectDao<QuickFilter>
quickFilter
- entity to be savedpublic <E extends QuickFilter> void saveAll(@NotNull Collection<E> entities)
BambooObjectDao
saveAll
in interface BambooObjectDao<QuickFilter>
saveAll
in interface QuickFilterDao
saveAll
in class BambooHibernateObjectDao<QuickFilter>
entities
- entities to be saved to databasepublic void create(@NotNull QuickFilter quickFilter)
QuickFilterDao
QuickFilterDao.save(QuickFilter)
to maintain database integrity
related to quick filter positions.
If the quick filter doesn't have a position defined, it will be assigned one. If instead it has a position
defined, then other persisted quick filters will be repositioned accordingly.create
in interface QuickFilterDao
quickFilter
- entity to create, with or without defined position.public void update(@NotNull QuickFilter quickFilter, int previousPosition)
QuickFilterDao
QuickFilterDao.save(QuickFilter)
to maintain database integrity
related to quick filter positions.
After the update, other persisted quick filters will be repositioned if necessary.update
in interface QuickFilterDao
quickFilter
- entity to updatepreviousPosition
- previous position of the quick filterpublic void delete(@NotNull QuickFilter quickFilter)
BambooObjectDao
delete
in interface BambooObjectDao<QuickFilter>
delete
in class BambooHibernateObjectDao<QuickFilter>
quickFilter
- entity to be removedCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.