org.sonar.batch
Class DefaultTimeMachine

java.lang.Object
  extended by org.sonar.batch.DefaultTimeMachine
All Implemented Interfaces:
TimeMachine, BatchComponent

public class DefaultTimeMachine
extends Object
implements TimeMachine


Constructor Summary
DefaultTimeMachine(DatabaseSession session, DefaultIndex index, MetricFinder metricFinder)
           
 
Method Summary
protected  List execute(TimeMachineQuery query, boolean selectAllFields, Set<Integer> metricIds)
           
 List<Measure> getMeasures(TimeMachineQuery query)
          Past measures, sorted by date.
 List<Object[]> getMeasuresFields(TimeMachineQuery query)
          Past measures sorted by date.
 Map<Integer,Metric> getMetricsById(TimeMachineQuery query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTimeMachine

public DefaultTimeMachine(DatabaseSession session,
                          DefaultIndex index,
                          MetricFinder metricFinder)
Method Detail

getMeasures

public List<Measure> getMeasures(TimeMachineQuery query)
Description copied from interface: TimeMachine
Past measures, sorted by date. Returns all fields.

Measures of current analysis are not included.

Specified by:
getMeasures in interface TimeMachine

getMeasuresFields

public List<Object[]> getMeasuresFields(TimeMachineQuery query)
Description copied from interface: TimeMachine
Past measures sorted by date. Return only a subset of basic fields : [date (java.util.Date), metric (org.sonar.api.measures.Metric), value (Double)].

Measures of current analysis are not included.

This method is recommended instead of getMeasures() for performance reasons. It needs less memory.

Specified by:
getMeasuresFields in interface TimeMachine

execute

protected List execute(TimeMachineQuery query,
                       boolean selectAllFields,
                       Set<Integer> metricIds)

getMetricsById

public Map<Integer,Metric> getMetricsById(TimeMachineQuery query)


Copyright © 2009-2012 SonarSource. All Rights Reserved.