Class Hierarchy    Previous  Next  Index

Interface COM.cloudscape.types.TypeDescriptor


public interface TypeDescriptor
extends java.io.Externalizable
Copyright © 1998-2000, Informix Software, 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.

Field Detail

 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.

Method Detail

 o getJDBCTypeId
public 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:
java.sql.Types
 o getMaximumWidth
public 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 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 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 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 java.lang.String getTypeName()
          Gets the name of this type.
Returns:
the name of this type
 o getSQLstring
public java.lang.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 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    Previous  Next  Index