Package org.h2.api
Enum IntervalQualifier
- java.lang.Object
-
- java.lang.Enum<IntervalQualifier>
-
- org.h2.api.IntervalQualifier
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<IntervalQualifier>
public enum IntervalQualifier extends java.lang.Enum<IntervalQualifier>
Interval qualifier.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DAYDAYDAY_TO_HOURDAY TO HOURDAY_TO_MINUTEDAY TO MINUTEDAY_TO_SECONDDAY TO SECONDHOURHOURHOUR_TO_MINUTEHOUR TO MINUTEHOUR_TO_SECONDHOUR TO SECONDMINUTEMINUTEMINUTE_TO_SECONDMINUTE TO SECONDMONTHMONTHSECONDSECONDYEARYEARYEAR_TO_MONTHYEAR TO MONTH
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringstring
-
Constructor Summary
Constructors Modifier Constructor Description privateIntervalQualifier()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetTypeName(int precision, int scale)Returns full type name.java.lang.StringBuildergetTypeName(java.lang.StringBuilder builder, int precision, int scale, boolean qualifierOnly)Appends full type name to the specified string builder.booleanhasDays()Returns whether interval with this qualifier has days.booleanhasHours()Returns whether interval with this qualifier has hours.booleanhasMinutes()Returns whether interval with this qualifier has minutes.booleanhasMonths()Returns whether interval with this qualifier has months.booleanhasMultipleFields()Returns whether interval with this qualifier has multiple fields.booleanhasSeconds()Returns whether interval with this qualifier has seconds.booleanhasYears()Returns whether interval with this qualifier has years.booleanisDayTime()Returns whether interval with this qualifier is a day-time interval.booleanisYearMonth()Returns whether interval with this qualifier is a year-month interval.java.lang.StringtoString()static IntervalQualifiervalueOf(int ordinal)Returns the interval qualifier with the specified ordinal value.static IntervalQualifiervalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static IntervalQualifier[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
YEAR
public static final IntervalQualifier YEAR
YEAR
-
MONTH
public static final IntervalQualifier MONTH
MONTH
-
DAY
public static final IntervalQualifier DAY
DAY
-
HOUR
public static final IntervalQualifier HOUR
HOUR
-
MINUTE
public static final IntervalQualifier MINUTE
MINUTE
-
SECOND
public static final IntervalQualifier SECOND
SECOND
-
YEAR_TO_MONTH
public static final IntervalQualifier YEAR_TO_MONTH
YEAR TO MONTH
-
DAY_TO_HOUR
public static final IntervalQualifier DAY_TO_HOUR
DAY TO HOUR
-
DAY_TO_MINUTE
public static final IntervalQualifier DAY_TO_MINUTE
DAY TO MINUTE
-
DAY_TO_SECOND
public static final IntervalQualifier DAY_TO_SECOND
DAY TO SECOND
-
HOUR_TO_MINUTE
public static final IntervalQualifier HOUR_TO_MINUTE
HOUR TO MINUTE
-
HOUR_TO_SECOND
public static final IntervalQualifier HOUR_TO_SECOND
HOUR TO SECOND
-
MINUTE_TO_SECOND
public static final IntervalQualifier MINUTE_TO_SECOND
MINUTE TO SECOND
-
-
Method Detail
-
values
public static IntervalQualifier[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IntervalQualifier c : IntervalQualifier.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IntervalQualifier valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
valueOf
public static IntervalQualifier valueOf(int ordinal)
Returns the interval qualifier with the specified ordinal value.- Parameters:
ordinal- Java ordinal value (0-based)- Returns:
- interval qualifier with the specified ordinal value
-
isYearMonth
public boolean isYearMonth()
Returns whether interval with this qualifier is a year-month interval.- Returns:
- whether interval with this qualifier is a year-month interval
-
isDayTime
public boolean isDayTime()
Returns whether interval with this qualifier is a day-time interval.- Returns:
- whether interval with this qualifier is a day-time interval
-
hasYears
public boolean hasYears()
Returns whether interval with this qualifier has years.- Returns:
- whether interval with this qualifier has years
-
hasMonths
public boolean hasMonths()
Returns whether interval with this qualifier has months.- Returns:
- whether interval with this qualifier has months
-
hasDays
public boolean hasDays()
Returns whether interval with this qualifier has days.- Returns:
- whether interval with this qualifier has days
-
hasHours
public boolean hasHours()
Returns whether interval with this qualifier has hours.- Returns:
- whether interval with this qualifier has hours
-
hasMinutes
public boolean hasMinutes()
Returns whether interval with this qualifier has minutes.- Returns:
- whether interval with this qualifier has minutes
-
hasSeconds
public boolean hasSeconds()
Returns whether interval with this qualifier has seconds.- Returns:
- whether interval with this qualifier has seconds
-
hasMultipleFields
public boolean hasMultipleFields()
Returns whether interval with this qualifier has multiple fields.- Returns:
- whether interval with this qualifier has multiple fields
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<IntervalQualifier>
-
getTypeName
public java.lang.String getTypeName(int precision, int scale)Returns full type name.- Parameters:
precision- precision, or-1scale- fractional seconds precision, or-1- Returns:
- full type name
-
getTypeName
public java.lang.StringBuilder getTypeName(java.lang.StringBuilder builder, int precision, int scale, boolean qualifierOnly)Appends full type name to the specified string builder.- Parameters:
builder- string builderprecision- precision, or-1scale- fractional seconds precision, or-1qualifierOnly- iftrue, don't add the INTERVAL prefix- Returns:
- the specified string builder
-
-