Package com.atlassian.jira.issue.search
Interface SearchRequestStore
- All Known Implementing Classes:
CachingSearchRequestStore,OfBizSearchRequestStore
public interface SearchRequestStore
Store used for CRUD of SearchRequests
- Since:
- v3.13
-
Method Summary
Modifier and TypeMethodDescriptionadjustFavouriteCount(Long searchRequestId, int incrementValue) Updates the favourite count of the SearchRequest in the database.create(SearchRequest request) Takes aSearchRequest, user, name of search request and description and persists the XML representation of the SearchRequest object to the database along with the rest of the detailsvoidRemoves the SearchRequest GenericValue from the database based on its idfindByNameIgnoreCase(String name) Find search requests matching the given name.get(SharedEntityAccessor.RetrievalDescriptor descriptor) Get aEnclosedIterableof SearchRequests for the specified List of ids.getAll()Get aEnclosedIterableof all SearchRequests in the database.Get aEnclosedIterableof all IndexableSharedEntities representing SearchRequests in the database.Retrieves a collection of SearchRequest objects that a user created.getAllOwnedSearchRequests(String userKey) Retrieves a collection of SearchRequest objects that a user created.getRequestByAuthorAndName(ApplicationUser author, String name) Find a search request given the author and the request name.getSearchRequest(Long id) Return the search request as stored in the databasegetSearchRequests(com.atlassian.crowd.embedded.api.Group group) Get allsearch requestsassociated with a givenGroup.getSearchRequests(Project project) Get allsearch requestsassociate with a givenProject.update(SearchRequest request) Updates an existing search request in the database.voidvisitAll(Visitor<SearchRequestEntity> visitor)
-
Method Details
-
getAll
EnclosedIterable<SearchRequest> getAll()Get aEnclosedIterableof all SearchRequests in the database.- Returns:
- CloseableIterable that contains reference to all SearchRequests.
-
getAllOwnedSearchRequests
Retrieves a collection of SearchRequest objects that a user created.- Parameters:
user- The user who created the SearchRequests- Returns:
- Collection of all
SearchRequestthat user created.
-
getAllOwnedSearchRequests
Retrieves a collection of SearchRequest objects that a user created.- Parameters:
userKey- The key of the user who created the SearchRequests- Returns:
- Collection of all
SearchRequestthat user created.
-
getRequestByAuthorAndName
Find a search request given the author and the request name.- Parameters:
author- Author of the SearchRequestname- Name of the SearchRequest- Returns:
- The SearchRequest, or null if there is no matching request
-
getSearchRequest
Return the search request as stored in the database- Parameters:
id- Id of the SearchRequest- Returns:
- The SearchRequest, or null if the request id does not exist
-
create
Takes aSearchRequest, user, name of search request and description and persists the XML representation of the SearchRequest object to the database along with the rest of the details- Parameters:
request- SearchResult that should be persisted- Returns:
- SearchRequest object that was persisted to the database
-
update
Updates an existing search request in the database.- Parameters:
request- the request to persist.- Returns:
- A
SearchRequestthat was persisted to the database
-
adjustFavouriteCount
Updates the favourite count of the SearchRequest in the database.- Parameters:
searchRequestId- the identifier of the search request to decrease.incrementValue- the value to increase the favourite count by. Can be a number invalid input: '<' 0 to decrease the favourite count.- Returns:
- the updated
SearchRequest.
-
delete
Removes the SearchRequest GenericValue from the database based on its id- Parameters:
id- of the search request to be removed from storage
-
getSearchRequests
Get allsearch requestsassociate with a givenProject.- Parameters:
project- Project that is associated with the filters- Returns:
- Collection of
SearchRequestthat have their project set to the given project
-
findByNameIgnoreCase
Find search requests matching the given name.- Parameters:
name- Name of the SearchRequest- Returns:
- List of all search requests matching the given name. Never null.
-
getSearchRequests
Get allsearch requestsassociated with a givenGroup.- Parameters:
group- the group that is associated with the filters- Returns:
- Collection of
SearchRequestthat have their project set to the given project
-
visitAll