Package com.iizix

Enum Class Value.Type

All Implemented Interfaces:
Serializable, Comparable<Value.Type>, Constable
Enclosing class:
Value

public static enum Value.Type extends Enum<Value.Type>
The enumeration of Types.
  • Enum Constant Details Link icon

    • String Link icon

      public static final Value.Type String
      The Data Type: String value.
    • KString Link icon

      public static final Value.Type KString
      The Data Type: String value.
    • Boolean Link icon

      public static final Value.Type Boolean
      The Data Type: T_Boolean as Boolean.
    • Byte Link icon

      public static final Value.Type Byte
      The Data Type: Byte.
    • Short Link icon

      public static final Value.Type Short
      The Data Type: Short.
    • Integer Link icon

      public static final Value.Type Integer
      The Data Type: Integer.
    • Long Link icon

      public static final Value.Type Long
      The Data Type: Long.
    • Float Link icon

      public static final Value.Type Float
      The Data Type: Float.
    • Double Link icon

      public static final Value.Type Double
      The Data Type: Double.
    • BigInteger Link icon

      public static final Value.Type BigInteger
      The Data Type: BigInteger.
    • BigDecimal Link icon

      public static final Value.Type BigDecimal
      The Data Type: BigDecimal.
    • LocalTime Link icon

      public static final Value.Type LocalTime
      The Data Type: java.time.LocalTime.
    • OffsetTime Link icon

      public static final Value.Type OffsetTime
      The Data Type: java.time.OffsetTime.
    • LocalDate Link icon

      public static final Value.Type LocalDate
      The Data Type: java.time.LocalDate.
    • MonthDay Link icon

      public static final Value.Type MonthDay
      The Data Type: java.time.MonthDay. No SQL mapping.
    • Year Link icon

      public static final Value.Type Year
      The Data Type: java.time.Year. No SQL mapping.
    • YearMonth Link icon

      public static final Value.Type YearMonth
      The Data Type: java.time.YearMonth. No SQL mapping.
    • LocalDateTime Link icon

      public static final Value.Type LocalDateTime
      The Data Type: java.time.LocalDateTime.
    • OffsetDateTime Link icon

      public static final Value.Type OffsetDateTime
      The Data Type: java.time.OffsetDateTime.
    • ZonedDateTime Link icon

      public static final Value.Type ZonedDateTime
      The Data Type: java.time.ZonedDateTime.
    • XMLGregorianCalendar Link icon

      public static final Value.Type XMLGregorianCalendar
      The Data Type: XMLGregorianCalendar using ImmutableXMLGregorianCalendar value class.
    • Duration Link icon

      public static final Value.Type Duration
      The Data Type: java.time.Duration. No SQL mapping.
    • Period Link icon

      public static final Value.Type Period
      The Data Type: java.time.Period. No SQL mapping.
    • XMLDuration Link icon

      public static final Value.Type XMLDuration
      The Data Type: javax.xml.datatype.Duration. No SQL mapping.
    • Binary Link icon

      public static final Value.Type Binary
      The Data Type: Binary as byte [].
  • Field Details Link icon

    • nullValue Link icon

      public final Value nullValue
      The null value for the type.
    • valueObject Link icon

      public final IValueObject<?> valueObject
      The interface that creates the default value.
    • category Link icon

      public final Value.Category category
      The category, null for value-specific category.
  • Method Details Link icon

    • values Link icon

      public static Value.Type[] 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 Link icon

      public static Value.Type valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • createDefault Link icon

      public Value createDefault()
      Creates a default value.
      Returns:
      A new default value.
    • getDefaultValue Link icon

      public Value getDefaultValue(boolean isNullAllowed)
      Gets a shared instance of a null or default Value of the specified type depending on the isNullAllowed flag.
      Parameters:
      isNullAllowed - Flag for null allowed.
      Returns:
      The default or null Value of the value type.
      Throws:
      IllegalArgumentException - If type is not valid.
    • getSQLType Link icon

      public int getSQLType()
      Gets the default SQL type for this Type.
      Returns:
      The SQL type, or Types.JAVA_OBJECT if no JDBC mapping is present.
    • canConvertTo Link icon

      public boolean canConvertTo(Value.Type dest)
      Returns 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).