|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.types.TypeId
The TypeId interface provides methods to get information about datatype ids.
The equals(Object) method can be used to determine if two typeIds are for the same type, which defines type id equality.
Field Summary | |
private BaseTypeIdImpl |
baseTypeId
|
static java.lang.String |
BINARY_NAME
|
private static TypeId |
BIT_ID
|
static int |
BIT_MAXWIDTH
|
static java.lang.String |
BIT_NAME
|
static int |
BIT_PRECEDENCE
|
private static TypeId |
BLOB_ID
|
static int |
BLOB_MAXWIDTH
|
static java.lang.String |
BLOB_NAME
|
static int |
BLOB_PRECEDENCE
|
static TypeId |
BOOLEAN_ID
|
static int |
BOOLEAN_MAXWIDTH
|
static java.lang.String |
BOOLEAN_NAME
|
static int |
BOOLEAN_PRECEDENCE
|
static TypeId |
CHAR_ID
|
static int |
CHAR_MAXWIDTH
|
static java.lang.String |
CHAR_NAME
|
static int |
CHAR_PRECEDENCE
|
private boolean |
classNameWasDelimitedIdentifier
|
private static TypeId |
CLOB_ID
|
static int |
CLOB_MAXWIDTH
|
static java.lang.String |
CLOB_NAME
|
static int |
CLOB_PRECEDENCE
|
private static TypeId |
DATE_ID
|
static int |
DATE_MAXWIDTH
|
static java.lang.String |
DATE_NAME
|
static int |
DATE_PRECEDENCE
|
private static TypeId |
DECIMAL_ID
|
static int |
DECIMAL_MAXWIDTH
|
static java.lang.String |
DECIMAL_NAME
|
static int |
DECIMAL_PRECEDENCE
|
static int |
DECIMAL_PRECISION
|
static int |
DECIMAL_SCALE
|
(package private) static DataValueDescriptor |
decimalImplementation
Implementation of DECIMAL datatype for generating holders through getNull. |
private static TypeId |
DOUBLE_ID
|
static int |
DOUBLE_MAXWIDTH
|
static java.lang.String |
DOUBLE_NAME
|
static int |
DOUBLE_PRECEDENCE
|
static int |
DOUBLE_PRECISION
|
static int |
DOUBLE_PRECISION_IN_DIGITS
|
static int |
DOUBLE_SCALE
|
static java.lang.String |
FLOAT_NAME
|
private int |
formatId
|
static int |
INT_MAXWIDTH
|
static int |
INT_PRECEDENCE
|
static int |
INT_PRECISION
|
static int |
INT_SCALE
|
static TypeId |
INTEGER_ID
|
static java.lang.String |
INTEGER_NAME
|
private boolean |
isBitTypeId
|
private boolean |
isBooleanTypeId
|
private boolean |
isBuiltIn
|
private boolean |
isConcatableTypeId
|
private boolean |
isDateTimeTimeStampTypeId
|
private boolean |
isDecimalTypeId
|
private boolean |
isFloatingPointTypeId
|
private boolean |
isLOBTypeId
|
private boolean |
isLongConcatableTypeId
|
private boolean |
isNumericTypeId
|
private boolean |
isRealTypeId
|
private boolean |
isRefTypeId
|
private boolean |
isStringTypeId
|
private boolean |
isUserDefinedTypeId
|
private java.lang.String |
javaTypeName
|
private static TypeId |
LONGINT_ID
|
static int |
LONGINT_MAXWIDTH
|
static java.lang.String |
LONGINT_NAME
|
static int |
LONGINT_PRECEDENCE
|
static int |
LONGINT_PRECISION
Various fixed numbers related to datatypes. |
static int |
LONGINT_SCALE
|
static java.lang.String |
LONGVARBINARY_NAME
|
private static TypeId |
LONGVARBIT_ID
|
static int |
LONGVARBIT_MAXWIDTH
|
static java.lang.String |
LONGVARBIT_NAME
|
static int |
LONGVARBIT_PRECEDENCE
|
private static TypeId |
LONGVARCHAR_ID
|
static int |
LONGVARCHAR_MAXWIDTH
|
static java.lang.String |
LONGVARCHAR_NAME
|
static int |
LONGVARCHAR_PRECEDENCE
|
private int |
maxMaxWidth
|
private int |
maxPrecision
|
private int |
maxScale
|
private static TypeId |
NATIONAL_CHAR_ID
|
static int |
NATIONAL_CHAR_MAXWIDTH
|
static java.lang.String |
NATIONAL_CHAR_NAME
|
static int |
NATIONAL_CHAR_PRECEDENCE
|
private static TypeId |
NATIONAL_LONGVARCHAR_ID
|
static int |
NATIONAL_LONGVARCHAR_MAXWIDTH
|
static java.lang.String |
NATIONAL_LONGVARCHAR_NAME
|
static int |
NATIONAL_LONGVARCHAR_PRECEDENCE
|
private static TypeId |
NATIONAL_VARCHAR_ID
|
static int |
NATIONAL_VARCHAR_MAXWIDTH
|
static java.lang.String |
NATIONAL_VARCHAR_NAME
|
static int |
NATIONAL_VARCHAR_PRECEDENCE
|
private static TypeId |
NCLOB_ID
|
static int |
NCLOB_MAXWIDTH
|
static java.lang.String |
NCLOB_NAME
|
static int |
NCLOB_PRECEDENCE
|
private static TypeId |
NUMERIC_ID
|
static java.lang.String |
NUMERIC_NAME
|
static int |
NUMERIC_PRECEDENCE
|
private static TypeId |
REAL_ID
|
static int |
REAL_MAXWIDTH
|
static java.lang.String |
REAL_NAME
|
static int |
REAL_PRECEDENCE
|
static int |
REAL_PRECISION
|
static int |
REAL_PRECISION_IN_DIGITS
|
static int |
REAL_SCALE
|
private static TypeId |
REF_ID
|
static java.lang.String |
REF_NAME
|
static int |
REF_PRECEDENCE
|
private static TypeId |
SMALLINT_ID
|
static int |
SMALLINT_MAXWIDTH
|
static java.lang.String |
SMALLINT_NAME
|
static int |
SMALLINT_PRECEDENCE
|
static int |
SMALLINT_PRECISION
|
static int |
SMALLINT_SCALE
|
private static TypeId |
TIME_ID
|
static int |
TIME_MAXWIDTH
|
static java.lang.String |
TIME_NAME
|
static int |
TIME_PRECEDENCE
|
static int |
TIME_SCALE
|
private static TypeId |
TIMESTAMP_ID
|
static int |
TIMESTAMP_MAXWIDTH
|
static java.lang.String |
TIMESTAMP_NAME
|
static int |
TIMESTAMP_PRECEDENCE
|
static int |
TIMESTAMP_SCALE
|
private static TypeId |
TINYINT_ID
|
static int |
TINYINT_MAXWIDTH
|
static java.lang.String |
TINYINT_NAME
|
static int |
TINYINT_PRECEDENCE
|
static int |
TINYINT_PRECISION
|
static int |
TINYINT_SCALE
|
private int |
typePrecedence
|
static int |
USER_PRECEDENCE
The following constants define the type precedence hierarchy. |
static java.lang.String |
VARBINARY_NAME
|
private static TypeId |
VARBIT_ID
|
static int |
VARBIT_MAXWIDTH
|
static java.lang.String |
VARBIT_NAME
|
static int |
VARBIT_PRECEDENCE
|
private static TypeId |
VARCHAR_ID
|
static int |
VARCHAR_MAXWIDTH
|
static java.lang.String |
VARCHAR_NAME
|
static int |
VARCHAR_PRECEDENCE
|
private static TypeId |
XML_ID
|
static int |
XML_MAXWIDTH
|
static java.lang.String |
XML_NAME
|
static int |
XML_PRECEDENCE
|
Constructor Summary | |
TypeId(int formatId)
1 argmument constructor. |
|
TypeId(int formatId,
BaseTypeIdImpl baseTypeId)
Constructor for a TypeId |
|
TypeId(int formatId,
BaseTypeIdImpl baseTypeId,
boolean classNameWasDelimitedIdentifier)
Constructor for a TypeId for user defined types |
Method Summary | |
boolean |
builtIn()
Tell whether this is a built-in type. |
boolean |
equals(java.lang.Object that)
we want equals to say if these are the same type id or not. |
int |
getApproximateLengthInBytes(DataTypeDescriptor dts)
Get the approximate length of this type in bytes. |
BaseTypeIdImpl |
getBaseTypeId()
Get the base type id that is embedded in this type id. |
static TypeId |
getBuiltInTypeId(int JDBCTypeId)
Get a TypeId of the given JDBC type. |
static TypeId |
getBuiltInTypeId(java.lang.String SQLTypeName)
|
boolean |
getClassNameWasDelimitedIdentifier()
For user types, tell whether or not the class name was a delimited identifier. |
java.lang.String |
getCorrespondingJavaTypeName()
Get the name of the corresponding Java type. |
int |
getJDBCTypeId()
JDBC has its own idea of type identifiers which is different from the Cloudscape internal type ids. |
int |
getMaximumMaximumWidth()
Get the maximum maximum width of the type (that's not a typo). |
int |
getMaximumPrecision()
Get the maximum precision of the type. |
int |
getMaximumScale()
Get the maximum scale of the type. |
DataValueDescriptor |
getNull()
Get SQL null value. |
int |
getPrecision(DataTypeDescriptor leftType,
DataTypeDescriptor rightType)
Get the precision of the merge of two Decimals |
java.lang.String |
getResultSetMetaDataTypeName()
Get the name of the corresponding Java type. |
int |
getScale(DataTypeDescriptor leftType,
DataTypeDescriptor rightType)
Get the scale of the merge of two decimals |
static TypeId |
getSQLTypeForJavaType(java.lang.String javaTypeName)
Get a TypeId for the class that corresponds to the given Java type name. |
java.lang.String |
getSQLTypeName()
Returns the SQL name of the datatype. |
int |
getTypeFormatId()
Get the formatID which corresponds to this class. |
static TypeId |
getUserDefinedTypeId(java.lang.String className,
boolean delimitedIdentifier)
|
int |
hashCode()
|
boolean |
isBitTypeId()
Is this a type id for a bit type? |
boolean |
isBlobTypeId()
Is this a Blob? |
boolean |
isBooleanTypeId()
Is this a type id for a boolean type? |
boolean |
isClobTypeId()
Is this a Clob? |
boolean |
isConcatableTypeId()
Is this a type id for a concatable type? |
boolean |
isDateTimeTimeStampTypeId()
Is this a TypeId for DATE/TIME/TIMESTAMP |
boolean |
isDateTimeTimeStampTypeID()
Is this DATE/TIME or TIMESTAMP? |
boolean |
isDecimalTypeId()
Is this a type id for a decimal type? |
boolean |
isDoubleTypeId()
Is this a TypeId for DOUBLE |
boolean |
isFixedStringTypeId()
Is this a fixed string type? |
boolean |
isFloatingPointTypeId()
Is this a TypeId for floating point (REAL/DOUBLE) |
boolean |
isLOBTypeId()
Is this a type id for a LOB type? |
boolean |
isLongConcatableTypeId()
Is this a type id for a long concatable type? |
boolean |
isLongVarcharTypeId()
Is this a LongVarchar? |
boolean |
isNationalStringTypeId()
Does this type id represent a national character string. |
boolean |
isNumericTypeId()
Is this a type id for a numeric type? |
boolean |
isRealTypeId()
Is this a TypeId for REAL |
boolean |
isRefTypeId()
Is this a type id for a ref type? |
boolean |
isStringTypeId()
Does this TypeId represent a TypeId for a StringDataType. |
boolean |
isUserDefinedTypeId()
Is this a type id for a user defined type? |
boolean |
isXMLTypeId()
Is this an XML doc? |
boolean |
orderable(ClassFactory cf)
Tell whether this type is orderable, that is, can participate in comparisons. |
void |
readExternal(java.io.ObjectInput in)
Read this object from a stream of stored objects. |
void |
setNestedTypeId(BaseTypeIdImpl typeId)
Set the nested BaseTypeId in this TypeId. |
private void |
setTypeIdSpecificInstanceVariables()
|
private void |
setUserTypeIdInfo()
|
boolean |
streamStorable()
Is this type StreamStorable? |
boolean |
systemBuiltIn()
Tell whether this is a built-in type. |
java.lang.String |
toParsableString(DataTypeDescriptor dts)
Converts this TypeId, given a data type descriptor (including length/precision), to a string. |
int |
typePrecedence()
Each built-in type in JSQL has a precedence. |
boolean |
userType()
Tell whether this is a built-in type. |
boolean |
variableLength()
Is type variable length |
void |
writeExternal(java.io.ObjectOutput out)
Write this object to a stream of stored objects. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LONGINT_PRECISION
public static final int LONGINT_SCALE
public static final int LONGINT_MAXWIDTH
public static final int INT_PRECISION
public static final int INT_SCALE
public static final int INT_MAXWIDTH
public static final int SMALLINT_PRECISION
public static final int SMALLINT_SCALE
public static final int SMALLINT_MAXWIDTH
public static final int TINYINT_PRECISION
public static final int TINYINT_SCALE
public static final int TINYINT_MAXWIDTH
public static final int DOUBLE_PRECISION
public static final int DOUBLE_PRECISION_IN_DIGITS
public static final int DOUBLE_SCALE
public static final int DOUBLE_MAXWIDTH
public static final int REAL_PRECISION
public static final int REAL_PRECISION_IN_DIGITS
public static final int REAL_SCALE
public static final int REAL_MAXWIDTH
public static final int DECIMAL_PRECISION
public static final int DECIMAL_SCALE
public static final int DECIMAL_MAXWIDTH
public static final int BOOLEAN_MAXWIDTH
public static final int CHAR_MAXWIDTH
public static final int VARCHAR_MAXWIDTH
public static final int LONGVARCHAR_MAXWIDTH
public static final int NATIONAL_CHAR_MAXWIDTH
public static final int NATIONAL_VARCHAR_MAXWIDTH
public static final int NATIONAL_LONGVARCHAR_MAXWIDTH
public static final int BIT_MAXWIDTH
public static final int VARBIT_MAXWIDTH
public static final int LONGVARBIT_MAXWIDTH
public static final int BLOB_MAXWIDTH
public static final int CLOB_MAXWIDTH
public static final int NCLOB_MAXWIDTH
public static final int XML_MAXWIDTH
public static final int DATE_MAXWIDTH
public static final int TIME_MAXWIDTH
public static final int TIMESTAMP_MAXWIDTH
public static final int TIME_SCALE
public static final int TIMESTAMP_SCALE
public static final java.lang.String BIT_NAME
public static final java.lang.String VARBIT_NAME
public static final java.lang.String LONGVARBIT_NAME
public static final java.lang.String TINYINT_NAME
public static final java.lang.String SMALLINT_NAME
public static final java.lang.String INTEGER_NAME
public static final java.lang.String LONGINT_NAME
public static final java.lang.String FLOAT_NAME
public static final java.lang.String REAL_NAME
public static final java.lang.String DOUBLE_NAME
public static final java.lang.String NUMERIC_NAME
public static final java.lang.String DECIMAL_NAME
public static final java.lang.String CHAR_NAME
public static final java.lang.String VARCHAR_NAME
public static final java.lang.String LONGVARCHAR_NAME
public static final java.lang.String DATE_NAME
public static final java.lang.String TIME_NAME
public static final java.lang.String TIMESTAMP_NAME
public static final java.lang.String BINARY_NAME
public static final java.lang.String VARBINARY_NAME
public static final java.lang.String LONGVARBINARY_NAME
public static final java.lang.String BOOLEAN_NAME
public static final java.lang.String REF_NAME
public static final java.lang.String NATIONAL_CHAR_NAME
public static final java.lang.String NATIONAL_VARCHAR_NAME
public static final java.lang.String NATIONAL_LONGVARCHAR_NAME
public static final java.lang.String BLOB_NAME
public static final java.lang.String CLOB_NAME
public static final java.lang.String NCLOB_NAME
public static final java.lang.String XML_NAME
public static final int USER_PRECEDENCE
public static final int XML_PRECEDENCE
public static final int BLOB_PRECEDENCE
public static final int LONGVARBIT_PRECEDENCE
public static final int VARBIT_PRECEDENCE
public static final int BIT_PRECEDENCE
public static final int BOOLEAN_PRECEDENCE
public static final int TIME_PRECEDENCE
public static final int TIMESTAMP_PRECEDENCE
public static final int DATE_PRECEDENCE
public static final int DOUBLE_PRECEDENCE
public static final int REAL_PRECEDENCE
public static final int DECIMAL_PRECEDENCE
public static final int NUMERIC_PRECEDENCE
public static final int LONGINT_PRECEDENCE
public static final int INT_PRECEDENCE
public static final int SMALLINT_PRECEDENCE
public static final int TINYINT_PRECEDENCE
public static final int REF_PRECEDENCE
public static final int NATIONAL_LONGVARCHAR_PRECEDENCE
public static final int NATIONAL_VARCHAR_PRECEDENCE
public static final int NATIONAL_CHAR_PRECEDENCE
public static final int CLOB_PRECEDENCE
public static final int NCLOB_PRECEDENCE
public static final int LONGVARCHAR_PRECEDENCE
public static final int VARCHAR_PRECEDENCE
public static final int CHAR_PRECEDENCE
public static final TypeId BOOLEAN_ID
public static final TypeId INTEGER_ID
public static final TypeId CHAR_ID
private static TypeId TINYINT_ID
private static TypeId SMALLINT_ID
private static TypeId LONGINT_ID
private static TypeId REAL_ID
private static TypeId DOUBLE_ID
private static TypeId DECIMAL_ID
private static TypeId NUMERIC_ID
private static TypeId VARCHAR_ID
private static TypeId NATIONAL_CHAR_ID
private static TypeId NATIONAL_LONGVARCHAR_ID
private static TypeId NATIONAL_VARCHAR_ID
private static TypeId DATE_ID
private static TypeId TIME_ID
private static TypeId TIMESTAMP_ID
private static TypeId BIT_ID
private static TypeId VARBIT_ID
private static TypeId REF_ID
private static TypeId LONGVARCHAR_ID
private static TypeId LONGVARBIT_ID
private static TypeId BLOB_ID
private static TypeId CLOB_ID
private static TypeId NCLOB_ID
private static TypeId XML_ID
static DataValueDescriptor decimalImplementation
private BaseTypeIdImpl baseTypeId
private int formatId
private boolean classNameWasDelimitedIdentifier
private boolean isBuiltIn
private boolean isBitTypeId
private boolean isLOBTypeId
private boolean isBooleanTypeId
private boolean isConcatableTypeId
private boolean isDecimalTypeId
private boolean isLongConcatableTypeId
private boolean isNumericTypeId
private boolean isRefTypeId
private boolean isStringTypeId
private boolean isFloatingPointTypeId
private boolean isRealTypeId
private boolean isDateTimeTimeStampTypeId
private boolean isUserDefinedTypeId
private int maxPrecision
private int maxScale
private int typePrecedence
private java.lang.String javaTypeName
private int maxMaxWidth
Constructor Detail |
public TypeId(int formatId)
formatId
- Format id of specific type id.public TypeId(int formatId, BaseTypeIdImpl baseTypeId)
formatId
- Format id of specific type id.baseTypeId
- The Base type idpublic TypeId(int formatId, BaseTypeIdImpl baseTypeId, boolean classNameWasDelimitedIdentifier)
formatId
- Format id of specific type id.baseTypeId
- The Base type idclassNameWasDelimitedIdentifier
- Whether or not the class name
was a delimited identifierMethod Detail |
public static TypeId getBuiltInTypeId(int JDBCTypeId)
JDBCTypeId
- The JDBC Id of the type, as listed in
java.sql.Types
public static TypeId getUserDefinedTypeId(java.lang.String className, boolean delimitedIdentifier)
public static TypeId getSQLTypeForJavaType(java.lang.String javaTypeName)
javaTypeName
- The name of the Java type
public static TypeId getBuiltInTypeId(java.lang.String SQLTypeName)
public boolean equals(java.lang.Object that)
public int hashCode()
private void setTypeIdSpecificInstanceVariables()
public final int getJDBCTypeId()
public java.lang.String getSQLTypeName()
public final boolean systemBuiltIn()
public final boolean userType()
public int getMaximumPrecision()
public int getMaximumScale()
public void setNestedTypeId(BaseTypeIdImpl typeId)
private void setUserTypeIdInfo()
public boolean getClassNameWasDelimitedIdentifier()
public boolean isStringTypeId()
public boolean isDateTimeTimeStampTypeId()
public boolean isRealTypeId()
public boolean isFloatingPointTypeId()
public boolean isDoubleTypeId()
public boolean isFixedStringTypeId()
public boolean isClobTypeId()
public boolean isBlobTypeId()
public boolean isLongVarcharTypeId()
public boolean isDateTimeTimeStampTypeID()
public boolean isNationalStringTypeId()
public boolean isXMLTypeId()
public boolean builtIn()
public boolean orderable(ClassFactory cf)
cf
- A ClassFactory
public int typePrecedence()
public java.lang.String getCorrespondingJavaTypeName()
public java.lang.String getResultSetMetaDataTypeName()
public int getMaximumMaximumWidth()
public java.lang.String toParsableString(DataTypeDescriptor dts)
dts
- Data type descriptor that holds the length/precision etc. as necessary
public boolean isNumericTypeId()
public boolean isDecimalTypeId()
public boolean isBooleanTypeId()
public boolean isRefTypeId()
public boolean isConcatableTypeId()
public boolean isBitTypeId()
public boolean isLOBTypeId()
public boolean isLongConcatableTypeId()
public boolean isUserDefinedTypeId()
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- read this.
java.io.IOException
- thrown on error
java.lang.ClassNotFoundException
- thrown on errorpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- write bytes here.
java.io.IOException
- thrown on errorpublic int getTypeFormatId()
getTypeFormatId
in interface TypedFormat
public DataValueDescriptor getNull()
public boolean streamStorable()
public int getApproximateLengthInBytes(DataTypeDescriptor dts)
dts
- Data type descriptor that holds the
length/precision etc. as necessary
public BaseTypeIdImpl getBaseTypeId()
public int getPrecision(DataTypeDescriptor leftType, DataTypeDescriptor rightType)
leftType
- the left typerightType
- the left type
public int getScale(DataTypeDescriptor leftType, DataTypeDescriptor rightType)
leftType
- the left typerightType
- the left type
public boolean variableLength()
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |