Enum DateGranularity

java.lang.Object
java.lang.Enum<DateGranularity>
com.smartgwt.client.types.DateGranularity
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<DateGranularity>, Constable

public enum DateGranularity extends Enum<DateGranularity> implements ValueEnum
Size of the date buckets a facet's values represent, as declared by Facet.dateGranularity.

Every granularity names an absolute period, so January 2024 and January 2025 are separate buckets. That is the meaning of the ListGrid's "monthAndYear" grouping mode, and the grid's cross-year modes - which fold every January together whatever the year - have no equivalent here, because such a group cannot be named by a single date. The grid's spellings for the periods that are absolute are accepted as synonyms, so "monthAndYear", "quarterAndYear" and "weekAndYear" mean the same as "month", "quarter" and "year".

  • Enum Constant Details

    • SECOND

      public static final DateGranularity SECOND
      one bucket per second

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "second".

    • MINUTE

      public static final DateGranularity MINUTE
      one bucket per minute

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "minute".

    • HOUR

      public static final DateGranularity HOUR
      one bucket per hour

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "hour".

    • DAY

      public static final DateGranularity DAY
      one bucket per day

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "day".

    • WEEK

      public static final DateGranularity WEEK
      one bucket per week, starting on DateUtil.getFirstDayOfWeek()

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "week".

    • MONTH

      public static final DateGranularity MONTH
      one bucket per calendar month

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "month".

    • QUARTER

      public static final DateGranularity QUARTER
      one bucket per calendar quarter

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "quarter".

    • YEAR

      public static final DateGranularity YEAR
      one bucket per calendar year

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "year".

    • DECADE

      public static final DateGranularity DECADE
      one bucket per decade

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "decade".

    • CENTURY

      public static final DateGranularity CENTURY
      one bucket per century

      If this enumerated value is used in a Component XML file or server-side DataSource descriptor (.ds.xml file), use the value "century".

  • Method Details

    • values

      public static DateGranularity[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DateGranularity valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Specified by:
      getValue in interface ValueEnum