Package com.iizix
Enum Class Value.Type
- All Implemented Interfaces:
- Serializable,- Comparable<Value.Type>,- Constable
- Enclosing class:
- Value
The enumeration of Types.
- Nested Class Summary- Nested classes/interfaces inherited from class java.lang.Enum- Enum.EnumDesc<E extends Enum<E>>
- Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionThe Data Type: BigDecimal.The Data Type: BigInteger.The Data Type: Binary as byte [].The Data Type: T_Boolean as Boolean.The Data Type: Byte.The Data Type: Double.The Data Type: java.time.Duration.The Data Type: Float.The Data Type: Integer.The Data Type: String value.The Data Type: java.time.LocalDate.The Data Type: java.time.LocalDateTime.The Data Type: java.time.LocalTime.The Data Type: Long.The Data Type: java.time.MonthDay.The Data Type: java.time.OffsetDateTime.The Data Type: java.time.OffsetTime.The Data Type: java.time.Period.The Data Type: Short.The Data Type: String value.The Data Type: javax.xml.datatype.Duration.The Data Type: XMLGregorianCalendar using ImmutableXMLGregorianCalendar value class.The Data Type: java.time.Year.The Data Type: java.time.YearMonth.The Data Type: java.time.ZonedDateTime.
- Field SummaryFieldsModifier and TypeFieldDescription- final Value.CategoryThe category, null for value-specific category.- final ValueThe null value for the type.- final IValueObject<?>The interface that creates the default value.
- Method SummaryModifier and TypeMethodDescription- boolean- canConvertTo- (Value.Type dest) Returns if this value can be converted to another value type.Creates a default value.- getDefaultValue- (boolean isNullAllowed) Gets a shared instance of a- nullor default- Valueof the specified type depending on the- isNullAllowedflag.- intGets the default SQL type for this Type.- static Value.TypeReturns the enum constant of this class with the specified name.- static Value.Type[]- values()Returns an array containing the constants of this enum class, in the order they are declared.
- Enum Constant Details- StringThe Data Type: String value.
- KStringThe Data Type: String value.
- BooleanThe Data Type: T_Boolean as Boolean.
- ByteThe Data Type: Byte.
- ShortThe Data Type: Short.
- IntegerThe Data Type: Integer.
- LongThe Data Type: Long.
- FloatThe Data Type: Float.
- DoubleThe Data Type: Double.
- BigIntegerThe Data Type: BigInteger.
- BigDecimalThe Data Type: BigDecimal.
- LocalTimeThe Data Type: java.time.LocalTime.
- OffsetTimeThe Data Type: java.time.OffsetTime.
- LocalDateThe Data Type: java.time.LocalDate.
- MonthDayThe Data Type: java.time.MonthDay. No SQL mapping.
- YearThe Data Type: java.time.Year. No SQL mapping.
- YearMonthThe Data Type: java.time.YearMonth. No SQL mapping.
- LocalDateTimeThe Data Type: java.time.LocalDateTime.
- OffsetDateTimeThe Data Type: java.time.OffsetDateTime.
- ZonedDateTimeThe Data Type: java.time.ZonedDateTime.
- XMLGregorianCalendarThe Data Type: XMLGregorianCalendar using ImmutableXMLGregorianCalendar value class.
- DurationThe Data Type: java.time.Duration. No SQL mapping.
- PeriodThe Data Type: java.time.Period. No SQL mapping.
- XMLDurationThe Data Type: javax.xml.datatype.Duration. No SQL mapping.
- BinaryThe Data Type: Binary as byte [].
 
- Field Details- nullValueThe null value for the type.
- valueObjectThe interface that creates the default value.
- categoryThe category, null for value-specific category.
 
- Method Details- valuesReturns 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
 
- valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- createDefaultCreates a default value.- Returns:
- A new default value.
 
- getDefaultValueGets a shared instance of a- nullor default- Valueof the specified type depending on the- isNullAllowedflag.- Parameters:
- isNullAllowed- Flag for null allowed.
- Returns:
- The default or null Valueof the value type.
- Throws:
- IllegalArgumentException- If type is not valid.
 
- getSQLTypepublic int getSQLType()Gets the default SQL type for this Type.- Returns:
- The SQL type, or Types.JAVA_OBJECTif no JDBC mapping is present.
 
- canConvertToReturns if this value can be converted to another value type. Data or precision loss is accepted in this conversion, e.g. losing the decimal part (conversion from Float to Integer) or the time part for (converting date-time to date). Note that String and KString are set to be convertable to all types, but they may fail often, e.g. String converted to Date fails due to wrong format.- Parameters:
- dest- The destination type.
- Returns:
- true if it is possible to convert, but if the value conversion succeeds or fails depends on the value itself (e.g. convert Integer 256 to Byte will fail).