org.hsqldb
Class DITypeInfo

java.lang.Object
  extended byorg.hsqldb.DITypeInfo

public final class DITypeInfo
extends Object

Provides information intrinsic to each standard data type known to HSQLDB. This includes all types for which standard type codes are known at the time of writing and thus includes types that may not yet be supported as table or procedure columns.

Since:
HSQLDB 1.7.2
Version:
1.7.2
Author:
boucherb@users.sourceforge.net

Constructor Summary
DITypeInfo()
          Creates a new DITypeInfo object having the default Locale.
 
Method Summary
 Integer getCharOctLen()
          Retrieves the maximum Integer.MAX_VALUE bounded length, in bytes, for character types.
 Long getCharOctLenAct()
          Retrieves the maximum Long.MAX_VALUE bounded length, in bytes, for character types.
 String getColStClsName()
          Retrieves the fully-qualified name of the Java class whose instances are manufactured by HSQLDB to store table column values in memory.
 String getCreateParams()
          Retrieves a character sequence representing a CSV list, in DDL declaraion order, of the create parameters for the type.
 String getCstMapClsName()
          Retrieves the fully-qualified name of the HSQLDB-provided java.sql interface implementation class whose instances would be manufactured by HSQLDB to retrieve column values of this type, if the the type does not have a standard Java mapping.
 Integer getDataType()
          Retrieves the data type, as an Integer.
 Integer getDefaultScale()
          Retrieves the implied or single permitted scale for exact numeric types, when no scale is declared or no scale declaration is permitted.
 Integer getIntervalPrecision()
          Retrieves null (not implemented).
 String getLiteralPrefix()
          Retrieves the character(s) prefixing a literal of this type.
 String getLiteralSuffix()
          Retrieves the character(s) terminating a literal of this type.
 String getLocalName()
          Retrieves a localized representation of the type's name, for human consumption only.
 int getMaxDisplaySize()
          Retrieves the maximum length that a String representation of the type may have.
 Integer getMaxScale()
          Retrieves the maximum Short.MAX_VALUE bounded scale supported for the type.
 Integer getMaxScaleAct()
          Retrieves the maximum Integer.MAX_VALUE bounded scale supported for the type.
 Integer getMinScale()
          Retrieves the minumum Short.MIN_VALUE bounded scale supported for the type.
 Integer getMinScaleAct()
          Retrieves the minumum Integer.MIN_VALUE bounded scale supported for the type.
 Integer getNullability()
          Retrieves the DatabaseMetaData default nullability code for the type.
 Integer getNumPrecRadix()
          Retrieves the number base which is to be used to interpret the value reported by getPrecision().
 Integer getPrecision()
          Retrieves the maximum Integer.MAX_VALUE bounded length or precision for the type.
 Long getPrecisionAct()
          Retrieves the maximum Long.MAX_VALUE bounded length or precision for the type.
 String getRemarks()
          Retrieves the localized remarks (if any) on the type.
 Integer getSearchability()
          Retrieves the DatabaseMetaData searchability code for the type.
 Integer getSqlDataType()
          Retrieves the SQL CLI data type code for the type.
 Integer getSqlDateTimeSub()
          Retrieves the SQL CLI datetime subcode for the type.
 String getStdMapClsName()
          Retrieve the fully qualified name of the recommended standard Java primitive, class or java.sql interface mapping for the type.
 int getTypeCode()
          Retrieves the data type as an int.
 String getTypeName()
          Retrieves the canonical data type name HSQLDB associates with the type.
 int getTypeSub()
          Retrieves the HSQLDB data subtype as an int.
 Boolean isAutoIncrement()
          Retrieves whether the type is an IDENTITY type.
 Boolean isCaseSensitive()
          Retrieves whether the type is case-sensitive in collations and comparisons.
 Boolean isColStClsSupported()
          Retrieves whether, under the current release, class path and hosting JVM, HSQLDB supports storing this type in table columns.
 Boolean isFixedPrecisionScale()
          Retrieves whether values of this type have a fixed precision and scale.
 Boolean isStdMapClsSupported()
          Retrieve whether the fully qualified name reported by getStdMapClsName() is supported as a jdbcResultSet.getXXX return type under the current HSQLDB release, class path and hosting JVM.
 Boolean isSupportedAsPCol()
          Retrieves whether, under the current release, class path and hosting JVM, HSQLDB supports passing or receiving this type as the value of a procedure column.
 Boolean isSupportedAsTCol()
          Retrieves whether, under the current release, class path and hosting JVM, HSQLDB supports this as the type of a table column.
 Boolean isUnsignedAttribute()
          Retrieves whether values of this type are unsigned.
 void setLocale(Locale l)
          Assigns the Locale object used to retrieve this object's resource bundle dependent values.
 void setTypeCode(int type)
          Assigns the SQL data type code on which this object is to report.
 void setTypeSub(int typeSub)
          Assigns the HSQLDB data subtype code on which this object is to report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DITypeInfo

public DITypeInfo()
Creates a new DITypeInfo object having the default Locale.

Method Detail

getCharOctLen

public Integer getCharOctLen()
Retrieves the maximum Integer.MAX_VALUE bounded length, in bytes, for character types.

Returns:
the maximum Integer.MAX_VALUE bounded length, in bytes, for character types

getCharOctLenAct

public Long getCharOctLenAct()
Retrieves the maximum Long.MAX_VALUE bounded length, in bytes, for character types.

Returns:
the maximum Long.MAX_VALUE bounded length, in bytes, for character types

getColStClsName

public String getColStClsName()
Retrieves the fully-qualified name of the Java class whose instances are manufactured by HSQLDB to store table column values in memory.

This is also typically the fully-qualified name of the Java class whose instances are manufactured by HSQLDB in response to jdbcResultSet.getObject(int).

Returns:
the fully-qualified name of the Java class whose instances are manufactured by HSQLDB to store table column values in memory

getCreateParams

public String getCreateParams()
Retrieves a character sequence representing a CSV list, in DDL declaraion order, of the create parameters for the type.

Returns:
a character sequence representing a CSV list, in DDL declaraion order, of the create parameters for the type.

getCstMapClsName

public String getCstMapClsName()
Retrieves the fully-qualified name of the HSQLDB-provided java.sql interface implementation class whose instances would be manufactured by HSQLDB to retrieve column values of this type, if the the type does not have a standard Java mapping.

This value is simply the expected class name, regardless of whether HSQLDB, the specific HSQLDB distribution instance or the hosting JVM actually provide or support such implementations. That is, as of a specific release, HSQLDB may not yet provide such an implementation or may not automatically map to it or may not support it as a table column type, the version of java.sql may not define the interface to implement and the HSQLDB jar may not contain the implementation classes, even if they are defined in the corresponding release and build options and are supported under the hosting JVM's java.sql version.

Returns:
the fully-qualified name of the HSQLDB-provided java.sql interface implementation class whose instances would be manufactured by HSQLDB to retrieve column values of this type, given that the the type does not have a standard Java mapping and regardless of whether a class with the indicated name is actually implemented or available on the class path

getMaxDisplaySize

public int getMaxDisplaySize()
Retrieves the maximum length that a String representation of the type may have. For character and datetime types, this is the same as the maximum length/precision, repectively. For numeric types, this is the precision, plus the length of the negation character (1), plus the maximum number of characters that may occupy the exponent character sequence. For bit/boolean types, it is the length of the character sequence "false", the longer of the two boolean value String representations. For any other types, the value is the result of whatever calculation must be performed to determine the maximum length of its String representation. If the size is unknown, unknowable or inapplicable, zero is returned.

Returns:
the maximum length that a String representation of the type may have

getDataType

public Integer getDataType()
Retrieves the data type, as an Integer.

Returns:
the data type, as an Integer.

getDefaultScale

public Integer getDefaultScale()
Retrieves the implied or single permitted scale for exact numeric types, when no scale is declared or no scale declaration is permitted.

Returns:
the implied or single permitted scale for exact numeric types, when no scale is declared or no scale declaration is permitted

getIntervalPrecision

public Integer getIntervalPrecision()
Retrieves null (not implemented).

Returns:
null (not implemented)

getLiteralPrefix

public String getLiteralPrefix()
Retrieves the character(s) prefixing a literal of this type.

Returns:
the character(s) prefixing a literal of this type.

getLiteralSuffix

public String getLiteralSuffix()
Retrieves the character(s) terminating a literal of this type.

Returns:
the character(s) terminating a literal of this type

getLocalName

public String getLocalName()
Retrieves a localized representation of the type's name, for human consumption only.

Returns:
a localized representation of the type's name

getMaxScale

public Integer getMaxScale()
Retrieves the maximum Short.MAX_VALUE bounded scale supported for the type.

Returns:
the maximum Short.MAX_VALUE bounded scale supported for the type

getMaxScaleAct

public Integer getMaxScaleAct()
Retrieves the maximum Integer.MAX_VALUE bounded scale supported for the type.

Returns:
the maximum Integer.MAX_VALUE bounded scale supported for the type

getMinScale

public Integer getMinScale()
Retrieves the minumum Short.MIN_VALUE bounded scale supported for the type.

Returns:
the minumum Short.MIN_VALUE bounded scale supported for the type

getMinScaleAct

public Integer getMinScaleAct()
Retrieves the minumum Integer.MIN_VALUE bounded scale supported for the type.

Returns:
the minumum Integer.MIN_VALUE bounded scale supported for the type

getNullability

public Integer getNullability()
Retrieves the DatabaseMetaData default nullability code for the type.

Returns:
the DatabaseMetaData nullability code for the type.

getNumPrecRadix

public Integer getNumPrecRadix()
Retrieves the number base which is to be used to interpret the value reported by getPrecision().

Returns:
the number base which is to be used to interpret the value reported by getPrecision()

getPrecision

public Integer getPrecision()
Retrieves the maximum Integer.MAX_VALUE bounded length or precision for the type.

Returns:
the maximum Integer.MAX_VALUE bounded length or precision for the type

getPrecisionAct

public Long getPrecisionAct()
Retrieves the maximum Long.MAX_VALUE bounded length or precision for the type.

Returns:
the maximum Long.MAX_VALUE bounded length or precision for the type

getRemarks

public String getRemarks()
Retrieves the localized remarks (if any) on the type.

Returns:
the localized remarks on the type.

getSearchability

public Integer getSearchability()
Retrieves the DatabaseMetaData searchability code for the type.

Returns:
the DatabaseMetaData searchability code for the type

getSqlDataType

public Integer getSqlDataType()
Retrieves the SQL CLI data type code for the type.

Returns:
the SQL CLI data type code for the type

getSqlDateTimeSub

public Integer getSqlDateTimeSub()
Retrieves the SQL CLI datetime subcode for the type.

Returns:
the SQL CLI datetime subcode for the type

getStdMapClsName

public String getStdMapClsName()
Retrieve the fully qualified name of the recommended standard Java primitive, class or java.sql interface mapping for the type.

Returns:
the fully qualified name of the recommended standard Java primitive, class or java.sql interface mapping for the type

getTypeCode

public int getTypeCode()
Retrieves the data type as an int.

Returns:
the data type as an int

getTypeName

public String getTypeName()
Retrieves the canonical data type name HSQLDB associates with the type.

This typically matches the designated JDBC name, with one or two exceptions.

Returns:
the canonical data type name HSQLDB associates with the type

getTypeSub

public int getTypeSub()
Retrieves the HSQLDB data subtype as an int.

Returns:
the HSQLDB data subtype as an int

isAutoIncrement

public Boolean isAutoIncrement()
Retrieves whether the type is an IDENTITY type.

Returns:
whether the type is an IDENTITY type.

isCaseSensitive

public Boolean isCaseSensitive()
Retrieves whether the type is case-sensitive in collations and comparisons.

Returns:
whether the type is case-sensitive in collations and comparisons.

isColStClsSupported

public Boolean isColStClsSupported()
Retrieves whether, under the current release, class path and hosting JVM, HSQLDB supports storing this type in table columns.

This value also typically represents whether HSQLDB supports retrieving values of this type in the columns of ResultSets.

Returns:
whether, under the current release, class path and hosting JVM, HSQLDB supports storing this type in table columns

isFixedPrecisionScale

public Boolean isFixedPrecisionScale()
Retrieves whether values of this type have a fixed precision and scale.

Returns:
whether values of this type have a fixed precision and scale.

isStdMapClsSupported

public Boolean isStdMapClsSupported()
Retrieve whether the fully qualified name reported by getStdMapClsName() is supported as a jdbcResultSet.getXXX return type under the current HSQLDB release, class path and hosting JVM.

Returns:
whether the fully qualified name reported by getStdMapClsName() is supported as a jdbcResultSet.getXXX return type under the current HSQLDB release, class path and hosting JVM.

isSupportedAsPCol

public Boolean isSupportedAsPCol()
Retrieves whether, under the current release, class path and hosting JVM, HSQLDB supports passing or receiving this type as the value of a procedure column.

Returns:
whether, under the current release, class path and hosting JVM, HSQLDB supports passing or receiving this type as the value of a procedure column.

isSupportedAsTCol

public Boolean isSupportedAsTCol()
Retrieves whether, under the current release, class path and hosting JVM, HSQLDB supports this as the type of a table column.

Returns:
whether, under the current release, class path and hosting JVM, HSQLDB supports this type as the values of a table column

isUnsignedAttribute

public Boolean isUnsignedAttribute()
Retrieves whether values of this type are unsigned.

Returns:
whether values of this type are unsigned

setLocale

public void setLocale(Locale l)
Assigns the Locale object used to retrieve this object's resource bundle dependent values.

Parameters:
l - the Locale object used to retrieve this object's resource bundle dependent values

setTypeCode

public void setTypeCode(int type)
Assigns the SQL data type code on which this object is to report.

Parameters:
type - the SQL data type code on which this object is to report

setTypeSub

public void setTypeSub(int typeSub)
Assigns the HSQLDB data subtype code on which this object is to report.

Parameters:
typeSub - the HSQLDB data subtype code on which this object is to report


Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.