com.akiban.sql.types
Class JSQLType

java.lang.Object
  extended by com.akiban.sql.types.JSQLType

public final class JSQLType
extends Object

Type descriptor which wraps all 3 kinds of types supported in Derby's JSQL language: SQL types, Java primitives, Java classes. This interface was originally added to support the serializing of WorkUnit signatures.


Field Summary
static byte BOOLEAN
           
static byte BYTE
           
static byte CHAR
           
static byte DOUBLE
           
static byte FLOAT
           
static byte INT
           
static byte JAVA_CLASS
           
static byte JAVA_PRIMITIVE
           
static byte LONG
           
static byte NOT_PRIMITIVE
           
static byte SHORT
           
static byte SQLTYPE
           
 
Constructor Summary
JSQLType(byte primitiveKind)
          Create a JSQLType for a Java primitive.
JSQLType(DataTypeDescriptor sqlType)
          Create a JSQLType from a SQL type.
JSQLType(String javaName)
          Create a JSQLType given the name of a Java primitive or java class.
 
Method Summary
 byte getCategory()
          What kind of type is this:
 String getJavaClassName()
          If this is a JAVA_CLASS, what is it's name?
 byte getPrimitiveKind()
          If this is a JAVA_PRIMITIVE, what is its name?
static String getPrimitiveName(byte index)
           
 String getPrimitiveTypeName()
           
 DataTypeDescriptor getSQLType()
          What's our SQLTYPE?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQLTYPE

public static final byte SQLTYPE
See Also:
Constant Field Values

JAVA_CLASS

public static final byte JAVA_CLASS
See Also:
Constant Field Values

JAVA_PRIMITIVE

public static final byte JAVA_PRIMITIVE
See Also:
Constant Field Values

NOT_PRIMITIVE

public static final byte NOT_PRIMITIVE
See Also:
Constant Field Values

BOOLEAN

public static final byte BOOLEAN
See Also:
Constant Field Values

CHAR

public static final byte CHAR
See Also:
Constant Field Values

BYTE

public static final byte BYTE
See Also:
Constant Field Values

SHORT

public static final byte SHORT
See Also:
Constant Field Values

INT

public static final byte INT
See Also:
Constant Field Values

LONG

public static final byte LONG
See Also:
Constant Field Values

FLOAT

public static final byte FLOAT
See Also:
Constant Field Values

DOUBLE

public static final byte DOUBLE
See Also:
Constant Field Values
Constructor Detail

JSQLType

public JSQLType(DataTypeDescriptor sqlType)
Create a JSQLType from a SQL type.

Parameters:
sqlType - the SQL type to wrap

JSQLType

public JSQLType(String javaName)
Create a JSQLType given the name of a Java primitive or java class.

Parameters:
javaName - name of java primitive or class to wrap

JSQLType

public JSQLType(byte primitiveKind)
Create a JSQLType for a Java primitive.

Parameters:
primitiveKind - primitive to wrap
Method Detail

getCategory

public byte getCategory()
What kind of type is this:

Returns:
one of the following: SQLTYPE, JAVA_PRIMITIVE, JAVA_CLASS

getPrimitiveKind

public byte getPrimitiveKind()
If this is a JAVA_PRIMITIVE, what is its name?

Returns:
BOOLEAN, INT, ... if this is a JAVA_PRIMITIVE. NOT_PRIMITIVE if this is SQLTYPE or JAVA_CLASS.

getJavaClassName

public String getJavaClassName()
If this is a JAVA_CLASS, what is it's name?

Returns:
java class name if this is a JAVA_CLASS null if this is SQLTYPE or JAVA_PRIMITIVE

getPrimitiveTypeName

public String getPrimitiveTypeName()

getSQLType

public DataTypeDescriptor getSQLType()
                              throws StandardException
What's our SQLTYPE?

Returns:
the DataTypeDescriptor corresponding to this type
Throws:
StandardException

getPrimitiveName

public static String getPrimitiveName(byte index)


Copyright © 2013 Akiban Technologies, Inc. All rights reserved.