Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.types
Class DataTypeUtilities  view DataTypeUtilities download DataTypeUtilities.java

java.lang.Object
  extended byorg.apache.derby.iapi.types.DataTypeUtilities

public abstract class DataTypeUtilities
extends java.lang.Object

A set of static utility methods for data types.


Constructor Summary
DataTypeUtilities()
           
 
Method Summary
static int computeMaxWidth(int precision, int scale)
          Compute the maximum width (column display width) of a decimal or numeric data value, given its precision and scale.
static int getColumnDisplaySize(DataTypeDescriptor dtd)
          Gets the display width of a column of a given type.
static int getColumnDisplaySize(int typeId, int storageLength)
           
static int getDigitPrecision(DataTypeDescriptor dtd)
          Get the precision of the datatype, in decimal digits This is used by EmbedResultSetMetaData.
static int getPrecision(DataTypeDescriptor dtd)
          Get the precision of the datatype.
static boolean isCaseSensitive(DataTypeDescriptor dtd)
          Is the data type case sensitive.
static boolean isCurrency(DataTypeDescriptor dtd)
          Is the data type currency.
static int isNullable(DataTypeDescriptor dtd)
          Is the data type nullable.
static boolean isSigned(DataTypeDescriptor dtd)
          Is the data type signed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeUtilities

public DataTypeUtilities()
Method Detail

getPrecision

public static int getPrecision(DataTypeDescriptor dtd)
Get the precision of the datatype.


getDigitPrecision

public static int getDigitPrecision(DataTypeDescriptor dtd)
Get the precision of the datatype, in decimal digits This is used by EmbedResultSetMetaData.


isCurrency

public static boolean isCurrency(DataTypeDescriptor dtd)
Is the data type currency.


isCaseSensitive

public static boolean isCaseSensitive(DataTypeDescriptor dtd)
Is the data type case sensitive.


isNullable

public static int isNullable(DataTypeDescriptor dtd)
Is the data type nullable.


isSigned

public static boolean isSigned(DataTypeDescriptor dtd)
Is the data type signed.


getColumnDisplaySize

public static int getColumnDisplaySize(DataTypeDescriptor dtd)
Gets the display width of a column of a given type.


getColumnDisplaySize

public static int getColumnDisplaySize(int typeId,
                                       int storageLength)

computeMaxWidth

public static int computeMaxWidth(int precision,
                                  int scale)
Compute the maximum width (column display width) of a decimal or numeric data value, given its precision and scale.