org.torweg.pulse.component.statistics.model.aggregation
Class VisitCountAggregation
java.lang.Object
org.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.component.statistics.model.aggregation.AbstractAggregation
org.torweg.pulse.component.statistics.model.aggregation.AbstractCountAggregation
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
|
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 java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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 StatisticsServerduration - the Duration
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 Visits - 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