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

public Class JPAXMLOverriddenAnnotationReader

extends Object
implements AnnotationReader
Class Inheritance
All Implemented Interfaces
org.hibernate.annotations.common.reflection.AnnotationReader
Annotations
@SuppressWarnings:unchecked, ToArrayCallWithZeroLengthArrayArgument
Imports
java.beans.Introspector, java.lang.annotation.Annotation, java.lang.reflect.AccessibleObject, .AnnotatedElement, .Field, .Method, java.util.ArrayList, .Arrays, .Collections, .HashMap, .HashSet, .List, .Map, .Set, java.util.function.Function, org.hibernate.AnnotationException, org.hibernate.annotations.Any, .Cache, .CacheConcurrencyStrategy, .Cascade, .Columns, .JdbcTypeCode, .ManyToAny, .Parameter, .Subselect, .TenantId, .Type, .UuidGenerator, org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor, .AnnotationFactory, org.hibernate.annotations.common.reflection.AnnotationReader, .ReflectionUtil, org.hibernate.boot.jaxb.mapping.AssociationAttribute, .AttributesContainer, .EntityOrMappedSuperclass, .JaxbAssociationOverride, .JaxbAttributeOverride, .JaxbAttributes, .JaxbBasic, .JaxbCaching, .JaxbCascadeType, .JaxbCollectionTable, .JaxbColumn, .JaxbColumnResult, .JaxbColumnType, .JaxbConfigurationParameter, .JaxbConstructorResult, .JaxbConvert, .JaxbDiscriminatorColumn, .JaxbElementCollection, .JaxbEmbeddable, .JaxbEmbedded, .JaxbEmbeddedId, .JaxbEmptyType, .JaxbEntity, .JaxbEntityListener, .JaxbEntityListeners, .JaxbEntityResult, .JaxbFieldResult, .JaxbGeneratedValue, .JaxbId, .JaxbIdClass, .JaxbIndex, .JaxbInheritance, .JaxbJoinColumn, .JaxbJoinTable, .JaxbLob, .JaxbManyToMany, .JaxbManyToOne, .JaxbMapKey, .JaxbMapKeyClass, .JaxbMapKeyColumn, .JaxbMapKeyJoinColumn, .JaxbMappedSuperclass, .JaxbNamedAttributeNode, .JaxbNamedEntityGraph, .JaxbNamedNativeQuery, .JaxbNamedQuery, .JaxbNamedStoredProcedureQuery, .JaxbNamedSubgraph, .JaxbOneToMany, .JaxbOneToOne, .JaxbOrderColumn, .JaxbPrimaryKeyJoinColumn, .JaxbQueryHint, .JaxbSecondaryTable, .JaxbSequenceGenerator, .JaxbSqlResultSetMapping, .JaxbStoredProcedureParameter, .JaxbSynchronizedTable, .JaxbTable, .JaxbTableGenerator, .JaxbTenantId, .JaxbUniqueConstraint, .JaxbUuidGenerator, .JaxbVersion, .LifecycleCallbackContainer, .ManagedType, org.hibernate.boot.registry.classloading.spi.ClassLoadingException, org.hibernate.boot.spi.BootstrapContext, .ClassLoaderAccess, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.StringHelper, org.hibernate.jpa.AvailableHints, jakarta.persistence.Access, .AccessType, .AssociationOverride, .AssociationOverrides, .AttributeOverride, .AttributeOverrides, .Basic, .Cacheable, .CascadeType, .CollectionTable, .Column, .ColumnResult, .ConstructorResult, .Convert, .Converts, .DiscriminatorColumn, .DiscriminatorType, .DiscriminatorValue, .ElementCollection, .Embeddable, .Embedded, .EmbeddedId, .Entity, .EntityListeners, .EntityResult, .EnumType, .Enumerated, .ExcludeDefaultListeners, .ExcludeSuperclassListeners, .FetchType, .FieldResult, .ForeignKey, .GeneratedValue, .GenerationType, .Id, .IdClass, .Index, .Inheritance, .InheritanceType, .JoinColumn, .JoinColumns, .JoinTable, .Lob, .ManyToMany, .ManyToOne, .MapKey, .MapKeyClass, .MapKeyColumn, .MapKeyEnumerated, .MapKeyJoinColumn, .MapKeyJoinColumns, .MapKeyTemporal, .MappedSuperclass, .MapsId, .NamedAttributeNode, .NamedEntityGraph, .NamedEntityGraphs, .NamedNativeQueries, .NamedNativeQuery, .NamedQueries, .NamedQuery, .NamedStoredProcedureQueries, .NamedStoredProcedureQuery, .NamedSubgraph, .OneToMany, .OneToOne, .OrderBy, .OrderColumn, .ParameterMode, .PostLoad, .PostPersist, .PostRemove, .PostUpdate, .PrePersist, .PreRemove, .PreUpdate, .PrimaryKeyJoinColumn, .PrimaryKeyJoinColumns, .QueryHint, .SecondaryTable, .SecondaryTables, .SequenceGenerator, .SqlResultSetMapping, .SqlResultSetMappings, .StoredProcedureParameter, .Table, .TableGenerator, .Temporal, .TemporalType, .Transient, .UniqueConstraint, .Version

Encapsulates the overriding of Java annotations from an EJB 3.0 descriptor (orm.xml, ...).
Authors
Paolo Perrotta, Davide Marchignoli, Emmanuel Bernard, Hardy Ferentschik

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private transient Annotation[]
private transient Map<Class<T>, Annotation>
private static final Map<Class<? extends Annotation>, String>
private final ClassLoaderAccess
private final String
private final AnnotatedElement
private transient PropertyMappingElementCollector
private static final CoreMessageLogger
private AccessibleObject
private final String
private final JPAXMLOverriddenAnnotationReader.PropertyType
private static final String
private static final String
private final XMLContext

Constructor Summary

AccessConstructor and Description
pack-priv
public

Method Summary

Modifier and TypeMethod and Description
private void
private void
private static void
addHint(Map<String, String> hints, String hint, Object value)

private void

Returns:

The annotation which was added to the list or null.
addIfNotNull
(List<Annotation>
The list of annotations.
annotationList
,
Annotation
The annotation to add to the list.
annotation
)

Adds annotation to the list (only if it's not null) and then returns it.

private void
private void
private void
private void
private void
private static void
private void
private void
afterGetAssociation(Class<? extends Annotation> annotationType, List<Annotation> annotationList, XMLContext.Default defaults)

private void
applyPhysicalConvertAnnotations(String attributeNamePrefix, Map<String, Convert> convertAnnotationsMap)

private void
applyXmlDefinedConverts(List<JaxbConvert> elements, XMLContext.Default defaults, String attributeNamePrefix, Map<String, Convert> convertAnnotationsMap)

private static void
private static void
bindNamedSubgraph(XMLContext.Default defaults, AnnotationDescriptor ann, String annotationAttributeName, List<JaxbNamedSubgraph> subgraphNodes, ClassLoaderAccess classLoaderAccess)

private List<AssociationOverride>
private List<AttributeOverride>
private static ColumnResult
buildColumnResult(JaxbColumnResult columnResultElement, XMLContext.Default defaults, ClassLoaderAccess classLoaderAccess)

private Columns
buildColumns(JaxbColumn element, String nodeName)

private Columns
buildColumns(List<JaxbColumn> elements, String nodeName)

private static ConstructorResult
buildConstructorResult(JaxbConstructorResult constructorResultElement, XMLContext.Default defaults, ClassLoaderAccess classLoaderAccess)

private static EntityResult
buildEntityResult(JaxbEntityResult entityResultElement, XMLContext.Default defaults, ClassLoaderAccess classLoaderAccess)

private GeneratedValue
private static void
private void
buildJoinColumns(List<Annotation> annotationList, List<JaxbJoinColumn> elements)

private JoinTable
private MapKeyJoinColumn[]
public static List<NamedEntityGraph>
public static List<NamedNativeQuery>
public static List<NamedQuery>
buildNamedQueries(List<JaxbNamedQuery> elements, XMLContext.Default defaults, ClassLoaderAccess classLoaderAccess)

public static List<NamedStoredProcedureQuery>
private PrimaryKeyJoinColumn[]
private static void
public static SequenceGenerator
public static List<SqlResultSetMapping>
public static TableGenerator
private static void
private void
private <T> void
checkForOrphanProperties(List<T> elements, Set<String> properties, Function<? super T, String> nameGetter)

private <T> void
checkForOrphanProperties(T element, Set<String> properties, Function<? super T, String> nameGetter)

private static void
copyAttribute(final AnnotationDescriptor
annotation descriptor where to copy to the attribute.
annotation
,
final String
name of the XML attribute to copy.
attributeName
,
final Object
value of the XML attribute to copy.
attributeValue
,
final boolean
whether the attribute is mandatory.
mandatory
)

Copy an attribute from an XML element to an annotation descriptor.

private static void
copyAttribute(final AnnotationDescriptor
annotation where to copy to the attribute.
annotation
,
final String
name of the annotation attribute where to copy.
annotationAttributeName
,
final Object attributeName, final Object
value of the XML attribute to copy.
attributeValue
,
boolean
whether the attribute is mandatory.
mandatory
)

Copy an attribute from an XML element to an annotation descriptor.

private void
getAccessType(List<Annotation> annotationList, AccessType type)

private Access
public <T extends Annotation> T
public Annotation[]
private void
getAny(List<Annotation> annotationList, XMLContext.Default defaults)

private void
getAssociationId(List<Annotation> annotationList, Boolean isId)

Adds an @Id annotation to the specified annotationList if the specified element has the id attribute set to true.

private AssociationOverrides
private AssociationOverrides
getAssociationOverrides(List<JaxbAssociationOverride> elements, XMLContext.Default defaults, boolean
Whether to use Java annotations for this element, if present and not disabled by the XMLContext defaults. In some contexts (such as an element-collection mapping) merging
mergeWithAnnotations
)

private AttributeOverrides
private AttributeOverrides
getAttributeOverrides(List<JaxbAttributeOverride> elements, XMLContext.Default defaults, boolean
Whether to use Java annotations for this element, if present and not disabled by the XMLContext defaults. In some contexts (such as an association mapping) merging with annotations is never allowed.
mergeWithAnnotations
)

private void
getBasic(List<Annotation> annotationList, XMLContext.Default defaults)

private Cacheable
private Cache
private void
private void
private Column
getColumn(JaxbColumn element, boolean isMandatory, String nodeName)

private Converts
private Annotation
private DiscriminatorColumn
private DiscriminatorValue
private void
getElementCollection(List<Annotation> annotationList, XMLContext.Default defaults)

As per sections 12.2.3.23.9, 12.2.4.8.9 and 12.2.5.3.6 of the JPA 2.0 specification, the element-collection subelement completely overrides the mapping for the specified field or property.

private Embeddable
private void
getEmbedded(List<Annotation> annotationList, XMLContext.Default defaults)

private void
getEmbeddedId(List<Annotation> annotationList, XMLContext.Default defaults)

private Entity
private EntityListeners
private void
getEnumerated(List<Annotation> annotationList, EnumType enumType)

private ExcludeDefaultListeners
private ExcludeSuperclassListeners
private void
private void
getId(List<Annotation> annotationList, XMLContext.Default defaults)

private IdClass
private Inheritance
private static String
private void
getJdbcTypeCode(List<Annotation> annotationList, Integer jdbcTypeCode)

private JoinColumn[]
getJoinColumns(List<JaxbJoinColumn> subelements, boolean isInverse)

private void
getJoinTable(List<Annotation> annotationList, AssociationAttribute associationAttribute, XMLContext.Default defaults)

private void
getLob(List<Annotation> annotationList, JaxbLob element)

private void
getManyToAny(List<Annotation> annotationList, XMLContext.Default defaults)

private void
getManyToMany(List<Annotation> annotationList, XMLContext.Default defaults)

private void
getManyToOne(List<Annotation> annotationList, XMLContext.Default defaults)

private void
getMapKey(List<Annotation> annotationList, JaxbMapKey element)

private AttributeOverrides
private void
getMapKeyClass(List<Annotation> annotationList, JaxbMapKeyClass element, XMLContext.Default defaults)

private void
getMapKeyColumn(List<Annotation> annotationList, JaxbMapKeyColumn element)

private void
getMapKeyEnumerated(List<Annotation> annotationList, EnumType enumType)

Adds a @MapKeyEnumerated annotation to the specified annotationList if the specified element contains a map-key-enumerated sub-element.

private void
private void
getMapKeyTemporal(List<Annotation> annotationList, TemporalType temporalType)

Adds a @MapKeyTemporal annotation to the specified annotationList if the specified element contains a map-key-temporal sub-element.

private MappedSuperclass
private void
getMapsId(List<Annotation> annotationList, String mapsId)

Adds a @MapsId annotation to the specified annotationList if the specified element has the maps-id attribute set.

private Annotation
getMarkerAnnotation(Class<? extends Annotation> clazz, JaxbEmptyType element, XMLContext.Default defaults)

private NamedEntityGraphs
private NamedNativeQueries
private NamedQueries
private NamedStoredProcedureQueries
private void
getOneToMany(List<Annotation> annotationList, XMLContext.Default defaults)

private void
getOneToOne(List<Annotation> annotationList, XMLContext.Default defaults)

As per section 12.2 of the JPA 2.0 specification, the association subelements (many-to-one, one-to-many, one-to-one, many-to-many, element-collection) completely override the mapping for the specified field or property.

private void
getOrderBy(List<Annotation> annotationList, String orderBy)

private void
getOrderColumn(List<Annotation> annotationList, JaxbOrderColumn element)

Adds an @OrderColumn annotation to the specified annotationList if the specified element contains an order-column sub-element.

private <T extends Annotation> T
getPhysicalAnnotation(Class<T> annotationType)

private Annotation[]
private PrimaryKeyJoinColumns
private PrimaryKeyJoinColumns
getPrimaryKeyJoinColumns(List<JaxbPrimaryKeyJoinColumn> elements, XMLContext.Default defaults, boolean
Whether to use Java annotations for this element, if present and not disabled by the XMLContext defaults. In some contexts (such as an association mapping) merging with
mergeWithAnnotations
)

private SecondaryTables
private Annotation
private SequenceGenerator
private SequenceGenerator
private SqlResultSetMappings
private Table
private Subselect
private Annotation
private TableGenerator
private TableGenerator
private void
getTemporal(List<Annotation> annotationList, TemporalType type)

private void
getTenantId(List<Annotation> annotationList, JaxbBasic element)

private Transient
private void
getType(List<Annotation> annotationList, JaxbColumnType type)

private void
getUuidGenerator(List<Annotation> annotationList, JaxbUuidGenerator uuidGenerator)

private void
getVersion(List<Annotation> annotationList, XMLContext.Default defaults)

private void
public <T extends Annotation> boolean
private <T extends Annotation> boolean
private boolean
private AttributeOverrides
mergeAttributeOverrides(XMLContext.Default defaults, List<AttributeOverride> attributes, boolean
Whether to use Java annotations for this element, if present and not disabled by the XMLContext defaults. In some contexts (such as an association mapping) merging with annotations is never allowed.
mergeWithAnnotations
)

private Annotation
private void
private JoinTable
private void
private void
private String
qualifyConverterAttributeName(String attributeNamePrefix, String specifiedAttributeName)

private static Class<?>
resolveClassReference(String className, XMLContext.Default defaults, ClassLoaderAccess classLoaderAccess)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait