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 VisitCountAggregation

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.AbstractCountAggregation
              extended by org.torweg.pulse.component.statistics.model.aggregation.VisitCountAggregation
All Implemented Interfaces:
java.io.Serializable, ICount, IHasDuration

@Entity
public class VisitCountAggregation
extends AbstractCountAggregation

Aggregates the given Visits 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 VisitCountAggregation()
          Deprecated. 
  VisitCountAggregation(StatisticsServer server, Duration duration)
          Creates a new VisitCountAggregation with the given StatisticsServer and the given Duration.
 
Method Summary
 void accumulate(VisitCountAggregation aggr)
          Adds the values of the given VisitCountAggregation if its Duration lies within the Duration of the current VisitCountAggregation.
 boolean aggregate(Visit visit, org.hibernate.Session s)
          Aggregates the given Visit.
 int getBouncesCount()
          Returns the bounces count.
 boolean isAggregateable(Visit visit)
          Test if the given Visit is aggregate-able by this VisitCountAggregation.
 
Methods inherited from class org.torweg.pulse.component.statistics.model.aggregation.AbstractCountAggregation
getCount, increase, increaseBy, setCount
 
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

VisitCountAggregation

@Deprecated
protected VisitCountAggregation()
Deprecated. 

Default constructor for HibernateTM and JAXB.


VisitCountAggregation

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

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

isAggregateable

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

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 Session UNUSED
Returns:
true if and only if the Visit has been processed, false otherwise
See Also:
#aggregate(org.torweg.pulse.component.statistics.model.Visit)

getBouncesCount

public final int getBouncesCount()
Returns the bounces count.

Returns:
the bounces

accumulate

public final void accumulate(VisitCountAggregation aggr)
Adds the values of the given VisitCountAggregation if its Duration lies within the Duration of the current VisitCountAggregation.

Parameters:
aggr - the VisitCountAggregation
Throws:
java.lang.NullPointerException - if the given VisitCountAggregation is null
java.lang.IllegalArgumentException - if the Duration of the given VisitCountAggregation does not lie within the Duration of the current VisitCountAggregation