com.atlassian.greenhopper.service.query
Interface QueryService

All Known Implementing Classes:
QueryServiceImpl

public interface QueryService

Some handy methods to operate on Query objects.


Method Summary
 ServiceOutcome<java.util.Set<com.atlassian.jira.project.Project>> getProjectsForRapidView(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Find all projects for a given rapid view.
 java.util.List<com.atlassian.jira.project.Project> getProjectsInProjectClauseOnlyQuery(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query projectBasedQuery)
          Return the projects which are included in this query.
 boolean isProjectClauseOnlyQuery(com.atlassian.query.Query query)
          Determine whether this query is "project based"; i.e.
 

Method Detail

isProjectClauseOnlyQuery

boolean isProjectClauseOnlyQuery(@Nullable
                                 com.atlassian.query.Query query)
Determine whether this query is "project based"; i.e. whether this query only contains project clauses, possibly combined with the OR operator.

Parameters:
query - the query; may be null
Returns:
the result

getProjectsInProjectClauseOnlyQuery

java.util.List<com.atlassian.jira.project.Project> getProjectsInProjectClauseOnlyQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                       @NotNull
                                                                                       com.atlassian.query.Query projectBasedQuery)
Return the projects which are included in this query. This does not execute a search - it instead uses QueryContext information.

Parameters:
user - the user performing the query
projectBasedQuery - the query; must not be null and must be a project-based query
Returns:
the IDs

getProjectsForRapidView

ServiceOutcome<java.util.Set<com.atlassian.jira.project.Project>> getProjectsForRapidView(com.atlassian.crowd.embedded.api.User user,
                                                                                          @NotNull
                                                                                          RapidView rapidView)
Find all projects for a given rapid view.

Returns:
a set of projects or an empty set if the rapid view matches all projects


Copyright © 2007-2013 Atlassian. All Rights Reserved.