public enum FieldType extends Enum<FieldType>
UNDEFINED
is used for any type not natively supported by Data Pipeline.Enum Constant and Description |
---|
BIG_DECIMAL |
BIG_INTEGER |
BLOB |
BOOLEAN |
BYTE |
CHAR |
DATE |
DATETIME |
DOUBLE |
FLOAT |
INT |
LONG |
RECORD |
SHORT |
STRING |
TIME |
UNDEFINED |
Modifier and Type | Method and Description |
---|---|
long |
getFixedSizeInBytes()
Returns the number of bytes used to represent values of this type or zero (0) for non-fixed-byte-sized types.
|
Class<?> |
getJavaType()
Returns the default Java representation for this instance.
|
long |
getMinimumSizeInBytes()
Returns the minimum number of bytes used to represent values of this type.
|
long |
getNumericSizeInBytes()
Returns the number of bytes used to represent values of this type or zero (0) for non-numeric types.
|
long |
getSizeInBytes(ValueNode<?> valueNode) |
protected long |
getSizeInBytesImpl(Object value) |
boolean |
isArbitrarySizeInBytes()
Returns
true if values of this type can vary in length/size, otherwise false for fixed-length types. |
boolean |
isBinary() |
boolean |
isBoolean() |
boolean |
isFixedSizeInBytes()
Returns
true if values of this type are fixed in length/size, otherwise false for types that can vary in length. |
boolean |
isIntegerNumber()
Returns
true if values of this type are numbers that cannot contain fractions (byte, short, int, etc.). |
boolean |
isNumeric() |
boolean |
isRealNumber()
Returns
true if values of this type are numbers that can contain fractions. |
boolean |
isTemporal() |
boolean |
isTextual() |
static FieldType |
lookupByType(String type) |
abstract Object |
mapValue(Object value)
Attempts to convert an object or string to the Java type that best represents this field type.
|
static FieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
String |
valueToString(Object value) |
protected String |
valueToStringImpl(Object value) |
public static final FieldType UNDEFINED
public static final FieldType STRING
public static final FieldType INT
public static final FieldType LONG
public static final FieldType DOUBLE
public static final FieldType DATETIME
public static final FieldType BOOLEAN
public static final FieldType BYTE
public static final FieldType FLOAT
public static final FieldType SHORT
public static final FieldType CHAR
public static final FieldType DATE
public static final FieldType TIME
public static final FieldType BLOB
public static final FieldType RECORD
public static final FieldType BIG_INTEGER
public static final FieldType BIG_DECIMAL
public static FieldType[] values()
for (FieldType c : FieldType.values()) System.out.println(c);
public static FieldType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final long getSizeInBytes(ValueNode<?> valueNode)
protected long getSizeInBytesImpl(Object value)
public Class<?> getJavaType()
public boolean isNumeric()
public boolean isTextual()
public boolean isTemporal()
public boolean isBoolean()
public boolean isBinary()
public boolean isArbitrarySizeInBytes()
true
if values of this type can vary in length/size, otherwise false
for fixed-length types.public boolean isFixedSizeInBytes()
true
if values of this type are fixed in length/size, otherwise false
for types that can vary in length.public boolean isRealNumber()
true
if values of this type are numbers that can contain fractions.public boolean isIntegerNumber()
true
if values of this type are numbers that cannot contain fractions (byte, short, int, etc.).public final long getNumericSizeInBytes()
public final long getFixedSizeInBytes()
public final long getMinimumSizeInBytes()
public abstract Object mapValue(Object value)
INT
would
attempt to parse or coerce values into Integer
s.Copyright (c) 2006-2023 North Concepts Inc. All Rights Reserved.