edu.umich.eecs.tac.props
Class SalesReport

java.lang.Object
  extended by edu.umich.eecs.tac.props.AbstractTransportable
      extended by edu.umich.eecs.tac.props.AbstractTransportableEntryListBacking<S>
          extended by edu.umich.eecs.tac.props.AbstractKeyedEntryList<Query,T>
              extended by edu.umich.eecs.tac.props.AbstractQueryKeyedReportTransportable<SalesReport.SalesReportEntry>
                  extended by edu.umich.eecs.tac.props.SalesReport
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<Query>, se.sics.isl.transport.Transportable

public class SalesReport
extends AbstractQueryKeyedReportTransportable<SalesReport.SalesReportEntry>

Sales report is a daily report of the sales revenue and conversions an advertisers garners for each query class.

Author:
Ben Cassell, Patrick Jordan, Lee Callender
See Also:
TAC Documentation, Serialized Form

Nested Class Summary
static class SalesReport.SalesReportEntry
          Sales report entry holds the conversions and revenue for a query class.
 
Constructor Summary
SalesReport()
           
 
Method Summary
 void addConversions(int index, int conversions)
          Adds conversions for a query.
 void addConversions(Query query, int conversions)
          Adds conversions for a query.
protected  void addQuery(Query query, int conversions, double revenue)
          Adds query data to the report.
 void addRevenue(int index, double revenue)
          Adds revenue for a query.
 void addRevenue(Query query, double revenue)
          Adds revenue for a query.
protected  SalesReport.SalesReportEntry createEntry(Query query)
          Returns a entry with the query as the key.
protected  java.lang.Class entryClass()
          Returns the SalesReport.SalesReportEntry class.
 int getConversions(int index)
          Returns the conversions for a query.
 int getConversions(Query query)
          Returns the conversions for a query.
 double getRevenue(int index)
          Returns the revenue for a query.
 double getRevenue(Query query)
          Returns the revenue for a query.
 void setConversions(int index, int conversions)
          Sets the conversions for a query.
 void setConversions(Query query, int conversions)
          Sets the conversions for a query.
 void setConversionsAndRevenue(int index, int conversions, double revenue)
          Sets the conversions and revenue for a query.
 void setConversionsAndRevenue(Query query, int conversions, double revenue)
          Sets the conversions and revenue for a query.
 void setRevenue(int index, double revenue)
          Sets the revenue for a query.
 void setRevenue(Query query, double revenue)
          Sets the revenue for a query.
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractQueryKeyedReportTransportable
addQuery, containsQuery, getQuery
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractKeyedEntryList
addKey, containsKey, getEntry, getKey, indexForEntry, iterator, keys
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportableEntryListBacking
addEntry, afterAddEntry, afterRemoveEntry, beforeAddEntry, beforeRemoveEntry, getEntries, getEntry, readAfterEntries, readBeforeEntries, readWithLock, removeEntry, size, toString, toStringAfterEntries, toStringBeforeEntries, writeAfterEntries, writeBeforeEntries, writeWithLock
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportable
getTransportName, isLocked, lock, lockCheck, read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SalesReport

public SalesReport()
Method Detail

createEntry

protected final SalesReport.SalesReportEntry createEntry(Query query)
Returns a entry with the query as the key.

Specified by:
createEntry in class AbstractKeyedEntryList<Query,SalesReport.SalesReportEntry>
Parameters:
query - the query key.
Returns:
a entry with the query as the key.

entryClass

protected final java.lang.Class entryClass()
Returns the SalesReport.SalesReportEntry class.

Specified by:
entryClass in class AbstractTransportableEntryListBacking<SalesReport.SalesReportEntry>
Returns:
the SalesReport.SalesReportEntry class.

addQuery

protected final void addQuery(Query query,
                              int conversions,
                              double revenue)
Adds query data to the report.

Parameters:
query - the query.
conversions - the conversions.
revenue - the revenue.

addConversions

public final void addConversions(Query query,
                                 int conversions)
Adds conversions for a query.

Parameters:
query - the query.
conversions - the conversions.

addConversions

public final void addConversions(int index,
                                 int conversions)
Adds conversions for a query.

Parameters:
index - the query index.
conversions - the conversions.

addRevenue

public final void addRevenue(Query query,
                             double revenue)
Adds revenue for a query.

Parameters:
query - the query.
revenue - the revenue.

addRevenue

public final void addRevenue(int index,
                             double revenue)
Adds revenue for a query.

Parameters:
index - the query index.
revenue - the revenue.

setConversions

public final void setConversions(Query query,
                                 int conversions)
Sets the conversions for a query.

Parameters:
query - the query.
conversions - the conversions.

setConversions

public final void setConversions(int index,
                                 int conversions)
Sets the conversions for a query.

Parameters:
index - the query index.
conversions - the conversions.

setRevenue

public final void setRevenue(Query query,
                             double revenue)
Sets the revenue for a query.

Parameters:
query - the query.
revenue - the revenue.

setRevenue

public final void setRevenue(int index,
                             double revenue)
Sets the revenue for a query.

Parameters:
index - the query index.
revenue - the revenue.

setConversionsAndRevenue

public final void setConversionsAndRevenue(Query query,
                                           int conversions,
                                           double revenue)
Sets the conversions and revenue for a query.

Parameters:
query - the query.
conversions - the conversions.
revenue - the revenue.

setConversionsAndRevenue

public final void setConversionsAndRevenue(int index,
                                           int conversions,
                                           double revenue)
Sets the conversions and revenue for a query.

Parameters:
index - the query index.
conversions - the conversions.
revenue - the revenue.

getConversions

public final int getConversions(Query query)
Returns the conversions for a query.

Parameters:
query - the query.
Returns:
the conversions for a query.

getConversions

public final int getConversions(int index)
Returns the conversions for a query.

Parameters:
index - the query index.
Returns:
the conversions for a query.

getRevenue

public final double getRevenue(Query query)
Returns the revenue for a query.

Parameters:
query - the query.
Returns:
the revenue for a query.

getRevenue

public final double getRevenue(int index)
Returns the revenue for a query.

Parameters:
index - the query index.
Returns:
the revenue for a query.


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.