public class StatisticAccessorBean extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StatisticAccessorBean.Direction
Enumerated type for sort direction.
|
static class |
StatisticAccessorBean.OrderBy
Enumerated type for ordering of statistics.
|
protected static class |
StatisticAccessorBean.SearchStatisticsResult |
Constructor and Description |
---|
StatisticAccessorBean() |
StatisticAccessorBean(ApplicationUser remoteUser,
Long projectId) |
StatisticAccessorBean(ApplicationUser remoteUser,
Long projectId,
boolean limitToOpenIssues) |
StatisticAccessorBean(ApplicationUser remoteUser,
Long projectId,
Clause additionalClause,
boolean limitToOpenIssues)
Instantiates this class with given parameters.
|
StatisticAccessorBean(ApplicationUser remoteUser,
SearchRequest filter) |
StatisticAccessorBean(ApplicationUser remoteUser,
SearchRequest filter,
boolean overrideSecurity) |
Modifier and Type | Method and Description |
---|---|
StatisticMapWrapper |
getAllFilterBy(String type) |
StatisticMapWrapper |
getAllFilterBy(String type,
StatisticAccessorBean.OrderBy orderBy,
StatisticAccessorBean.Direction direction) |
long |
getCount()
Returns nuber of search results for this filter
|
SearchRequest |
getFilter() |
Collection |
getIssues()
Returns a collection of found issues for this filter
|
StatisticsMapper |
getMapper(String type) |
long |
getOpenByComponent()
Stats by Component
|
long |
getOpenByComponent(org.ofbiz.core.entity.GenericValue component) |
long |
getOpenByFixFor()
Stats by FixFor
|
long |
getOpenByFixFor(Version version) |
SearchRequestAppender |
getSearchRequestAppender(String statisticType)
This will obtain a SearchRequestAppender relevant for the given statisticType, either by casting the
StatisticsMapper to SearchRequestAppender.Factory or by constructing an artificial SearchRequestAppender wrapper
around the StatisticsMapper.
|
StatisticMapWrapper |
getWrapper(StatisticsMapper mapper) |
StatisticMapWrapper |
getWrapper(StatisticsMapper mapper,
StatisticAccessorBean.OrderBy orderBy,
StatisticAccessorBean.Direction direction)
Returns a
StatisticMapWrapper containing ordered search statistic results |
protected StatisticAccessorBean.SearchStatisticsResult |
searchCountMap(String groupField) |
public StatisticAccessorBean()
public StatisticAccessorBean(ApplicationUser remoteUser, SearchRequest filter)
public StatisticAccessorBean(ApplicationUser remoteUser, SearchRequest filter, boolean overrideSecurity)
public StatisticAccessorBean(ApplicationUser remoteUser, Long projectId, boolean limitToOpenIssues)
public StatisticAccessorBean(ApplicationUser remoteUser, Long projectId)
public StatisticAccessorBean(ApplicationUser remoteUser, Long projectId, Clause additionalClause, boolean limitToOpenIssues)
remoteUser
- remote UserprojectId
- project idadditionalClause
- An additional clause to and to the current filter. Can be null.limitToOpenIssues
- flag that limits issues on status (open vs other)public SearchRequest getFilter()
public StatisticMapWrapper getWrapper(StatisticsMapper mapper) throws SearchException
SearchException
public StatisticMapWrapper getWrapper(StatisticsMapper mapper, StatisticAccessorBean.OrderBy orderBy, StatisticAccessorBean.Direction direction) throws SearchException
StatisticMapWrapper
containing ordered search statistic resultsmapper
- the relevant StatisticsMapper for this instanceorderBy
- either OrderBy.NATURAL or OrderBy.TOTAL to specify ordering by result keys or values respectively.
null produces the same result as OrderBy.NATURALdirection
- either Direction.DESC or Direction.ASC to specify direction of ordering. null produces the same
result as Direction.ASCSearchException
- .protected StatisticAccessorBean.SearchStatisticsResult searchCountMap(String groupField) throws SearchException
SearchException
public long getOpenByComponent() throws SearchException
SearchException
public long getOpenByComponent(org.ofbiz.core.entity.GenericValue component) throws SearchException
SearchException
public long getOpenByFixFor() throws SearchException
SearchException
public long getOpenByFixFor(Version version) throws SearchException
SearchException
public long getCount() throws SearchException
SearchException
- if search failspublic Collection getIssues() throws SearchException
Issue
objectsSearchException
- if search failspublic StatisticMapWrapper getAllFilterBy(String type) throws SearchException
SearchException
public StatisticMapWrapper getAllFilterBy(String type, StatisticAccessorBean.OrderBy orderBy, StatisticAccessorBean.Direction direction) throws SearchException
SearchException
public StatisticsMapper getMapper(String type)
public SearchRequestAppender getSearchRequestAppender(String statisticType)
Copyright © 2002-2015 Atlassian. All Rights Reserved.