HHH-17377 - Migrate to JPA 3.2

https://hibernate.atlassian.net/browse/HHH-17377

Latest JPA 3.2 XSD changes - 9cca8e2432/api/src/main/resources/jakarta/persistence/orm_3_2.xsd
This commit is contained in:
Steve Ebersole 2023-11-06 07:41:02 -06:00
parent 55b4f907f9
commit 3d2411a630
93 changed files with 5410 additions and 1244 deletions

View File

@ -120,7 +120,7 @@ xjc {
xjcExtensions += ['inheritance', 'simplify']
}
mapping {
xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd' )
xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.2.0.xsd' )
xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' )
xjcExtensions += ['inheritance', 'simplify']
}

View File

@ -23,7 +23,7 @@ import org.hibernate.Internal;
import org.hibernate.boot.archive.spi.InputStreamAccess;
import org.hibernate.boot.internal.MetadataBuilderImpl;
import org.hibernate.boot.jaxb.internal.XmlSources;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.jaxb.spi.XmlSource;
import org.hibernate.boot.registry.BootstrapServiceRegistry;
@ -65,7 +65,7 @@ public class MetadataSources implements Serializable {
private XmlMappingBinderAccess xmlMappingBinderAccess;
private List<Binding<BindableMappingDescriptor>> xmlBindings;
private List<Binding<JaxbBindableMappingDescriptor>> xmlBindings;
private LinkedHashSet<Class<?>> annotatedClasses;
private LinkedHashSet<String> annotatedClassNames;
private LinkedHashSet<String> annotatedPackages;
@ -121,7 +121,7 @@ public class MetadataSources implements Serializable {
return xmlMappingBinderAccess;
}
public List<Binding<BindableMappingDescriptor>> getXmlBindings() {
public List<Binding<JaxbBindableMappingDescriptor>> getXmlBindings() {
return xmlBindings == null ? Collections.emptyList() : xmlBindings;
}
@ -373,7 +373,7 @@ public class MetadataSources implements Serializable {
*/
public MetadataSources addXmlBinding(Binding<?> binding) {
//noinspection unchecked
getXmlBindingsForWrite().add( (Binding<BindableMappingDescriptor>) binding );
getXmlBindingsForWrite().add( (Binding<JaxbBindableMappingDescriptor>) binding );
return this;
}
@ -549,7 +549,7 @@ public class MetadataSources implements Serializable {
return this;
}
private List<Binding<BindableMappingDescriptor>> getXmlBindingsForWrite() {
private List<Binding<JaxbBindableMappingDescriptor>> getXmlBindingsForWrite() {
if ( xmlBindings == null ) {
xmlBindings = new ArrayList<>();
}

View File

@ -0,0 +1,22 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.internal;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Used in mapping dynamic models to signify that an entity should be considered abstract.
*
* @author Steve Ebersole
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Abstract {
}

View File

@ -0,0 +1,23 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.internal;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Used in mapping dynamic models to signify the type of collection to use for a plural attribute
*
* @author Steve Ebersole
*/
@Target({ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface CollectionClassification {
LimitedCollectionClassification value();
}

View File

@ -0,0 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.internal;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Used in mapping dynamic models to specify from which other entity an entity extends.
*
* @author Steve Ebersole
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Extends {
/**
* The type extended. String because dynamic models have named "classes".
*/
String superType();
}

View File

@ -0,0 +1,23 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.internal;
/**
* Limited set of {@linkplain org.hibernate.metamodel.CollectionClassification}
* used in mapping a dynamic model.
*
* @see org.hibernate.boot.jaxb.mapping.spi.JaxbCollectionClassificationImpl
* @see org.hibernate.metamodel.CollectionClassification
*
* @author Steve Ebersole
*/
public enum LimitedCollectionClassification {
BAG,
LIST,
SET,
MAP
}

View File

@ -0,0 +1,40 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.internal;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Used in mapping dynamic models to specify the java-type of an attribute, mainly for
* {@linkplain jakarta.persistence.Basic basic},
* {@linkplain jakarta.persistence.Id id},
* {@linkplain jakarta.persistence.Embedded embedded} and
* {@linkplain jakarta.persistence.EmbeddedId embedded-id} attributes.
* Can also be useful for {@linkplain org.hibernate.annotations.Any any} and
* {@linkplain org.hibernate.annotations.ManyToAny many-to-any} attributes to
* specify a base type.
* <p/>
* Other attribute classifications have spec-defined ways to specify the target<ul>
* <li>{@linkplain jakarta.persistence.ManyToOne#targetEntity()}</li>
* <li>{@linkplain jakarta.persistence.OneToOne#targetEntity()}</li>
* <li>{@linkplain jakarta.persistence.ElementCollection#targetClass()} </li>
* <li>{@linkplain jakarta.persistence.OneToMany#targetEntity()}</li>
* <li>{@linkplain jakarta.persistence.ManyToMany#targetEntity()}</li>
* </ul>
*
* @author Steve Ebersole
*/
@java.lang.annotation.Target({ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Target {
/**
* The attribute's Java type
*/
String value();
}

View File

@ -6,19 +6,20 @@
*/
package org.hibernate.boot.jaxb.hbm.transform;
import org.hibernate.boot.jaxb.mapping.JaxbColumn;
import org.hibernate.boot.jaxb.mapping.spi.JaxbCheckConstraintImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbColumnImpl;
/**
* @author Steve Ebersole
*/
public class TargetColumnAdapterJaxbColumn implements TargetColumnAdapter {
private final JaxbColumn jaxbColumn;
private final JaxbColumnImpl jaxbColumn;
public TargetColumnAdapterJaxbColumn(ColumnDefaults columnDefaults) {
this( new JaxbColumn(), columnDefaults );
this( new JaxbColumnImpl(), columnDefaults );
}
public TargetColumnAdapterJaxbColumn(JaxbColumn jaxbColumn, ColumnDefaults columnDefaults) {
public TargetColumnAdapterJaxbColumn(JaxbColumnImpl jaxbColumn, ColumnDefaults columnDefaults) {
this.jaxbColumn = jaxbColumn;
this.jaxbColumn.setLength( columnDefaults.getLength() );
this.jaxbColumn.setScale( columnDefaults.getScale() );
@ -29,7 +30,7 @@ public class TargetColumnAdapterJaxbColumn implements TargetColumnAdapter {
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
}
public JaxbColumn getTargetColumn() {
public JaxbColumnImpl getTargetColumn() {
return jaxbColumn;
}
@ -104,7 +105,9 @@ public class TargetColumnAdapterJaxbColumn implements TargetColumnAdapter {
@Override
public void setCheck(String value) {
jaxbColumn.setCheck( value );
final JaxbCheckConstraintImpl checkConstraint = new JaxbCheckConstraintImpl();
checkConstraint.setConstraint( value );
jaxbColumn.getCheckConstraints().add( checkConstraint );
}
@Override

View File

@ -6,19 +6,19 @@
*/
package org.hibernate.boot.jaxb.hbm.transform;
import org.hibernate.boot.jaxb.mapping.JaxbJoinColumn;
import org.hibernate.boot.jaxb.mapping.spi.JaxbJoinColumnImpl;
/**
* @author Steve Ebersole
*/
public class TargetColumnAdapterJaxbJoinColumn implements TargetColumnAdapter {
private final JaxbJoinColumn jaxbColumn;
private final JaxbJoinColumnImpl jaxbColumn;
public TargetColumnAdapterJaxbJoinColumn(ColumnDefaults columnDefaults) {
this( new JaxbJoinColumn(), columnDefaults );
this( new JaxbJoinColumnImpl(), columnDefaults );
}
public TargetColumnAdapterJaxbJoinColumn(JaxbJoinColumn jaxbColumn, ColumnDefaults columnDefaults) {
public TargetColumnAdapterJaxbJoinColumn(JaxbJoinColumnImpl jaxbColumn, ColumnDefaults columnDefaults) {
this.jaxbColumn = jaxbColumn;
this.jaxbColumn.setNullable( columnDefaults.isNullable() );
this.jaxbColumn.setUnique( columnDefaults.isUnique() );
@ -26,7 +26,7 @@ public class TargetColumnAdapterJaxbJoinColumn implements TargetColumnAdapter {
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
}
public JaxbJoinColumn getTargetColumn() {
public JaxbJoinColumnImpl getTargetColumn() {
return jaxbColumn;
}

View File

@ -23,8 +23,8 @@ import org.hibernate.boot.jaxb.hbm.transform.UnsupportedFeatureHandling;
import org.hibernate.boot.jaxb.internal.stax.HbmEventReader;
import org.hibernate.boot.jaxb.internal.stax.JpaOrmXmlEventReader;
import org.hibernate.boot.jaxb.internal.stax.MappingEventReader;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.xsd.MappingXsdSupport;
@ -48,7 +48,7 @@ import static org.hibernate.engine.config.spi.StandardConverters.BOOLEAN;
*
* @author Steve Ebersole
*/
public class MappingBinder extends AbstractBinder<BindableMappingDescriptor> {
public class MappingBinder extends AbstractBinder<JaxbBindableMappingDescriptor> {
private static final Logger log = Logger.getLogger( MappingBinder.class );
private final XMLEventFactory xmlEventFactory = XMLEventFactory.newInstance();
@ -200,7 +200,7 @@ public class MappingBinder extends AbstractBinder<BindableMappingDescriptor> {
}
@Override
protected <X extends BindableMappingDescriptor> Binding<X> doBind(
protected <X extends JaxbBindableMappingDescriptor> Binding<X> doBind(
XMLEventReader staxEventReader,
StartElement rootElementStartEvent,
Origin origin) {
@ -230,7 +230,7 @@ public class MappingBinder extends AbstractBinder<BindableMappingDescriptor> {
log.debugf( "Performing JAXB binding of orm.xml document : %s", origin.toString() );
final XMLEventReader reader = new MappingEventReader( staxEventReader, xmlEventFactory );
final JaxbEntityMappings bindingRoot = jaxb( reader, MappingXsdSupport.latestDescriptor()
final JaxbEntityMappingsImpl bindingRoot = jaxb( reader, MappingXsdSupport.latestDescriptor()
.getSchema(), mappingJaxbContext(), origin );
//noinspection unchecked
return new Binding<>( (X) bindingRoot, origin );
@ -257,7 +257,7 @@ public class MappingBinder extends AbstractBinder<BindableMappingDescriptor> {
public JAXBContext mappingJaxbContext() {
if ( entityMappingsJaxbContext == null ) {
try {
entityMappingsJaxbContext = JAXBContext.newInstance( JaxbEntityMappings.class );
entityMappingsJaxbContext = JAXBContext.newInstance( JaxbEntityMappingsImpl.class );
}
catch (JAXBException e) {
throw new ConfigurationException( "Unable to build orm.xml JAXBContext", e );

View File

@ -1,40 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
import java.util.List;
/**
* JAXB binding interface for commonality between things which contain attributes.
*
* @apiNote In the mapping XSD, this equates to the `attributes` and `embeddable-attributes`
* nodes rather than the ManagedTypes themselves.
*
* @author Strong Liu
* @author Steve Ebersole
*/
public interface AttributesContainer {
List<JaxbBasic> getBasicAttributes();
List<JaxbEmbedded> getEmbeddedAttributes();
List<JaxbOneToOne> getOneToOneAttributes();
List<JaxbManyToOne> getManyToOneAttributes();
List<JaxbHbmAnyMapping> getDiscriminatedAssociations();
List<JaxbElementCollection> getElementCollectionAttributes();
List<JaxbOneToMany> getOneToManyAttributes();
List<JaxbManyToMany> getManyToManyAttributes();
List<JaxbHbmManyToAny> getPluralDiscriminatedAssociations();
List<JaxbTransient> getTransients();
}

View File

@ -1,65 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
import java.util.List;
import jakarta.persistence.EnumType;
import jakarta.persistence.TemporalType;
/**
* JAXB binding interface for plural attributes
*
* @author Brett Meyer
*/
public interface CollectionAttribute extends FetchableAttribute {
JaxbPluralFetchMode getFetchMode();
void setFetchMode(JaxbPluralFetchMode mode);
String getOrderBy();
void setOrderBy(String value);
JaxbOrderColumn getOrderColumn();
void setOrderColumn(JaxbOrderColumn value);
String getSort();
void setSort(String value);
JaxbMapKey getMapKey();
void setMapKey(JaxbMapKey value);
JaxbMapKeyClass getMapKeyClass();
void setMapKeyClass(JaxbMapKeyClass value);
TemporalType getMapKeyTemporal();
void setMapKeyTemporal(TemporalType value);
EnumType getMapKeyEnumerated();
void setMapKeyEnumerated(EnumType value);
List<JaxbAttributeOverride> getMapKeyAttributeOverride();
List<JaxbConvert> getMapKeyConvert();
JaxbMapKeyColumn getMapKeyColumn();
void setMapKeyColumn(JaxbMapKeyColumn value);
List<JaxbMapKeyJoinColumn> getMapKeyJoinColumn();
JaxbForeignKey getMapKeyForeignKey();
void setMapKeyForeignKey(JaxbForeignKey value);
}

View File

@ -1,62 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
/**
* JAXB binding interface for commonality between entity and mapped-superclass mappings
*
* @author Steve Ebersole
*/
public interface EntityOrMappedSuperclass extends ManagedType, LifecycleCallbackContainer {
JaxbIdClass getIdClass();
void setIdClass(JaxbIdClass value);
JaxbEmptyType getExcludeDefaultListeners();
void setExcludeDefaultListeners(JaxbEmptyType value);
JaxbEmptyType getExcludeSuperclassListeners();
void setExcludeSuperclassListeners(JaxbEmptyType value);
JaxbEntityListeners getEntityListeners();
void setEntityListeners(JaxbEntityListeners value);
JaxbPrePersist getPrePersist();
void setPrePersist(JaxbPrePersist value);
JaxbPostPersist getPostPersist();
void setPostPersist(JaxbPostPersist value);
JaxbPreRemove getPreRemove();
void setPreRemove(JaxbPreRemove value);
JaxbPostRemove getPostRemove();
void setPostRemove(JaxbPostRemove value);
JaxbPreUpdate getPreUpdate();
void setPreUpdate(JaxbPreUpdate value);
JaxbPostUpdate getPostUpdate();
void setPostUpdate(JaxbPostUpdate value);
JaxbPostLoad getPostLoad();
void setPostLoad(JaxbPostLoad value);
JaxbAttributes getAttributes();
void setAttributes(JaxbAttributes value);
}

View File

@ -1,50 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
/**
* JAXB binding interface for commonality between things which
* allow callback declarations. This includes <ul>
* <li>
* entities and mapped-superclasses
* </li>
* <li>
* entity-listener classes
* </li>
* </ul>
*
* @author Steve Ebersole
*/
public interface LifecycleCallbackContainer {
JaxbPrePersist getPrePersist();
void setPrePersist(JaxbPrePersist value);
JaxbPostPersist getPostPersist();
void setPostPersist(JaxbPostPersist value);
JaxbPreRemove getPreRemove();
void setPreRemove(JaxbPreRemove value);
JaxbPostRemove getPostRemove();
void setPostRemove(JaxbPostRemove value);
JaxbPreUpdate getPreUpdate();
void setPreUpdate(JaxbPreUpdate value);
JaxbPostUpdate getPostUpdate();
void setPostUpdate(JaxbPostUpdate value);
JaxbPostLoad getPostLoad();
void setPostLoad(JaxbPostLoad value);
}

View File

@ -1,34 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
import java.io.Serializable;
import java.util.List;
import jakarta.persistence.LockModeType;
public interface NamedQuery extends Serializable {
String getName();
void setName(String value);
String getDescription();
void setDescription(String value);
String getQuery();
void setQuery(String value);
String getComment();
void setComment(String comment);
Integer getTimeout();
void setTimeout(Integer timeout);
LockModeType getLockMode();
void setLockMode(LockModeType value);
List<JaxbQueryHint> getHint();
}

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.AccessType;

View File

@ -5,7 +5,7 @@
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import org.hibernate.cache.spi.access.AccessType;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import java.util.Locale;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import org.hibernate.metamodel.CollectionClassification;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.ConstraintMode;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.DiscriminatorType;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.EnumType;

View File

@ -0,0 +1,22 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.internal;
import org.hibernate.annotations.FetchMode;
/**
* @author Steve Ebersole
*/
public class FetchModeMarshalling {
public static FetchMode fromXml(String name) {
return name == null ? null : FetchMode.valueOf( name );
}
public static String toXml(FetchMode fetchType) {
return fetchType == null ? null : fetchType.name();
}
}

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.FetchType;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import java.util.Locale;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import java.util.Locale;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.GenerationType;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.InheritanceType;

View File

@ -0,0 +1,28 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.internal;
import java.util.Locale;
import org.hibernate.boot.internal.LimitedCollectionClassification;
import jakarta.persistence.AccessType;
/**
* JAXB marshalling for JPA's {@link AccessType}
*
* @author Steve Ebersole
*/
public class LimitedCollectionClassificationMarshalling {
public static LimitedCollectionClassification fromXml(String name) {
return name == null ? null : LimitedCollectionClassification.valueOf( name.toUpperCase( Locale.ROOT ) );
}
public static String toXml(LimitedCollectionClassification classification) {
return classification == null ? null : classification.name().toLowerCase( Locale.ROOT );
}
}

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.LockModeType;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import org.hibernate.annotations.OnDeleteAction;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import java.util.Locale;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.ParameterMode;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import org.hibernate.annotations.PolymorphismType;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import jakarta.persistence.TemporalType;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.marshall;
package org.hibernate.boot.jaxb.mapping.internal;
import java.util.Locale;

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
import java.util.List;
@ -13,7 +13,7 @@ import java.util.List;
*
* @author Steve Ebersole
*/
public interface DiscriminatedAssociation extends PersistentAttribute {
public interface JaxbAnyMapping extends JaxbPersistentAttribute {
/**
* Details about the logical association foreign-key
*/
@ -25,12 +25,12 @@ public interface DiscriminatedAssociation extends PersistentAttribute {
Discriminator getDiscriminator();
/**
* The key of a {@link DiscriminatedAssociation} - the (logical) foreign-key value
* The key of a {@link JaxbAnyMapping} - the (logical) foreign-key value
*
* @author Steve Ebersole
*/
interface Key {
List<JaxbColumn> getColumns();
List<JaxbColumnImpl> getColumns();
}
/**
@ -42,11 +42,11 @@ public interface DiscriminatedAssociation extends PersistentAttribute {
/**
* The column holding the discriminator value
*/
JaxbColumn getColumn();
JaxbColumnImpl getColumn();
/**
* Mapping of discriminator-values to the corresponding entity names
*/
List<? extends DiscriminatorMapping> getValueMappings();
List<? extends JaxbDiscriminatorMapping> getValueMappings();
}
}

View File

@ -4,23 +4,15 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
/**
* JAXB binding interface for association attributes (to-one and plural mappings)
*
* @author Steve Ebersole
*/
public interface AssociationAttribute extends PersistentAttribute, FetchableAttribute {
JaxbJoinTable getJoinTable();
void setJoinTable(JaxbJoinTable value);
JaxbCascadeType getCascade();
void setCascade(JaxbCascadeType value);
public interface JaxbAssociationAttribute extends JaxbCascadableAttribute {
String getTargetEntity();
void setTargetEntity(String value);
}

View File

@ -0,0 +1,32 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.spi;
import java.util.List;
/**
* JAXB binding interface for commonality between things which contain attributes.
*
* @apiNote In the mapping XSD, this equates to the `attributes` and `embeddable-attributes`
* nodes rather than the ManagedTypes themselves.
*
* @author Strong Liu
* @author Steve Ebersole
*/
public interface JaxbAttributesContainer extends JaxbBaseAttributesContainer {
List<JaxbOneToOneImpl> getOneToOneAttributes();
List<JaxbElementCollectionImpl> getElementCollectionAttributes();
List<JaxbOneToManyImpl> getOneToManyAttributes();
List<JaxbManyToManyImpl> getManyToManyAttributes();
List<JaxbPluralAnyMappingImpl> getPluralAnyMappingAttributes();
List<JaxbTransientImpl> getTransients();
}

View File

@ -0,0 +1,22 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
import java.util.List;
/**
* @author Steve Ebersole
*/
public interface JaxbBaseAttributesContainer {
List<JaxbBasicImpl> getBasicAttributes();
List<JaxbEmbeddedImpl> getEmbeddedAttributes();
List<JaxbManyToOneImpl> getManyToOneAttributes();
List<JaxbAnyMappingImpl> getAnyMappingAttributes();
}

View File

@ -0,0 +1,39 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* A model part that is (or can be) basic-valued - {@linkplain JaxbIdImpl}, {@linkplain JaxbBasicImpl} and
* {@linkplain JaxbElementCollectionImpl}
*
* @author Steve Ebersole
*/
public interface JaxbBasicMapping {
JaxbUserTypeImpl getType();
void setType(JaxbUserTypeImpl value);
String getTarget();
void setTarget(String value);
String getJavaType();
void setJavaType(String value);
String getJdbcType();
void setJdbcType(String value);
Integer getJdbcTypeCode();
void setJdbcTypeCode(Integer value);
String getJdbcTypeName();
void setJdbcTypeName(String value);
}

View File

@ -0,0 +1,15 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbCascadableAttribute extends JaxbPersistentAttribute {
JaxbCascadeTypeImpl getCascade();
void setCascade(JaxbCascadeTypeImpl value);
}

View File

@ -0,0 +1,16 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbCheckConstraint {
String getName();
String getConstraint();
String getOptions();
}

View File

@ -4,14 +4,14 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
/**
* Mapping of a discriminator value to the corresponding entity-name
*
* @author Steve Ebersole
*/
public interface DiscriminatorMapping {
public interface JaxbDiscriminatorMapping {
String getDiscriminatorValue();
String getCorrespondingEntityName();
}

View File

@ -0,0 +1,13 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbEmbeddable extends JaxbManagedType {
}

View File

@ -0,0 +1,16 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* A model part that is (or can be) embeddable-valued (composite) - {@linkplain JaxbEmbeddedIdImpl},
* {@linkplain JaxbEmbeddedIdImpl} and {@linkplain JaxbElementCollectionImpl}
*
* @author Steve Ebersole
*/
public interface JaxbEmbeddedMapping extends JaxbSingularAttribute {
}

View File

@ -0,0 +1,128 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
import java.util.List;
import org.hibernate.annotations.PolymorphismType;
import org.hibernate.engine.OptimisticLockStyle;
/**
* @author Steve Ebersole
*/
public interface JaxbEntity extends JaxbEntityOrMappedSuperclass {
String getName();
void setName(String name);
JaxbTableImpl getTable();
void setTable(JaxbTableImpl value);
String getTableExpression();
void setTableExpression(String value);
List<JaxbSecondaryTableImpl> getSecondaryTables();
List<JaxbSynchronizedTableImpl> getSynchronizeTables();
List<JaxbPrimaryKeyJoinColumnImpl> getPrimaryKeyJoinColumns();
JaxbForeignKeyImpl getPrimaryKeyForeignKey();
void setPrimaryKeyForeignKey(JaxbForeignKeyImpl value);
String getRowid();
void setRowid(String value);
String getSqlRestriction();
void setSqlRestriction(String value);
JaxbCustomLoaderImpl getLoader();
void setLoader(JaxbCustomLoaderImpl value);
JaxbCustomSqlImpl getSqlInsert();
void setSqlInsert(JaxbCustomSqlImpl value);
JaxbCustomSqlImpl getSqlUpdate();
void setSqlUpdate(JaxbCustomSqlImpl value);
JaxbCustomSqlImpl getSqlDelete();
void setSqlDelete(JaxbCustomSqlImpl value);
Boolean isDynamicInsert();
void setDynamicInsert(Boolean value);
Boolean isDynamicUpdate();
void setDynamicUpdate(Boolean value);
Boolean isSelectBeforeUpdate();
void setSelectBeforeUpdate(Boolean value);
JaxbCachingImpl getCaching();
void setCaching(JaxbCachingImpl value);
Integer getBatchSize();
void setBatchSize(Integer value);
Boolean isLazy();
void setLazy(Boolean value);
Boolean isMutable();
void setMutable(Boolean value);
OptimisticLockStyle getOptimisticLocking();
void setOptimisticLocking(OptimisticLockStyle value);
JaxbInheritanceImpl getInheritance();
void setInheritance(JaxbInheritanceImpl value);
String getProxy();
void setProxy(String value);
PolymorphismType getPolymorphism();
void setPolymorphism(PolymorphismType value);
String getDiscriminatorValue();
void setDiscriminatorValue(String value);
JaxbDiscriminatorColumnImpl getDiscriminatorColumn();
void setDiscriminatorColumn(JaxbDiscriminatorColumnImpl value);
String getDiscriminatorFormula();
void setDiscriminatorFormula(String value);
JaxbSequenceGeneratorImpl getSequenceGenerator();
void setSequenceGenerator(JaxbSequenceGeneratorImpl value);
JaxbTableGeneratorImpl getTableGenerator();
void setTableGenerator(JaxbTableGeneratorImpl value);
List<JaxbGenericIdGeneratorImpl> getIdentifierGenerator();
List<JaxbNamedQueryImpl> getNamedQueries();
List<JaxbNamedNativeQueryImpl> getNamedNativeQueries();
List<JaxbNamedStoredProcedureQueryImpl> getNamedStoredProcedureQueries();
List<JaxbSqlResultSetMappingImpl> getSqlResultSetMappings();
List<JaxbAttributeOverrideImpl> getAttributeOverrides();
List<JaxbAssociationOverrideImpl> getAssociationOverrides();
List<JaxbConvertImpl> getConverts();
List<JaxbNamedEntityGraphImpl> getNamedEntityGraphs();
List<JaxbHbmFilterImpl> getFilters();
List<JaxbFetchProfileImpl> getFetchProfiles();
JaxbTenantIdImpl getTenantId();
void setTenantId(JaxbTenantIdImpl value);
JaxbAttributesContainerImpl getAttributes();
void setAttributes(JaxbAttributesContainerImpl value);
Boolean isCacheable();
void setCacheable(Boolean value);
}

View File

@ -0,0 +1,30 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* JAXB binding interface for commonality between entity and mapped-superclass mappings
*
* @author Steve Ebersole
*/
public interface JaxbEntityOrMappedSuperclass extends JaxbManagedType, JaxbLifecycleCallbackContainer {
JaxbIdClassImpl getIdClass();
void setIdClass(JaxbIdClassImpl value);
JaxbEmptyTypeImpl getExcludeDefaultListeners();
void setExcludeDefaultListeners(JaxbEmptyTypeImpl value);
JaxbEmptyTypeImpl getExcludeSuperclassListeners();
void setExcludeSuperclassListeners(JaxbEmptyTypeImpl value);
JaxbEntityListenersImpl getEntityListeners();
void setEntityListeners(JaxbEntityListenersImpl value);
}

View File

@ -4,13 +4,12 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface ToOneAttribute extends AssociationAttribute {
JaxbSingularFetchMode getFetchMode();
void setFetchMode(JaxbSingularFetchMode mode);
public interface JaxbJoinTableCapable {
JaxbJoinTableImpl getJoinTable();
void setJoinTable(JaxbJoinTableImpl value);
}

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
/**
* JAXB binding interface for lifecycle callbacks.
@ -12,6 +12,6 @@ package org.hibernate.boot.jaxb.mapping;
* @author Strong Liu
* @author Steve Ebersole
*/
public interface LifecycleCallback {
public interface JaxbLifecycleCallback {
String getMethodName();
}

View File

@ -0,0 +1,43 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* JAXB binding interface for commonality between things which
* allow callback declarations. This includes <ul>
* <li>
* entities and mapped-superclasses
* </li>
* <li>
* entity-listener classes
* </li>
* </ul>
*
* @author Steve Ebersole
*/
public interface JaxbLifecycleCallbackContainer {
JaxbPrePersistImpl getPrePersist();
void setPrePersist(JaxbPrePersistImpl value);
JaxbPostPersistImpl getPostPersist();
void setPostPersist(JaxbPostPersistImpl value);
JaxbPreRemoveImpl getPreRemove();
void setPreRemove(JaxbPreRemoveImpl value);
JaxbPostRemoveImpl getPostRemove();
void setPostRemove(JaxbPostRemoveImpl value);
JaxbPreUpdateImpl getPreUpdate();
void setPreUpdate(JaxbPreUpdateImpl value);
JaxbPostUpdateImpl getPostUpdate();
void setPostUpdate(JaxbPostUpdateImpl value);
JaxbPostLoadImpl getPostLoad();
void setPostLoad(JaxbPostLoadImpl value);
}

View File

@ -0,0 +1,17 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* Non-id, non-version singular attribute
*
* @author Steve Ebersole
*/
public interface JaxbLockableAttribute extends JaxbPersistentAttribute {
boolean isOptimisticLock();
void setOptimisticLock(Boolean value);
}

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
import jakarta.persistence.AccessType;
@ -15,7 +15,7 @@ import jakarta.persistence.AccessType;
* @author Strong Liu
* @author Steve Ebersole
*/
public interface ManagedType {
public interface JaxbManagedType {
String getDescription();
@ -33,5 +33,5 @@ public interface ManagedType {
void setAccess(AccessType value);
AttributesContainer getAttributes();
JaxbAttributesContainer getAttributes();
}

View File

@ -0,0 +1,13 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbMappedSuperclass extends JaxbEntityOrMappedSuperclass {
}

View File

@ -4,22 +4,16 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
import java.util.List;
package org.hibernate.boot.jaxb.mapping.spi;
/**
* JAXB binding interface for natural-id definitions
*
* @author Steve Ebersole
*/
public interface NaturalId {
public interface JaxbNaturalId extends JaxbBaseAttributesContainer {
/**
* The cache config associated with this natural-id
*/
JaxbCaching getCaching();
List<JaxbBasic> getBasicAttributes();
List<JaxbManyToOne> getManyToOneAttributes();
JaxbCachingImpl getCaching();
}

View File

@ -0,0 +1,15 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbNotFoundCapable extends JaxbPersistentAttribute {
JaxbNotFoundEnumImpl getNotFound();
void setNotFound(JaxbNotFoundEnumImpl value);
}

View File

@ -4,9 +4,10 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
import jakarta.persistence.AccessType;
import jakarta.persistence.FetchType;
/**
* Common interface for JAXB bindings that represent persistent attributes.
@ -14,7 +15,7 @@ import jakarta.persistence.AccessType;
* @author Strong Liu
* @author Steve Ebersole
*/
public interface PersistentAttribute {
public interface JaxbPersistentAttribute {
/**
* The attribute's name
*/

View File

@ -0,0 +1,70 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.spi;
import java.util.List;
import org.hibernate.boot.internal.LimitedCollectionClassification;
import jakarta.persistence.EnumType;
import jakarta.persistence.TemporalType;
/**
* JAXB binding interface for plural attributes
*
* @author Brett Meyer
*/
public interface JaxbPluralAttribute extends JaxbPersistentAttribute, JaxbLockableAttribute, JaxbStandardAttribute {
JaxbPluralFetchModeImpl getFetchMode();
void setFetchMode(JaxbPluralFetchModeImpl mode);
JaxbCollectionIdImpl getCollectionId();
void setCollectionId(JaxbCollectionIdImpl id);
LimitedCollectionClassification getClassification();
void setClassification(LimitedCollectionClassification value);
String getOrderBy();
void setOrderBy(String value);
JaxbOrderColumnImpl getOrderColumn();
void setOrderColumn(JaxbOrderColumnImpl value);
String getSort();
void setSort(String value);
JaxbMapKeyImpl getMapKey();
void setMapKey(JaxbMapKeyImpl value);
JaxbMapKeyClassImpl getMapKeyClass();
void setMapKeyClass(JaxbMapKeyClassImpl value);
TemporalType getMapKeyTemporal();
void setMapKeyTemporal(TemporalType value);
EnumType getMapKeyEnumerated();
void setMapKeyEnumerated(EnumType value);
List<JaxbAttributeOverrideImpl> getMapKeyAttributeOverride();
List<JaxbConvertImpl> getMapKeyConvert();
JaxbMapKeyColumnImpl getMapKeyColumn();
void setMapKeyColumn(JaxbMapKeyColumnImpl value);
List<JaxbMapKeyJoinColumnImpl> getMapKeyJoinColumn();
JaxbForeignKeyImpl getMapKeyForeignKey();
void setMapKeyForeignKey(JaxbForeignKeyImpl value);
List<JaxbHbmFilterImpl> getFilters();
}

View File

@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
/**
* Common interface for JAXB bindings that understand database schema (tables, sequences, etc).
@ -12,7 +12,7 @@ package org.hibernate.boot.jaxb.mapping;
* @author Strong Liu
* @author Steve Ebersole
*/
public interface SchemaAware {
public interface JaxbSchemaAware {
String getSchema();
void setSchema(String schema);

View File

@ -0,0 +1,15 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbSingularAssociationAttribute extends JaxbSingularAttribute, JaxbStandardAttribute, JaxbAssociationAttribute {
JaxbSingularFetchModeImpl getFetchMode();
void setFetchMode(JaxbSingularFetchModeImpl mode);
}

View File

@ -0,0 +1,13 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbSingularAttribute extends JaxbPersistentAttribute {
}

View File

@ -4,21 +4,17 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
*/
package org.hibernate.boot.jaxb.mapping;
package org.hibernate.boot.jaxb.mapping.spi;
import jakarta.persistence.FetchType;
/**
* JAXB binding interface for EAGER/LAZY
* Commonality between non-id, non-version and non-embedded. Basically attributes that JPA
* defines as fetchable or not.
*
* @apiNote All standard attributes are fetchable (basics allow FetchType as well); this
* contract distinguishes ANY mappings which are always eager and so do not allow
* specifying FetchType.
*
* @author Brett Meyer
* @author Steve Ebersole
*/
public interface FetchableAttribute extends PersistentAttribute {
public interface JaxbStandardAttribute extends JaxbPersistentAttribute {
FetchType getFetch();
void setFetch(FetchType value);
}

View File

@ -0,0 +1,15 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.jaxb.mapping.spi;
/**
* @author Steve Ebersole
*/
public interface JaxbTableMapping extends JaxbSchemaAware {
String getComment();
String getOptions();
}

View File

@ -15,5 +15,5 @@ package org.hibernate.boot.jaxb.spi;
*
* @author Steve Ebersole
*/
public interface BindableMappingDescriptor {
public interface JaxbBindableMappingDescriptor {
}

View File

@ -16,9 +16,9 @@ import java.util.Map;
import org.hibernate.annotations.common.reflection.AnnotationReader;
import org.hibernate.annotations.common.reflection.MetadataProvider;
import org.hibernate.annotations.common.reflection.java.JavaMetadataProvider;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.JaxbSequenceGenerator;
import org.hibernate.boot.jaxb.mapping.JaxbTableGenerator;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbSequenceGeneratorImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbTableGeneratorImpl;
import org.hibernate.boot.registry.classloading.spi.ClassLoadingException;
import org.hibernate.boot.spi.BootstrapContext;
import org.hibernate.boot.spi.ClassLoaderAccess;
@ -115,24 +115,24 @@ public class JPAXMLOverriddenMetadataProvider implements MetadataProvider {
}
}
defaults.put( EntityListeners.class, entityListeners );
for ( JaxbEntityMappings entityMappings : xmlContext.getAllDocuments() ) {
List<JaxbSequenceGenerator> jaxbSequenceGenerators = entityMappings.getSequenceGenerators();
for ( JaxbEntityMappingsImpl entityMappings : xmlContext.getAllDocuments() ) {
List<JaxbSequenceGeneratorImpl> jaxbSequenceGenerators = entityMappings.getSequenceGenerators();
List<SequenceGenerator> sequenceGenerators = (List<SequenceGenerator>) defaults.get( SequenceGenerator.class );
if ( sequenceGenerators == null ) {
sequenceGenerators = new ArrayList<>();
defaults.put( SequenceGenerator.class, sequenceGenerators );
}
for ( JaxbSequenceGenerator element : jaxbSequenceGenerators ) {
for ( JaxbSequenceGeneratorImpl element : jaxbSequenceGenerators ) {
sequenceGenerators.add( JPAXMLOverriddenAnnotationReader.buildSequenceGeneratorAnnotation( element ) );
}
List<JaxbTableGenerator> jaxbTableGenerators = entityMappings.getTableGenerators();
List<JaxbTableGeneratorImpl> jaxbTableGenerators = entityMappings.getTableGenerators();
List<TableGenerator> tableGenerators = (List<TableGenerator>) defaults.get( TableGenerator.class );
if ( tableGenerators == null ) {
tableGenerators = new ArrayList<>();
defaults.put( TableGenerator.class, tableGenerators );
}
for ( JaxbTableGenerator element : jaxbTableGenerators ) {
for ( JaxbTableGeneratorImpl element : jaxbTableGenerators ) {
tableGenerators.add(
JPAXMLOverriddenAnnotationReader.buildTableGeneratorAnnotation(
element,

View File

@ -11,32 +11,32 @@ import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import org.hibernate.boot.jaxb.mapping.AttributesContainer;
import org.hibernate.boot.jaxb.mapping.JaxbAttributes;
import org.hibernate.boot.jaxb.mapping.JaxbBasic;
import org.hibernate.boot.jaxb.mapping.JaxbElementCollection;
import org.hibernate.boot.jaxb.mapping.JaxbEmbedded;
import org.hibernate.boot.jaxb.mapping.JaxbEmbeddedId;
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
import org.hibernate.boot.jaxb.mapping.JaxbId;
import org.hibernate.boot.jaxb.mapping.JaxbManyToMany;
import org.hibernate.boot.jaxb.mapping.JaxbManyToOne;
import org.hibernate.boot.jaxb.mapping.JaxbOneToMany;
import org.hibernate.boot.jaxb.mapping.JaxbOneToOne;
import org.hibernate.boot.jaxb.mapping.JaxbPostLoad;
import org.hibernate.boot.jaxb.mapping.JaxbPostPersist;
import org.hibernate.boot.jaxb.mapping.JaxbPostRemove;
import org.hibernate.boot.jaxb.mapping.JaxbPostUpdate;
import org.hibernate.boot.jaxb.mapping.JaxbPrePersist;
import org.hibernate.boot.jaxb.mapping.JaxbPreRemove;
import org.hibernate.boot.jaxb.mapping.JaxbPreUpdate;
import org.hibernate.boot.jaxb.mapping.JaxbTenantId;
import org.hibernate.boot.jaxb.mapping.JaxbTransient;
import org.hibernate.boot.jaxb.mapping.JaxbVersion;
import org.hibernate.boot.jaxb.mapping.LifecycleCallback;
import org.hibernate.boot.jaxb.mapping.LifecycleCallbackContainer;
import org.hibernate.boot.jaxb.mapping.ManagedType;
import org.hibernate.boot.jaxb.mapping.PersistentAttribute;
import org.hibernate.boot.jaxb.mapping.spi.JaxbAttributesContainer;
import org.hibernate.boot.jaxb.mapping.spi.JaxbAttributesContainerImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbBasicImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbElementCollectionImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddedIdImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddedImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbIdImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback;
import org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallbackContainer;
import org.hibernate.boot.jaxb.mapping.spi.JaxbManagedType;
import org.hibernate.boot.jaxb.mapping.spi.JaxbManyToManyImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbManyToOneImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbOneToManyImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbOneToOneImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistentAttribute;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostLoadImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostPersistImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostRemoveImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostUpdateImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPrePersistImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPreRemoveImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPreUpdateImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbTenantIdImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbTransientImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbVersionImpl;
/**
@ -48,31 +48,31 @@ import org.hibernate.boot.jaxb.mapping.PersistentAttribute;
* </ul>
*/
public final class PropertyMappingElementCollector {
public static final Function<PersistentAttribute, String> PERSISTENT_ATTRIBUTE_NAME = PersistentAttribute::getName;
public static final Function<JaxbTransient, String> JAXB_TRANSIENT_NAME = JaxbTransient::getName;
static final Function<LifecycleCallback, String> LIFECYCLE_CALLBACK_NAME = LifecycleCallback::getMethodName;
public static final Function<JaxbPersistentAttribute, String> PERSISTENT_ATTRIBUTE_NAME = JaxbPersistentAttribute::getName;
public static final Function<JaxbTransientImpl, String> JAXB_TRANSIENT_NAME = JaxbTransientImpl::getName;
static final Function<JaxbLifecycleCallback, String> LIFECYCLE_CALLBACK_NAME = JaxbLifecycleCallback::getMethodName;
private final String propertyName;
private List<JaxbId> id;
private List<JaxbEmbeddedId> embeddedId;
private List<JaxbVersion> version;
private List<JaxbBasic> basic;
private List<JaxbEmbedded> embedded;
private List<JaxbOneToOne> oneToOne;
private List<JaxbManyToOne> manyToOne;
private List<JaxbElementCollection> elementCollection;
private List<JaxbOneToMany> oneToMany;
private List<JaxbManyToMany> manyToMany;
private List<JaxbTransient> _transient;
private List<JaxbIdImpl> id;
private List<JaxbEmbeddedIdImpl> embeddedId;
private List<JaxbVersionImpl> version;
private List<JaxbBasicImpl> basic;
private List<JaxbEmbeddedImpl> embedded;
private List<JaxbOneToOneImpl> oneToOne;
private List<JaxbManyToOneImpl> manyToOne;
private List<JaxbElementCollectionImpl> elementCollection;
private List<JaxbOneToManyImpl> oneToMany;
private List<JaxbManyToManyImpl> manyToMany;
private List<JaxbTransientImpl> _transient;
private List<JaxbPrePersist> prePersist;
private List<JaxbPostPersist> postPersist;
private List<JaxbPreRemove> preRemove;
private List<JaxbPostRemove> postRemove;
private List<JaxbPreUpdate> preUpdate;
private List<JaxbPostUpdate> postUpdate;
private List<JaxbPostLoad> postLoad;
private List<JaxbPrePersistImpl> prePersist;
private List<JaxbPostPersistImpl> postPersist;
private List<JaxbPreRemoveImpl> preRemove;
private List<JaxbPostRemoveImpl> postRemove;
private List<JaxbPreUpdateImpl> preUpdate;
private List<JaxbPostUpdateImpl> postUpdate;
private List<JaxbPostLoadImpl> postLoad;
public PropertyMappingElementCollector(String propertyName) {
this.propertyName = propertyName;
@ -97,11 +97,10 @@ public final class PropertyMappingElementCollector {
return list == null ? Collections.emptyList() : list;
}
public void collectPersistentAttributesIfMatching(AttributesContainer container) {
if ( container instanceof JaxbAttributes ) {
final JaxbAttributes jaxbAttributes = (JaxbAttributes) container;
id = collectIfMatching( id, jaxbAttributes.getId(), PERSISTENT_ATTRIBUTE_NAME );
embeddedId = collectIfMatching( embeddedId, jaxbAttributes.getEmbeddedId(), PERSISTENT_ATTRIBUTE_NAME );
public void collectPersistentAttributesIfMatching(JaxbAttributesContainer container) {
if ( container instanceof JaxbAttributesContainerImpl jaxbAttributes ) {
id = collectIfMatching( id, jaxbAttributes.getIdAttributes(), PERSISTENT_ATTRIBUTE_NAME );
embeddedId = collectIfMatching( embeddedId, jaxbAttributes.getEmbeddedIdAttribute(), PERSISTENT_ATTRIBUTE_NAME );
version = collectIfMatching( version, jaxbAttributes.getVersion(), PERSISTENT_ATTRIBUTE_NAME );
}
basic = collectIfMatching( basic, container.getBasicAttributes(), PERSISTENT_ATTRIBUTE_NAME );
@ -114,7 +113,7 @@ public final class PropertyMappingElementCollector {
_transient = collectIfMatching( _transient, container.getTransients(), JAXB_TRANSIENT_NAME );
}
public void collectLifecycleCallbacksIfMatching(LifecycleCallbackContainer container) {
public void collectLifecycleCallbacksIfMatching(JaxbLifecycleCallbackContainer container) {
prePersist = collectIfMatching( prePersist, container.getPrePersist(), LIFECYCLE_CALLBACK_NAME );
postPersist = collectIfMatching( postPersist, container.getPostPersist(), LIFECYCLE_CALLBACK_NAME );
preRemove = collectIfMatching( preRemove, container.getPreRemove(), LIFECYCLE_CALLBACK_NAME );
@ -124,9 +123,9 @@ public final class PropertyMappingElementCollector {
postLoad = collectIfMatching( postLoad, container.getPostLoad(), LIFECYCLE_CALLBACK_NAME );
}
public void collectTenantIdIfMatching(ManagedType managedType) {
if ( managedType instanceof JaxbEntity ) {
JaxbTenantId tenantId = ( (JaxbEntity) managedType ).getTenantId();
public void collectTenantIdIfMatching(JaxbManagedType managedType) {
if ( managedType instanceof JaxbEntityImpl ) {
JaxbTenantIdImpl tenantId = ( (JaxbEntityImpl) managedType ).getTenantId();
basic = collectIfMatching( basic, tenantId, PERSISTENT_ATTRIBUTE_NAME );
}
}
@ -151,75 +150,75 @@ public final class PropertyMappingElementCollector {
return result;
}
public List<JaxbId> getId() {
public List<JaxbIdImpl> getId() {
return defaultToEmpty( id );
}
public List<JaxbEmbeddedId> getEmbeddedId() {
public List<JaxbEmbeddedIdImpl> getEmbeddedId() {
return defaultToEmpty( embeddedId );
}
public List<JaxbBasic> getBasic() {
public List<JaxbBasicImpl> getBasic() {
return defaultToEmpty( basic );
}
public List<JaxbVersion> getVersion() {
public List<JaxbVersionImpl> getVersion() {
return defaultToEmpty( version );
}
public List<JaxbManyToOne> getManyToOne() {
public List<JaxbManyToOneImpl> getManyToOne() {
return defaultToEmpty( manyToOne );
}
public List<JaxbOneToMany> getOneToMany() {
public List<JaxbOneToManyImpl> getOneToMany() {
return defaultToEmpty( oneToMany );
}
public List<JaxbOneToOne> getOneToOne() {
public List<JaxbOneToOneImpl> getOneToOne() {
return defaultToEmpty( oneToOne );
}
public List<JaxbManyToMany> getManyToMany() {
public List<JaxbManyToManyImpl> getManyToMany() {
return defaultToEmpty( manyToMany );
}
public List<JaxbElementCollection> getElementCollection() {
public List<JaxbElementCollectionImpl> getElementCollection() {
return defaultToEmpty( elementCollection );
}
public List<JaxbEmbedded> getEmbedded() {
public List<JaxbEmbeddedImpl> getEmbedded() {
return defaultToEmpty( embedded );
}
public List<JaxbTransient> getTransient() {
public List<JaxbTransientImpl> getTransient() {
return defaultToEmpty( _transient );
}
public List<JaxbPrePersist> getPrePersist() {
public List<JaxbPrePersistImpl> getPrePersist() {
return defaultToEmpty( prePersist );
}
public List<JaxbPostPersist> getPostPersist() {
public List<JaxbPostPersistImpl> getPostPersist() {
return defaultToEmpty( postPersist );
}
public List<JaxbPreRemove> getPreRemove() {
public List<JaxbPreRemoveImpl> getPreRemove() {
return defaultToEmpty( preRemove );
}
public List<JaxbPostRemove> getPostRemove() {
public List<JaxbPostRemoveImpl> getPostRemove() {
return defaultToEmpty( postRemove );
}
public List<JaxbPreUpdate> getPreUpdate() {
public List<JaxbPreUpdateImpl> getPreUpdate() {
return defaultToEmpty( preUpdate );
}
public List<JaxbPostUpdate> getPostUpdate() {
public List<JaxbPostUpdateImpl> getPostUpdate() {
return defaultToEmpty( postUpdate );
}
public List<JaxbPostLoad> getPostLoad() {
public List<JaxbPostLoadImpl> getPostLoad() {
return defaultToEmpty( postLoad );
}
}

View File

@ -14,15 +14,15 @@ import java.util.Map;
import org.hibernate.AnnotationException;
import org.hibernate.boot.internal.ClassmateContext;
import org.hibernate.boot.jaxb.mapping.JaxbConverter;
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
import org.hibernate.boot.jaxb.mapping.JaxbEntityListener;
import org.hibernate.boot.jaxb.mapping.JaxbEntityListeners;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.JaxbMappedSuperclass;
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitDefaults;
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitMetadata;
import org.hibernate.boot.jaxb.mapping.ManagedType;
import org.hibernate.boot.jaxb.mapping.spi.JaxbConverterImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenerImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenersImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbManagedType;
import org.hibernate.boot.jaxb.mapping.spi.JaxbMappedSuperclassImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitDefaultsImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitMetadataImpl;
import org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.convert.spi.ConverterRegistry;
@ -49,10 +49,10 @@ public class XMLContext implements Serializable {
private final ClassmateContext classmateContext;
private Default globalDefaults;
private final Map<String, ManagedType> managedTypeOverride = new HashMap<>();
private final Map<String, JaxbEntityListener> entityListenerOverride = new HashMap<>();
private final Map<String, JaxbManagedType> managedTypeOverride = new HashMap<>();
private final Map<String, JaxbEntityListenerImpl> entityListenerOverride = new HashMap<>();
private final Map<String, Default> defaultsOverride = new HashMap<>();
private final List<JaxbEntityMappings> defaultElements = new ArrayList<>();
private final List<JaxbEntityMappingsImpl> defaultElements = new ArrayList<>();
private final List<String> defaultEntityListeners = new ArrayList<>();
private boolean hasContext = false;
@ -68,13 +68,13 @@ public class XMLContext implements Serializable {
/**
* Add the JAXB binding to this context and return the list of added class names.
*/
public List<String> addDocument(JaxbEntityMappings entityMappings) {
public List<String> addDocument(JaxbEntityMappingsImpl entityMappings) {
hasContext = true;
final List<String> addedClasses = new ArrayList<>();
//global defaults
final JaxbPersistenceUnitMetadata metadata = entityMappings.getPersistenceUnitMetadata();
final JaxbPersistenceUnitMetadataImpl metadata = entityMappings.getPersistenceUnitMetadata();
if ( metadata != null ) {
if ( globalDefaults == null ) {
globalDefaults = new Default();
@ -84,7 +84,7 @@ public class XMLContext implements Serializable {
: null
);
final JaxbPersistenceUnitDefaults defaultElement = metadata.getPersistenceUnitDefaults();
final JaxbPersistenceUnitDefaultsImpl defaultElement = metadata.getPersistenceUnitDefaults();
if ( defaultElement != null ) {
globalDefaults.setSchema( defaultElement.getSchema() );
globalDefaults.setCatalog( defaultElement.getCatalog() );
@ -119,8 +119,8 @@ public class XMLContext implements Serializable {
return addedClasses;
}
private void addClass(List<? extends ManagedType> managedTypes, String packageName, Default defaults, List<String> addedClasses) {
for (ManagedType element : managedTypes) {
private void addClass(List<? extends JaxbManagedType> managedTypes, String packageName, Default defaults, List<String> addedClasses) {
for ( JaxbManagedType element : managedTypes) {
String className = buildSafeClassName( element.getClazz(), packageName );
if ( managedTypeOverride.containsKey( className ) ) {
//maybe switch it to warn?
@ -140,20 +140,20 @@ public class XMLContext implements Serializable {
defaultsOverride.put( className, mergedDefaults );
LOG.debugf( "Adding XML overriding information for %s", className );
if ( element instanceof JaxbEntity ) {
addEntityListenerClasses( ( (JaxbEntity) element ).getEntityListeners(), packageName, addedClasses );
if ( element instanceof JaxbEntityImpl ) {
addEntityListenerClasses( ( (JaxbEntityImpl) element ).getEntityListeners(), packageName, addedClasses );
}
else if ( element instanceof JaxbMappedSuperclass ) {
addEntityListenerClasses( ( (JaxbMappedSuperclass) element ).getEntityListeners(), packageName, addedClasses );
else if ( element instanceof JaxbMappedSuperclassImpl ) {
addEntityListenerClasses( ( (JaxbMappedSuperclassImpl) element ).getEntityListeners(), packageName, addedClasses );
}
}
}
private List<String> addEntityListenerClasses(JaxbEntityListeners listeners, String packageName, List<String> addedClasses) {
private List<String> addEntityListenerClasses(JaxbEntityListenersImpl listeners, String packageName, List<String> addedClasses) {
List<String> localAddedClasses = new ArrayList<>();
if ( listeners != null ) {
List<JaxbEntityListener> elements = listeners.getEntityListener();
for ( JaxbEntityListener listener : elements ) {
List<JaxbEntityListenerImpl> elements = listeners.getEntityListener();
for ( JaxbEntityListenerImpl listener : elements ) {
String listenerClassName = buildSafeClassName( listener.getClazz(), packageName );
if ( entityListenerOverride.containsKey( listenerClassName ) ) {
LOG.duplicateListener( listenerClassName );
@ -168,8 +168,8 @@ public class XMLContext implements Serializable {
return localAddedClasses;
}
private void setLocalAttributeConverterDefinitions(List<JaxbConverter> converterElements, String packageName) {
for ( JaxbConverter converterElement : converterElements ) {
private void setLocalAttributeConverterDefinitions(List<JaxbConverterImpl> converterElements, String packageName) {
for ( JaxbConverterImpl converterElement : converterElements ) {
final String className = converterElement.getClazz();
final boolean autoApply = Boolean.TRUE.equals( converterElement.isAutoApply() );
@ -217,15 +217,15 @@ public class XMLContext implements Serializable {
return xmlDefault;
}
public ManagedType getManagedTypeOverride(String className) {
public JaxbManagedType getManagedTypeOverride(String className) {
return managedTypeOverride.get( className );
}
public JaxbEntityListener getEntityListenerOverride(String className) {
public JaxbEntityListenerImpl getEntityListenerOverride(String className) {
return entityListenerOverride.get( className );
}
public List<JaxbEntityMappings> getAllDocuments() {
public List<JaxbEntityMappingsImpl> getAllDocuments() {
return defaultElements;
}

View File

@ -17,7 +17,7 @@ import java.util.Set;
import org.hibernate.Internal;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
import org.hibernate.boot.model.process.spi.ManagedResources;
@ -33,7 +33,7 @@ public class ManagedResourcesImpl implements ManagedResources {
private final Set<Class<?>> annotatedClassReferences = new LinkedHashSet<>();
private final Set<String> annotatedClassNames = new LinkedHashSet<>();
private final Set<String> annotatedPackageNames = new LinkedHashSet<>();
private final List<Binding<BindableMappingDescriptor>> mappingFileBindings = new ArrayList<>();
private final List<Binding<JaxbBindableMappingDescriptor>> mappingFileBindings = new ArrayList<>();
private Map<String, Class<?>> extraQueryImports;
public static ManagedResourcesImpl baseline(MetadataSources sources, BootstrapContext bootstrapContext) {
@ -71,7 +71,7 @@ public class ManagedResourcesImpl implements ManagedResources {
}
@Override
public Collection<Binding<BindableMappingDescriptor>> getXmlMappingBindings() {
public Collection<Binding<JaxbBindableMappingDescriptor>> getXmlMappingBindings() {
return Collections.unmodifiableList( mappingFileBindings );
}
@ -105,7 +105,7 @@ public class ManagedResourcesImpl implements ManagedResources {
}
@Internal
public void addXmlBinding(Binding<BindableMappingDescriptor> binding) {
public void addXmlBinding(Binding<JaxbBindableMappingDescriptor> binding) {
mappingFileBindings.add( binding );
}
}

View File

@ -9,7 +9,7 @@ package org.hibernate.boot.model.process.spi;
import java.util.Collection;
import java.util.Map;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
@ -65,7 +65,7 @@ public interface ManagedResources {
*
* @return The list of bindings for all known XML mapping files.
*/
Collection<Binding<BindableMappingDescriptor>> getXmlMappingBindings();
Collection<Binding<JaxbBindableMappingDescriptor>> getXmlMappingBindings();
Map<String,Class<?>> getExtraQueryImports();
}

View File

@ -29,8 +29,8 @@ import org.hibernate.boot.jaxb.Origin;
import org.hibernate.boot.jaxb.SourceType;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
import org.hibernate.boot.jaxb.internal.MappingBinder;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.model.TypeContributions;
import org.hibernate.boot.model.TypeContributor;
@ -406,7 +406,7 @@ public class MetadataBuildingProcess {
private final EntityHierarchyBuilder hierarchyBuilder = new EntityHierarchyBuilder();
private List<Class<?>> additionalEntityClasses;
private List<JaxbEntityMappings> additionalJaxbMappings;
private List<JaxbEntityMappingsImpl> additionalJaxbMappings;
private boolean extraHbmXml = false;
private String currentContributor;
@ -437,19 +437,19 @@ public class MetadataBuildingProcess {
@Override
public void contributeBinding(InputStream xmlStream) {
final Origin origin = new Origin( SourceType.INPUT_STREAM, null );
final Binding<BindableMappingDescriptor> binding = mappingBinder.bind( xmlStream, origin );
final Binding<JaxbBindableMappingDescriptor> binding = mappingBinder.bind( xmlStream, origin );
final BindableMappingDescriptor bindingRoot = binding.getRoot();
final JaxbBindableMappingDescriptor bindingRoot = binding.getRoot();
if ( bindingRoot instanceof JaxbHbmHibernateMapping ) {
contributeBinding( (JaxbHbmHibernateMapping) bindingRoot );
}
else {
contributeBinding( (JaxbEntityMappings) bindingRoot );
contributeBinding( (JaxbEntityMappingsImpl) bindingRoot );
}
}
@Override
public void contributeBinding(JaxbEntityMappings mappingJaxbBinding) {
public void contributeBinding(JaxbEntityMappingsImpl mappingJaxbBinding) {
if ( ! options.isXmlMappingEnabled() ) {
return;
}

View File

@ -12,15 +12,11 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
import jakarta.persistence.Entity;
import jakarta.persistence.MappedSuperclass;
import org.hibernate.annotations.common.reflection.MetadataProviderInjector;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.annotations.common.reflection.XClass;
import org.hibernate.boot.internal.MetadataBuildingContextRootImpl;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.model.convert.spi.ConverterRegistry;
import org.hibernate.boot.model.internal.AnnotationBinder;
@ -37,6 +33,11 @@ import org.hibernate.internal.util.collections.CollectionHelper;
import org.jboss.jandex.IndexView;
import org.jboss.logging.Logger;
import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
import jakarta.persistence.Entity;
import jakarta.persistence.MappedSuperclass;
/**
* @author Steve Ebersole
*/
@ -85,10 +86,10 @@ public class AnnotationMetadataSourceProcessorImpl implements MetadataSourceProc
( (MetadataProviderInjector) reflectionManager ).getMetadataProvider();
for ( Binding<?> xmlBinding : managedResources.getXmlMappingBindings() ) {
Object root = xmlBinding.getRoot();
if ( !( root instanceof JaxbEntityMappings ) ) {
if ( !( root instanceof JaxbEntityMappingsImpl ) ) {
continue;
}
final JaxbEntityMappings entityMappings = (JaxbEntityMappings) xmlBinding.getRoot();
final JaxbEntityMappingsImpl entityMappings = (JaxbEntityMappingsImpl) xmlBinding.getRoot();
final List<String> classNames = jpaMetadataProvider.getXMLContext().addDocument( entityMappings );
for ( String className : classNames ) {
@ -115,7 +116,7 @@ public class AnnotationMetadataSourceProcessorImpl implements MetadataSourceProc
*/
public static void processAdditionalMappings(
List<Class<?>> additionalClasses,
List<JaxbEntityMappings> additionalJaxbMappings,
List<JaxbEntityMappingsImpl> additionalJaxbMappings,
MetadataBuildingContextRootImpl rootMetadataBuildingContext) {
final AnnotationMetadataSourceProcessorImpl processor = new AnnotationMetadataSourceProcessorImpl( rootMetadataBuildingContext );

View File

@ -12,7 +12,7 @@ import java.util.List;
import java.util.Set;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.model.process.spi.ManagedResources;
import org.hibernate.boot.model.source.spi.MetadataSourceProcessor;
@ -42,14 +42,14 @@ public class HbmMetadataSourceProcessorImpl implements MetadataSourceProcessor {
}
public HbmMetadataSourceProcessorImpl(
Collection<Binding<BindableMappingDescriptor>> xmlBindings,
Collection<Binding<JaxbBindableMappingDescriptor>> xmlBindings,
MetadataBuildingContext rootBuildingContext) {
this.rootBuildingContext = rootBuildingContext;
final EntityHierarchyBuilder hierarchyBuilder = new EntityHierarchyBuilder();
this.mappingDocuments = new ArrayList<>();
for ( Binding<BindableMappingDescriptor> xmlBinding : xmlBindings ) {
for ( Binding<JaxbBindableMappingDescriptor> xmlBinding : xmlBindings ) {
if ( !(xmlBinding.getRoot() instanceof JaxbHbmHibernateMapping) ) {
continue;
}

View File

@ -10,7 +10,7 @@ import java.io.InputStream;
import org.hibernate.Incubating;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.model.relational.AuxiliaryDatabaseObject;
import org.hibernate.boot.model.relational.Sequence;
import org.hibernate.mapping.Table;
@ -38,7 +38,7 @@ public interface AdditionalMappingContributions {
* Contribute mappings in the form of {@code hbm.xml} JAXB bindings.
*
* @deprecated {@code hbm.xml} mapping file support is deprecated. Use
* {@linkplain #contributeBinding(JaxbEntityMappings) extended orm.xml}
* {@linkplain #contributeBinding(org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl) extended orm.xml}
* bindings instead.
*/
@Deprecated
@ -47,7 +47,7 @@ public interface AdditionalMappingContributions {
/**
* Contribute mappings in the form of (extended) {@code orm.xml} JAXB bindings
*/
void contributeBinding(JaxbEntityMappings mappingJaxbBinding);
void contributeBinding(JaxbEntityMappingsImpl mappingJaxbBinding);
/**
* Contribute a materialized Table

View File

@ -20,7 +20,7 @@ import org.hibernate.boot.jaxb.internal.FileXmlSource;
import org.hibernate.boot.jaxb.internal.InputStreamXmlSource;
import org.hibernate.boot.jaxb.internal.MappingBinder;
import org.hibernate.boot.jaxb.internal.UrlXmlSource;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.service.ServiceRegistry;
@ -57,7 +57,7 @@ public class XmlMappingBinderAccess {
/**
* Create a {@linkplain Binding binding} from a named URL resource
*/
public <X extends BindableMappingDescriptor> Binding<X> bind(String resource) {
public <X extends JaxbBindableMappingDescriptor> Binding<X> bind(String resource) {
LOG.tracef( "reading mappings from resource : %s", resource );
final Origin origin = new Origin( SourceType.RESOURCE, resource );
@ -73,7 +73,7 @@ public class XmlMappingBinderAccess {
/**
* Create a {@linkplain Binding binding} from a File reference
*/
public <X extends BindableMappingDescriptor> Binding<X> bind(File file) {
public <X extends JaxbBindableMappingDescriptor> Binding<X> bind(File file) {
final Origin origin = new Origin( SourceType.FILE, file.getPath() );
LOG.tracef( "reading mappings from file : %s", origin.getName() );
@ -88,7 +88,7 @@ public class XmlMappingBinderAccess {
/**
* Create a {@linkplain Binding binding} from an input stream
*/
public <X extends BindableMappingDescriptor> Binding<X> bind(InputStreamAccess xmlInputStreamAccess) {
public <X extends JaxbBindableMappingDescriptor> Binding<X> bind(InputStreamAccess xmlInputStreamAccess) {
LOG.tracef( "reading mappings from InputStreamAccess : %s", xmlInputStreamAccess.getStreamName() );
final Origin origin = new Origin( SourceType.INPUT_STREAM, xmlInputStreamAccess.getStreamName() );
@ -110,7 +110,7 @@ public class XmlMappingBinderAccess {
/**
* Create a {@linkplain Binding binding} from an input stream
*/
public <X extends BindableMappingDescriptor> Binding<X> bind(InputStream xmlInputStream) {
public <X extends JaxbBindableMappingDescriptor> Binding<X> bind(InputStream xmlInputStream) {
LOG.trace( "reading mappings from InputStream" );
final Origin origin = new Origin( SourceType.INPUT_STREAM, null );
//noinspection unchecked
@ -120,7 +120,7 @@ public class XmlMappingBinderAccess {
/**
* Create a {@linkplain Binding binding} from a URL
*/
public <X extends BindableMappingDescriptor> Binding<X> bind(URL url) {
public <X extends JaxbBindableMappingDescriptor> Binding<X> bind(URL url) {
final String urlExternalForm = url.toExternalForm();
LOG.debugf( "Reading mapping document from URL : %s", urlExternalForm );

View File

@ -0,0 +1,15 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.internal.util;
/**
* @author Steve Ebersole
*/
@FunctionalInterface
public interface NamedConsumer<T> {
void consume(String name, T thing);
}

View File

@ -33,7 +33,7 @@ import org.hibernate.boot.cfgxml.spi.LoadedConfig;
import org.hibernate.boot.cfgxml.spi.MappingReference;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmRootEntityType;
import org.hibernate.boot.jaxb.spi.BindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.model.TypeContributor;
import org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor;
@ -351,8 +351,8 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil
if ( classLoader == null ) {
throw persistenceException( "Enhancement requires a temp class loader, but none was given." );
}
for ( Binding<BindableMappingDescriptor> binding : metadataSources.getXmlBindings() ) {
final BindableMappingDescriptor root = binding.getRoot();
for ( Binding<JaxbBindableMappingDescriptor> binding : metadataSources.getXmlBindings() ) {
final JaxbBindableMappingDescriptor root = binding.getRoot();
if ( root instanceof JaxbHbmHibernateMapping ) {
final JaxbHbmHibernateMapping hibernateMapping = (JaxbHbmHibernateMapping) root;
final String packageName = hibernateMapping.getPackage();

View File

@ -18,7 +18,6 @@ import org.hibernate.Filter;
import org.hibernate.Incubating;
import org.hibernate.Internal;
import org.hibernate.annotations.ConcreteProxy;
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
import org.hibernate.engine.OptimisticLockStyle;
import org.hibernate.engine.spi.LoadQueryInfluencers;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
@ -66,7 +65,7 @@ public interface EntityMappingType
* <p/>
* For most entities, this will be the fully-qualified name
* of the entity class. The alternative is an explicit
* {@linkplain JaxbEntity#getName() entity-name} which takes precedence if provided
* {@linkplain org.hibernate.boot.jaxb.mapping.spi.JaxbEntity#getName() entity-name} which takes precedence if provided
*
* @apiNote Different from {@link Entity#name()}, which is just a glorified
* SQM "import" name

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~

File diff suppressed because it is too large Load Diff

View File

@ -85,7 +85,7 @@
<jaxb:bindings node="//xsd:element[@name='hibernate-mapping']/xsd:complexType">
<inheritance:implements>org.hibernate.boot.jaxb.spi.BindableMappingDescriptor</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor</inheritance:implements>
</jaxb:bindings>
<jaxb:bindings node="//xsd:complexType[@name='ToolingHintContainer']">

View File

@ -6,428 +6,615 @@
extensionBindingPrefixes="inheritance"
version="3.0">
<bindings schemaLocation="../resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd" node="/xsd:schema">
<bindings schemaLocation="../resources/org/hibernate/xsd/mapping/mapping-3.2.0.xsd" node="/xsd:schema">
<schemaBindings>
<package name="org.hibernate.boot.jaxb.mapping" />
<package name="org.hibernate.boot.jaxb.mapping.spi" />
<nameXmlTransform>
<typeName prefix="Jaxb" />
<elementName prefix="Jaxb" />
<modelGroupName prefix="Jaxb" />
<anonymousTypeName prefix="Jaxb" />
<typeName prefix="Jaxb" suffix="Impl"/>
<elementName prefix="Jaxb" suffix="Impl"/>
<modelGroupName prefix="Jaxb" suffix="Impl"/>
<anonymousTypeName prefix="Jaxb" suffix="Impl"/>
</nameXmlTransform>
</schemaBindings>
<bindings node="//xsd:element[@name='entity-mappings']/xsd:complexType">
<inheritance:implements>org.hibernate.boot.jaxb.spi.BindableMappingDescriptor</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor</inheritance:implements>
<bindings node=".//xsd:element[@name='filter-def']">
<property name="filterDefinitions"/>
<property name="filterDefinitions"/>
</bindings>
<bindings node=".//xsd:element[@name='fetch-profile']">
<property name="fetchProfiles"/>
<property name="fetchProfiles"/>
</bindings>
<bindings node=".//xsd:element[@name='identifier-generator']">
<property name="genericGenerators"/>
<bindings node=".//xsd:element[@name='generic-generator']">
<property name="genericGenerators"/>
</bindings>
<bindings node=".//xsd:element[@name='sequence-generator']">
<property name="sequenceGenerators"/>
<property name="sequenceGenerators"/>
</bindings>
<bindings node=".//xsd:element[@name='table-generator']">
<property name="tableGenerators"/>
<property name="tableGenerators"/>
</bindings>
<bindings node=".//xsd:element[@name='database-object']">
<property name="databaseObjects"/>
<property name="databaseObjects"/>
</bindings>
<bindings node=".//xsd:element[@name='import']">
<property name="hqlImports"/>
<property name="hqlImports"/>
</bindings>
<bindings node=".//xsd:element[@name='named-query']">
<property name="namedQueries"/>
<property name="namedQueries"/>
</bindings>
<bindings node=".//xsd:element[@name='named-native-query']">
<property name="namedNativeQueries"/>
<property name="namedNativeQueries"/>
</bindings>
<bindings node=".//xsd:element[@name='named-stored-procedure-query']">
<property name="namedProcedureQueries"/>
<property name="namedProcedureQueries"/>
</bindings>
<bindings node=".//xsd:element[@name='sql-result-set-mapping']">
<property name="sqlResultSetMappings"/>
<property name="sqlResultSetMappings"/>
</bindings>
<bindings node=".//xsd:element[@name='mapped-superclass']">
<property name="mappedSuperclasses"/>
<property name="mappedSuperclasses"/>
</bindings>
<bindings node=".//xsd:element[@name='entity']">
<property name="entities"/>
<property name="entities"/>
</bindings>
<bindings node=".//xsd:element[@name='embeddable']">
<property name="embeddables"/>
<property name="embeddables"/>
</bindings>
<bindings node=".//xsd:element[@name='converter']">
<property name="converters"/>
<property name="converters"/>
</bindings>
<bindings node=".//xsd:element[@name='java-type']">
<property name="javaTypeRegistrations"/>
<property name="javaTypeRegistrations"/>
</bindings>
<bindings node=".//xsd:element[@name='jdbc-type']">
<property name="jdbcTypeRegistrations"/>
<property name="jdbcTypeRegistrations"/>
</bindings>
<bindings node=".//xsd:element[@name='user-type']">
<property name="userTypeRegistrations"/>
<property name="userTypeRegistrations"/>
</bindings>
<bindings node=".//xsd:element[@name='composite-user-type']">
<property name="compositeUserTypeRegistrations"/>
<property name="compositeUserTypeRegistrations"/>
</bindings>
<bindings node=".//xsd:element[@name='collection-user-type']">
<property name="collectionUserTypeRegistrations"/>
<property name="collectionUserTypeRegistrations"/>
</bindings>
<bindings node=".//xsd:element[@name='embeddable-instantiator']">
<property name="embeddableInstantiatorRegistrations"/>
<property name="embeddableInstantiatorRegistrations"/>
</bindings>
<bindings node=".//xsd:element[@name='conversion']">
<property name="converterRegistrations"/>
<property name="converterRegistrations"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='collection-user-type-registration']">
<bindings node=".//xsd:element[@name='param']">
<property name="parameters"/>
</bindings>
<bindings node=".//xsd:element[@name='param']">
<property name="parameters"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='entity']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.EntityOrMappedSuperclass</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbEntity</inheritance:implements>
<bindings node=".//xsd:element[@name='primary-key-join-column']">
<property name="primaryKeyJoinColumns"/>
</bindings>
<bindings node=".//xsd:element[@name='named-query']">
<property name="namedQueries"/>
</bindings>
<bindings node=".//xsd:element[@name='named-native-query']">
<property name="namedNativeQueries"/>
</bindings>
<bindings node=".//xsd:element[@name='named-stored-procedure-query']">
<property name="namedStoredProcedureQueries"/>
</bindings>
<bindings node=".//xsd:element[@name='sql-result-set-mapping']">
<property name="sqlResultSetMappings"/>
</bindings>
<bindings node=".//xsd:element[@name='attribute-override']">
<property name="attributeOverrides"/>
</bindings>
<bindings node=".//xsd:element[@name='association-override']">
<property name="associationOverrides"/>
</bindings>
<bindings node=".//xsd:element[@name='convert']">
<property name="converts"/>
</bindings>
<bindings node=".//xsd:element[@name='named-entity-graph']">
<property name="namedEntityGraphs"/>
</bindings>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
<bindings node=".//xsd:element[@name='fetch-profile']">
<property name="fetchProfiles"/>
</bindings>
<bindings node=".//xsd:element[@name='secondary-table']">
<property name="secondaryTables"/>
</bindings>
<bindings node=".//xsd:element[@name='synchronize']">
<property name="synchronizeTables"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='embeddable']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.ManagedType</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddable</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='mapped-superclass']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.EntityOrMappedSuperclass</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbMappedSuperclass</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='attributes']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.AttributesContainer</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAttributesContainer</inheritance:implements>
<class name="JaxbAttributesContainerImpl"/>
<bindings node=".//xsd:element[@name='id']">
<property name="idAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='embedded-id']">
<property name="embeddedIdAttribute"/>
</bindings>
<bindings node=".//xsd:element[@name='basic']">
<property name="basicAttributes"/>
<property name="basicAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='embedded']">
<property name="embeddedAttributes"/>
<property name="embeddedAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='one-to-one']">
<property name="oneToOneAttributes"/>
<property name="oneToOneAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='many-to-one']">
<property name="manyToOneAttributes"/>
<property name="manyToOneAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='any']">
<property name="discriminatedAssociations"/>
<property name="anyMappingAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='element-collection']">
<property name="elementCollectionAttributes"/>
<property name="elementCollectionAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='one-to-many']">
<property name="oneToManyAttributes"/>
<property name="oneToManyAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='many-to-many']">
<property name="manyToManyAttributes"/>
<property name="manyToManyAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='many-to-any']">
<property name="pluralDiscriminatedAssociations"/>
<property name="pluralAnyMappingAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='transient']">
<property name="transients"/>
<property name="transients"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='embeddable-attributes']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.AttributesContainer</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAttributesContainer</inheritance:implements>
<class name="JaxbEmbeddableAttributesContainerImpl"/>
<bindings node=".//xsd:element[@name='basic']">
<property name="basicAttributes"/>
<property name="basicAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='embedded']">
<property name="embeddedAttributes"/>
<property name="embeddedAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='one-to-one']">
<property name="oneToOneAttributes"/>
<property name="oneToOneAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='many-to-one']">
<property name="manyToOneAttributes"/>
<property name="manyToOneAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='any']">
<property name="discriminatedAssociations"/>
<property name="anyMappingAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='element-collection']">
<property name="elementCollectionAttributes"/>
<property name="elementCollectionAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='one-to-many']">
<property name="oneToManyAttributes"/>
<property name="oneToManyAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='many-to-many']">
<property name="manyToManyAttributes"/>
<property name="manyToManyAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='many-to-any']">
<property name="pluralDiscriminatedAssociations"/>
<property name="pluralAnyMappingAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='transient']">
<property name="transients"/>
<property name="transients"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='id']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.PersistentAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbBasicMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='embedded-id']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.PersistentAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddedMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='version']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.PersistentAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAttribute</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='basic']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.PersistentAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbStandardAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLockableAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbBasicMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='embedded']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.PersistentAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLockableAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddedMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='one-to-one']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.ToOneAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbStandardAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLockableAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbJoinTableCapable</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='many-to-one']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.ToOneAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbStandardAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLockableAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbNotFoundCapable</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbJoinTableCapable</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='hbm-any-mapping']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatedAssociation</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSingularAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbStandardAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLockableAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbCascadableAttribute</inheritance:implements>
<class name="JaxbAnyMappingImpl"/>
</bindings>
<bindings node="//xsd:complexType[@name='any-discriminator']">
<class name="JaxbAnyMappingDiscriminatorImpl"/>
</bindings>
<bindings node="//xsd:complexType[@name='any-key']">
<class name="JaxbAnyMappingKeyImpl"/>
</bindings>
<bindings node="//xsd:complexType[@name='element-collection']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.CollectionAttribute</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='one-to-many']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.CollectionAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.AssociationAttribute</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='many-to-many']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.CollectionAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.AssociationAttribute</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='hbm-many-to-any']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatedAssociation</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='hbm-any-discriminator']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatedAssociation.Discriminator</inheritance:implements>
<bindings node=".//xsd:element[@name='mapping']">
<property name="valueMappings"/>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbPluralAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbBasicMapping</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='hbm-any-discriminator-value-mapping']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatorMapping</inheritance:implements>
<bindings node="//xsd:complexType[@name='one-to-many']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbPluralAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbNotFoundCapable</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbJoinTableCapable</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
<bindings node=".//xsd:element[@name='filter-join-table']">
<property name="joinTableFilters"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='many-to-many']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbPluralAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbNotFoundCapable</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbJoinTableCapable</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
<bindings node=".//xsd:element[@name='filter-join-table']">
<property name="joinTableFilters"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='hbm-many-to-any']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbPluralAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbCascadableAttribute</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
<class name="JaxbPluralAnyMappingImpl"/>
</bindings>
<bindings node="//xsd:complexType[@name='any-discriminator']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping.Discriminator</inheritance:implements>
<bindings node=".//xsd:element[@name='mapping']">
<property name="valueMappings"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='any-discriminator-value-mapping']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbDiscriminatorMapping</inheritance:implements>
<property name="correspondingEntityName"/>
<bindings node=".//xsd:attribute[@name='value']">
<bindings node=".//xsd:attribute[@name='value']">
<property name="discriminatorValue"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='hbm-any-key']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatedAssociation.Key</inheritance:implements>
<bindings node=".//xsd:element[@name='column']">
<bindings node="//xsd:complexType[@name='any-key']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping.Key</inheritance:implements>
<bindings node=".//xsd:element[@name='column']">
<property name="columns"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='secondary-table']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.SchemaAware</inheritance:implements>
<bindings node="//xsd:complexType[@name='natural-id']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbNaturalId</inheritance:implements>
<bindings node=".//xsd:element[@name='basic']">
<property name="basicAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='many-to-one']">
<property name="manyToOneAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='embedded']">
<property name="embeddedAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='any']">
<property name="anyMappingAttributes"/>
</bindings>
<bindings node=".//xsd:element[@name='cache']">
<property name="caching"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='table']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.SchemaAware</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbTableMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='check-constraint']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbCheckConstraint</inheritance:implements>
</bindings>
<bindings node="//xsd:group[@name='hbm-common-table-extensions']">
<bindings node=".//xsd:element[@name='check-constraint']">
<property name="checkConstraints"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='join-table']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.SchemaAware</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbTableMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='collection-table']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.SchemaAware</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbTableMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='table-generator']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.SchemaAware</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbTableMapping</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='sequence-generator']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.SchemaAware</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbSchemaAware</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='generic-id-generator']">
<bindings node=".//xsd:element[@name='parameter']">
<property name="parameters"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='database-object']">
<bindings node=".//xsd:element[@name='dialect-scope']">
<bindings node=".//xsd:element[@name='dialect-scope']">
<property name="dialectScopes"/>
</bindings>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='column']">
<bindings node=".//xsd:element[@name='check-constraint']">
<property name="checkConstraints"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='entity-listener']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallbackContainer</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallbackContainer</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='pre-persist']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallback</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='pre-remove']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallback</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='pre-update']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallback</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='post-load']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallback</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='post-remove']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallback</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='post-update']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallback</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='post-persist']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.LifecycleCallback</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback</inheritance:implements>
</bindings>
<bindings node="//xsd:complexType[@name='named-query']">
<bindings node=".//xsd:element[@name='hint']">
<property name="hints"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='named-native-query']">
<bindings node=".//xsd:element[@name='synchronize']">
<bindings node=".//xsd:element[@name='synchronize']">
<property name="synchronizations"/>
</bindings>
<bindings node=".//xsd:element[@name='hint']">
<property name="hints"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='named-stored-procedure-query']">
<bindings node=".//xsd:element[@name='hint']">
<property name="hints"/>
</bindings>
<bindings node=".//xsd:element[@name='result-class']">
<property name="resultClasses"/>
</bindings>
<bindings node=".//xsd:element[@name='result-set-mapping']">
<property name="resultSetMappings"/>
</bindings>
</bindings>
<bindings node="//xsd:complexType[@name='filter-def']">
<bindings node=".//xsd:element[@name='filter-param']">
<property name="filterParams"/>
</bindings>
</bindings>
<!--
#################################################################
Marshalling of enum values
#################################################################
-->
<!--
#################################################################
Marshalling of enum values
#################################################################
-->
<bindings node="//xsd:simpleType[@name='access-type']">
<javaType name="jakarta.persistence.AccessType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.AccessTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.AccessTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='access-type']">
<javaType name="jakarta.persistence.AccessType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.AccessTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.AccessTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='cache-access-type']">
<javaType name="org.hibernate.cache.spi.access.AccessType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheAccessTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheAccessTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='cache-access-type']">
<javaType name="org.hibernate.cache.spi.access.AccessType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.CacheAccessTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.CacheAccessTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='hbm-cache-mode-type']">
<javaType name="org.hibernate.CacheMode"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheModeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='hbm-cache-mode-type']">
<javaType name="org.hibernate.CacheMode"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.CacheModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.CacheModeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='discriminator-type']">
<javaType name="jakarta.persistence.DiscriminatorType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.DiscriminatorTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.DiscriminatorTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='discriminator-type']">
<javaType name="jakarta.persistence.DiscriminatorType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.DiscriminatorTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.DiscriminatorTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='enum-type']">
<javaType name="jakarta.persistence.EnumType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.EnumTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.EnumTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='enum-type']">
<javaType name="jakarta.persistence.EnumType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.EnumTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.EnumTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='fetch-type']">
<javaType name="jakarta.persistence.FetchType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.FetchTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.FetchTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='fetch-type']">
<javaType name="jakarta.persistence.FetchType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.FetchTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.FetchTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='flush-mode-type']">
<javaType name="org.hibernate.FlushMode"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.FlushModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.FlushModeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='flush-mode-type']">
<javaType name="org.hibernate.FlushMode"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.FlushModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.FlushModeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='lock-mode-type']">
<javaType name="jakarta.persistence.LockModeType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.LockModeTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.LockModeTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='lock-mode-type']">
<javaType name="jakarta.persistence.LockModeType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.LockModeTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.LockModeTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='optimistic-locking-type']">
<javaType name="org.hibernate.engine.OptimisticLockStyle"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.OptimisticLockStyleMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.OptimisticLockStyleMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='parameter-mode']">
<javaType name="jakarta.persistence.ParameterMode"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.ParameterModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.ParameterModeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='optimistic-locking-type']">
<javaType name="org.hibernate.engine.OptimisticLockStyle"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.OptimisticLockStyleMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.OptimisticLockStyleMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='custom-sql-check-type']">
<javaType name="org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.ResultCheckStyleMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.ResultCheckStyleMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='on-delete-type']">
<javaType name="org.hibernate.annotations.OnDeleteAction"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.OnDeleteActionMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.OnDeleteActionMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='polymorphism-type']">
<javaType name="org.hibernate.annotations.PolymorphismType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.PolymorphismTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.PolymorphismTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='temporal-type']">
<javaType name="jakarta.persistence.TemporalType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.TemporalTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.TemporalTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='parameter-mode']">
<javaType name="jakarta.persistence.ParameterMode"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.ParameterModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.ParameterModeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='inheritance-type']">
<javaType name="jakarta.persistence.InheritanceType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.InheritanceTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.InheritanceTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='custom-sql-result-check-type']">
<javaType name="org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.ResultCheckStyleMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.ResultCheckStyleMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='generation-type']">
<javaType name="jakarta.persistence.GenerationType"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTypeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='on-delete-type']">
<javaType name="org.hibernate.annotations.OnDeleteAction"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.OnDeleteActionMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.OnDeleteActionMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='basic-generation-timing-type']">
<javaType name="org.hibernate.tuple.GenerationTiming"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTimingMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTimingMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='polymorphism-type']">
<javaType name="org.hibernate.annotations.PolymorphismType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.PolymorphismTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.PolymorphismTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='constraint-mode']">
<javaType name="jakarta.persistence.ConstraintMode"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.ConstraintModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.ConstraintModeMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='temporal-type']">
<javaType name="jakarta.persistence.TemporalType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.TemporalTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.TemporalTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='collection-classifications']">
<javaType name="org.hibernate.metamodel.CollectionClassification"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.CollectionClassificationMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.CollectionClassificationMarshalling.toXml" />
<bindings node="//xsd:simpleType[@name='inheritance-type']">
<javaType name="jakarta.persistence.InheritanceType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.InheritanceTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.InheritanceTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='generation-type']">
<javaType name="jakarta.persistence.GenerationType"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTypeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTypeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='basic-generation-timing-type']">
<javaType name="org.hibernate.tuple.GenerationTiming"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTimingMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTimingMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='constraint-mode']">
<javaType name="jakarta.persistence.ConstraintMode"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.ConstraintModeMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.ConstraintModeMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='collection-classification-enum']">
<javaType name="org.hibernate.metamodel.CollectionClassification"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.CollectionClassificationMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.CollectionClassificationMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='limited-collection-classification-enum']">
<javaType name="org.hibernate.boot.internal.LimitedCollectionClassification"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.LimitedCollectionClassificationMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.LimitedCollectionClassificationMarshalling.toXml" />
</bindings>
<bindings node="//xsd:simpleType[@name='uuid-generator-style']">
<javaType name="org.hibernate.annotations.UuidGenerator.Style"
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.UuidGeneratorStyleMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.marshall.UuidGeneratorStyleMarshalling.toXml" />
</bindings>
<javaType name="org.hibernate.annotations.UuidGenerator.Style"
parseMethod="org.hibernate.boot.jaxb.mapping.internal.UuidGeneratorStyleMarshalling.fromXml"
printMethod="org.hibernate.boot.jaxb.mapping.internal.UuidGeneratorStyleMarshalling.toXml" />
</bindings>
</bindings>

View File

@ -11,7 +11,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import org.hibernate.annotations.Columns;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.model.internal.JPAXMLOverriddenAnnotationReader;
import org.hibernate.boot.model.internal.XMLContext;
import org.hibernate.orm.test.internal.util.xml.XMLMappingHelper;
@ -461,7 +461,7 @@ public class JPAXMLOverriddenAnnotationReaderTest extends BaseUnitTestCase {
private XMLContext buildContext(String ormfile) throws IOException {
XMLMappingHelper xmlHelper = new XMLMappingHelper();
JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings( ormfile );
JaxbEntityMappingsImpl mappings = xmlHelper.readOrmXmlMappings( ormfile );
XMLContext context = new XMLContext( bootstrapContext );
context.addDocument( mappings );
return context;

View File

@ -6,7 +6,7 @@
*/
package org.hibernate.orm.test.annotations.reflection;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.model.internal.XMLContext;
import org.hibernate.orm.test.internal.util.xml.XMLMappingHelper;
@ -39,7 +39,7 @@ public class XMLContextTest {
XMLMappingHelper xmlHelper = new XMLMappingHelper();
final XMLContext context = new XMLContext( bootstrapContext );
JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings(
JaxbEntityMappingsImpl mappings = xmlHelper.readOrmXmlMappings(
"org/hibernate/orm/test/annotations/reflection/orm.xml" );
context.addDocument( mappings );
}

View File

@ -10,7 +10,7 @@ import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.model.internal.JPAXMLOverriddenAnnotationReader;
import org.hibernate.boot.model.internal.XMLContext;
import org.hibernate.orm.test.internal.util.xml.XMLMappingHelper;
@ -81,7 +81,7 @@ public abstract class Ejb3XmlTestCase extends BaseUnitTestCase {
protected XMLContext getContext(InputStream is, String resourceName) throws Exception {
XMLMappingHelper xmlHelper = new XMLMappingHelper();
JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings( is, resourceName );
JaxbEntityMappingsImpl mappings = xmlHelper.readOrmXmlMappings( is, resourceName );
XMLContext context = new XMLContext( bootstrapContext );
context.addDocument( mappings );
return context;

View File

@ -12,7 +12,7 @@ import javax.xml.stream.XMLEventFactory;
import javax.xml.stream.XMLEventReader;
import org.hibernate.boot.jaxb.internal.stax.MappingEventReader;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.xsd.MappingXsdSupport;
import org.hibernate.orm.test.boot.jaxb.JaxbHelper;
@ -46,8 +46,8 @@ public class BasicMappingJaxbTests {
final XMLEventFactory xmlEventFactory = XMLEventFactory.newInstance();
final XMLEventReader reader = new MappingEventReader( staxEventReader, xmlEventFactory );
try {
final JAXBContext jaxbCtx = JAXBContext.newInstance( org.hibernate.boot.jaxb.mapping.JaxbEntityMappings.class );
final JaxbEntityMappings entityMappings = JaxbHelper.VALIDATING.jaxb( reader, MappingXsdSupport._310.getSchema(), jaxbCtx );
final JAXBContext jaxbCtx = JAXBContext.newInstance( JaxbEntityMappingsImpl.class );
final JaxbEntityMappingsImpl entityMappings = JaxbHelper.VALIDATING.jaxb( reader, MappingXsdSupport._310.getSchema(), jaxbCtx );
assertThat( entityMappings ).isNotNull();
assertThat( entityMappings.getEntities() ).hasSize( 1 );
}

View File

@ -17,8 +17,8 @@ import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
import org.hibernate.boot.jaxb.hbm.transform.HbmXmlTransformer;
import org.hibernate.boot.jaxb.hbm.transform.UnsupportedFeatureHandling;
import org.hibernate.boot.jaxb.internal.stax.HbmEventReader;
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.boot.xsd.MappingXsdSupport;
import org.hibernate.orm.test.boot.jaxb.JaxbHelper;
@ -56,7 +56,7 @@ public class HbmTransformationJaxbTests {
assertThat( hbmMapping ).isNotNull();
assertThat( hbmMapping.getClazz() ).hasSize( 1 );
final JaxbEntityMappings transformed = HbmXmlTransformer.transform(
final JaxbEntityMappingsImpl transformed = HbmXmlTransformer.transform(
hbmMapping,
new Origin( SourceType.RESOURCE, resourceName ),
() -> UnsupportedFeatureHandling.ERROR
@ -66,19 +66,19 @@ public class HbmTransformationJaxbTests {
assertThat( transformed.getEntities() ).hasSize( 1 );
assertThat( transformed.getPackage() ).isEqualTo( "org.hibernate.orm.test.boot.jaxb.mapping" );
final JaxbEntity ormEntity = transformed.getEntities().get( 0 );
final JaxbEntityImpl ormEntity = transformed.getEntities().get( 0 );
assertThat( ormEntity.getName() ).isNull();
assertThat( ormEntity.getClazz() ).isEqualTo( "SimpleEntity" );
assertThat( ormEntity.getAttributes().getId() ).hasSize( 1 );
assertThat( ormEntity.getAttributes().getIdAttributes() ).hasSize( 1 );
assertThat( ormEntity.getAttributes().getBasicAttributes() ).hasSize( 1 );
assertThat( ormEntity.getAttributes().getEmbeddedAttributes() ).isEmpty();
assertThat( ormEntity.getAttributes().getOneToOneAttributes() ).isEmpty();
assertThat( ormEntity.getAttributes().getManyToOneAttributes() ).isEmpty();
assertThat( ormEntity.getAttributes().getDiscriminatedAssociations() ).isEmpty();
assertThat( ormEntity.getAttributes().getAnyMappingAttributes() ).isEmpty();
assertThat( ormEntity.getAttributes().getOneToManyAttributes() ).isEmpty();
assertThat( ormEntity.getAttributes().getManyToManyAttributes() ).isEmpty();
assertThat( ormEntity.getAttributes().getPluralDiscriminatedAssociations() ).isEmpty();
assertThat( ormEntity.getAttributes().getPluralAnyMappingAttributes() ).isEmpty();
}
catch (JAXBException e) {
throw new RuntimeException( "Error during JAXB processing", e );

View File

@ -9,8 +9,8 @@ package org.hibernate.orm.test.boot.jaxb.mapping;
import org.hibernate.boot.jaxb.Origin;
import org.hibernate.boot.jaxb.SourceType;
import org.hibernate.boot.jaxb.internal.MappingBinder;
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
@ -30,17 +30,17 @@ public class PartialJaxbTests {
final MappingBinder mappingBinder = new MappingBinder( scope.getRegistry() );
scope.withService( ClassLoaderService.class, (cls) -> {
//noinspection unchecked
final Binding<JaxbEntityMappings> binding = mappingBinder.bind(
final Binding<JaxbEntityMappingsImpl> binding = mappingBinder.bind(
cls.locateResourceStream( "xml/jaxb/mapping/partial/caching.xml" ),
new Origin( SourceType.RESOURCE, "xml/jaxb/mapping/partial/caching.xml" )
);
final JaxbEntityMappings entityMappings = binding.getRoot();
final JaxbEntityMappingsImpl entityMappings = binding.getRoot();
assertThat( entityMappings ).isNotNull();
assertThat( entityMappings.getEntities() ).hasSize( 1 );
assertThat( entityMappings.getPackage() ).isEqualTo( "org.hibernate.orm.test.boot.jaxb.mapping" );
final JaxbEntity ormEntity = entityMappings.getEntities().get( 0 );
final JaxbEntityImpl ormEntity = entityMappings.getEntities().get( 0 );
assertThat( ormEntity.getName() ).isNull();
assertThat( ormEntity.getClazz() ).isEqualTo( "SimpleEntity" );
assertThat( ormEntity.isCacheable() ).isTrue();

View File

@ -12,7 +12,7 @@ import java.io.InputStream;
import org.hibernate.boot.jaxb.Origin;
import org.hibernate.boot.jaxb.SourceType;
import org.hibernate.boot.jaxb.internal.MappingBinder;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.testing.boot.ClassLoaderServiceTestingImpl;
@ -28,17 +28,17 @@ public final class XMLMappingHelper {
binder = new MappingBinder( ClassLoaderServiceTestingImpl.INSTANCE, MappingBinder.VALIDATING );
}
public JaxbEntityMappings readOrmXmlMappings(String name) throws IOException {
public JaxbEntityMappingsImpl readOrmXmlMappings(String name) throws IOException {
try ( InputStream is = ClassLoaderServiceTestingImpl.INSTANCE.locateResourceStream( name ) ) {
return readOrmXmlMappings( is, name );
}
}
public JaxbEntityMappings readOrmXmlMappings(InputStream is, String name) {
public JaxbEntityMappingsImpl readOrmXmlMappings(InputStream is, String name) {
try {
Assert.assertNotNull( "Resource not found: " + name, is );
Binding<?> binding = binder.bind( is, new Origin( SourceType.JAR, name ) );
return (JaxbEntityMappings) binding.getRoot();
return (JaxbEntityMappingsImpl) binding.getRoot();
}
catch (RuntimeException e) {
throw new IllegalStateException( "Could not parse orm.xml mapping '" + name + "': " + e.getMessage(), e );

View File

@ -16,11 +16,11 @@ import javax.xml.transform.stream.StreamSource;
import org.hibernate.boot.jaxb.Origin;
import org.hibernate.boot.jaxb.SourceType;
import org.hibernate.boot.jaxb.internal.MappingBinder;
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
import org.hibernate.boot.jaxb.mapping.JaxbEntityListener;
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitDefaults;
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitMetadata;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenerImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitDefaultsImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitMetadataImpl;
import org.hibernate.boot.jaxb.spi.Binding;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
@ -43,19 +43,19 @@ public class JakartaXmlSmokeTests {
final MappingBinder mappingBinder = new MappingBinder( cls, MappingBinder.VALIDATING );
final InputStream inputStream = cls.locateResourceStream( "xml/jakarta/simple/orm.xml" );
try {
final Binding<JaxbEntityMappings> binding = mappingBinder.bind( new StreamSource( inputStream ), new Origin( SourceType.RESOURCE, "xml/jakarta/simple/orm.xml" ) );
final Binding<JaxbEntityMappingsImpl> binding = mappingBinder.bind( new StreamSource( inputStream ), new Origin( SourceType.RESOURCE, "xml/jakarta/simple/orm.xml" ) );
assertThat( binding.getRoot()
.getEntities()
.stream()
.map( JaxbEntity::getClazz ) ).containsOnly( "Lighter", "ApplicationServer" );
.map( JaxbEntityImpl::getClazz ) ).containsOnly( "Lighter", "ApplicationServer" );
final JaxbPersistenceUnitMetadata puMetadata = binding.getRoot().getPersistenceUnitMetadata();
final JaxbPersistenceUnitDefaults puDefaults = puMetadata.getPersistenceUnitDefaults();
final JaxbPersistenceUnitMetadataImpl puMetadata = binding.getRoot().getPersistenceUnitMetadata();
final JaxbPersistenceUnitDefaultsImpl puDefaults = puMetadata.getPersistenceUnitDefaults();
final Stream<String> listenerNames = puDefaults.getEntityListeners()
.getEntityListener()
.stream()
.map( JaxbEntityListener::getClazz );
.map( JaxbEntityListenerImpl::getClazz );
assertThat( listenerNames ).containsOnly( "org.hibernate.jpa.test.pack.defaultpar.IncrementListener" );
}
finally {

View File

@ -58,8 +58,8 @@ dependencyResolutionManagement {
versionCatalogs {
jdks {
version "baseline", "11"
version "compatible", "11, 17 or 21"
version "baseline", "17"
version "compatible", "17 or 21"
version "jdbc", "4.2" // Bundled with JDK 11
// Gradle does bytecode transformation on tests.