|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.issue.search.CachingSearchRequestStore
public class CachingSearchRequestStore
Caching store for SearchRequest
.
Constructor Summary | |
---|---|
CachingSearchRequestStore(SearchRequestStore delegateStore,
com.atlassian.cache.CacheManager cacheManager)
|
Method Summary | |
---|---|
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 searchId)
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 owner)
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 searchRequestId)
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 . |
void |
onClearCache(ClearCacheEvent event)
|
SearchRequest |
update(SearchRequest request)
Updates an existing search request in the database. |
void |
visitAll(Visitor<SearchRequestEntity> visitor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachingSearchRequestStore(SearchRequestStore delegateStore, com.atlassian.cache.CacheManager cacheManager)
Method Detail |
---|
@EventListener public void onClearCache(ClearCacheEvent event)
public EnclosedIterable<SearchRequest> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
SearchRequestStore
EnclosedIterable
of SearchRequests for the specified List of ids.
get
in interface SearchRequestStore
descriptor
- retrieval descriptor
public EnclosedIterable<SearchRequest> getAll()
SearchRequestStore
EnclosedIterable
of all SearchRequests in the database.
getAll
in interface SearchRequestStore
public void visitAll(Visitor<SearchRequestEntity> visitor)
visitAll
in interface SearchRequestStore
public EnclosedIterable<IndexableSharedEntity<SearchRequest>> getAllIndexableSharedEntities()
SearchRequestStore
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
.
getAllIndexableSharedEntities
in interface SearchRequestStore
public Collection<SearchRequest> getAllOwnedSearchRequests(ApplicationUser owner)
SearchRequestStore
getAllOwnedSearchRequests
in interface SearchRequestStore
owner
- The user who created the SearchRequests
SearchRequest
that user created.public Collection<SearchRequest> getAllOwnedSearchRequests(String userKey)
SearchRequestStore
getAllOwnedSearchRequests
in interface SearchRequestStore
userKey
- The key of the user who created the SearchRequests
SearchRequest
that user created.public SearchRequest getRequestByAuthorAndName(ApplicationUser author, String name)
SearchRequestStore
getRequestByAuthorAndName
in interface SearchRequestStore
author
- Author of the SearchRequestname
- Name of the SearchRequest
public SearchRequest getSearchRequest(@Nonnull Long searchRequestId)
SearchRequestStore
getSearchRequest
in interface SearchRequestStore
searchRequestId
- Id of the SearchRequest
public SearchRequest create(@Nonnull SearchRequest request)
SearchRequestStore
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
create
in interface SearchRequestStore
request
- SearchResult that should be persisted
public SearchRequest update(@Nonnull SearchRequest request)
SearchRequestStore
update
in interface SearchRequestStore
request
- the request to persist.
SearchRequest
that was persisted to the databasepublic SearchRequest adjustFavouriteCount(@Nonnull Long searchRequestId, int incrementValue)
SearchRequestStore
adjustFavouriteCount
in interface SearchRequestStore
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
.public void delete(@Nonnull Long searchId)
SearchRequestStore
delete
in interface SearchRequestStore
searchId
- of the search request to be removed from storagepublic EnclosedIterable<SearchRequest> getSearchRequests(Project project)
SearchRequestStore
search requests
associate with a given Project
.
getSearchRequests
in interface SearchRequestStore
project
- Project that is associated with the filters
SearchRequest
that have their project set to the given project@Nonnull public List<SearchRequest> findByNameIgnoreCase(String name)
SearchRequestStore
findByNameIgnoreCase
in interface SearchRequestStore
name
- Name of the SearchRequest
public EnclosedIterable<SearchRequest> getSearchRequests(com.atlassian.crowd.embedded.api.Group group)
SearchRequestStore
search requests
associated with a given Group
.
getSearchRequests
in interface SearchRequestStore
group
- the group that is associated with the filters
SearchRequest
that have their project set to the given project
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |