public final class JSQLType extends java.lang.Object implements Formatable
Modifier and Type | Field and Description |
---|---|
static byte |
BOOLEAN |
static byte |
BYTE |
private byte |
category |
static byte |
CHAR |
static byte |
DOUBLE |
static byte |
FLOAT |
static byte |
INT |
static byte |
JAVA_CLASS |
static byte |
JAVA_PRIMITIVE |
private java.lang.String |
javaClassName |
static byte |
LONG |
static byte |
NOT_PRIMITIVE |
private byte |
primitiveKind |
private static java.lang.String[] |
primitiveNames |
static byte |
SHORT |
private DataTypeDescriptor |
sqlType |
static byte |
SQLTYPE |
private static java.lang.String[] |
wrapperClassNames |
Constructor and Description |
---|
JSQLType()
Public 0-arg constructor for Formatable machinery.
|
JSQLType(byte primitiveKind)
Create a JSQLType for a Java primitive.
|
JSQLType(DataTypeDescriptor sqlType)
Create a JSQLType from a SQL type.
|
JSQLType(java.lang.String javaName)
Create a JSQLType given the name of a Java primitive or java class.
|
Modifier and Type | Method and Description |
---|---|
byte |
getCategory()
What kind of type is this:
|
java.lang.String |
getJavaClassName()
If this is a JAVA_CLASS, what is it's name?
|
static byte |
getPrimitiveID(java.lang.String name)
Translate the name of a java primitive to an id
|
byte |
getPrimitiveKind()
If this is a JAVA_PRIMITIVE, what is its name?
|
static java.lang.String |
getPrimitiveName(byte index) |
DataTypeDescriptor |
getSQLType()
What's our SQLTYPE?
|
int |
getTypeFormatId()
Get the formatID which corresponds to this class.
|
static java.lang.String |
getWrapperClassName(byte primitive)
Gets the name of the java wrapper class corresponding to a primitive.
|
private void |
initialize(byte primitiveKind) |
private void |
initialize(byte category,
DataTypeDescriptor sqlType,
java.lang.String javaClassName,
byte primitiveKind)
Initialize this JSQL type.
|
private void |
initialize(DataTypeDescriptor sqlType) |
private void |
initialize(java.lang.String javaClassName) |
void |
readExternal(java.io.ObjectInput in) |
void |
writeExternal(java.io.ObjectOutput out) |
public static final byte SQLTYPE
public static final byte JAVA_CLASS
public static final byte JAVA_PRIMITIVE
public static final byte NOT_PRIMITIVE
public static final byte BOOLEAN
public static final byte CHAR
public static final byte BYTE
public static final byte SHORT
public static final byte INT
public static final byte LONG
public static final byte FLOAT
public static final byte DOUBLE
private static final java.lang.String[] wrapperClassNames
private static final java.lang.String[] primitiveNames
private byte category
private DataTypeDescriptor sqlType
private java.lang.String javaClassName
private byte primitiveKind
public JSQLType()
public JSQLType(DataTypeDescriptor sqlType)
sqlType
- the SQL type to wrappublic JSQLType(java.lang.String javaName)
javaName
- name of java primitive or class to wrappublic JSQLType(byte primitiveKind)
primitiveKind
- primitive to wrappublic byte getCategory()
public byte getPrimitiveKind()
public java.lang.String getJavaClassName()
public DataTypeDescriptor getSQLType() throws StandardException
StandardException
public static java.lang.String getPrimitiveName(byte index)
public int getTypeFormatId()
getTypeFormatId
in interface TypedFormat
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
- thrown on errorjava.lang.ClassNotFoundException
- thrown on errorExternalizable.readExternal(java.io.ObjectInput)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
- thrown on errorprivate void initialize(byte primitiveKind)
private void initialize(DataTypeDescriptor sqlType)
private void initialize(java.lang.String javaClassName)
private void initialize(byte category, DataTypeDescriptor sqlType, java.lang.String javaClassName, byte primitiveKind)
category
- SQLTYPE, JAVA_CLASS, JAVA_PRIMITIVEsqlType
- corresponding SQL type if category=SQLTYPEjavaClassName
- corresponding java class if category=JAVA_CLASSprimitiveKind
- kind of primitive if category=JAVA_PRIMITIVEpublic static java.lang.String getWrapperClassName(byte primitive)
primitive
- BOOLEAN, INT, ... etc.public static byte getPrimitiveID(java.lang.String name)
name
- name of primitiveApache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.