See: Description
| Interface | Description |
|---|---|
| DataType |
Interface defines a database datatype (e.g.
|
| Class | Description |
|---|---|
| BaseDateTimeDataType | |
| BinaryDataType | |
| CharacterDataType | |
| ComplexType | Deprecated
use
Type instead |
| DataTypeAttribute | |
| DataTypeHelper |
Helper class for unwrapping the DataTypeUsage object.
|
| DataTypeID |
INTERNAL USE ONLY.
|
| DataTypeRegistry |
Registry for DataTypes.
|
| DataTypeRegistry.Registerer |
A Registerer is responsible for providing allowed DataTypes for a given provider class.
|
| DataTypeSynonym |
DataType implementation that delegates all calls to an underlying DataType that it is a "synonym" for.
|
| DataTypeUsage |
To "use" a DataType is to refere to it by ID and store values for any attributes that DataType may have (e.g.
|
| DateDataType | |
| NumericDataType | |
| NumericDataType.MinMaxValue |
public static class MinMaxValue defines the minimum and maximum value range of integer and floating-point numbers for use by NumericDataType.validateDefaultValue().
|
| ObjectType | Deprecated |
| ObjectTypeUsage | Deprecated
use
DataTypeUsage instead |
| PredefinedDataType | |
| PredefinedDataTypeUsage | Deprecated |
| TimeStampTZDataType | |
| UserDataType |
Defines a data type that we 'discovered' when importing or navigating a database, usually from a foreign database, or for un-imported object types.
|
| Enum | Description |
|---|---|
| ComplexType.SQLJUsingType |
| Exception | Description |
|---|---|
| DataTypeValidationException | |
| DefaultValueValidationException |
DataType definitions are DBObjects, and are retrieved from a DBObjectProvider using the listDataTypes and getDataType methods. For ComplexType objects the listObjects and getObject methods should be used with their type string ComplexType.TYPE.
DataTypeUsage object. This includes the ID of the datatype, as well as any attributes associated with its use (e.g. size, scale, precision etc). For more information see DataTypeUsage. In general when using DataType and DataTypeUsage objects, the DataTypeHelper class provides a lot of useful helper methods.
Column's DataTypeUsage
final Column ename = table.getColumn( "ENAME" );
final DataTypeUsage datatypeUsage = ename.getDataTypeUsage();
final Long size = DataTypeHelper.getLongAttributeValue(
datatypeUsage,
DataTypeAttribute.DATATYPE_SIZE );
final DataType datatype = provider.getDataType( "VARCHAR2" );
final DataTypeUsage datatypeUsage = datatype.createDefaultUsage();
datatypeUsage.putAttributeValue( DataTypeAttribute.DATATYPE_SIZE,
30L );
oracle.javatools.db