net.sf.farrago.fennel.tuple
Class FennelStandardTypeDescriptor

java.lang.Object
  extended by org.eigenbase.util14.Enum14.BasicValue
      extended by net.sf.farrago.fennel.tuple.FennelStandardTypeDescriptor
All Implemented Interfaces:
Serializable, Comparable, FennelStoredTypeDescriptor, Enum14.Value
Direct Known Subclasses:
FennelStandardTypeDescriptor.FennelType

public abstract class FennelStandardTypeDescriptor
extends Enum14.BasicValue
implements FennelStoredTypeDescriptor

FennelStandardTypeDescriptor implements the FennelStandardTypeDescriptor enumerations as kept in fennel. This must be kept in sync with any changes to fennel's FennelStandardTypeDescriptor.h. This class is JDK 1.4 compatible.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/fennel/tuple/FennelStandardTypeDescriptor.java#13 $
Author:
Mike Bennett
See Also:
Serialized Form

Nested Class Summary
private static class FennelStandardTypeDescriptor.FennelNumericType
          Abstract base class for all numeric types.
private static class FennelStandardTypeDescriptor.FennelType
          Abstract base class for all types.
private static class FennelStandardTypeDescriptor.Type_BINARY
          Describes a fixed-width binary string.
private static class FennelStandardTypeDescriptor.Type_BOOL
          Describes a boolean.
private static class FennelStandardTypeDescriptor.Type_CHAR
          Describes a fixed-width character string.
private static class FennelStandardTypeDescriptor.Type_DOUBLE
          Describes a double.
private static class FennelStandardTypeDescriptor.Type_INT_16
          Describes a signed short.
private static class FennelStandardTypeDescriptor.Type_INT_32
          Describes a signed int.
private static class FennelStandardTypeDescriptor.Type_INT_64
          Describes a signed long.
private static class FennelStandardTypeDescriptor.Type_INT_8
          Describes a signed byte.
private static class FennelStandardTypeDescriptor.Type_REAL
          Describes a float.
private static class FennelStandardTypeDescriptor.Type_UINT_16
          Describes an unsigned short.
private static class FennelStandardTypeDescriptor.Type_UINT_32
          Describes an unsigned int.
private static class FennelStandardTypeDescriptor.Type_UINT_64
          Describes an unsigned long.
private static class FennelStandardTypeDescriptor.Type_UINT_8
          Describes an unsigned byte.
private static class FennelStandardTypeDescriptor.Type_UNICODE_CHAR
          Describes a fixed-width character string.
private static class FennelStandardTypeDescriptor.Type_UNICODE_VARCHAR
          Describes a variable-width UNICODE character string.
private static class FennelStandardTypeDescriptor.Type_VARBINARY
          Describes a variable-width binary array.
private static class FennelStandardTypeDescriptor.Type_VARCHAR
          Describes a variable-width character string.
 
Field Summary
static FennelStandardTypeDescriptor.Type_BINARY BINARY
          Describes a fixed-width binary string.
static int BINARY_ORDINAL
           
static FennelStandardTypeDescriptor.Type_BOOL BOOL
          Describes a boolean.
static int BOOL_ORDINAL
           
static FennelStandardTypeDescriptor.Type_CHAR CHAR
          Describes a fixed-width character string.
static int CHAR_ORDINAL
           
static FennelStandardTypeDescriptor.Type_DOUBLE DOUBLE
          Describes a double.
static int DOUBLE_ORDINAL
           
static Enum14 enumeration
           
static int EXTENSION_MIN_ORDINAL
           
static FennelStandardTypeDescriptor.Type_INT_16 INT_16
          Describes a signed short.
static int INT_16_ORDINAL
           
static FennelStandardTypeDescriptor.Type_INT_32 INT_32
          Describes a signed int.
static int INT_32_ORDINAL
           
static FennelStandardTypeDescriptor.Type_INT_64 INT_64
          Describes a signed long.
static int INT_64_ORDINAL
           
static FennelStandardTypeDescriptor.Type_INT_8 INT_8
          Describes a signed byte.
static int INT_8_ORDINAL
           
static int MIN_ORDINAL
           
static FennelStandardTypeDescriptor.Type_REAL REAL
          Describes a float.
static int REAL_ORDINAL
           
private static long serialVersionUID
          SerialVersionUID created with JDK 1.5 serialver tool.
static FennelStandardTypeDescriptor.Type_UINT_16 UINT_16
          Describes an unsigned short.
static int UINT_16_ORDINAL
           
static FennelStandardTypeDescriptor.Type_UINT_32 UINT_32
          Describes an unsigned int.
static int UINT_32_ORDINAL
           
static FennelStandardTypeDescriptor.Type_UINT_64 UINT_64
          Describes an unsigned long.
static int UINT_64_ORDINAL
           
static FennelStandardTypeDescriptor.Type_UINT_8 UINT_8
          Describes an unsigned signed byte.
static int UINT_8_ORDINAL
           
static FennelStandardTypeDescriptor.Type_UNICODE_CHAR UNICODE_CHAR
          Describes a fixed-width UNICODE character string.
static int UNICODE_CHAR_ORDINAL
           
static FennelStandardTypeDescriptor.Type_UNICODE_VARCHAR UNICODE_VARCHAR
          Describes a variable-width binary string.
static int UNICODE_VARCHAR_ORDINAL
           
private static FennelStandardTypeDescriptor[] values
           
static FennelStandardTypeDescriptor.Type_VARBINARY VARBINARY
          Describes a variable-width binary string.
static int VARBINARY_ORDINAL
           
static FennelStandardTypeDescriptor.Type_VARCHAR VARCHAR
          Describes a variable-width character string.
static int VARCHAR_ORDINAL
           
 
Constructor Summary
private FennelStandardTypeDescriptor(String name, int ordinal)
           
 
Method Summary
static FennelStandardTypeDescriptor forOrdinal(int ordinal)
          Returns the FennelStandardTypeDescriptor with a given ordinal.
static FennelStandardTypeDescriptor get(String name)
          Returns the FennelStandardTypeDescriptor with a given name.
 boolean isApprox()
          Returns whether this ordinal is an approximate numeric.
 boolean isArray()
          Returns whether this ordinal represents an array.
 boolean isBinaryArray()
          Returns whether this ordinal represent a binary array.
 boolean isExact()
          Returns whether this ordinal is an exact numeric.
 boolean isFixedLenArray()
          Returns whether this ordinal represents a fixed length array.
 boolean isIntegralNative(int st)
          Returns whether this ordinal represents an integral native type.
 boolean isNative()
          Returns whether this is primitive type.
 boolean isNativeNotBool()
          Returns whether this ordinal represents a primitive non-boolean type.
abstract  boolean isNumeric()
          Returns whether this type is numeric.
 boolean isTextArray()
          Returns whether this ordinal represents a text array.
 boolean isVariableLenArray()
          Returns whether this ordinal represents a variable length array.
 
Methods inherited from class org.eigenbase.util14.Enum14.BasicValue
compareTo, equals, equals, getDescription, getName, getOrdinal, hashCode, toString, unexpected
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.farrago.fennel.tuple.FennelStoredTypeDescriptor
getAlignmentByteCount, getBitCount, getFixedByteCount, getMinByteCount, getOrdinal, isSigned, newAttributeAccessor
 

Field Detail

serialVersionUID

private static final long serialVersionUID
SerialVersionUID created with JDK 1.5 serialver tool.

See Also:
Constant Field Values

MIN_ORDINAL

public static final int MIN_ORDINAL
See Also:
Constant Field Values

INT_8_ORDINAL

public static final int INT_8_ORDINAL
See Also:
Constant Field Values

UINT_8_ORDINAL

public static final int UINT_8_ORDINAL
See Also:
Constant Field Values

INT_16_ORDINAL

public static final int INT_16_ORDINAL
See Also:
Constant Field Values

UINT_16_ORDINAL

public static final int UINT_16_ORDINAL
See Also:
Constant Field Values

INT_32_ORDINAL

public static final int INT_32_ORDINAL
See Also:
Constant Field Values

UINT_32_ORDINAL

public static final int UINT_32_ORDINAL
See Also:
Constant Field Values

INT_64_ORDINAL

public static final int INT_64_ORDINAL
See Also:
Constant Field Values

UINT_64_ORDINAL

public static final int UINT_64_ORDINAL
See Also:
Constant Field Values

BOOL_ORDINAL

public static final int BOOL_ORDINAL
See Also:
Constant Field Values

REAL_ORDINAL

public static final int REAL_ORDINAL
See Also:
Constant Field Values

DOUBLE_ORDINAL

public static final int DOUBLE_ORDINAL
See Also:
Constant Field Values

CHAR_ORDINAL

public static final int CHAR_ORDINAL
See Also:
Constant Field Values

VARCHAR_ORDINAL

public static final int VARCHAR_ORDINAL
See Also:
Constant Field Values

BINARY_ORDINAL

public static final int BINARY_ORDINAL
See Also:
Constant Field Values

VARBINARY_ORDINAL

public static final int VARBINARY_ORDINAL
See Also:
Constant Field Values

UNICODE_CHAR_ORDINAL

public static final int UNICODE_CHAR_ORDINAL
See Also:
Constant Field Values

UNICODE_VARCHAR_ORDINAL

public static final int UNICODE_VARCHAR_ORDINAL
See Also:
Constant Field Values

EXTENSION_MIN_ORDINAL

public static final int EXTENSION_MIN_ORDINAL
See Also:
Constant Field Values

INT_8

public static final FennelStandardTypeDescriptor.Type_INT_8 INT_8
Describes a signed byte.


UINT_8

public static final FennelStandardTypeDescriptor.Type_UINT_8 UINT_8
Describes an unsigned signed byte.


INT_16

public static final FennelStandardTypeDescriptor.Type_INT_16 INT_16
Describes a signed short.


UINT_16

public static final FennelStandardTypeDescriptor.Type_UINT_16 UINT_16
Describes an unsigned short.


INT_32

public static final FennelStandardTypeDescriptor.Type_INT_32 INT_32
Describes a signed int.


UINT_32

public static final FennelStandardTypeDescriptor.Type_UINT_32 UINT_32
Describes an unsigned int.


INT_64

public static final FennelStandardTypeDescriptor.Type_INT_64 INT_64
Describes a signed long.


UINT_64

public static final FennelStandardTypeDescriptor.Type_UINT_64 UINT_64
Describes an unsigned long.


BOOL

public static final FennelStandardTypeDescriptor.Type_BOOL BOOL
Describes a boolean.


REAL

public static final FennelStandardTypeDescriptor.Type_REAL REAL
Describes a float.


DOUBLE

public static final FennelStandardTypeDescriptor.Type_DOUBLE DOUBLE
Describes a double.


CHAR

public static final FennelStandardTypeDescriptor.Type_CHAR CHAR
Describes a fixed-width character string.


VARCHAR

public static final FennelStandardTypeDescriptor.Type_VARCHAR VARCHAR
Describes a variable-width character string.


BINARY

public static final FennelStandardTypeDescriptor.Type_BINARY BINARY
Describes a fixed-width binary string.


VARBINARY

public static final FennelStandardTypeDescriptor.Type_VARBINARY VARBINARY
Describes a variable-width binary string.


UNICODE_CHAR

public static final FennelStandardTypeDescriptor.Type_UNICODE_CHAR UNICODE_CHAR
Describes a fixed-width UNICODE character string.


UNICODE_VARCHAR

public static final FennelStandardTypeDescriptor.Type_UNICODE_VARCHAR UNICODE_VARCHAR
Describes a variable-width binary string.


values

private static final FennelStandardTypeDescriptor[] values

enumeration

public static final Enum14 enumeration
Constructor Detail

FennelStandardTypeDescriptor

private FennelStandardTypeDescriptor(String name,
                                     int ordinal)
Method Detail

get

public static FennelStandardTypeDescriptor get(String name)
Returns the FennelStandardTypeDescriptor with a given name.


forOrdinal

public static FennelStandardTypeDescriptor forOrdinal(int ordinal)
Returns the FennelStandardTypeDescriptor with a given ordinal.


isNumeric

public abstract boolean isNumeric()
Returns whether this type is numeric.


isNative

public boolean isNative()
Returns whether this is primitive type.


isNativeNotBool

public boolean isNativeNotBool()
Returns whether this ordinal represents a primitive non-boolean type.


isIntegralNative

public boolean isIntegralNative(int st)
Returns whether this ordinal represents an integral native type.


isExact

public boolean isExact()
Returns whether this ordinal is an exact numeric.

Specified by:
isExact in interface FennelStoredTypeDescriptor
Returns:
false for non-numeric data types, false for approximate numeric data types (REAL, FLOAT) true for exact numeric data types

isApprox

public boolean isApprox()
Returns whether this ordinal is an approximate numeric.


isArray

public boolean isArray()
Returns whether this ordinal represents an array.


isVariableLenArray

public boolean isVariableLenArray()
Returns whether this ordinal represents a variable length array.


isFixedLenArray

public boolean isFixedLenArray()
Returns whether this ordinal represents a fixed length array.


isTextArray

public boolean isTextArray()
Returns whether this ordinal represents a text array.


isBinaryArray

public boolean isBinaryArray()
Returns whether this ordinal represent a binary array.