Package com.atlassian.jira.issue.search
Class OfBizSearchRequestStore
java.lang.Object
com.atlassian.jira.issue.search.OfBizSearchRequestStore
- All Implemented Interfaces:
InitializingComponent,SearchRequestStore
public class OfBizSearchRequestStore
extends Object
implements SearchRequestStore, InitializingComponent
OfBiz implementation of
SearchRequestStore- Since:
- v3.13
-
Constructor Summary
ConstructorsConstructorDescriptionOfBizSearchRequestStore(OfBizDelegator delegator, JqlQueryParser jqlQueryParser, SearchService searchService, UserManager userManager, ApplicationProperties applicationProperties) -
Method Summary
Modifier and TypeMethodDescriptionadjustFavouriteCount(Long searchRequestId, int incrementValue) Updates the favourite count of the SearchRequest in the database.voidCalled after all the beans are constructed and the ApplicationContext is fully populated.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)
-
Constructor Details
-
OfBizSearchRequestStore
public OfBizSearchRequestStore(OfBizDelegator delegator, JqlQueryParser jqlQueryParser, SearchService searchService, UserManager userManager, ApplicationProperties applicationProperties)
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponentCalled after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiationin interfaceInitializingComponent- Throws:
Exception
-
visitAll
- Specified by:
visitAllin interfaceSearchRequestStore
-
getAll
Description copied from interface:SearchRequestStoreGet aEnclosedIterableof all SearchRequests in the database.- Specified by:
getAllin interfaceSearchRequestStore- Returns:
- CloseableIterable that contains reference to all SearchRequests.
-
getAllOwnedSearchRequests
Description copied from interface:SearchRequestStoreRetrieves a collection of SearchRequest objects that a user created.- Specified by:
getAllOwnedSearchRequestsin interfaceSearchRequestStore- Parameters:
author- The user who created the SearchRequests- Returns:
- Collection of all
SearchRequestthat user created.
-
getAllOwnedSearchRequests
Description copied from interface:SearchRequestStoreRetrieves a collection of SearchRequest objects that a user created.- Specified by:
getAllOwnedSearchRequestsin interfaceSearchRequestStore- Parameters:
userKey- The key of the user who created the SearchRequests- Returns:
- Collection of all
SearchRequestthat user created.
-
getRequestByAuthorAndName
Description copied from interface:SearchRequestStoreFind a search request given the author and the request name.- Specified by:
getRequestByAuthorAndNamein interfaceSearchRequestStore- Parameters:
author- Author of the SearchRequestname- Name of the SearchRequest- Returns:
- The SearchRequest, or null if there is no matching request
-
getSearchRequest
Description copied from interface:SearchRequestStoreReturn the search request as stored in the database- Specified by:
getSearchRequestin interfaceSearchRequestStore- Parameters:
id- Id of the SearchRequest- Returns:
- The SearchRequest, or null if the request id does not exist
-
create
Description copied from interface:SearchRequestStoreTakes 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- Specified by:
createin interfaceSearchRequestStore- Parameters:
request- SearchResult that should be persisted- Returns:
- SearchRequest object that was persisted to the database
-
update
Description copied from interface:SearchRequestStoreUpdates an existing search request in the database.- Specified by:
updatein interfaceSearchRequestStore- Parameters:
request- the request to persist.- Returns:
- A
SearchRequestthat was persisted to the database
-
adjustFavouriteCount
Description copied from interface:SearchRequestStoreUpdates the favourite count of the SearchRequest in the database.- Specified by:
adjustFavouriteCountin interfaceSearchRequestStore- 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
Description copied from interface:SearchRequestStoreRemoves the SearchRequest GenericValue from the database based on its id- Specified by:
deletein interfaceSearchRequestStore- Parameters:
id- of the search request to be removed from storage
-
getSearchRequests
Description copied from interface:SearchRequestStoreGet allsearch requestsassociate with a givenProject.- Specified by:
getSearchRequestsin interfaceSearchRequestStore- Parameters:
project- Project that is associated with the filters- Returns:
- Collection of
SearchRequestthat have their project set to the given project
-
findByNameIgnoreCase
Description copied from interface:SearchRequestStoreFind search requests matching the given name.- Specified by:
findByNameIgnoreCasein interfaceSearchRequestStore- Parameters:
name- Name of the SearchRequest- Returns:
- List of all search requests matching the given name. Never null.
-
getSearchRequests
public EnclosedIterable<SearchRequest> getSearchRequests(com.atlassian.crowd.embedded.api.Group group) Description copied from interface:SearchRequestStoreGet allsearch requestsassociated with a givenGroup.- Specified by:
getSearchRequestsin interfaceSearchRequestStore- Parameters:
group- the group that is associated with the filters- Returns:
- Collection of
SearchRequestthat have their project set to the given project
-