za.org.coefficient.statistics.data
Class ModuleStatistics

java.lang.Object
  extended by za.org.coefficient.statistics.data.ModuleStatistics
All Implemented Interfaces:
java.io.Serializable

public class ModuleStatistics
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
private  java.util.Map archive
           
private  ModuleStatisticsData currentData
           
private  java.lang.Long id
           
private  java.lang.String name
           
private  java.lang.Long projectId
           
private  java.util.Date statsDate
           
 
Constructor Summary
ModuleStatistics()
           
 
Method Summary
 boolean archiveStats()
           
 long calculateStats()
           
 boolean equals(java.lang.Object other)
           
 java.util.Map getActivityForNumberOfDaysIncludingToday(int days, java.lang.String type)
          This method will get the complete activity for each day up to the number of specified days from today.
 long getActivityTotalForNumberOfDaysIncludingToday(int days)
          This method will get the total activity for each day up to the number of specified days from today.
 java.util.Map getArchive()
          Gets the value of archive
 long getCompleteStatsForDate(java.util.Date date)
           
 long getCreateStatsForDate(java.util.Date date)
           
 ModuleStatisticsData getCurrentData()
          Gets the value of currentData
 java.lang.Long getId()
          Gets the value of id
 java.lang.String getName()
          Gets the value of name
 java.lang.Long getProjectId()
          Gets the value of projectId
 java.util.Date getStatsDate()
          Gets the value of statsDate
 long getStatsTotalForDate(java.util.Date date)
           
 long getUpdateStatsForDate(java.util.Date date)
           
 void setArchive(java.util.Map argArchive)
          Sets the value of archive
 void setCurrentData(ModuleStatisticsData argCurrentData)
          Sets the value of currentData
 void setId(java.lang.Long argId)
          Sets the value of id
 void setName(java.lang.String name)
          Sets the value of name
 void setProjectId(java.lang.Long argProjectId)
          Sets the value of projectId
 void setStatsDate(java.util.Date argStatsDate)
          Sets the value of statsDate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statsDate

private java.util.Date statsDate

id

private java.lang.Long id

projectId

private java.lang.Long projectId

name

private java.lang.String name

currentData

private ModuleStatisticsData currentData

archive

private java.util.Map archive
Constructor Detail

ModuleStatistics

public ModuleStatistics()
Method Detail

archiveStats

public boolean archiveStats()

setId

public void setId(java.lang.Long argId)
Sets the value of id

Parameters:
argId - Value to assign to this.id

getId

public java.lang.Long getId()
Gets the value of id

Returns:
the value of id

setName

public void setName(java.lang.String name)
Sets the value of name

Parameters:
argName - Value to assign to this.name

getName

public java.lang.String getName()
Gets the value of name

Returns:
the value of name

setProjectId

public void setProjectId(java.lang.Long argProjectId)
Sets the value of projectId

Parameters:
argProjectId - Value to assign to this.projectId

getProjectId

public java.lang.Long getProjectId()
Gets the value of projectId

Returns:
the value of projectId

setStatsDate

public void setStatsDate(java.util.Date argStatsDate)
Sets the value of statsDate

Parameters:
argStatsDate - Value to assign to this.statsDate

getStatsDate

public java.util.Date getStatsDate()
Gets the value of statsDate

Returns:
the value of statsDate

getCurrentData

public ModuleStatisticsData getCurrentData()
Gets the value of currentData

Returns:
the value of currentData

setCurrentData

public void setCurrentData(ModuleStatisticsData argCurrentData)
Sets the value of currentData

Parameters:
argCurrentData - Value to assign to this.currentData

getArchive

public java.util.Map getArchive()
Gets the value of archive

Returns:
the value of archive

setArchive

public void setArchive(java.util.Map argArchive)
Sets the value of archive

Parameters:
argArchive - Value to assign to this.archive

calculateStats

public long calculateStats()

getActivityForNumberOfDaysIncludingToday

public java.util.Map getActivityForNumberOfDaysIncludingToday(int days,
                                                              java.lang.String type)
This method will get the complete activity for each day up to the number of specified days from today. For example if daysAgo is 7 the returned map will return the complete activity for the last 7 days including today.

Parameters:
days - indicates how many days including today to report back on. If there is no data for a day then the activity result will be 0.
is - the type of activity you want values for. The legal types are: create, update, and complete
Returns:
Map is a map keyed by a java.util.Date object containing the java.lang.Long value that is the update activity for the day.

getActivityTotalForNumberOfDaysIncludingToday

public long getActivityTotalForNumberOfDaysIncludingToday(int days)
This method will get the total activity for each day up to the number of specified days from today.

Parameters:
days - indicates how many days including today to report back on. If there is no data for a day then the activity result will be 0.
Returns:
long is the total for the date range

getStatsTotalForDate

public long getStatsTotalForDate(java.util.Date date)

getCreateStatsForDate

public long getCreateStatsForDate(java.util.Date date)

getUpdateStatsForDate

public long getUpdateStatsForDate(java.util.Date date)

getCompleteStatsForDate

public long getCompleteStatsForDate(java.util.Date date)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object


Copyright CSIR. All Rights Reserved.