Package tilda.enums
Enum ColumnType
- java.lang.Object
-
- java.lang.Enum<ColumnType>
-
- tilda.enums.ColumnType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ColumnType>
public enum ColumnType extends java.lang.Enum<ColumnType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BINARY
BITFIELD
BOOLEAN
CHAR
DATE
DATETIME
All Datetimes are stored as 2 columns in the DB, so SETs are not allowed because they are unordered.
Datetimes with timezones are stored as TIMESTAMPTZ in UTC and readjusted to ZonedDateTime in the app, and the TZ field is updated as appropriate during a set.DATETIME_PLAIN
All Datetimes are stored as 2 columns in the DB, so SETs are not allowed because they are unordered.
Datetimes without timezones (plain) are stored as DATETIME and readjusted to ZonedDateTime in the app based on the stored TZ field which is then managed explicitly in the app.
DATETIME_PLAIN is an internal type and is not available in the markup so that datetimes are enforced as being handled uniformly and always with a timezone.DOUBLE
FLOAT
INTEGER
JSON
LONG
NUMERIC
SHORT
STRING
UUID
VECTOR
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[][]
_ALIASES
boolean
_ArrayCompatible
static ColumnType[][]
_CompatibleDBTypes
static ColumnType[][]
_CompatibleTypes
boolean
_InternalOnly
static PaddingTracker
_PadderTypeNames
boolean
_Primitive
boolean
_SetCompatible
java.lang.String
_ShortName
java.lang.String
_SimpleName
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBigQueryType()
static java.lang.String
getCompatibleDBTypesString(ColumnType Type)
static java.lang.String
getCompatibleTypesString(ColumnType Type)
java.lang.String
getMappedName()
java.lang.String
getPad()
int
getSQLType()
boolean
isCollectionCompatible(MultiType CollectionType)
boolean
isCompatible(ColumnType Type)
boolean
isDBCompatible(ColumnType Type)
boolean
isNumber()
static boolean
isNumber(ColumnType Type)
boolean
isPrimitive()
java.util.Collection<?>
parse(boolean isSet, java.lang.String[] parts)
static ColumnType
parse(java.lang.String str)
static <T> void
validate(T[] Enums, java.lang.String typeName)
static ColumnType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ColumnType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final ColumnType STRING
-
JSON
public static final ColumnType JSON
-
VECTOR
public static final ColumnType VECTOR
-
CHAR
public static final ColumnType CHAR
-
SHORT
public static final ColumnType SHORT
-
INTEGER
public static final ColumnType INTEGER
-
LONG
public static final ColumnType LONG
-
FLOAT
public static final ColumnType FLOAT
-
DOUBLE
public static final ColumnType DOUBLE
-
NUMERIC
public static final ColumnType NUMERIC
-
BOOLEAN
public static final ColumnType BOOLEAN
-
DATE
public static final ColumnType DATE
-
DATETIME
public static final ColumnType DATETIME
All Datetimes are stored as 2 columns in the DB, so SETs are not allowed because they are unordered.
Datetimes with timezones are stored as TIMESTAMPTZ in UTC and readjusted to ZonedDateTime in the app, and the TZ field is updated as appropriate during a set.
-
DATETIME_PLAIN
public static final ColumnType DATETIME_PLAIN
All Datetimes are stored as 2 columns in the DB, so SETs are not allowed because they are unordered.
Datetimes without timezones (plain) are stored as DATETIME and readjusted to ZonedDateTime in the app based on the stored TZ field which is then managed explicitly in the app.
DATETIME_PLAIN is an internal type and is not available in the markup so that datetimes are enforced as being handled uniformly and always with a timezone. The difference is whether the timezone is baked in the timestamptz or managed manually along with a datetime. The internal implementation differences are driven by tzMode.
-
BINARY
public static final ColumnType BINARY
-
BITFIELD
public static final ColumnType BITFIELD
-
UUID
public static final ColumnType UUID
-
-
Field Detail
-
_PadderTypeNames
public static PaddingTracker _PadderTypeNames
-
_ArrayCompatible
public final boolean _ArrayCompatible
-
_SetCompatible
public final boolean _SetCompatible
-
_Primitive
public final boolean _Primitive
-
_InternalOnly
public final boolean _InternalOnly
-
_SimpleName
public final java.lang.String _SimpleName
-
_ShortName
public final java.lang.String _ShortName
-
_CompatibleTypes
public static final ColumnType[][] _CompatibleTypes
-
_CompatibleDBTypes
public static final ColumnType[][] _CompatibleDBTypes
-
_ALIASES
protected static java.lang.String[][] _ALIASES
-
-
Method Detail
-
values
public static ColumnType[] 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 (ColumnType c : ColumnType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ColumnType 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
-
parse
public static ColumnType parse(java.lang.String str)
-
isCollectionCompatible
public boolean isCollectionCompatible(MultiType CollectionType)
-
isPrimitive
public boolean isPrimitive()
-
isCompatible
public boolean isCompatible(ColumnType Type)
-
isDBCompatible
public boolean isDBCompatible(ColumnType Type)
-
getCompatibleTypesString
public static java.lang.String getCompatibleTypesString(ColumnType Type)
-
getCompatibleDBTypesString
public static java.lang.String getCompatibleDBTypesString(ColumnType Type)
-
validate
public static <T> void validate(T[] Enums, java.lang.String typeName)
-
getPad
public java.lang.String getPad()
-
parse
public java.util.Collection<?> parse(boolean isSet, java.lang.String[] parts) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isNumber
public boolean isNumber()
-
isNumber
public static boolean isNumber(ColumnType Type)
-
getBigQueryType
public java.lang.String getBigQueryType()
-
getSQLType
public int getSQLType()
-
getMappedName
public java.lang.String getMappedName()
-
-