com.xpn.xwiki.stats.impl
Class XWikiStats
java.lang.Object
com.xpn.xwiki.objects.BaseElement<R>
com.xpn.xwiki.objects.BaseCollection
com.xpn.xwiki.stats.impl.XWikiStats
- All Implemented Interfaces:
- ElementInterface, ObjectInterface, Serializable, Cloneable
- Direct Known Subclasses:
- DocumentStats, RefererStats, VisitStats
public class XWikiStats
- extends BaseCollection
Base class for all stored statistics object.
- Version:
- $Id: b261504349817c1717319d6fda1103e49025e9f4 $
- See Also:
- Serialized Form
Methods inherited from class com.xpn.xwiki.objects.BaseCollection |
addField, addPropertyForRemoval, apply, clone, get, getClassName, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getNumber, getProperties, getPropertyList, getPropertyNames, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClass, getXClassReference, merge, merge, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setNumber, setOwnerDocument, setSetValue, setStringListValue, setStringValue, setXClassReference, toString, toXMLString |
Methods inherited from class com.xpn.xwiki.objects.BaseElement |
createReference, getDocumentReference, getId, getLocalUidStringEntityReferenceSerializer, getName, getOwnerDocument, getPrettyName, getReference, setId, setName, setPrettyName |
XWikiStats
public XWikiStats()
- Default constructor.
XWikiStats
public XWikiStats(Date periodDate,
StatsUtil.PeriodType periodtype)
- Parameters:
periodDate
- the period date.periodtype
- the period type.
getPeriod
public int getPeriod()
- Returns:
- the time when statistic was stored.
setPeriod
public void setPeriod(int period)
- Parameters:
period
- the time when statistic was stored.
getPageViews
public int getPageViews()
- Returns:
- the counter of view action of this statistic.
setPageViews
public void setPageViews(int pageViews)
- Parameters:
pageViews
- the counter of view action of this statistic.
incPageViews
public void incPageViews()
- Add 1 to the counter of view action of this statistic.
getLocalKey
protected String getLocalKey()
- Overrides:
getLocalKey
in class BaseElement
- Returns:
- a unique identifier representing this element reference to be used for
hashCode()
.
hashCode
public int hashCode()
- Overrides:
hashCode
in class BaseElement
equals
public boolean equals(Object obj)
- Overrides:
equals
in class BaseCollection
toXML
public org.dom4j.Element toXML(BaseClass bclass)
- Specified by:
toXML
in interface ObjectInterface
- Specified by:
toXML
in class BaseCollection
fromXML
public void fromXML(org.dom4j.Element oel)
throws XWikiException
- Initialize statistics object from XML schema.
- Parameters:
oel
- the XML root node containing statistics datas.
- Throws:
XWikiException
- error when parsing XML schema.
Copyright © 2004–2014 XWiki. All rights reserved.