Package deltix.qsrv.hf.pub.md
Class VarcharDataType
- java.lang.Object
-
- deltix.qsrv.hf.pub.md.DataType
-
- deltix.qsrv.hf.pub.md.VarcharDataType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public final class VarcharDataType extends DataType
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class deltix.qsrv.hf.pub.md.DataType
DataType.ConversionType
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALPHANUMERIC
static long
ALPHANUMERIC_NULL
static java.lang.String[]
ENCODING
static java.lang.String
ENCODING_ALPHANUMERIC
static java.lang.String
ENCODING_INLINE_VARSIZE
static int[]
ENCODING_TYPE
static int
FORWARD_VARSIZE
static int
INLINE_VARSIZE
-
Fields inherited from class deltix.qsrv.hf.pub.md.DataType
encoding, T_ARRAY_TYPE, T_BINARY_TYPE, T_BOOLEAN_TYPE, T_CHAR_TYPE, T_DATE_TIME_TYPE, T_DOUBLE_TYPE, T_ENUM_TYPE, T_FLOAT_TYPE, T_INTEGER_TYPE, T_OBJECT_TYPE, T_STRING_TYPE, T_TIME_OF_DAY_TYPE
-
-
Constructor Summary
Constructors Constructor Description VarcharDataType(java.lang.String encoding, boolean nullable, boolean inMultiLine)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assertValidImpl(java.lang.Object obj)
Checks a non-null Boxed value against constraints, if any.static int
extractSize(java.lang.String encoding)
java.lang.String
getBaseName()
int
getCode()
static VarcharDataType
getDefaultInstance()
static java.lang.String
getEncodingAlphanumeric(int length)
int
getEncodingType()
int
getLength()
boolean
isAlphanumeric()
DataType.ConversionType
isConvertible(DataType to)
boolean
isMultiLine()
void
parseEncoding(java.lang.String encoding)
protected void
readFields(java.io.DataInputStream in, ClassDescriptor.TypeResolver resolver)
protected java.lang.Object
toBoxedImpl(java.lang.CharSequence text)
Parse non-null text and return an object without checking constraints.protected java.lang.String
toStringImpl(java.lang.Object obj)
Converts a non-null, constraint-compliant Boxed value to String.void
writeTo(java.io.DataOutputStream out)
-
Methods inherited from class deltix.qsrv.hf.pub.md.DataType
assertValid, clone, getEncoding, isNullable, isPrimitive, nullableInstance, outOfRange, parse, parseBoolean, parseByte, parseDate, parseDouble, parseFloat, parseInt, parseLong, parseShort, readFrom, setNullable, toString, unsupportedType
-
-
-
-
Field Detail
-
INLINE_VARSIZE
public static final int INLINE_VARSIZE
- See Also:
- Constant Field Values
-
FORWARD_VARSIZE
public static final int FORWARD_VARSIZE
- See Also:
- Constant Field Values
-
ALPHANUMERIC
public static final int ALPHANUMERIC
- See Also:
- Constant Field Values
-
ENCODING_INLINE_VARSIZE
public static final java.lang.String ENCODING_INLINE_VARSIZE
- See Also:
- Constant Field Values
-
ENCODING_ALPHANUMERIC
public static final java.lang.String ENCODING_ALPHANUMERIC
- See Also:
- Constant Field Values
-
ALPHANUMERIC_NULL
public static final long ALPHANUMERIC_NULL
- See Also:
- Constant Field Values
-
ENCODING
public static final java.lang.String[] ENCODING
-
ENCODING_TYPE
public static final int[] ENCODING_TYPE
-
-
Method Detail
-
extractSize
public static int extractSize(java.lang.String encoding) throws java.text.ParseException
- Throws:
java.text.ParseException
-
getDefaultInstance
public static VarcharDataType getDefaultInstance()
-
getBaseName
public java.lang.String getBaseName()
- Specified by:
getBaseName
in classDataType
-
parseEncoding
public void parseEncoding(java.lang.String encoding)
- Overrides:
parseEncoding
in classDataType
-
assertValidImpl
protected void assertValidImpl(java.lang.Object obj)
Description copied from class:DataType
Checks a non-null Boxed value against constraints, if any. If the object is of unsupported type, this method should throwDataType.unsupportedType(java.lang.Object)
.- Specified by:
assertValidImpl
in classDataType
- Parameters:
obj
- A Boxed representation of a value.
-
toBoxedImpl
protected java.lang.Object toBoxedImpl(java.lang.CharSequence text)
Description copied from class:DataType
Parse non-null text and return an object without checking constraints.- Specified by:
toBoxedImpl
in classDataType
-
toStringImpl
protected java.lang.String toStringImpl(java.lang.Object obj)
Description copied from class:DataType
Converts a non-null, constraint-compliant Boxed value to String.- Specified by:
toStringImpl
in classDataType
- Parameters:
obj
- A non-null, valid value.- Returns:
- A String representation.
-
isMultiLine
public boolean isMultiLine()
-
getEncodingType
public int getEncodingType()
-
getLength
public int getLength()
-
getEncodingAlphanumeric
public static java.lang.String getEncodingAlphanumeric(int length)
-
isConvertible
public DataType.ConversionType isConvertible(DataType to)
- Specified by:
isConvertible
in classDataType
-
isAlphanumeric
public boolean isAlphanumeric()
-
writeTo
public void writeTo(java.io.DataOutputStream out) throws java.io.IOException
-
readFields
protected void readFields(java.io.DataInputStream in, ClassDescriptor.TypeResolver resolver) throws java.io.IOException
- Overrides:
readFields
in classDataType
- Throws:
java.io.IOException
-
-