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.aggregator
Class AbstractRegexVersionedPerVisitAggregator<T extends AbstractRegexVersioned,U extends AbstractRegexVersionedCounterAggregation<?,?>>

java.lang.Object
  extended by org.torweg.pulse.component.statistics.aggregator.AbstractBaseAggregator
      extended by org.torweg.pulse.component.statistics.aggregator.AbstractRegexVersionedPerVisitAggregator<T,U>
Type Parameters:
T - the AbstractRegexVersioned being processed by the AbstractRegexVersionedPerVisitAggregator
U - the matching AbstractRegexVersionedCounterAggregation&lt;?,?&gt; for &lt;T&gt;
Direct Known Subclasses:
OperatingSystemPerVisitAggregator, UserAgentPerVisitAggregator

public abstract class AbstractRegexVersionedPerVisitAggregator<T extends AbstractRegexVersioned,U extends AbstractRegexVersionedCounterAggregation<?,?>>
extends AbstractBaseAggregator

Passes the given Visit to &lt;T&gt; and stores the result of the aggregation to &lt;U&gt; on a per Visit basis.

Here on a per Visit basis means:
A Visit extending over two days (e.g. first PIRecord [2009.01.01 23:59:59:999], second PIRecord [2009.01.02 00:00:00:000]) will only be aggregated once for - the first/start day of - the Visit.

Version:
$Revision: 1541 $
Author:
Daniel Dietz

Constructor Summary
AbstractRegexVersionedPerVisitAggregator()
           
 
Method Summary
 void aggregate(Visit visit, org.hibernate.Session s)
          Aggregates information about the AbstractVersioned.
protected abstract  U getAbstractRegexVersionedCounterAggregation(T checkedAbstractRegexVersioned, Visit visit, Duration fullDay, org.hibernate.Session s)
          Tries to load a matching {@code AbstractRegexVersionCounterAggregation<?
protected abstract  java.lang.String getCheckValue(Visit visit)
          Returns the string-value to be checked from the given Visit.
protected abstract  java.util.List<T> getKnownAbstractRegexVersioneds(org.hibernate.Session s)
          Returns all the known AbstractRegexVersioneds of the type &lt;T&gt;.
protected abstract  U getNewAbstractRegexVersionedCounterAggregation(T checkedAbstractRegexVersioned, Visit visit, Duration fullDay)
          Returns a new {@code AbstractRegexVersionCounterAggregation<?
protected abstract  T getUnknownAbstractRegexVersioned(org.hibernate.Session s)
          Returns the AbstractRegexVersioned of the type &lt;T&gt; which represents the "unknown".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRegexVersionedPerVisitAggregator

public AbstractRegexVersionedPerVisitAggregator()
Method Detail

aggregate

public final void aggregate(Visit visit,
                            org.hibernate.Session s)
Aggregates information about the AbstractVersioned.

Specified by:
aggregate in class AbstractBaseAggregator
Parameters:
visit - the Visit to be processed
s - the current hibernateTM-Session
See Also:
#aggregate(org.torweg.pulse.component.statistics.model.Visit, org.hibernate.Session, org.torweg.pulse.component.statistics.DataAggregationJobletConfiguration)

getKnownAbstractRegexVersioneds

protected abstract java.util.List<T> getKnownAbstractRegexVersioneds(org.hibernate.Session s)
Returns all the known AbstractRegexVersioneds of the type &lt;T&gt;.

Parameters:
s - the current HibernateTM-Session
Returns:
List&lt;AbstractRegexVersioned&gt; of the type &lt;T&gt;

getCheckValue

protected abstract java.lang.String getCheckValue(Visit visit)
Returns the string-value to be checked from the given Visit.

Parameters:
visit - the Visit
Returns:
the string-value to be checked

getUnknownAbstractRegexVersioned

protected abstract T getUnknownAbstractRegexVersioned(org.hibernate.Session s)
Returns the AbstractRegexVersioned of the type &lt;T&gt; which represents the "unknown".

Parameters:
s - the current HibernateTM-Session
Returns:
the AbstractRegexVersioned of the type &lt;T&gt; which represents the "unknown"

getAbstractRegexVersionedCounterAggregation

protected abstract U getAbstractRegexVersionedCounterAggregation(T checkedAbstractRegexVersioned, Visit visit, Duration fullDay,
                                                                 org.hibernate.Session s)
Tries to load a matching AbstractRegexVersionCounterAggregation&lt;?,?&gt; for the given AbstractRegexVersioned of the type &lt;T&gt;, the given Visit and the given Duration.

Parameters:
checkedAbstractRegexVersioned - the AbstractRegexVersioned of the type &lt;T&gt;
visit - the Visit
fullDay - the Duration
s - the current HibernateTM-Session
Returns:
a matching AbstractRegexVersionCounterAggregation&lt;?,?&gt; if available, null otherwise

getNewAbstractRegexVersionedCounterAggregation

protected abstract U getNewAbstractRegexVersionedCounterAggregation(T checkedAbstractRegexVersioned, Visit visit, Duration fullDay)
Returns a new AbstractRegexVersionCounterAggregation&lt;?,?&gt; for the given AbstractRegexVersioned of the type &lt;T&gt;, the given Visit and the given Duration.

Parameters:
checkedAbstractRegexVersioned - the AbstractRegexVersioned of the type &lt;T&gt;
visit - the Visit
fullDay - the Duration
Returns:
a new AbstractRegexVersionCounterAggregation&lt;?,?&gt;