public class

StatisticAccessorBean

extends Object
java.lang.Object
   ↳ com.atlassian.jira.web.bean.StatisticAccessorBean

Summary

Nested Classes
class StatisticAccessorBean.Direction Enumerated type for sort direction. 
class StatisticAccessorBean.OrderBy Enumerated type for ordering of statistics. 
class StatisticAccessorBean.SearchStatisticsResult  
Public Constructors
StatisticAccessorBean()
StatisticAccessorBean(ApplicationUser remoteUser, SearchRequest filter)
StatisticAccessorBean(ApplicationUser remoteUser, SearchRequest filter, boolean overrideSecurity)
StatisticAccessorBean(ApplicationUser remoteUser, Long projectId, boolean limitToOpenIssues)
StatisticAccessorBean(ApplicationUser remoteUser, Long projectId)
StatisticAccessorBean(ApplicationUser remoteUser, Long projectId, Clause additionalClause, boolean limitToOpenIssues)
Instantiates this class with given parameters.
Public Methods
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(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 Methods
StatisticAccessorBean.SearchStatisticsResult searchCountMap(String groupField)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

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)

Instantiates this class with given parameters.

Parameters
remoteUser remote User
projectId project id
additionalClause An additional clause to and to the current filter. Can be null.
limitToOpenIssues flag that limits issues on status (open vs other)

Public Methods

public StatisticMapWrapper getAllFilterBy (String type)

public long getCount ()

Returns nuber of search results for this filter

Returns
  • count
Throws
SearchException if search fails

public SearchRequest getFilter ()

public Collection getIssues ()

Returns a collection of found issues for this filter

Returns
  • collection of Issue objects
Throws
SearchException if search fails

public StatisticsMapper getMapper (String type)

public long getOpenByComponent ()

Stats by Component

public long getOpenByComponent (GenericValue component)

public long getOpenByFixFor ()

Stats by FixFor

public long getOpenByFixFor (Version version)

public 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.

public StatisticMapWrapper getWrapper (StatisticsMapper mapper)

public StatisticMapWrapper getWrapper (StatisticsMapper mapper, StatisticAccessorBean.OrderBy orderBy, StatisticAccessorBean.Direction direction)

Returns a StatisticMapWrapper containing ordered search statistic results

Parameters
mapper the relevant StatisticsMapper for this instance
orderBy either OrderBy.NATURAL or OrderBy.TOTAL to specify ordering by result keys or values respectively. null produces the same result as OrderBy.NATURAL
direction either Direction.DESC or Direction.ASC to specify direction of ordering. null produces the same result as Direction.ASC
Returns
  • the ordered results
Throws
SearchException .

Protected Methods

protected StatisticAccessorBean.SearchStatisticsResult searchCountMap (String groupField)