|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.ao.types.TypeInfo<T>
public final class TypeInfo<T>
Describes a mapping between a 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.
| Constructor Summary | |
|---|---|
|
TypeInfo(LogicalType<T> logicalType,
SchemaProperties schemaProperties,
TypeQualifiers defaultQualifiers)
|
protected |
TypeInfo(LogicalType<T> logicalType,
SchemaProperties schemaProperties,
TypeQualifiers defaultQualifiers,
TypeQualifiers qualifiers)
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TypeInfo(LogicalType<T> logicalType,
SchemaProperties schemaProperties,
TypeQualifiers defaultQualifiers)
protected TypeInfo(LogicalType<T> logicalType,
SchemaProperties schemaProperties,
TypeQualifiers defaultQualifiers,
TypeQualifiers qualifiers)
| Method Detail |
|---|
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)
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||