Top Description Constructors Methods
org.hibernate.boot.model.convert.internal

public Class ConverterHelper

extends Object
Class Inheritance
Imports
java.lang.reflect.Field, .Member, .Method, .ParameterizedType, java.util.List, org.hibernate.AnnotationException, .HibernateException, org.hibernate.annotations.common.reflection.ReflectionManager, .XProperty, org.hibernate.boot.internal.ClassmateContext, org.hibernate.boot.model.internal.HCANNHelper, org.hibernate.boot.spi.MetadataBuildingContext, org.hibernate.internal.util.GenericsHelper, org.hibernate.internal.util.type.PrimitiveWrapperHelper, com.fasterxml.classmate.ResolvedType, .ResolvedTypeWithMembers, com.fasterxml.classmate.members.ResolvedField, .ResolvedMember, .ResolvedMethod, jakarta.persistence.AttributeConverter

Helpers related to handling converters

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ParameterizedType
public static ResolvedType
public static List<ResolvedType>
public static ResolvedMember<? extends Member>
resolveMember(XProperty xProperty, MetadataBuildingContext buildingContext)

public static Member
toMember(XProperty xProperty)

public static boolean

Returns:

true if they match, otherwise false.
typesMatch
(ResolvedType
The type defined via the converter's parameterized type signature. E.g. O in implements AttributeConverter<O,R>
converterDefinedType
,
ResolvedType
The type from the domain model (basic attribute type, Map key type, Collection element type)
checkType
)

Determine whether 2 types match.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ConverterHelperback to summary
public ConverterHelper()

Method Detail

extractAttributeConverterParameterizedTypeback to summary
public static ParameterizedType extractAttributeConverterParameterizedType(Class<? extends AttributeConverter<?, ?>> base)
resolveAttributeTypeback to summary
public static ResolvedType resolveAttributeType(XProperty xProperty, MetadataBuildingContext context)
resolveConverterClassParamTypesback to summary
public static List<ResolvedType> resolveConverterClassParamTypes(Class<? extends AttributeConverter<?, ?>> converterClass, ClassmateContext context)
resolveMemberback to summary
public static ResolvedMember<? extends Member> resolveMember(XProperty xProperty, MetadataBuildingContext buildingContext)
toMemberback to summary
public static Member toMember(XProperty xProperty)
typesMatchback to summary
public static boolean typesMatch(ResolvedType converterDefinedType, ResolvedType checkType)

Determine whether 2 types match. Intended for determining whether to auto applying a converter

Parameters
converterDefinedType:ResolvedType

The type defined via the converter's parameterized type signature. E.g. O in implements AttributeConverter<O,R>

checkType:ResolvedType

The type from the domain model (basic attribute type, Map key type, Collection element type)

Returns:boolean

true if they match, otherwise false.