Package com.atlassian.bamboo.quickfilter
Interface QuickFilterDao
- All Superinterfaces:
BambooObjectDao<QuickFilter>
- All Known Implementing Classes:
QuickFilterHibernateDao
DAO for operating on
quick filters
.
Methods from this DAO are not thread safe. Especially, mutative methods should not be called concurrently as multiple
update operations may be executed for each write.
External locking should be implemented on upper level, preferably in QuickFilterManager
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(@NotNull QuickFilter quickFilter) Creates a new quick filter.@NotNull List<QuickFilter>
findAll()
Returns all quick filters ordered by theirposition
.@Nullable QuickFilter
findById
(long id) @Nullable QuickFilter
findByName
(@NotNull String name) void
save
(@NotNull QuickFilter quickFilter) Deprecated.<E extends QuickFilter>
voidsaveAll
(@NotNull Collection<E> entities) Deprecated.Unsupported operation - usecreate(QuickFilter)
orupdate(QuickFilter, int)
instead.long
scrollQuickFiltersForExport
(Consumer<QuickFilter> exportXmlConsumer) Scroll through all QuickFilter records and pass them to consumervoid
update
(@NotNull QuickFilter quickFilter, int previousPosition) Updates a quick filter.Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge
-
Method Details
-
findById
-
findByName
-
findAll
Returns all quick filters ordered by theirposition
.- Returns:
- ordered list of quick filters
-
save
Deprecated.Unsupported operation - usecreate(QuickFilter)
orupdate(QuickFilter, int)
instead.Unsupported operation, guaranteed to throw exception on use. Methodscreate(QuickFilter)
orupdate(QuickFilter, int)
should be used instead, to maintain database integrity related to quick filter positions.- Specified by:
save
in interfaceBambooObjectDao<QuickFilter>
- Parameters:
quickFilter
- quick filter to save- Throws:
UnsupportedOperationException
- always thrown
-
saveAll
Deprecated.Unsupported operation - usecreate(QuickFilter)
orupdate(QuickFilter, int)
instead.Unsupported operation, guaranteed to throw exception on use. Methodscreate(QuickFilter)
orupdate(QuickFilter, int)
should be used instead, operating on singular quick filters, to maintain database integrity related to quick filter positions.- Specified by:
saveAll
in interfaceBambooObjectDao<QuickFilter>
- Parameters:
entities
- entities to be saved to database- Throws:
UnsupportedOperationException
- always thrown
-
create
Creates a new quick filter. This method must be used instead of directly callingsave(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.- Parameters:
quickFilter
- entity to create, with or without defined position.
-
update
Updates a quick filter. This method must be used instead of directly callingsave(QuickFilter)
to maintain database integrity related to quick filter positions. After the update, other persisted quick filters will be repositioned if necessary.- Parameters:
quickFilter
- entity to updatepreviousPosition
- previous position of the quick filter
-
scrollQuickFiltersForExport
Scroll through all QuickFilter records and pass them to consumer
-
create(QuickFilter)
orupdate(QuickFilter, int)
instead.