Top Description Fields Constructors Methods
org.hsqldb.types

public Class BinaryUUIDType

extends BinaryType
Class Inheritance
Imports
java.util.UUID, org.hsqldb.Session, .SessionInterface, .Tokens, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.ArrayUtil, .StringConverter

Type implementation for BINARY UUID.

A binary UUID is exactly 16 bytes.

Cast from CHARACTER types to BINARY converts a hexadecimal UUID string with or without the dashes.

Cast to CHARACTER types converts to a hexadecimal UUID string.

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

Field Summary

Modifier and TypeField and Description
public static final int
Inherited from org.hsqldb.types.BinaryType:
maxBinaryPrecision

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public int
canMoveFrom(Type otherType)

Overrides org.hsqldb.types.BinaryType.canMoveFrom.

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

pack-priv Object
public Object
castToType(SessionInterface session, Object a, Type otherType)

Overrides org.hsqldb.types.BinaryType.castToType.

Explicit casts are handled by this method.

public int
public Object
public Object
public Object
public Object
convertToDefaultType(SessionInterface session, Object a)

Overrides org.hsqldb.types.BinaryType.convertToDefaultType.

Converts the object to the given type without limit checks.

public String
public String
public Object
convertToType(SessionInterface session, Object a, Type otherType)

Overrides org.hsqldb.types.BinaryType.convertToType.

Same as castToType except for CHARACTER values.

public Object
public int
public Type
getAggregateType(Type other)

Overrides org.hsqldb.types.BinaryType.getAggregateType.

Common type used in comparison operations.

public static BinaryData
getBinary(long hi, long lo)

public static BinaryData
public Type
getCombinedType(Session session, Type other, int operation)

Overrides org.hsqldb.types.BinaryType.getCombinedType.

Returns type for concat

public String
getDefinition()

Overrides org.hsqldb.types.BinaryType.getDefinition.

Returns the full definition of the type, including parameters

public static UUID
public Class<T>
public String
getJDBCClassName()

Overrides org.hsqldb.types.BinaryType.getJDBCClassName.

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

public int
getJDBCTypeCode()

Overrides org.hsqldb.types.BinaryType.getJDBCTypeCode.

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

public long
public String
public String
getNameString()

Overrides org.hsqldb.types.BinaryType.getNameString.

Returns the name of the type

pack-priv int
public boolean
public boolean
public BlobData
overlay(Session session, BlobData data, BlobData overlay, long offset, long length, boolean hasLength)

Overrides org.hsqldb.types.BinaryType.overlay.

public long
position(SessionInterface session, BlobData data, BlobData otherData, Type otherType, long offset)

Overrides org.hsqldb.types.BinaryType.position.

public int
precedenceDegree(Type other)

Overrides org.hsqldb.types.BinaryType.precedenceDegree.

relaxes the SQL standard list to avoid problems with conversion of literals and java method parameter type issues

public boolean
public BlobData
substring(SessionInterface session, BlobData data, long offset, long length, boolean hasLength)

Overrides org.hsqldb.types.BinaryType.substring.

public BlobData
trim(Session session, BlobData data, int trim, boolean leading, boolean trailing)

Overrides org.hsqldb.types.BinaryType.trim.

Inherited from org.hsqldb.types.BinaryType:
convertToJSONgetBinaryType

Field Detail

binaryUUIDPrecisionback to summary
public static final int binaryUUIDPrecision

Constructor Detail

BinaryUUIDTypeback to summary
protected BinaryUUIDType()

Method Detail

acceptsPrecisionback to summary
public boolean acceptsPrecision()

Overrides org.hsqldb.types.BinaryType.acceptsPrecision.

canConvertFromback to summary
public boolean canConvertFrom(Type otherType)

Overrides org.hsqldb.types.BinaryType.canConvertFrom.

canMoveFromback to summary
public int canMoveFrom(Type otherType)

Overrides org.hsqldb.types.BinaryType.canMoveFrom.

Doc from org.hsqldb.types.Type.canMoveFrom.

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

castOrConvertToTypeback to summary
pack-priv Object castOrConvertToType(SessionInterface session, Object a, Type otherType, boolean cast)

Overrides org.hsqldb.types.BinaryType.castOrConvertToType.

castToTypeback to summary
public Object castToType(SessionInterface session, Object a, Type otherType)

Overrides org.hsqldb.types.BinaryType.castToType.

Doc from org.hsqldb.types.Type.castToType.

Explicit casts are handled by this method. SQL standard 6.12 rules for enforcement of size, precision and scale are implemented. For CHARACTER values, it performs truncation in all cases of long strings.

compareback to summary
public int compare(Session session, Object a, Object b)

Overrides org.hsqldb.types.BinaryType.compare.

concatback to summary
public Object concat(Session session, Object a, Object b)

Overrides org.hsqldb.types.BinaryType.concat.

convertJavaToSQLback to summary
public Object convertJavaToSQL(SessionInterface session, Object a)

Overrides org.hsqldb.types.BinaryType.convertJavaToSQL.

convertSQLToJavaback to summary
public Object convertSQLToJava(SessionInterface session, Object a)

Overrides org.hsqldb.types.BinaryType.convertSQLToJava.

convertToDefaultTypeback to summary
public Object convertToDefaultType(SessionInterface session, Object a)

Overrides org.hsqldb.types.BinaryType.convertToDefaultType.

Doc from org.hsqldb.types.Type.convertToDefaultType.

Converts the object to the given type without limit checks. Used for JDBC writes.

convertToSQLStringback to summary
public String convertToSQLString(Object a)

Overrides org.hsqldb.types.BinaryType.convertToSQLString.

convertToStringback to summary
public String convertToString(Object a)

Overrides org.hsqldb.types.BinaryType.convertToString.

convertToTypeback to summary
public Object convertToType(SessionInterface session, Object a, Type otherType)

Overrides org.hsqldb.types.BinaryType.convertToType.

Doc from org.hsqldb.types.Type.convertToType.

Same as castToType except for CHARACTER values. Perform string truncation of trailing spaces only. For other long strings, it raises an exception.

convertToTypeLimitsback to summary
public Object convertToTypeLimits(SessionInterface session, Object a)

Overrides org.hsqldb.types.BinaryType.convertToTypeLimits.

displaySizeback to summary
public int displaySize()

Overrides org.hsqldb.types.BinaryType.displaySize.

getAggregateTypeback to summary
public Type getAggregateType(Type other)

Overrides org.hsqldb.types.BinaryType.getAggregateType.

Doc from org.hsqldb.types.Type.getAggregateType.

Common type used in comparison operations. other must be comparable with this.

getBinaryback to summary
public static BinaryData getBinary(long hi, long lo)
getBinaryback to summary
public static BinaryData getBinary(UUID uuid)
getCombinedTypeback to summary
public Type getCombinedType(Session session, Type other, int operation)

Overrides org.hsqldb.types.BinaryType.getCombinedType.

Returns type for concat

getDefinitionback to summary
public String getDefinition()

Overrides org.hsqldb.types.BinaryType.getDefinition.

Doc from org.hsqldb.types.Type.getDefinition.

Returns the full definition of the type, including parameters

getJavaUUIDback to summary
public static UUID getJavaUUID(BinaryData data)
getJDBCClassback to summary
public Class<T> getJDBCClass()

Overrides org.hsqldb.types.BinaryType.getJDBCClass.

getJDBCClassNameback to summary
public String getJDBCClassName()

Overrides org.hsqldb.types.BinaryType.getJDBCClassName.

Doc from org.hsqldb.types.Type.getJDBCClassName.

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

getJDBCTypeCodeback to summary
public int getJDBCTypeCode()

Overrides org.hsqldb.types.BinaryType.getJDBCTypeCode.

Doc from org.hsqldb.types.Type.getJDBCTypeCode.

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

getMaxPrecisionback to summary
public long getMaxPrecision()

Overrides org.hsqldb.types.BinaryType.getMaxPrecision.

getNameFullStringback to summary
public String getNameFullString()

Overrides org.hsqldb.types.BinaryType.getNameFullString.

getNameStringback to summary
public String getNameString()

Overrides org.hsqldb.types.BinaryType.getNameString.

Doc from org.hsqldb.types.Type.getNameString.

Returns the name of the type

getRightTrimSizeback to summary
pack-priv int getRightTrimSize(BlobData data)

Overrides org.hsqldb.types.BinaryType.getRightTrimSize.

isBinaryTypeback to summary
public boolean isBinaryType()

Overrides org.hsqldb.types.BinaryType.isBinaryType.

isUUIDTypeback to summary
public boolean isUUIDType()

Overrides org.hsqldb.types.Type.isUUIDType.

overlayback to summary
public BlobData overlay(Session session, BlobData data, BlobData overlay, long offset, long length, boolean hasLength)

Overrides org.hsqldb.types.BinaryType.overlay.

positionback to summary
public long position(SessionInterface session, BlobData data, BlobData otherData, Type otherType, long offset)

Overrides org.hsqldb.types.BinaryType.position.

precedenceDegreeback to summary
public int precedenceDegree(Type other)

Overrides org.hsqldb.types.BinaryType.precedenceDegree.

relaxes the SQL standard list to avoid problems with conversion of literals and java method parameter type issues

requiresPrecisionback to summary
public boolean requiresPrecision()

Overrides org.hsqldb.types.BinaryType.requiresPrecision.

substringback to summary
public BlobData substring(SessionInterface session, BlobData data, long offset, long length, boolean hasLength)

Overrides org.hsqldb.types.BinaryType.substring.

trimback to summary
public BlobData trim(Session session, BlobData data, int trim, boolean leading, boolean trailing)

Overrides org.hsqldb.types.BinaryType.trim.