Top Description Fields Constructors Methods
org.hsqldb.types

public Class RowType

extends Type
Class Inheritance
Imports
org.hsqldb.OpTypes, .Session, .SessionInterface, .SortAndSlice, .Tokens, org.hsqldb.error.Error, .ErrorCode

Class for ROW type objects.

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

Field Summary

Modifier and TypeField and Description
pack-priv final Type[]
Inherited from org.hsqldb.types.Type:
emptyArrayjdbcConvertTypesOTHERprecisionscaleSQL_ALL_TYPESSQL_ARRAY_ALL_TYPESSQL_BIGINTSQL_BINARYSQL_BINARY_16SQL_BINARY_DEFAULTSQL_BITSQL_BIT_VARYINGSQL_BIT_VARYING_MAX_LENGTHSQL_BLOBSQL_BOOLEANSQL_CHARSQL_CHAR_DEFAULTSQL_CHAR_UUIDSQL_CLOBSQL_DATESQL_DECIMALSQL_DECIMAL_BIGINT_SQRSQL_DECIMAL_DEFAULTSQL_DOUBLESQL_GUIDSQL_INTEGERSQL_INTERVAL_DAYSQL_INTERVAL_DAY_MAX_PRECISIONSQL_INTERVAL_DAY_TO_HOURSQL_INTERVAL_DAY_TO_MINUTESQL_INTERVAL_DAY_TO_SECONDSQL_INTERVAL_DAY_TO_SECOND_MAX_PRECISIONSQL_INTERVAL_HOURSQL_INTERVAL_HOUR_MAX_PRECISIONSQL_INTERVAL_HOUR_TO_MINUTESQL_INTERVAL_HOUR_TO_SECONDSQL_INTERVAL_MINUTESQL_INTERVAL_MINUTE_MAX_PRECISIONSQL_INTERVAL_MINUTE_TO_SECONDSQL_INTERVAL_MONTHSQL_INTERVAL_MONTH_MAX_PRECISIONSQL_INTERVAL_SECONDSQL_INTERVAL_SECOND_MAX_FRACTIONSQL_INTERVAL_SECOND_MAX_FRACTION_MAX_PRECISIONSQL_INTERVAL_SECOND_MAX_PRECISIONSQL_INTERVAL_YEARSQL_INTERVAL_YEAR_MAX_PRECISIONSQL_INTERVAL_YEAR_TO_MONTHSQL_INTERVAL_YEAR_TO_MONTH_MAX_PRECISIONSQL_NUMERICSQL_SMALLINTSQL_TIMESQL_TIME_MAXSQL_TIME_WITH_TIME_ZONESQL_TIME_WITH_TIME_ZONE_MAXSQL_TIMESTAMPSQL_TIMESTAMP_NO_FRACTIONSQL_TIMESTAMP_WITH_TIME_ZONESQL_TIMESTAMP_WITH_TIME_ZONE_MAXSQL_VARBINARYSQL_VARBINARY_DEFAULTSQL_VARCHARSQL_VARCHAR_DEFAULTSQL_VARCHAR_LONGTINYINTtypeAliasestypeCodetypeComparisonGrouptypeDataGrouptypeNamesuserTypeModifier

Constructor Summary

AccessConstructor and Description
public
RowType(Type[] dataTypes)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public int
compare(Session session, Object a, Object b)

Implements abstract org.hsqldb.types.Type.compare.

public int
public static int
compare(Session session, Object a, Object b, SortAndSlice sort, Type[] dataTypes)

public Object
convertToDefaultType(SessionInterface sessionInterface, Object o)

Implements abstract org.hsqldb.types.Type.convertToDefaultType.

Converts the object to the given type without limit checks.

public void
public String
public static String
convertToSQLString(Object[] array, Type[] types, int maxUnitLength)

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

Implements abstract org.hsqldb.types.Type.convertToType.

Same as castToType except for CHARACTER values.

public Object
public int
public boolean
equals(Object other)

Overrides org.hsqldb.types.Type.equals.

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

public Type
getAggregateType(Type other)

Implements abstract org.hsqldb.types.Type.getAggregateType.

Common type used in comparison operations.

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

Implements abstract org.hsqldb.types.Type.getCombinedType.

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

public String
getDefinition()

Implements abstract org.hsqldb.types.Type.getDefinition.

Returns the full definition of the type, including parameters

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

Implements abstract org.hsqldb.types.Type.getJDBCClassName.

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

public int
public int
public int
getJDBCTypeCode()

Implements abstract org.hsqldb.types.Type.getJDBCTypeCode.

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

public String
getNameString()

Implements abstract org.hsqldb.types.Type.getNameString.

Returns the name of the type

public int
getSQLGenericTypeCode()

Overrides org.hsqldb.types.Type.getSQLGenericTypeCode.

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

public Type[]
public int
public boolean
Inherited from org.hsqldb.types.Type:
absoluteacceptsFractionalPrecisionacceptsPrecisionacceptsScaleaddarrayLimitCardinalitycanCompareDirectcanMoveFromcardinalitycastToTypecollectionBaseTypecomparecompareToTypeRangecompileconcatconvertJavaToSQLconvertSQLToJavaconvertToJSONconvertToTypeJDBCdivideduplicategetAggregateTypegetCatalogNamegetChangeTimestampgetCharacterSetgetCollationgetComponentsgetDefaultArrayTypegetDefaultTypegetDefaultTypeWithSizegetFullNameStringgetHSQLDBTypeCodegetJDBCTypeCodegetMaxPrecisiongetMaxScalegetNamegetOwnergetPrecisionRadixgetReferencesgetSchemaNamegetSQLgetTypegetTypegetTypegetTypeDefinitiongetTypeForJDBCConvertTokengetTypeNrhashCodeisArrayTypeisBinaryTypeisBitTypeisBooleanTypeisCharacterTypeisDateOrTimestampTypeisDateTimeTypeisDateTimeTypeWithZoneisDecimalTypeisDistinctTypeisDomainTypeisExactNumberTypeisIntegralTypeisIntervalDaySecondTypeisIntervalTypeisIntervalYearMonthTypeisLobTypeisMultisetTypeisNegativeisNumberTypeisObjectTypeisStructuredTypeisSupportedSQLTypeisTimestampTypeisTimeTypeisUUIDTypematchesmultiplynegateprecedenceDegreerequiresPrecisionsubtract

Field Detail

dataTypesback to summary
pack-priv final Type[] dataTypes

Constructor Detail

RowTypeback to summary
public RowType(Type[] dataTypes)

Method Detail

canBeAssignedFromback to summary
public boolean canBeAssignedFrom(Type otherType)

Overrides org.hsqldb.types.Type.canBeAssignedFrom.

canConvertFromback to summary
public boolean canConvertFrom(Type otherType)

Implements abstract org.hsqldb.types.Type.canConvertFrom.

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

Implements abstract org.hsqldb.types.Type.compare.

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

Overrides org.hsqldb.types.Type.compare.

compareback to summary
public static int compare(Session session, Object a, Object b, SortAndSlice sort, Type[] dataTypes)
convertToDefaultTypeback to summary
public Object convertToDefaultType(SessionInterface sessionInterface, Object o)

Implements abstract org.hsqldb.types.Type.convertToDefaultType.

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

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

convertToJSONback to summary
public void convertToJSON(Object a, StringBuilder sb)

Overrides org.hsqldb.types.Type.convertToJSON.

convertToSQLStringback to summary
public String convertToSQLString(Object a)

Implements abstract org.hsqldb.types.Type.convertToSQLString.

convertToSQLStringback to summary
public static String convertToSQLString(Object[] array, Type[] types, int maxUnitLength)
convertToStringback to summary
public String convertToString(Object a)

Implements abstract org.hsqldb.types.Type.convertToString.

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

Implements abstract org.hsqldb.types.Type.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)

Implements abstract org.hsqldb.types.Type.convertToTypeLimits.

displaySizeback to summary
public int displaySize()

Implements abstract org.hsqldb.types.Type.displaySize.

equalsback to summary
public boolean equals(Object other)

Overrides org.hsqldb.types.Type.equals.

Doc from java.lang.Object.equals.

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

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

getAggregateTypeback to summary
public Type getAggregateType(Type other)

Implements abstract org.hsqldb.types.Type.getAggregateType.

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

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

getCombinedTypeback to summary
public Type getCombinedType(Session session, Type other, int operation)

Implements abstract org.hsqldb.types.Type.getCombinedType.

Doc from org.hsqldb.types.Type.getCombinedType.

Result type of combining values of two types in different operations. The other type is not always comparable with this, but an operation should be valid without any explicit CAST

getDefinitionback to summary
public String getDefinition()

Implements abstract org.hsqldb.types.Type.getDefinition.

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

Returns the full definition of the type, including parameters

getDegreeback to summary
public int getDegree()

Overrides org.hsqldb.types.Type.getDegree.

getJDBCClassback to summary
public Class<T> getJDBCClass()

Implements abstract org.hsqldb.types.Type.getJDBCClass.

getJDBCClassNameback to summary
public String getJDBCClassName()

Implements abstract org.hsqldb.types.Type.getJDBCClassName.

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

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

getJDBCPrecisionback to summary
public int getJDBCPrecision()

Overrides org.hsqldb.types.Type.getJDBCPrecision.

getJDBCScaleback to summary
public int getJDBCScale()

Overrides org.hsqldb.types.Type.getJDBCScale.

getJDBCTypeCodeback to summary
public int getJDBCTypeCode()

Implements abstract org.hsqldb.types.Type.getJDBCTypeCode.

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

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

getNameStringback to summary
public String getNameString()

Implements abstract org.hsqldb.types.Type.getNameString.

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

Returns the name of the type

getSQLGenericTypeCodeback to summary
public int getSQLGenericTypeCode()

Overrides org.hsqldb.types.Type.getSQLGenericTypeCode.

Doc from org.hsqldb.types.Type.getSQLGenericTypeCode.

Returns the generic SQL CLI type number of type, if it exists, otherwise the HSQLDB type. The generic type is returned for DATETIME and INTERVAL types.

getTypesArrayback to summary
public Type[] getTypesArray()
hashCodeback to summary
public int hashCode(Object a)

Overrides org.hsqldb.types.Type.hashCode.

isRowTypeback to summary
public boolean isRowType()

Overrides org.hsqldb.types.Type.isRowType.