com.ebay.carad.os.vitalsigns.dataretrievers
Class ReportRatioLogger

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.dataretrievers.ReportRatioLogger
All Implemented Interfaces:
IDataRetriever, java.lang.Cloneable

public class ReportRatioLogger
extends java.lang.Object
implements IDataRetriever

Takes in two report ID's and logs the ratio of their most recently logged values into its own report ID.

The Report ID and sort order of the report this runs for needs to be higher than both numerator and denominator in order for it to run after the other reports.

You can either supply an instance of IDataDAO to use, or this logger will utilized the default IDataDAO from the IDashboardAgent that invokes it (if you do not specify one).

Version:
$Id$
Author:
Jeremy Kraybill, Jeremy Thomerson

Field Summary
private  IDataDAO mDataDAO
           
private  IDashboardReport mDenominator
           
private  IDashboardReport mNumerator
           
private  double multiplier
           
 
Fields inherited from interface com.ebay.carad.os.vitalsigns.IDataRetriever
NO_OP_DATA_RETRIEVER, ZERO
 
Constructor Summary
ReportRatioLogger()
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.Float getData(IDashboardAgent agent)
           
 IDataDAO getDataDAO(IDashboardAgent agent)
           
 void setDenominator(IDashboardReport denominator)
          Set the denominator (bottom) report.
 void setMultiplier(double inMultiplier)
          Set the multiplier for the result of numerator divided by denominator.
 void setNumerator(IDashboardReport numerator)
          Set the numerator (top) report.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mNumerator

private IDashboardReport mNumerator

mDenominator

private IDashboardReport mDenominator

multiplier

private double multiplier

mDataDAO

private IDataDAO mDataDAO
Constructor Detail

ReportRatioLogger

public ReportRatioLogger()
Method Detail

setNumerator

public void setNumerator(IDashboardReport numerator)
Set the numerator (top) report.

Parameters:
numerator - the numerator (top) report

setDenominator

public void setDenominator(IDashboardReport denominator)
Set the denominator (bottom) report.

Parameters:
denominator - the numerator (bottom) report

setMultiplier

public void setMultiplier(double inMultiplier)
Set the multiplier for the result of numerator divided by denominator. Defaults to 100 if not specified.

Parameters:
inMultiplier - multiplier to use

getDataDAO

public IDataDAO getDataDAO(IDashboardAgent agent)

getData

public java.lang.Float getData(IDashboardAgent agent)
Specified by:
getData in interface IDataRetriever

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in interface IDataRetriever
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException


Copyright © 2004-2009. All Rights Reserved.