Interface QuickFilterDao

All Superinterfaces:
BambooObjectDao<QuickFilter>
All Known Implementing Classes:
QuickFilterHibernateDao

@Internal @NotThreadSafe public interface QuickFilterDao extends BambooObjectDao<QuickFilter>
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 Details

    • 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 their position.
      Returns:
      ordered list of quick filters
    • save

      @Deprecated void save(@NotNull @NotNull QuickFilter quickFilter)
      Deprecated.
      Unsupported operation - use create(QuickFilter) or update(QuickFilter, int) instead.
      Unsupported operation, guaranteed to throw exception on use. Methods create(QuickFilter) or update(QuickFilter, int) should be used instead, to maintain database integrity related to quick filter positions.
      Specified by:
      save in interface BambooObjectDao<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 - use create(QuickFilter) or update(QuickFilter, int) instead.
      Unsupported operation, guaranteed to throw exception on use. Methods create(QuickFilter) or update(QuickFilter, int) should be used instead, operating on singular quick filters, to maintain database integrity related to quick filter positions.
      Specified by:
      saveAll in interface BambooObjectDao<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 calling 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.
      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 calling save(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 update
      previousPosition - previous position of the quick filter
    • scrollQuickFiltersForExport

      long scrollQuickFiltersForExport(Consumer<QuickFilter> exportXmlConsumer)
      Scroll through all QuickFilter records and pass them to consumer