Class QuickSearchItemDaoImpl
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
-
- com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<QuickSearchItem>
-
- com.atlassian.bamboo.index.quicksearch.QuickSearchItemDaoImpl
-
- All Implemented Interfaces:
QuickSearchItemDao
,BambooObjectDao<QuickSearchItem>
,org.springframework.beans.factory.InitializingBean
public class QuickSearchItemDaoImpl extends BambooHibernateObjectDao<QuickSearchItem> implements QuickSearchItemDao
-
-
Constructor Summary
Constructors Constructor Description QuickSearchItemDaoImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deIndexAll()
Clears entire index table.void
deIndexItem(QuickSearchItem.Type type, long id)
Remove all search terms for a specified entity.@NotNull List<QuickSearchItem>
findMatchingItems(@NotNull Set<String> searchTerms, int offset, int pageSize)
@NotNull List<QuickSearchItem>
findMatchingItems(@NotNull Set<String> searchTerms, QuickSearchItem.Type type, int offset, int pageSize)
void
indexItems(@NotNull List<QuickSearchItem> items)
Insert provided search terms.boolean
reIndexItem(QuickSearchItem.Type type, long id, long aclId, @NotNull Iterable<String> searchTerms)
Update search terms for an entity.boolean
reIndexItem(QuickSearchItem.Type type, long id, @NotNull Iterable<String> searchTerms)
Update search terms for an entity.-
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
-
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
-
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
reIndexItem
public boolean reIndexItem(@NotNull QuickSearchItem.Type type, long id, @NotNull @NotNull Iterable<String> searchTerms)
Description copied from interface:QuickSearchItemDao
Update search terms for an entity. The method removes all pre-existing search items that are not listed in the 'searchTerms' argument. The method does not perform any DB operations if the state of the DB already matches the arguments.- Specified by:
reIndexItem
in interfaceQuickSearchItemDao
- Returns:
- true iff any changes has been performed.
-
reIndexItem
public boolean reIndexItem(@NotNull QuickSearchItem.Type type, long id, long aclId, @NotNull @NotNull Iterable<String> searchTerms)
Description copied from interface:QuickSearchItemDao
Update search terms for an entity. The method removes all pre-existing search items that are not listed in the 'searchTerms' argument. The method does not perform any DB operations if the state of the DB already matches the arguments.- Specified by:
reIndexItem
in interfaceQuickSearchItemDao
- Returns:
- true iff any changes has been performed.
-
deIndexItem
public void deIndexItem(@NotNull QuickSearchItem.Type type, long id)
Description copied from interface:QuickSearchItemDao
Remove all search terms for a specified entity.- Specified by:
deIndexItem
in interfaceQuickSearchItemDao
-
findMatchingItems
@NotNull public @NotNull List<QuickSearchItem> findMatchingItems(@NotNull @NotNull Set<String> searchTerms, int offset, int pageSize)
- Specified by:
findMatchingItems
in interfaceQuickSearchItemDao
-
findMatchingItems
@NotNull public @NotNull List<QuickSearchItem> findMatchingItems(@NotNull @NotNull Set<String> searchTerms, @Nullable QuickSearchItem.Type type, int offset, int pageSize)
- Specified by:
findMatchingItems
in interfaceQuickSearchItemDao
-
deIndexAll
public void deIndexAll()
Description copied from interface:QuickSearchItemDao
Clears entire index table.- Specified by:
deIndexAll
in interfaceQuickSearchItemDao
-
indexItems
public void indexItems(@NotNull @NotNull List<QuickSearchItem> items)
Description copied from interface:QuickSearchItemDao
Insert provided search terms. This method does not check if any matching items already exist.- Specified by:
indexItems
in interfaceQuickSearchItemDao
-
-