public final class TypeInfo<T> extends Object
LogicalType, with optional qualifiers, and the
underlying database type.
The database provider constructs one instance of this class for each supported logical type, and may provide additional derived instances for specific entity properties. The caller will never construct an instance of this class directly.
| Modifier | Constructor and Description |
|---|---|
|
TypeInfo(LogicalType<T> logicalType,
SchemaProperties schemaProperties,
TypeQualifiers defaultQualifiers) |
protected |
TypeInfo(LogicalType<T> logicalType,
SchemaProperties schemaProperties,
TypeQualifiers defaultQualifiers,
TypeQualifiers qualifiers) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsQualifiers(TypeQualifiers qualifiers)
Returns true if this type is compatible with the given qualifiers.
|
boolean |
equals(Object other) |
int |
getJdbcWriteType()
Returns the JDBC type code to use when passing values to the database.
|
LogicalType<T> |
getLogicalType()
Returns the
LogicalType describing what Java types are supported by this
type and how they are mapped to JDBC operations. |
TypeQualifiers |
getQualifiers()
Returns the
TypeQualifiers describing optional length/precision modifiers for this
type, which may include defaults set by the database provider and/or values specified by
annotations for particular entity properties. |
SchemaProperties |
getSchemaProperties()
Returns the
SchemaProperties describing the SQL representation of this type,
as specified by the database provider. |
String |
getSqlTypeIdentifier()
Returns the SQL type identifier for this type, including any length or precision modifiers.
|
int |
hashCode() |
boolean |
isAllowedAsPrimaryKey()
Returns a boolean specifying if this type can be used as a primary key value.
|
String |
toString()
Describes the type mapping in a format that includes the logical type name, any
non-default qualifiers, and the SQL type name, e.g.
|
TypeInfo<T> |
withQualifiers(TypeQualifiers qualifiers)
Returns a new instance of this class with the same properties, but with the default
TypeQualifiers overridden by the specified values. |
public TypeInfo(LogicalType<T> logicalType, SchemaProperties schemaProperties, TypeQualifiers defaultQualifiers)
protected TypeInfo(LogicalType<T> logicalType, SchemaProperties schemaProperties, TypeQualifiers defaultQualifiers, TypeQualifiers qualifiers)
public LogicalType<T> getLogicalType()
LogicalType describing what Java types are supported by this
type and how they are mapped to JDBC operations.public SchemaProperties getSchemaProperties()
SchemaProperties describing the SQL representation of this type,
as specified by the database provider.public TypeQualifiers getQualifiers()
TypeQualifiers describing optional length/precision modifiers for this
type, which may include defaults set by the database provider and/or values specified by
annotations for particular entity properties.public boolean isAllowedAsPrimaryKey()
public String getSqlTypeIdentifier()
public int getJdbcWriteType()
LogicalType but can be overridden by each database provider
in the SchemaProperties.public TypeInfo<T> withQualifiers(TypeQualifiers qualifiers)
TypeQualifiers overridden by the specified values.ActiveObjectsConfigurationException - if the qualifiers are not allowed for this typepublic boolean acceptsQualifiers(TypeQualifiers qualifiers)
Copyright © 2007–2018. All rights reserved.