Enum Class DateTimeGroupBy
java.lang.Object
java.lang.Enum<DateTimeGroupBy>
com.kingsrook.qqq.backend.core.actions.dashboard.widgets.DateTimeGroupBy
- All Implemented Interfaces:
Serializable
,Comparable<DateTimeGroupBy>
,Constable
Enum to define various "levels" of group-by for on dashboards that want to
group records by, e.g., year, or month, or week, or day, or hour.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetSqlExpression
(ZoneId targetZoneId) makeHumanString
(Instant instant) Make a string to show to a usermakeHumanString
(Instant instant, ZoneId zoneId) Make a string to show to a usermakeSelectedString
(Instant time) Make an Instant into a string that will match what came out of the database's DATE_FORMAT() functionmakeSelectedString
(Instant time, ZoneId zoneId) Make an Instant into a string that will match what came out of the database's DATE_FORMAT() functionstatic DateTimeGroupBy
selectFromStartAndEndTimes
(Instant start, Instant end) get an instance of this enum, based on start invalid input: '&' end instants - look at the # of millis between them, and return the first enum value w/ a millisThreshold under that difference.static DateTimeFormatter
sqlDateFormatToSelectedDateTimeFormatter
(String sqlDateFormat) static DateTimeGroupBy
Returns the enum constant of this class with the specified name.static DateTimeGroupBy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
YEAR
////////////////////////////////////////////////////////////////////////////////////////////////////////// -
MONTH
-
WEEK
-
DAY
-
HOUR
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getSqlExpression
-
getSqlExpression
-
selectFromStartAndEndTimes
get an instance of this enum, based on start invalid input: '&' end instants - look at the # of millis between them, and return the first enum value w/ a millisThreshold under that difference. Default to HOUR. -
makeSelectedString
-
makeSelectedString
-
makeHumanString
-
makeHumanString
-
roundDown
-
roundDown
-
increment
-
increment
-
sqlDateFormatToSelectedDateTimeFormatter
-