Class Hierarchy        Index

Interface COM.cloudscape.types.TypeDescriptor

public interface TypeDescriptor
extends Externalizable
Copyright © 1997-1999, Cloudscape, Inc. All rights reserved.

An interface for describing types in Cloudscape systems.

The values in system catalog DATATYPE columns are of type TypeDescriptor.


Variable Index

 o BUILTIN
Denotes a built-in type.
 o MAXIMUM_WIDTH_UNKNOWN
The return value from getMaximumWidth() for types where the maximum width is unknown.
 o SERIALIZABLE
Denotes a serialized user type.

Method Index

 o getJDBCTypeId()
Get the jdbc type id for this type.
 o getMaximumWidth()
Returns the maximum width of the type.
 o getPrecision()
Returns the number of decimal digits for the type, if applicable.
 o getScale()
Returns the number of digits to the right of the decimal for the type, if applicable.
 o getSQLstring()
Converts this type descriptor (including length/precision) to a string suitable for appearing in a SQL type specifier.
 o getStorageType()
Returns the storage type for this type.
 o getTypeName()
Gets the name of this type.
 o isNullable()
Gets the nullability that values of this type have.

Variables

 o MAXIMUM_WIDTH_UNKNOWN
 public static final int MAXIMUM_WIDTH_UNKNOWN
The return value from getMaximumWidth() for types where the maximum width is unknown.

 o BUILTIN
 public static final int BUILTIN
Denotes a built-in type.

 o SERIALIZABLE
 public static final int SERIALIZABLE
Denotes a serialized user type.

Methods

 o getJDBCTypeId
 public abstract int getJDBCTypeId()
Get the jdbc type id for this type. JDBC type can be found in java.sql.Types.

Returns:
a jdbc type, e.g. java.sql.Types.DECIMAL
See Also:
Types
 o getMaximumWidth
 public abstract int getMaximumWidth()
Returns the maximum width of the type. This may have different meanings for different types. For example, with char, it means the maximum number of characters, while with int, it is the number of bytes (i.e. 4).

Returns:
the maximum length of this Type; -1 means "unknown/no max length"
 o getPrecision
 public abstract int getPrecision()
Returns the number of decimal digits for the type, if applicable.

Returns:
The number of decimal digits for the type. Returns zero for non-numeric types.
 o getScale
 public abstract int getScale()
Returns the number of digits to the right of the decimal for the type, if applicable.

Returns:
The number of digits to the right of the decimal for the type. Returns zero for non-numeric types.
 o isNullable
 public abstract boolean isNullable()
Gets the nullability that values of this type have.

Returns:
true if values of this type may be null. false otherwise
 o getTypeName
 public abstract String getTypeName()
Gets the name of this type.

Returns:
the name of this type
 o getSQLstring
 public abstract String getSQLstring()
Converts this type descriptor (including length/precision) to a string suitable for appearing in a SQL type specifier. E.g. VARCHAR(30) or serialize ( java.util.Hashtable )

Returns:
String version of type, suitable for running through a SQL Parser.
 o getStorageType
 public abstract int getStorageType()
Returns the storage type for this type. Currently supported storage types are BUILTIN and SERIALIZABLE.

Returns:
storage type of this type

  Class Hierarchy        Index