Top Description Fields Constructors Methods
org.hibernate.cfg

public Class AttributeConverterDefinition

extends Object
implements AttributeConverterInfo
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.AttributeConverterInfo
Annotations
@Deprecated
Imports
java.lang.reflect.Constructor, .ParameterizedType, .Type, .TypeVariable, java.util.ArrayList, .Arrays, .List, javax.persistence.AttributeConverter, .Converter, org.hibernate.AnnotationException, .AssertionFailure, org.hibernate.boot.AttributeConverterInfo, org.hibernate.boot.model.convert.internal.InstanceBasedConverterDescriptor, org.hibernate.boot.model.convert.spi.ConverterDescriptor, org.hibernate.boot.spi.MetadataBuildingContext

Deprecated

(since 5.3) forces the converter instance to be built too early, which precludes the ability to resolve them from CDI, etc. See org.hibernate.boot.model.convert.spi.ConverterDescriptor instead

Externalized representation of an AttributeConverter
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final AttributeConverter<X, Y>
private final boolean
private final Class<T>
private final Class<T>

Constructor Summary

AccessConstructor and Description
public
AttributeConverterDefinition(AttributeConverter<X, Y> attributeConverter, boolean autoApply)

Method Summary

Modifier and TypeMethod and Description
private ParameterizedType
private static Class<T>
public static AttributeConverterDefinition

Returns:

The constructed definition
from
(Class<? extends AttributeConverter<X, Y>>
The AttributeConverter Class
attributeConverterClass
,
boolean
Should the AttributeConverter be auto-applied?
autoApply
)

Deprecated as a consequence of AttributeConverterDefinition being deprecated.
Build an AttributeConverterDefinition from the AttributeConverter Class reference and whether or not to auto-apply it.
public static AttributeConverterDefinition

Returns:

The constructed definition
from
(Class<? extends AttributeConverter<X, Y>>
The converter class
attributeConverterClass
)

Deprecated as a consequence of AttributeConverterDefinition being deprecated.
Build an AttributeConverterDefinition from the AttributeConverter Class reference.
public static AttributeConverterDefinition

Returns:

The constructed definition
from
(AttributeConverter<X, Y>
The AttributeConverter instance
attributeConverter
)

Deprecated as a consequence of AttributeConverterDefinition being deprecated.
Build an AttributeConverterDefinition from an AttributeConverter instance.
public static AttributeConverterDefinition

Returns:

The constructed definition
from
(AttributeConverter<X, Y>
The AttributeConverter instance
attributeConverter
,
boolean
Should the AttributeConverter be auto-applied?
autoApply
)

Deprecated as a consequence of AttributeConverterDefinition being deprecated.
Build an AttributeConverterDefinition from the AttributeConverter instance and whether or not to auto-apply it.
public AttributeConverter<X, Y>
public Class<? extends AttributeConverter<X, Y>>
public Class<T>
public Class<T>
private static AttributeConverter<X, Y>
instantiateAttributeConverter(Class<? extends AttributeConverter<X, Y>> attributeConverterClass)

public boolean
private static ParameterizedType
resolveParameterizedType(final ParameterizedType parameterizedType, Type context)

private static Type
resolveType(Type target, Type context)

private static Type
public ConverterDescriptor
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

attributeConverterback to summary
private final AttributeConverter<X, Y> attributeConverter
autoApplyback to summary
private final boolean autoApply
databaseColumnTypeback to summary
private final Class<T> databaseColumnType
entityAttributeTypeback to summary
private final Class<T> entityAttributeType

Constructor Detail

AttributeConverterDefinitionback to summary
public AttributeConverterDefinition(AttributeConverter<X, Y> attributeConverter, boolean autoApply)

Method Detail

extractAttributeConverterParameterizedTypeback to summary
private ParameterizedType extractAttributeConverterParameterizedType(Type base)
extractClassback to summary
private static Class<T> extractClass(Type type)
fromback to summary
public static AttributeConverterDefinition from(Class<? extends AttributeConverter<X, Y>> attributeConverterClass, boolean autoApply)

Deprecated

as a consequence of AttributeConverterDefinition being deprecated. See corresponding docs for further information.

Build an AttributeConverterDefinition from the AttributeConverter Class reference and whether or not to auto-apply it.

Parameters
attributeConverterClass:Class<? extends AttributeConverter<X, Y>>

The AttributeConverter Class

autoApply:boolean

Should the AttributeConverter be auto-applied?

Returns:AttributeConverterDefinition

The constructed definition

fromback to summary
public static AttributeConverterDefinition from(Class<? extends AttributeConverter<X, Y>> attributeConverterClass)

Deprecated

as a consequence of AttributeConverterDefinition being deprecated. See corresponding docs for further information.

Build an AttributeConverterDefinition from the AttributeConverter Class reference. The converter is searched for a Converter annotation to determine whether it should be treated as auto-apply. If the annotation is present, Converter#autoApply() is used to make that determination. If the annotation is not present, false is assumed.

Parameters
attributeConverterClass:Class<? extends AttributeConverter<X, Y>>

The converter class

Returns:AttributeConverterDefinition

The constructed definition

fromback to summary
public static AttributeConverterDefinition from(AttributeConverter<X, Y> attributeConverter)

Deprecated

as a consequence of AttributeConverterDefinition being deprecated. See corresponding docs for further information.

Build an AttributeConverterDefinition from an AttributeConverter instance. The converter is searched for a Converter annotation to determine whether it should be treated as auto-apply. If the annotation is present, Converter#autoApply() is used to make that determination. If the annotation is not present, false is assumed.

Parameters
attributeConverter:AttributeConverter<X, Y>

The AttributeConverter instance

Returns:AttributeConverterDefinition

The constructed definition

fromback to summary
public static AttributeConverterDefinition from(AttributeConverter<X, Y> attributeConverter, boolean autoApply)

Deprecated

as a consequence of AttributeConverterDefinition being deprecated. See corresponding docs for further information.

Build an AttributeConverterDefinition from the AttributeConverter instance and whether or not to auto-apply it.

Parameters
attributeConverter:AttributeConverter<X, Y>

The AttributeConverter instance

autoApply:boolean

Should the AttributeConverter be auto-applied?

Returns:AttributeConverterDefinition

The constructed definition

getAttributeConverterback to summary
public AttributeConverter<X, Y> getAttributeConverter()
getConverterClassback to summary
public Class<? extends AttributeConverter<X, Y>> getConverterClass()

Implements org.hibernate.boot.AttributeConverterInfo.getConverterClass.

Annotations
@Override
getDatabaseColumnTypeback to summary
public Class<T> getDatabaseColumnType()
getEntityAttributeTypeback to summary
public Class<T> getEntityAttributeType()
instantiateAttributeConverterback to summary
private static AttributeConverter<X, Y> instantiateAttributeConverter(Class<? extends AttributeConverter<X, Y>> attributeConverterClass)
isAutoApplyback to summary
public boolean isAutoApply()
resolveParameterizedTypeback to summary
private static ParameterizedType resolveParameterizedType(final ParameterizedType parameterizedType, Type context)
resolveTypeback to summary
private static Type resolveType(Type target, Type context)
resolveTypeVariableback to summary
private static Type resolveTypeVariable(TypeVariable<D extends GenericDeclaration> typeVariable, ParameterizedType context)
toConverterDescriptorback to summary
public ConverterDescriptor toConverterDescriptor(MetadataBuildingContext context)

Implements org.hibernate.boot.AttributeConverterInfo.toConverterDescriptor.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override