Interface Type
- All Known Subinterfaces:
ArrayOfRefType
,ArrayType
,BooleanType
,ByteType
,DoubleType
,FloatType
,IntegerType
,LongType
,RefType
,ShortType
,StringType
- All Known Implementing Classes:
SimpleType
,acdp.internal.types.Type_
There are simple column types and array column types.
A simple column type is either represented by the RefType
interface
or by the SimpleType
class.
(Although the acdp.types
package contains additional interfaces for
built-in simple column types, instances of built-in simple column types are
instances of classes extending the SimpleType
class, see the
description of the ST
class.)
A simple column type has a value type which is the type of the
value a row can store in that column.
An array column type is either represented by the ArrayOfRefType
or
the ArrayType
interface.
An array column type has a component type which is a simple column
type.
There should be no need for clients to implement this interface.
(Implementers of custom column types extend the mentioned SimpleType
class.)
- Author:
- Beat Hörmann
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Defines the so called inrow and outrow storage schemes for values of a particular column type. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isCompatible
(Object value) Tests if the specified value is compatible with this column type.scheme()
Returns the storage scheme of this column type.typeDesc()
Returns the type descriptor of this column type.
-
Method Details
-
scheme
Type.Scheme scheme()Returns the storage scheme of this column type.- Returns:
- The storage scheme of this column type, never
null
.
-
typeDesc
String typeDesc()Returns the type descriptor of this column type.The type descriptor uniquely identifies a particular column type among all other column types. It is used by a type factory to create an instance of that column type.
If the type descriptor starts with an upper case character then this column type is a custom column type otherwise it is a built-in column type. (A custom column type is provided by a client whereas a built-in column type is provided by ACDP.)
Implementers of this method must ensure that the value returned by this method is indeed unique and that it remains consistent even across session boundaries.
- Returns:
- The column type descriptor, never
null
.
-
isCompatible
Tests if the specified value is compatible with this column type.If the column type is a simple column type then the specified value is compatible with this column type if and only if
- The value is
null
and this column type allows thenull
value or - The value is different from
null
but the value is assignment-compatible with the value type of this column type.
If the column type is an array column type then the specified value is compatible with this column type if and only if it is
null
or the following conditions are satisfied:- The value is an array.
- If at least one element of the array value is equal to
null
then this array column type's component type allows thenull
value. - The component type of the array value is equal to the value type of this array column type's component type.
- The number of elements of the array value is less than or equal to the maximum size allowed by this array column type.
- Parameters:
value
- The value to test for compatibility.- Returns:
- The boolean value
true
if and only if the value is compatible with this column type.
- The value is
-