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
Class PIRecord

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.component.statistics.model.PIRecord
All Implemented Interfaces:
java.io.Serializable

@Entity
public class PIRecord
extends AbstractBasicEntity

A raw page impression record.

Version:
$Revision: 1624 $
Author:
Thomas Weber, Daniel Dietz
See Also:
Serialized Form

Field Summary
static java.lang.String UNDEFINED_COUNTRY
          The value used for the PIRecords country if null was given in constructor.
 
Constructor Summary
protected PIRecord()
          Deprecated. 
  PIRecord(StatisticsServer s, javax.servlet.http.HttpSession httpSession, int[] sr, java.lang.String ipAddress, java.lang.String c, java.lang.String p, java.lang.String r, java.lang.String userAgent, java.lang.String acceptLanguage, boolean isProxy)
          creates a new PIRecord for the given server and request.
 
Method Summary
 java.lang.String getCountry()
           
 Duration getFullDay()
          Returns the Duration representing the "full, surrounding" day of the PIRecords recorded-time-stamp: start: YYYY-MM-DD-00:00:00:000
end: YYYY-MM-DD-23:59:59:999.
 java.lang.String getIpHash()
           
 java.lang.String getPath()
           
 java.util.Date getProcessedDate()
          Returns the Date the PIRecord has been statistically processed by DataAggregationJoblet.
 long getProcessedMillis()
          Returns the time-stamp the PIRecord has been statistically processed by DataAggregationJoblet.
 java.util.Date getRecordedDate()
          Returns the Date of creation.
 long getRecordedMillis()
          Returns the recorded of creation - milliseconds.
 java.lang.String getReferer()
           
 int[] getScreenResolution()
          returns the screenResolution as an int array (x, y) or null, if the screen resolution is unknown.
 java.lang.String getSessionId()
          Returns the session-id.
 StatisticsServer getStatisticsServer()
           
 java.lang.String getUserAgentString()
           
 int[] getViewportResolution()
          returns the viewport resolution as an int array (x, y) or null, if the viewport resolution is unknown.
 boolean isProcessed()
          Indicates whether the PIRecord has been already statistically processed.
 boolean isProxyRequest()
          Returns whether the PIRecord was produced by a proxyRequest.
 boolean isRecurring()
          Returns whether the the stored sessionId has been previously recorded.
 void setProcessed(long millis)
          Called by DataAggregationJoblet to set the time-stamp the PIRecord has been statistically processed.
 void setRecurring(boolean b)
          sets the recurring flag.
 java.lang.String toString()
          Returns a string-representation.
 
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
 

Field Detail

UNDEFINED_COUNTRY

public static final java.lang.String UNDEFINED_COUNTRY
The value used for the PIRecords country if null was given in constructor.

See Also:
Constant Field Values
Constructor Detail

PIRecord

@Deprecated
protected PIRecord()
Deprecated. 

used by HibernateTM and JAXB.


PIRecord

public PIRecord(StatisticsServer s,
                javax.servlet.http.HttpSession httpSession,
                int[] sr,
                java.lang.String ipAddress,
                java.lang.String c,
                java.lang.String p,
                java.lang.String r,
                java.lang.String userAgent,
                java.lang.String acceptLanguage,
                boolean isProxy)
creates a new PIRecord for the given server and request.

Parameters:
s - the server the record is created for
httpSession - the HttpSession
sr - the screen resolution as a two int array (x, y)
ipAddress - the IP address of the user creating the page impression
c - the ISO 3166-2 two-letter country code
p - the path identifying the page
r - the HTTP referer
userAgent - the user-agent as sent by the browser
acceptLanguage - the accept-language header as sent by the browser
isProxy - flag, identifying proxy request requests
Method Detail

getStatisticsServer

public final StatisticsServer getStatisticsServer()
Returns:
Returns the server.

getScreenResolution

public final int[] getScreenResolution()
returns the screenResolution as an int array (x, y) or null, if the screen resolution is unknown.

Returns:
the screenResolution as an int array (x, y) or null

getViewportResolution

public final int[] getViewportResolution()
returns the viewport resolution as an int array (x, y) or null, if the viewport resolution is unknown.

Returns:
the viewport resolution as an int array (x, y) or null

getIpHash

public final java.lang.String getIpHash()
Returns:
Returns the ipHash.

getCountry

public final java.lang.String getCountry()
Returns:
Returns the country.

getPath

public final java.lang.String getPath()
Returns:
Returns the path.

getReferer

public final java.lang.String getReferer()
Returns:
Returns the referer.

getUserAgentString

public final java.lang.String getUserAgentString()
Returns:
Returns the userAgentString.

getRecordedDate

public final java.util.Date getRecordedDate()
Returns the Date of creation.

Returns:
the Date

getRecordedMillis

public final long getRecordedMillis()
Returns the recorded of creation - milliseconds.

Returns:
the recorded

getSessionId

public final java.lang.String getSessionId()
Returns the session-id.

Returns:
the session-id

isProxyRequest

public final boolean isProxyRequest()
Returns whether the PIRecord was produced by a proxyRequest.

Returns:
whether the PIRecord was produced by a proxyRequest

isRecurring

public final boolean isRecurring()
Returns whether the the stored sessionId has been previously recorded.

Returns:
true if the stored sessionId has been previously recorded, false otherwise

setRecurring

public final void setRecurring(boolean b)
sets the recurring flag.

Parameters:
b - the value to set

getFullDay

public final Duration getFullDay()
Returns the Duration representing the "full, surrounding" day of the PIRecords recorded-time-stamp:

start: YYYY-MM-DD-00:00:00:000
end: YYYY-MM-DD-23:59:59:999.

Returns:
a Duration

getProcessedDate

public final java.util.Date getProcessedDate()
Returns the Date the PIRecord has been statistically processed by DataAggregationJoblet.

Returns:
Date

getProcessedMillis

public final long getProcessedMillis()
Returns the time-stamp the PIRecord has been statistically processed by DataAggregationJoblet.

Returns:
the processed

setProcessed

public final void setProcessed(long millis)
Called by DataAggregationJoblet to set the time-stamp the PIRecord has been statistically processed.

Parameters:
millis - the time-stamp to set

isProcessed

public final boolean isProcessed()
Indicates whether the PIRecord has been already statistically processed.

Returns:
true if the PIRecord has been processed by DataAggregationJoblet, false otherwise

toString

public final java.lang.String toString()
Returns a string-representation.

Overrides:
toString in class java.lang.Object
Returns:
string-representation.