Class DateExpression

    • Constructor Detail

      • DateExpression

        public DateExpression()
        Default Constructor.
    • Method Detail

      • getTimeZone

        public TimeZone getTimeZone()
        Returns the current time-zone.
        Returns:
        the time-zone or null, if none is set.
      • setTimeZone

        public void setTimeZone​(TimeZone timeZone)
        Defines the timezone. If none is defined here, the locale's default timezone is used instead.
        Parameters:
        timeZone - the time-zone.
      • getMonth

        public Integer getMonth()
        Returns the month property.
        Returns:
        the month property.
      • setMonth

        public void setMonth​(Integer month)
        Defines the month property.
        Parameters:
        month - the month property.
      • getDay

        public Integer getDay()
        Returns the day property. This returns the day within the current month.
        Returns:
        the day of the month property.
      • setDay

        public void setDay​(Integer day)
        Defines the day property. This defines the day within the current month.
        Parameters:
        day - the day of the month property.
      • getYear

        public Integer getYear()
        Returns the year property.
        Returns:
        the year property.
      • setYear

        public void setYear​(Integer year)
        Defines the year property.
        Parameters:
        year - the year property.
      • getHour

        public Integer getHour()
        Returns the hour of the day property. This uses the 24-hour system.
        Returns:
        the hour property.
      • setHour

        public void setHour​(Integer hour)
        Defines the hour property. This uses the 24-hour system
        Parameters:
        hour - the hour property.
      • getMinute

        public Integer getMinute()
        Returns the minute property.
        Returns:
        the minute property.
      • setMinute

        public void setMinute​(Integer minute)
        Defines the minute property.
        Parameters:
        minute - the minute property.
      • getSecond

        public Integer getSecond()
        Returns the second property.
        Returns:
        the second property.
      • setSecond

        public void setSecond​(Integer second)
        Defines the second property.
        Parameters:
        second - the second property.
      • getMilliSecond

        public Integer getMilliSecond()
        Returns the milli-second property.
        Returns:
        the milli-second property.
      • setMilliSecond

        public void setMilliSecond​(Integer milliSecond)
        Defines the year property.
        Parameters:
        milliSecond - the milli-seconds property.
      • getTime

        public Long getTime()
        Returns the time in milli-seconds since 01-Jan-1970.
        Returns:
        the time in milli-seconds since 01-Jan-1970.
      • setTime

        public void setTime​(Long time)
        Defines the time in milli-seconds since 01-Jan-1970.
        Parameters:
        time - the time in milli-seconds since 01-Jan-1970.
      • getEpochTime

        public Long getEpochTime()
        Returns the time in seconds since 01-Jan-1970.
        Returns:
        the time in seconds since 01-Jan-1970.
      • setEpochTime

        public void setEpochTime​(Long epochTime)
        Defines the time in seconds since 01-Jan-1970.
        Parameters:
        epochTime - the time in seconds since 01-Jan-1970.
      • getDayOfWeek

        public Integer getDayOfWeek()
        Returns the day of the week property.
        Returns:
        the day-of-the-week property.
      • setDayOfWeek

        public void setDayOfWeek​(Integer dayOfWeek)
        Defines the day of the week property.
        Parameters:
        dayOfWeek - the day-of-the-week property.
      • getDayOfYear

        public Integer getDayOfYear()
        Returns the day of the year property.
        Returns:
        the day-of-the-year property.
      • setDayOfYear

        public void setDayOfYear​(Integer dayOfYear)
        Defines the day of the year property.
        Parameters:
        dayOfYear - the day-of-the-year property.
      • getDayOfMonth

        public Integer getDayOfMonth()
        Returns the day of the month property.
        Returns:
        the day-of-the-month property.
      • setDayOfMonth

        public void setDayOfMonth​(Integer dayOfMonth)
        Defines the day of the month property.
        Parameters:
        dayOfMonth - the day-of-the-month property.
      • getDayOfWeekInMonth

        public Integer getDayOfWeekInMonth()
        Returns the day of the week in the month property.
        Returns:
        the day of the week in the month property.
      • setDayOfWeekInMonth

        public void setDayOfWeekInMonth​(Integer dayOfWeekInMonth)
        Defines the day of the week in the month property.
        Parameters:
        dayOfWeekInMonth - the day of the week in the month property.
      • getWeekOfYear

        public Integer getWeekOfYear()
        Returns the week of the year property.
        Returns:
        the week of the year property.
      • setWeekOfYear

        public void setWeekOfYear​(Integer weekOfYear)
        Defines the week of the year property.
        Parameters:
        weekOfYear - the week of the year property.
      • getWeekOfMonth

        public Integer getWeekOfMonth()
      • setWeekOfMonth

        public void setWeekOfMonth​(Integer weekOfMonth)
      • getValue

        public Object getValue()
        Return the current expression value.

        The value depends (obviously) on the expression implementation.

        Returns:
        the value of the function.
      • configureCalendar

        protected void configureCalendar​(Calendar calendar)
        Configures the given Calendar instance by applying all defined fields to it.
        Parameters:
        calendar - the week of the year property.
      • getCalendar

        protected Calendar getCalendar()
        Create a new calendar instance. This implementation uses Calendar.getInstance(..) to create the Calendar, and therefore the result depends on the locale of the report.
        Returns:
        the calendar.