pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics.model.aggregation
Class CountryPerPIRecordAggregation

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.component.statistics.model.aggregation.AbstractAggregation
          extended by org.torweg.pulse.component.statistics.model.aggregation.CountryPerPIRecordAggregation
All Implemented Interfaces:
java.io.Serializable, ICount, IHasDuration

@Entity
public class CountryPerPIRecordAggregation
extends AbstractAggregation
implements ICount

Aggregates the "countries" from the given Visit for a day per PIRecord for the set Duration.

Version:
$Revision: 1579 $
Author:
Daniel Dietz
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.component.statistics.model.aggregation.AbstractAggregation
AbstractAggregation.Hour
 
Field Summary
 
Fields inherited from class org.torweg.pulse.component.statistics.model.aggregation.AbstractAggregation
LOGGER
 
Constructor Summary
protected CountryPerPIRecordAggregation()
          Deprecated. 
  CountryPerPIRecordAggregation(StatisticsServer server, Duration duration)
          Creates a new CountryPerPIRecordAggregation with the given StatisticsServer and the given Duration.
 
Method Summary
 boolean aggregate(Visit visit, org.hibernate.Session s)
          Aggregates the given Visit.
 int getCount()
          Returns the total country-hit count for all countries.
 int getCount(java.lang.String c)
          Returns the country-hit count for the given country-string.
 java.util.Set<CountryHitCounter> getCountryHitCounters()
          Returns the CountryHitCounters.
 boolean isAggregateable(Visit visit)
          Test if the given Visit is aggregate-able by this CountryPerPIRecordAggregation.
 
Methods inherited from class org.torweg.pulse.component.statistics.model.aggregation.AbstractAggregation
getDataResolution, getDuration, getEndMillis, getStartMillis, getStatisticsServer, setDuration, setEndMillis, setStartMillis, setStatisticsServer, toString
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CountryPerPIRecordAggregation

@Deprecated
protected CountryPerPIRecordAggregation()
Deprecated. 

Default constructor for HibernateTM and JAXB.


CountryPerPIRecordAggregation

public CountryPerPIRecordAggregation(StatisticsServer server, Duration duration)
Creates a new CountryPerPIRecordAggregation with the given StatisticsServer and the given Duration.

Parameters:
server - the StatisticsServer
duration - the Duration
Method Detail

getCountryHitCounters

public final java.util.Set<CountryHitCounter> getCountryHitCounters()
Returns the CountryHitCounters.

Returns:
the counters

getCount

public final int getCount(java.lang.String c)
Returns the country-hit count for the given country-string.

Parameters:
c - the country
Returns:
the count

getCount

public final int getCount()
Returns the total country-hit count for all countries.

Specified by:
getCount in interface ICount
Returns:
the count

isAggregateable

public final boolean isAggregateable(Visit visit)
Test if the given Visit is aggregate-able by this CountryPerPIRecordAggregation.

Specified by:
isAggregateable in class AbstractAggregation
Parameters:
visit - the Visit
Returns:
true if and only if this AbstractAggregation can process the given Visit, false otherwise
See Also:
#isAggregateable(org.torweg.pulse.component.statistics.model.Visit)

aggregate

public final boolean aggregate(Visit visit,
                               org.hibernate.Session s)
Aggregates the given Visit.

Specified by:
aggregate in class AbstractAggregation
Parameters:
visit - the Visit
s - the HibernateTM-Session
Returns:
true if and only if the Visit has been processed, false otherwise
See Also:
#aggregate(org.torweg.pulse.component.statistics.model.Visit)