Top Inners Fields Constructors Methods
org.hibernate.boot.model.convert.internal

public Class AttributeConverterManager

extends Object
implements ConverterAutoApplyHandler
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler
Imports
java.util.ArrayList, .Collection, .Collections, .List, .Locale, .Map, java.util.concurrent.ConcurrentHashMap, java.util.function.Function, org.hibernate.AnnotationException, .HibernateException, org.hibernate.annotations.common.reflection.XProperty, org.hibernate.boot.model.convert.spi.AutoApplicableConverterDescriptor, .ConverterAutoApplyHandler, .ConverterDescriptor, .RegisteredConversion, org.hibernate.boot.spi.BootstrapContext, .MetadataBuildingContext, org.hibernate.internal.util.StringHelper, org.jboss.logging.Logger, com.fasterxml.classmate.ResolvedType

Implementation Note

It is important that all RegisteredConversion be registered prior to attempts to register any ConverterDescriptor

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private Map<Class<?>, ConverterDescriptor>
private static final Logger
private Map<Class<?>, RegisteredConversion>
private static final StringHelper.Renderer<ConverterDescriptor>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
private Collection<ConverterDescriptor>
public ConverterDescriptor
findAutoApplyConverterForAttribute(XProperty
The HCANN descriptor for the basic attribute
property
,
MetadataBuildingContext context)

Implements org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForAttribute.

Resolve the auto-applied converter to be applied to a basic attribute described by the passed property descriptor.
public ConverterDescriptor
findAutoApplyConverterForCollectionElement(XProperty
The HCANN descriptor for the plural attribute
property
,
MetadataBuildingContext context)

Implements org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForCollectionElement.

Resolve the auto-applied converter to be applied to the elements of a plural attribute described by the passed property descriptor.
public ConverterDescriptor
findAutoApplyConverterForMapKey(XProperty
The HCANN descriptor for the Map-typed plural attribute
property
,
MetadataBuildingContext context)

Implements org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForMapKey.

Resolve the auto-applied converter to be applied to the keys of a plural Map attribute described by the passed property descriptor.
public RegisteredConversion
private ConverterDescriptor
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributeConverterDescriptorsByClassback to summary
private Map<Class<?>, ConverterDescriptor> attributeConverterDescriptorsByClass
logback to summary
private static final Logger log
registeredConversionsByDomainTypeback to summary
private Map<Class<?>, RegisteredConversion> registeredConversionsByDomainType
RENDERERback to summary
private static final StringHelper.Renderer<ConverterDescriptor> RENDERER

Constructor Detail

AttributeConverterManagerback to summary
public AttributeConverterManager()

Method Detail

addConverterback to summary
public void addConverter(ConverterDescriptor descriptor)
addRegistrationback to summary
public void addRegistration(RegisteredConversion conversion, BootstrapContext context)
converterDescriptorsback to summary
private Collection<ConverterDescriptor> converterDescriptors()
findAutoApplyConverterForAttributeback to summary
public ConverterDescriptor findAutoApplyConverterForAttribute(XProperty property, MetadataBuildingContext context)

Implements org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForAttribute.

Doc from org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForAttribute.

Resolve the auto-applied converter to be applied to a basic attribute described by the passed property descriptor. null indicates that no auto-applied converter matched

Parameters
property:XProperty

The HCANN descriptor for the basic attribute

Annotations
@Override
findAutoApplyConverterForCollectionElementback to summary
public ConverterDescriptor findAutoApplyConverterForCollectionElement(XProperty property, MetadataBuildingContext context)

Implements org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForCollectionElement.

Doc from org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForCollectionElement.

Resolve the auto-applied converter to be applied to the elements of a plural attribute described by the passed property descriptor. null indicates that no auto-applied converter matched

Parameters
property:XProperty

The HCANN descriptor for the plural attribute

Annotations
@Override
findAutoApplyConverterForMapKeyback to summary
public ConverterDescriptor findAutoApplyConverterForMapKey(XProperty property, MetadataBuildingContext context)

Implements org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForMapKey.

Doc from org.hibernate.boot.model.convert.spi.ConverterAutoApplyHandler.findAutoApplyConverterForMapKey.

Resolve the auto-applied converter to be applied to the keys of a plural Map attribute described by the passed property descriptor. null indicates that no auto-applied converter matched

Parameters
property:XProperty

The HCANN descriptor for the Map-typed plural attribute

Annotations
@Override
findRegisteredConversionback to summary
public RegisteredConversion findRegisteredConversion(Class<?> domainType)
locateMatchingConverterback to summary
private ConverterDescriptor locateMatchingConverter(XProperty xProperty, AttributeConverterManager.ConversionSite conversionSite, Function<AutoApplicableConverterDescriptor, ConverterDescriptor> matcher, MetadataBuildingContext context)
org.hibernate.boot.model.convert.internal back to summary

pack-priv final Enum AttributeConverterManager.ConversionSite

extends Enum<AttributeConverterManager.ConversionSite>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final AttributeConverterManager.ConversionSite
public static final AttributeConverterManager.ConversionSite
public static final AttributeConverterManager.ConversionSite
private final String

Constructor Summary

AccessConstructor and Description
private
ConversionSite(String siteDescriptor)

Method Summary

Modifier and TypeMethod and Description
public String
public static AttributeConverterManager.ConversionSite
public static AttributeConverterManager.ConversionSite[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ATTRIBUTEback to summary
public static final AttributeConverterManager.ConversionSite ATTRIBUTE
COLLECTION_ELEMENTback to summary
public static final AttributeConverterManager.ConversionSite COLLECTION_ELEMENT
MAP_KEYback to summary
public static final AttributeConverterManager.ConversionSite MAP_KEY
siteDescriptorback to summary
private final String siteDescriptor

Constructor Detail

ConversionSiteback to summary
private ConversionSite(String siteDescriptor)

Method Detail

getSiteDescriptorback to summary
public String getSiteDescriptor()
valueOfback to summary
public static AttributeConverterManager.ConversionSite valueOf(String name)
valuesback to summary
public static AttributeConverterManager.ConversionSite[] values()