public interface SearchRequestStore
Modifier and Type | Method and Description |
---|---|
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 user)
Retrieves a collection of SearchRequest objects that a user created.
|
Collection<SearchRequest> |
getAllOwnedSearchRequests(String userKey)
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(com.atlassian.crowd.embedded.api.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) |
EnclosedIterable<SearchRequest> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
EnclosedIterable
of SearchRequests for the specified List of ids.descriptor
- retrieval descriptorEnclosedIterable<SearchRequest> getAll()
EnclosedIterable
of all SearchRequests in the database.EnclosedIterable<IndexableSharedEntity<SearchRequest>> getAllIndexableSharedEntities()
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
.
Collection<SearchRequest> getAllOwnedSearchRequests(ApplicationUser user)
user
- The user who created the SearchRequestsSearchRequest
that user created.Collection<SearchRequest> getAllOwnedSearchRequests(String userKey)
userKey
- The key of the user who created the SearchRequestsSearchRequest
that user created.SearchRequest getRequestByAuthorAndName(ApplicationUser author, String name)
author
- Author of the SearchRequestname
- Name of the SearchRequestSearchRequest getSearchRequest(@Nonnull Long id)
id
- Id of the SearchRequestSearchRequest create(@Nonnull SearchRequest request)
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 detailsrequest
- SearchResult that should be persistedSearchRequest update(@Nonnull SearchRequest request)
request
- the request to persist.SearchRequest
that was persisted to the databaseSearchRequest adjustFavouriteCount(@Nonnull Long searchRequestId, int incrementValue)
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.SearchRequest
.void delete(@Nonnull Long id)
id
- of the search request to be removed from storageEnclosedIterable<SearchRequest> getSearchRequests(Project project)
search requests
associate with a given Project
.project
- Project that is associated with the filtersSearchRequest
that have their project set to the given project@Nonnull List<SearchRequest> findByNameIgnoreCase(String name)
name
- Name of the SearchRequestEnclosedIterable<SearchRequest> getSearchRequests(com.atlassian.crowd.embedded.api.Group group)
search requests
associated with a given Group
.group
- the group that is associated with the filtersSearchRequest
that have their project set to the given projectvoid visitAll(Visitor<SearchRequestEntity> visitor)
Copyright © 2002-2022 Atlassian. All Rights Reserved.