public class

OfBizSearchRequestStore

extends Object
implements SearchRequestStore
java.lang.Object
   ↳ com.atlassian.jira.issue.search.OfBizSearchRequestStore

Class Overview

OfBiz implementation of SearchRequestStore

Summary

Public Constructors
OfBizSearchRequestStore(OfBizDelegator delegator, JqlQueryParser jqlQueryParser, SearchService searchService, UserManager userManager)
Public Methods
SearchRequest adjustFavouriteCount(Long searchRequestId, int incrementValue)
Updates the favourite count of the SearchRequest in the database.
SearchRequest create(SearchRequest request)
Takes a SearchRequest, 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
void delete(Long id)
Removes the SearchRequest GenericValue from the database based on its id
List<SearchRequest> findByNameIgnoreCase(String name)
Find search requests matching the given name.
EnclosedIterable<SearchRequest> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Get a EnclosedIterable of SearchRequests for the specified List of ids.
EnclosedIterable<SearchRequest> getAll()
Get a EnclosedIterable of all SearchRequests in the database.
EnclosedIterable<IndexableSharedEntity<SearchRequest>> getAllIndexableSharedEntities()
Get a EnclosedIterable of all IndexableSharedEntities representing SearchRequests in the database.
Collection<SearchRequest> getAllOwnedSearchRequests(ApplicationUser author)
Retrieves a collection of SearchRequest objects that a user created.
SearchRequest getRequestByAuthorAndName(ApplicationUser author, String name)
Find a search request given the author and the request name.
SearchRequest getSearchRequest(Long id)
Return the search request as stored in the database
EnclosedIterable<SearchRequest> getSearchRequests(Group group)
Get all search requests associated with a given Group.
EnclosedIterable<SearchRequest> getSearchRequests(Project project)
Get all search requests associate with a given Project.
SearchRequest update(SearchRequest request)
Updates an existing search request in the database.
void visitAll(Visitor<SearchRequestEntity> visitor)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.search.SearchRequestStore

Public Constructors

public OfBizSearchRequestStore (OfBizDelegator delegator, JqlQueryParser jqlQueryParser, SearchService searchService, UserManager userManager)

Public Methods

public SearchRequest adjustFavouriteCount (Long searchRequestId, int incrementValue)

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 < 0 to decrease the favourite count.
Returns

public SearchRequest create (SearchRequest request)

Takes a SearchRequest, 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

public void delete (Long id)

Removes the SearchRequest GenericValue from the database based on its id

Parameters
id of the search request to be removed from storage

public List<SearchRequest> findByNameIgnoreCase (String name)

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.

public EnclosedIterable<SearchRequest> get (SharedEntityAccessor.RetrievalDescriptor descriptor)

Get a EnclosedIterable of SearchRequests for the specified List of ids.

Parameters
descriptor retrieval descriptor
Returns
  • CloseableIterable that contains reference to SearchRequests with the specified ids.

public EnclosedIterable<SearchRequest> getAll ()

Get a EnclosedIterable of all SearchRequests in the database.

Returns
  • CloseableIterable that contains reference to all SearchRequests.

public EnclosedIterable<IndexableSharedEntity<SearchRequest>> getAllIndexableSharedEntities ()

Get a EnclosedIterable of all IndexableSharedEntities representing SearchRequests in the database. Note: this is used so that we can retrieve all the meta data about a SearchRequest without having to deal with the Query.

Returns
  • CloseableIterable that contains reference to all IndexableSharedEntities representing SearchRequests.

public Collection<SearchRequest> getAllOwnedSearchRequests (ApplicationUser author)

Retrieves a collection of SearchRequest objects that a user created.

Parameters
author The user who created the SearchRequests
Returns

public SearchRequest getRequestByAuthorAndName (ApplicationUser author, String name)

Find a search request given the author and the request name.

Parameters
author Author of the SearchRequest
name Name of the SearchRequest
Returns
  • The SearchRequest, or null if there is no matching request

public SearchRequest getSearchRequest (Long id)

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

public EnclosedIterable<SearchRequest> getSearchRequests (Group group)

Get all search requests associated with a given Group.

Parameters
group the group that is associated with the filters
Returns
  • Collection of SearchRequest that have their project set to the given project

public EnclosedIterable<SearchRequest> getSearchRequests (Project project)

Get all search requests associate with a given Project.

Parameters
project Project that is associated with the filters
Returns
  • Collection of SearchRequest that have their project set to the given project

public SearchRequest update (SearchRequest request)

Updates an existing search request in the database.

Parameters
request the request to persist.
Returns

public void visitAll (Visitor<SearchRequestEntity> visitor)