Class VisitStats

    • Field Detail

      • oldObject

        protected VisitStats oldObject
        The previous visit object.
    • Constructor Detail

      • VisitStats

        public VisitStats()
        Default VisitStats constructor.
      • VisitStats

        public VisitStats​(String user,
                          String uniqueID,
                          String cookie,
                          String ip,
                          String userAgent,
                          Date startDate,
                          StatsUtil.PeriodType periodType)
        Parameters:
        user - the user name.
        uniqueID - the visit object unique id.
        cookie - the cookie id.
        ip - the IP of the user.
        userAgent - the user agent of the user.
        startDate - the starting date of the visit.
        periodType - the type of the period.
    • Method Detail

      • rememberOldObject

        public void rememberOldObject​(VisitStats vobject)
        Store previous object to be able to remove it from the database later.
        Parameters:
        vobject - the previous object.
      • unrememberOldObject

        public void unrememberOldObject()
        Set old visit object to null.
      • getOldObject

        public VisitStats getOldObject()
        Returns:
        the previous visit object.
      • getPageSaves

        public int getPageSaves()
        Returns:
        the number of saved pages during this visit.
      • setPageSaves

        public void setPageSaves​(int pageSaves)
        Parameters:
        pageSaves - the number of saved pages during this visit.
      • incPageSaves

        public void incPageSaves()
        Add 1 to the number of saved pages during this visit.
      • getDownloads

        public int getDownloads()
        Returns:
        the number of downloaded pages during this visit.
      • setDownloads

        public void setDownloads​(int downloads)
        Parameters:
        downloads - the number of downloaded pages during this visit.
      • incDownloads

        public void incDownloads()
        Add 1 to the number of downloaded pages during this visit.
      • getStartDate

        public Date getStartDate()
        Returns:
        the starting date of the user visit.
      • setStartDate

        public void setStartDate​(Date startDate)
        Parameters:
        startDate - the starting date of the user visit.
      • getEndDate

        public Date getEndDate()
        Returns:
        the ending date of the user visit.
      • setEndDate

        public void setEndDate​(Date endDate)
        Parameters:
        endDate - the ending date of the user visit.
      • getUniqueID

        public String getUniqueID()
        Returns:
        the unique id of the user visit.
      • setUniqueID

        public void setUniqueID​(String uniqueID)
        Parameters:
        uniqueID - the unique id of the user visit.
      • getCookie

        public String getCookie()
        Returns:
        the cookie id of the user.
      • setCookie

        public void setCookie​(String cookie)
        Parameters:
        cookie - the cookie id of the user.
      • getIP

        public String getIP()
        Returns:
        the IP address of the user.
      • setIP

        public void setIP​(String ip)
        Parameters:
        ip - the IP address of the user.
      • getUserAgent

        public String getUserAgent()
        Returns:
        the user agent of the user.
      • setUserAgent

        public void setUserAgent​(String userAgent)
        Parameters:
        userAgent - the user agent of the user.
      • getUser

        public String getUser()
        Returns:
        the user name.
      • setUser

        public void setUser​(String user)
        Parameters:
        user - the user name.