Package com.atlassian.bamboo.quickfilter
Interface QuickFilterDao
-
- All Superinterfaces:
BambooObjectDao<QuickFilter>
- All Known Implementing Classes:
QuickFilterHibernateDao
@Internal @NotThreadSafe public interface QuickFilterDao extends BambooObjectDao<QuickFilter>
DAO for operating onquick 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 inQuickFilterManager
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
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.Unsupported operation - usecreate(QuickFilter)
orupdate(QuickFilter, int)
instead.<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 Detail
-
findById
@Nullable @Nullable QuickFilter findById(long id)
-
findByName
@Nullable @Nullable QuickFilter findByName(@NotNull @NotNull String name)
-
findAll
@NotNull @NotNull List<QuickFilter> findAll()
Returns all quick filters ordered by theirposition
.- Returns:
- ordered list of quick filters
-
save
@Deprecated void save(@NotNull @NotNull QuickFilter quickFilter)
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 <E extends QuickFilter> void saveAll(@NotNull @NotNull Collection<E> entities)
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
void create(@NotNull @NotNull QuickFilter quickFilter)
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
void update(@NotNull @NotNull QuickFilter quickFilter, int previousPosition)
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
long scrollQuickFiltersForExport(Consumer<QuickFilter> exportXmlConsumer)
Scroll through all QuickFilter records and pass them to consumer
-
-