Top Description Inners Fields Constructors Methods
org.hsqldb.types

public abstract Class Type

extends Object
implements SchemaObject, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, org.hsqldb.SchemaObject
Known Direct Subclasses
org.hsqldb.types.ArrayType, org.hsqldb.types.BinaryType, org.hsqldb.types.BooleanType, org.hsqldb.types.CharacterType, org.hsqldb.types.DTIType, org.hsqldb.types.NullType, org.hsqldb.types.NumberType, org.hsqldb.types.OtherType, org.hsqldb.types.RowType
Imports
org.hsqldb.HsqlNameManager.HsqlName, .SchemaObject, .Session, .SessionInterface, .SortAndSlice, .Tokens, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.IntKeyHashMap, .IntValueHashMap, .OrderedHashSet, org.hsqldb.rights.Grantee

Base class for type objects.

Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
1.9.0
Version
2.7.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
public static final Type[]
public static final IntKeyHashMap<Type>
public static final OtherType
public final long
public final int
public static final Type
public static final ArrayType
public static final NumberType
public static final BinaryType
public static final BinaryType
public static final BinaryType
public static final BitType
public static final BitType
public static final BitType
public static final BlobType
public static final BooleanType
public static final CharacterType
public static final CharacterType
public static final CharacterType
public static final ClobType
public static final DateTimeType
public static final NumberType
public static final NumberType
public static final NumberType
public static final NumberType
public static final BinaryUUIDType
public static final NumberType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final IntervalType
public static final NumberType
public static final NumberType
public static final DateTimeType
public static final DateTimeType
public static final DateTimeType
public static final DateTimeType
public static final DateTimeType
public static final DateTimeType
public static final DateTimeType
public static final DateTimeType
public static final BinaryType
public static final BinaryType
public static final CharacterType
public static final CharacterType
public static final CharacterType
public static final NumberType
public static final IntValueHashMap<String>
public final int
public final int
public final int
public static final IntValueHashMap<String>
public UserTypeModifier

Constructor Summary

AccessConstructor and Description
pack-priv
Type(int typeGroup, int type, long precision, int scale)

Method Summary

Modifier and TypeMethod and Description
public Object
absolute(Object a)

All arithmetic ops are called on the pre-determined Type object of the result

public boolean
public boolean
public boolean
public Object
add(Session session, Object a, Object b, Type otherType)

public int
public boolean
public boolean
public abstract boolean
canConvertFrom(Type otherType)

public int

Returns:

0 always, 1 only value range check required, -1 value conversion required
canMoveFrom
(Type otherType)

When canConvertFrom() is true, can convert without changing the object

public int
public Object
castToType(SessionInterface session, Object a, Type type)

Explicit casts are handled by this method.

public Type
public abstract int
compare(Session session, Object a, Object b)

public int
compare(Session session, Object a, Object b, int opType)

public int
compare(Session session, Object a, Object b, SortAndSlice sort)

public int
public final void
compile(Session session, SchemaObject parentObject)

Overrides default org.hsqldb.SchemaObject.compile.

public Object
concat(Session session, Object a, Object b)

public Object
public Object
public abstract Object
convertToDefaultType(SessionInterface sessionInterface, Object o)

Converts the object to the given type without limit checks.

public void
public void
convertToJSON(Object a, StringBuilder sb, boolean nullOnNull)

public abstract String
public abstract String
public abstract Object
convertToType(SessionInterface session, Object a, Type type)

Same as castToType except for CHARACTER values.

public Object
convertToTypeJDBC(SessionInterface session, Object a, Type otherType)

Convert type for JDBC reads.

public abstract Object
public abstract int
public Object
divide(Session session, Object a, Object b)

public Type
public boolean
equals(Object other)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public abstract Type
getAggregateType(Type other)

Common type used in comparison operations.

public static Type
getAggregateType(Type add, Type existing)

public final HsqlNameManager.HsqlName
public long
public Charset
public Collation
public abstract Type
getCombinedType(Session session, Type other, int operation)

Result type of combining values of two types in different operations.

public final OrderedHashSet<SchemaObject>
public static ArrayType
public static Type
getDefaultType(int type)

public static Type
public abstract String
getDefinition()

Returns the full definition of the type, including parameters

public int
public String
getFullNameString()

Returns the name of the type

public static int
getHSQLDBTypeCode(int jdbcTypeNumber)

public abstract Class<T>
public abstract String
getJDBCClassName()

Returns the JDBC class name of type, if it exists, otherwise the HSQLDB class name.

public int
public int
public abstract int
getJDBCTypeCode()

Returns the JDBC type number of type, if it exists, otherwise the HSQLDB / SQL type.

public static int

Returns:

int
getJDBCTypeCode
(int
int
type
)

translate an internal type number to JDBC type number if a type is not supported internally, it is returned without translation

public long
public int
public final HsqlNameManager.HsqlName
public abstract String
getNameString()

Returns the name of the type

public final Grantee
public int
public OrderedHashSet<HsqlNameManager.HsqlName>
public final HsqlNameManager.HsqlName
public String

Returns:

the SQL character sequence required to (re)create the type
getSQL
()

Implements org.hsqldb.SchemaObject.getSQL.

Retrieves the SQL character sequence required to (re)create the type, as a String

public int
getSQLGenericTypeCode()

Returns the generic SQL CLI type number of type, if it exists, otherwise the HSQLDB type.

public final int
public static Type
getType(Type type, Collation collation)

public static Type
getType(int type, Charset charset, Collation collation, long precision, int scale)

Enforces precision and scale limits on type

public final String
public static Type
public static int
public int
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public static boolean
isSupportedSQLType(int typeNumber)

public boolean
public boolean
public boolean
public static boolean
matches(Type[] one, Type[] other)

public Object
public Object
public int
public boolean
public Object
subtract(Session session, Object a, Object b, Type otherType)

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait