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:
parent
55b4f907f9
commit
3d2411a630
|
@ -120,7 +120,7 @@ xjc {
|
||||||
xjcExtensions += ['inheritance', 'simplify']
|
xjcExtensions += ['inheritance', 'simplify']
|
||||||
}
|
}
|
||||||
mapping {
|
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' )
|
xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' )
|
||||||
xjcExtensions += ['inheritance', 'simplify']
|
xjcExtensions += ['inheritance', 'simplify']
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ import org.hibernate.Internal;
|
||||||
import org.hibernate.boot.archive.spi.InputStreamAccess;
|
import org.hibernate.boot.archive.spi.InputStreamAccess;
|
||||||
import org.hibernate.boot.internal.MetadataBuilderImpl;
|
import org.hibernate.boot.internal.MetadataBuilderImpl;
|
||||||
import org.hibernate.boot.jaxb.internal.XmlSources;
|
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.Binding;
|
||||||
import org.hibernate.boot.jaxb.spi.XmlSource;
|
import org.hibernate.boot.jaxb.spi.XmlSource;
|
||||||
import org.hibernate.boot.registry.BootstrapServiceRegistry;
|
import org.hibernate.boot.registry.BootstrapServiceRegistry;
|
||||||
|
@ -65,7 +65,7 @@ public class MetadataSources implements Serializable {
|
||||||
|
|
||||||
private XmlMappingBinderAccess xmlMappingBinderAccess;
|
private XmlMappingBinderAccess xmlMappingBinderAccess;
|
||||||
|
|
||||||
private List<Binding<BindableMappingDescriptor>> xmlBindings;
|
private List<Binding<JaxbBindableMappingDescriptor>> xmlBindings;
|
||||||
private LinkedHashSet<Class<?>> annotatedClasses;
|
private LinkedHashSet<Class<?>> annotatedClasses;
|
||||||
private LinkedHashSet<String> annotatedClassNames;
|
private LinkedHashSet<String> annotatedClassNames;
|
||||||
private LinkedHashSet<String> annotatedPackages;
|
private LinkedHashSet<String> annotatedPackages;
|
||||||
|
@ -121,7 +121,7 @@ public class MetadataSources implements Serializable {
|
||||||
return xmlMappingBinderAccess;
|
return xmlMappingBinderAccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Binding<BindableMappingDescriptor>> getXmlBindings() {
|
public List<Binding<JaxbBindableMappingDescriptor>> getXmlBindings() {
|
||||||
return xmlBindings == null ? Collections.emptyList() : xmlBindings;
|
return xmlBindings == null ? Collections.emptyList() : xmlBindings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ public class MetadataSources implements Serializable {
|
||||||
*/
|
*/
|
||||||
public MetadataSources addXmlBinding(Binding<?> binding) {
|
public MetadataSources addXmlBinding(Binding<?> binding) {
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
getXmlBindingsForWrite().add( (Binding<BindableMappingDescriptor>) binding );
|
getXmlBindingsForWrite().add( (Binding<JaxbBindableMappingDescriptor>) binding );
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ public class MetadataSources implements Serializable {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Binding<BindableMappingDescriptor>> getXmlBindingsForWrite() {
|
private List<Binding<JaxbBindableMappingDescriptor>> getXmlBindingsForWrite() {
|
||||||
if ( xmlBindings == null ) {
|
if ( xmlBindings == null ) {
|
||||||
xmlBindings = new ArrayList<>();
|
xmlBindings = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
}
|
|
@ -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();
|
||||||
|
}
|
|
@ -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();
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
|
@ -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();
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -6,19 +6,20 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.boot.jaxb.hbm.transform;
|
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
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class TargetColumnAdapterJaxbColumn implements TargetColumnAdapter {
|
public class TargetColumnAdapterJaxbColumn implements TargetColumnAdapter {
|
||||||
private final JaxbColumn jaxbColumn;
|
private final JaxbColumnImpl jaxbColumn;
|
||||||
|
|
||||||
public TargetColumnAdapterJaxbColumn(ColumnDefaults columnDefaults) {
|
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 = jaxbColumn;
|
||||||
this.jaxbColumn.setLength( columnDefaults.getLength() );
|
this.jaxbColumn.setLength( columnDefaults.getLength() );
|
||||||
this.jaxbColumn.setScale( columnDefaults.getScale() );
|
this.jaxbColumn.setScale( columnDefaults.getScale() );
|
||||||
|
@ -29,7 +30,7 @@ public class TargetColumnAdapterJaxbColumn implements TargetColumnAdapter {
|
||||||
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
|
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public JaxbColumn getTargetColumn() {
|
public JaxbColumnImpl getTargetColumn() {
|
||||||
return jaxbColumn;
|
return jaxbColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +105,9 @@ public class TargetColumnAdapterJaxbColumn implements TargetColumnAdapter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCheck(String value) {
|
public void setCheck(String value) {
|
||||||
jaxbColumn.setCheck( value );
|
final JaxbCheckConstraintImpl checkConstraint = new JaxbCheckConstraintImpl();
|
||||||
|
checkConstraint.setConstraint( value );
|
||||||
|
jaxbColumn.getCheckConstraints().add( checkConstraint );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -6,19 +6,19 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.boot.jaxb.hbm.transform;
|
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
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class TargetColumnAdapterJaxbJoinColumn implements TargetColumnAdapter {
|
public class TargetColumnAdapterJaxbJoinColumn implements TargetColumnAdapter {
|
||||||
private final JaxbJoinColumn jaxbColumn;
|
private final JaxbJoinColumnImpl jaxbColumn;
|
||||||
|
|
||||||
public TargetColumnAdapterJaxbJoinColumn(ColumnDefaults columnDefaults) {
|
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 = jaxbColumn;
|
||||||
this.jaxbColumn.setNullable( columnDefaults.isNullable() );
|
this.jaxbColumn.setNullable( columnDefaults.isNullable() );
|
||||||
this.jaxbColumn.setUnique( columnDefaults.isUnique() );
|
this.jaxbColumn.setUnique( columnDefaults.isUnique() );
|
||||||
|
@ -26,7 +26,7 @@ public class TargetColumnAdapterJaxbJoinColumn implements TargetColumnAdapter {
|
||||||
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
|
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public JaxbJoinColumn getTargetColumn() {
|
public JaxbJoinColumnImpl getTargetColumn() {
|
||||||
return jaxbColumn;
|
return jaxbColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.HbmEventReader;
|
||||||
import org.hibernate.boot.jaxb.internal.stax.JpaOrmXmlEventReader;
|
import org.hibernate.boot.jaxb.internal.stax.JpaOrmXmlEventReader;
|
||||||
import org.hibernate.boot.jaxb.internal.stax.MappingEventReader;
|
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.jaxb.spi.BindableMappingDescriptor;
|
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
|
||||||
import org.hibernate.boot.jaxb.spi.Binding;
|
import org.hibernate.boot.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
||||||
import org.hibernate.boot.xsd.MappingXsdSupport;
|
import org.hibernate.boot.xsd.MappingXsdSupport;
|
||||||
|
@ -48,7 +48,7 @@ import static org.hibernate.engine.config.spi.StandardConverters.BOOLEAN;
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @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 static final Logger log = Logger.getLogger( MappingBinder.class );
|
||||||
|
|
||||||
private final XMLEventFactory xmlEventFactory = XMLEventFactory.newInstance();
|
private final XMLEventFactory xmlEventFactory = XMLEventFactory.newInstance();
|
||||||
|
@ -200,7 +200,7 @@ public class MappingBinder extends AbstractBinder<BindableMappingDescriptor> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected <X extends BindableMappingDescriptor> Binding<X> doBind(
|
protected <X extends JaxbBindableMappingDescriptor> Binding<X> doBind(
|
||||||
XMLEventReader staxEventReader,
|
XMLEventReader staxEventReader,
|
||||||
StartElement rootElementStartEvent,
|
StartElement rootElementStartEvent,
|
||||||
Origin origin) {
|
Origin origin) {
|
||||||
|
@ -230,7 +230,7 @@ public class MappingBinder extends AbstractBinder<BindableMappingDescriptor> {
|
||||||
log.debugf( "Performing JAXB binding of orm.xml document : %s", origin.toString() );
|
log.debugf( "Performing JAXB binding of orm.xml document : %s", origin.toString() );
|
||||||
|
|
||||||
final XMLEventReader reader = new MappingEventReader( staxEventReader, xmlEventFactory );
|
final XMLEventReader reader = new MappingEventReader( staxEventReader, xmlEventFactory );
|
||||||
final JaxbEntityMappings bindingRoot = jaxb( reader, MappingXsdSupport.latestDescriptor()
|
final JaxbEntityMappingsImpl bindingRoot = jaxb( reader, MappingXsdSupport.latestDescriptor()
|
||||||
.getSchema(), mappingJaxbContext(), origin );
|
.getSchema(), mappingJaxbContext(), origin );
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
return new Binding<>( (X) bindingRoot, origin );
|
return new Binding<>( (X) bindingRoot, origin );
|
||||||
|
@ -257,7 +257,7 @@ public class MappingBinder extends AbstractBinder<BindableMappingDescriptor> {
|
||||||
public JAXBContext mappingJaxbContext() {
|
public JAXBContext mappingJaxbContext() {
|
||||||
if ( entityMappingsJaxbContext == null ) {
|
if ( entityMappingsJaxbContext == null ) {
|
||||||
try {
|
try {
|
||||||
entityMappingsJaxbContext = JAXBContext.newInstance( JaxbEntityMappings.class );
|
entityMappingsJaxbContext = JAXBContext.newInstance( JaxbEntityMappingsImpl.class );
|
||||||
}
|
}
|
||||||
catch (JAXBException e) {
|
catch (JAXBException e) {
|
||||||
throw new ConfigurationException( "Unable to build orm.xml JAXBContext", e );
|
throw new ConfigurationException( "Unable to build orm.xml JAXBContext", e );
|
||||||
|
|
|
@ -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();
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -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();
|
|
||||||
}
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.AccessType;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
|
* 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;
|
import org.hibernate.cache.spi.access.AccessType;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import java.util.Locale;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import org.hibernate.metamodel.CollectionClassification;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.ConstraintMode;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.DiscriminatorType;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.EnumType;
|
||||||
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.FetchType;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import java.util.Locale;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import java.util.Locale;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.GenerationType;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.InheritanceType;
|
||||||
|
|
|
@ -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 );
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.LockModeType;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import org.hibernate.annotations.OnDeleteAction;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import java.util.Locale;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.ParameterMode;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import org.hibernate.annotations.PolymorphismType;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import jakarta.persistence.TemporalType;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import java.util.Locale;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface DiscriminatedAssociation extends PersistentAttribute {
|
public interface JaxbAnyMapping extends JaxbPersistentAttribute {
|
||||||
/**
|
/**
|
||||||
* Details about the logical association foreign-key
|
* Details about the logical association foreign-key
|
||||||
*/
|
*/
|
||||||
|
@ -25,12 +25,12 @@ public interface DiscriminatedAssociation extends PersistentAttribute {
|
||||||
Discriminator getDiscriminator();
|
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
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
interface Key {
|
interface Key {
|
||||||
List<JaxbColumn> getColumns();
|
List<JaxbColumnImpl> getColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,11 +42,11 @@ public interface DiscriminatedAssociation extends PersistentAttribute {
|
||||||
/**
|
/**
|
||||||
* The column holding the discriminator value
|
* The column holding the discriminator value
|
||||||
*/
|
*/
|
||||||
JaxbColumn getColumn();
|
JaxbColumnImpl getColumn();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mapping of discriminator-values to the corresponding entity names
|
* Mapping of discriminator-values to the corresponding entity names
|
||||||
*/
|
*/
|
||||||
List<? extends DiscriminatorMapping> getValueMappings();
|
List<? extends JaxbDiscriminatorMapping> getValueMappings();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,23 +4,15 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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)
|
* JAXB binding interface for association attributes (to-one and plural mappings)
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface AssociationAttribute extends PersistentAttribute, FetchableAttribute {
|
public interface JaxbAssociationAttribute extends JaxbCascadableAttribute {
|
||||||
JaxbJoinTable getJoinTable();
|
|
||||||
|
|
||||||
void setJoinTable(JaxbJoinTable value);
|
|
||||||
|
|
||||||
JaxbCascadeType getCascade();
|
|
||||||
|
|
||||||
void setCascade(JaxbCascadeType value);
|
|
||||||
|
|
||||||
String getTargetEntity();
|
String getTargetEntity();
|
||||||
|
|
||||||
void setTargetEntity(String value);
|
void setTargetEntity(String value);
|
||||||
}
|
}
|
|
@ -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();
|
||||||
|
}
|
|
@ -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();
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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();
|
||||||
|
}
|
|
@ -4,14 +4,14 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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
|
* Mapping of a discriminator value to the corresponding entity-name
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface DiscriminatorMapping {
|
public interface JaxbDiscriminatorMapping {
|
||||||
String getDiscriminatorValue();
|
String getDiscriminatorValue();
|
||||||
String getCorrespondingEntityName();
|
String getCorrespondingEntityName();
|
||||||
}
|
}
|
|
@ -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 {
|
||||||
|
}
|
|
@ -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 {
|
||||||
|
}
|
|
@ -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);
|
||||||
|
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -4,13 +4,12 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface ToOneAttribute extends AssociationAttribute {
|
public interface JaxbJoinTableCapable {
|
||||||
JaxbSingularFetchMode getFetchMode();
|
JaxbJoinTableImpl getJoinTable();
|
||||||
|
void setJoinTable(JaxbJoinTableImpl value);
|
||||||
void setFetchMode(JaxbSingularFetchMode mode);
|
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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.
|
* JAXB binding interface for lifecycle callbacks.
|
||||||
|
@ -12,6 +12,6 @@ package org.hibernate.boot.jaxb.mapping;
|
||||||
* @author Strong Liu
|
* @author Strong Liu
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface LifecycleCallback {
|
public interface JaxbLifecycleCallback {
|
||||||
String getMethodName();
|
String getMethodName();
|
||||||
}
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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.AccessType;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import jakarta.persistence.AccessType;
|
||||||
* @author Strong Liu
|
* @author Strong Liu
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface ManagedType {
|
public interface JaxbManagedType {
|
||||||
|
|
||||||
String getDescription();
|
String getDescription();
|
||||||
|
|
||||||
|
@ -33,5 +33,5 @@ public interface ManagedType {
|
||||||
|
|
||||||
void setAccess(AccessType value);
|
void setAccess(AccessType value);
|
||||||
|
|
||||||
AttributesContainer getAttributes();
|
JaxbAttributesContainer getAttributes();
|
||||||
}
|
}
|
|
@ -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 {
|
||||||
|
}
|
|
@ -4,22 +4,16 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JAXB binding interface for natural-id definitions
|
* JAXB binding interface for natural-id definitions
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface NaturalId {
|
public interface JaxbNaturalId extends JaxbBaseAttributesContainer {
|
||||||
/**
|
/**
|
||||||
* The cache config associated with this natural-id
|
* The cache config associated with this natural-id
|
||||||
*/
|
*/
|
||||||
JaxbCaching getCaching();
|
JaxbCachingImpl getCaching();
|
||||||
|
|
||||||
List<JaxbBasic> getBasicAttributes();
|
|
||||||
|
|
||||||
List<JaxbManyToOne> getManyToOneAttributes();
|
|
||||||
}
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -4,9 +4,10 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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.AccessType;
|
||||||
|
import jakarta.persistence.FetchType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common interface for JAXB bindings that represent persistent attributes.
|
* Common interface for JAXB bindings that represent persistent attributes.
|
||||||
|
@ -14,7 +15,7 @@ import jakarta.persistence.AccessType;
|
||||||
* @author Strong Liu
|
* @author Strong Liu
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface PersistentAttribute {
|
public interface JaxbPersistentAttribute {
|
||||||
/**
|
/**
|
||||||
* The attribute's name
|
* The attribute's name
|
||||||
*/
|
*/
|
|
@ -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();
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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).
|
* 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 Strong Liu
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface SchemaAware {
|
public interface JaxbSchemaAware {
|
||||||
String getSchema();
|
String getSchema();
|
||||||
void setSchema(String schema);
|
void setSchema(String schema);
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
|
@ -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 {
|
||||||
|
}
|
|
@ -4,21 +4,17 @@
|
||||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
* 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.
|
* 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;
|
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
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface FetchableAttribute extends PersistentAttribute {
|
public interface JaxbStandardAttribute extends JaxbPersistentAttribute {
|
||||||
FetchType getFetch();
|
FetchType getFetch();
|
||||||
void setFetch(FetchType value);
|
void setFetch(FetchType value);
|
||||||
}
|
}
|
|
@ -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();
|
||||||
|
}
|
|
@ -15,5 +15,5 @@ package org.hibernate.boot.jaxb.spi;
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public interface BindableMappingDescriptor {
|
public interface JaxbBindableMappingDescriptor {
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -16,9 +16,9 @@ import java.util.Map;
|
||||||
import org.hibernate.annotations.common.reflection.AnnotationReader;
|
import org.hibernate.annotations.common.reflection.AnnotationReader;
|
||||||
import org.hibernate.annotations.common.reflection.MetadataProvider;
|
import org.hibernate.annotations.common.reflection.MetadataProvider;
|
||||||
import org.hibernate.annotations.common.reflection.java.JavaMetadataProvider;
|
import org.hibernate.annotations.common.reflection.java.JavaMetadataProvider;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbSequenceGenerator;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbSequenceGeneratorImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbTableGenerator;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbTableGeneratorImpl;
|
||||||
import org.hibernate.boot.registry.classloading.spi.ClassLoadingException;
|
import org.hibernate.boot.registry.classloading.spi.ClassLoadingException;
|
||||||
import org.hibernate.boot.spi.BootstrapContext;
|
import org.hibernate.boot.spi.BootstrapContext;
|
||||||
import org.hibernate.boot.spi.ClassLoaderAccess;
|
import org.hibernate.boot.spi.ClassLoaderAccess;
|
||||||
|
@ -115,24 +115,24 @@ public class JPAXMLOverriddenMetadataProvider implements MetadataProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defaults.put( EntityListeners.class, entityListeners );
|
defaults.put( EntityListeners.class, entityListeners );
|
||||||
for ( JaxbEntityMappings entityMappings : xmlContext.getAllDocuments() ) {
|
for ( JaxbEntityMappingsImpl entityMappings : xmlContext.getAllDocuments() ) {
|
||||||
List<JaxbSequenceGenerator> jaxbSequenceGenerators = entityMappings.getSequenceGenerators();
|
List<JaxbSequenceGeneratorImpl> jaxbSequenceGenerators = entityMappings.getSequenceGenerators();
|
||||||
List<SequenceGenerator> sequenceGenerators = (List<SequenceGenerator>) defaults.get( SequenceGenerator.class );
|
List<SequenceGenerator> sequenceGenerators = (List<SequenceGenerator>) defaults.get( SequenceGenerator.class );
|
||||||
if ( sequenceGenerators == null ) {
|
if ( sequenceGenerators == null ) {
|
||||||
sequenceGenerators = new ArrayList<>();
|
sequenceGenerators = new ArrayList<>();
|
||||||
defaults.put( SequenceGenerator.class, sequenceGenerators );
|
defaults.put( SequenceGenerator.class, sequenceGenerators );
|
||||||
}
|
}
|
||||||
for ( JaxbSequenceGenerator element : jaxbSequenceGenerators ) {
|
for ( JaxbSequenceGeneratorImpl element : jaxbSequenceGenerators ) {
|
||||||
sequenceGenerators.add( JPAXMLOverriddenAnnotationReader.buildSequenceGeneratorAnnotation( element ) );
|
sequenceGenerators.add( JPAXMLOverriddenAnnotationReader.buildSequenceGeneratorAnnotation( element ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
List<JaxbTableGenerator> jaxbTableGenerators = entityMappings.getTableGenerators();
|
List<JaxbTableGeneratorImpl> jaxbTableGenerators = entityMappings.getTableGenerators();
|
||||||
List<TableGenerator> tableGenerators = (List<TableGenerator>) defaults.get( TableGenerator.class );
|
List<TableGenerator> tableGenerators = (List<TableGenerator>) defaults.get( TableGenerator.class );
|
||||||
if ( tableGenerators == null ) {
|
if ( tableGenerators == null ) {
|
||||||
tableGenerators = new ArrayList<>();
|
tableGenerators = new ArrayList<>();
|
||||||
defaults.put( TableGenerator.class, tableGenerators );
|
defaults.put( TableGenerator.class, tableGenerators );
|
||||||
}
|
}
|
||||||
for ( JaxbTableGenerator element : jaxbTableGenerators ) {
|
for ( JaxbTableGeneratorImpl element : jaxbTableGenerators ) {
|
||||||
tableGenerators.add(
|
tableGenerators.add(
|
||||||
JPAXMLOverriddenAnnotationReader.buildTableGeneratorAnnotation(
|
JPAXMLOverriddenAnnotationReader.buildTableGeneratorAnnotation(
|
||||||
element,
|
element,
|
||||||
|
|
|
@ -11,32 +11,32 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import org.hibernate.boot.jaxb.mapping.AttributesContainer;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbAttributesContainer;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbAttributes;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbAttributesContainerImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbBasic;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbBasicImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbElementCollection;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbElementCollectionImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEmbedded;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddedIdImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEmbeddedId;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEmbeddedImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbId;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbIdImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbManyToMany;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallback;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbManyToOne;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbLifecycleCallbackContainer;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbOneToMany;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbManagedType;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbOneToOne;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbManyToManyImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPostLoad;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbManyToOneImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPostPersist;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbOneToManyImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPostRemove;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbOneToOneImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPostUpdate;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistentAttribute;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPrePersist;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostLoadImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPreRemove;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostPersistImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPreUpdate;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostRemoveImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbTenantId;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPostUpdateImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbTransient;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPrePersistImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbVersion;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPreRemoveImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.LifecycleCallback;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPreUpdateImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.LifecycleCallbackContainer;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbTenantIdImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.ManagedType;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbTransientImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.PersistentAttribute;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbVersionImpl;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,31 +48,31 @@ import org.hibernate.boot.jaxb.mapping.PersistentAttribute;
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public final class PropertyMappingElementCollector {
|
public final class PropertyMappingElementCollector {
|
||||||
public static final Function<PersistentAttribute, String> PERSISTENT_ATTRIBUTE_NAME = PersistentAttribute::getName;
|
public static final Function<JaxbPersistentAttribute, String> PERSISTENT_ATTRIBUTE_NAME = JaxbPersistentAttribute::getName;
|
||||||
public static final Function<JaxbTransient, String> JAXB_TRANSIENT_NAME = JaxbTransient::getName;
|
public static final Function<JaxbTransientImpl, String> JAXB_TRANSIENT_NAME = JaxbTransientImpl::getName;
|
||||||
static final Function<LifecycleCallback, String> LIFECYCLE_CALLBACK_NAME = LifecycleCallback::getMethodName;
|
static final Function<JaxbLifecycleCallback, String> LIFECYCLE_CALLBACK_NAME = JaxbLifecycleCallback::getMethodName;
|
||||||
|
|
||||||
private final String propertyName;
|
private final String propertyName;
|
||||||
|
|
||||||
private List<JaxbId> id;
|
private List<JaxbIdImpl> id;
|
||||||
private List<JaxbEmbeddedId> embeddedId;
|
private List<JaxbEmbeddedIdImpl> embeddedId;
|
||||||
private List<JaxbVersion> version;
|
private List<JaxbVersionImpl> version;
|
||||||
private List<JaxbBasic> basic;
|
private List<JaxbBasicImpl> basic;
|
||||||
private List<JaxbEmbedded> embedded;
|
private List<JaxbEmbeddedImpl> embedded;
|
||||||
private List<JaxbOneToOne> oneToOne;
|
private List<JaxbOneToOneImpl> oneToOne;
|
||||||
private List<JaxbManyToOne> manyToOne;
|
private List<JaxbManyToOneImpl> manyToOne;
|
||||||
private List<JaxbElementCollection> elementCollection;
|
private List<JaxbElementCollectionImpl> elementCollection;
|
||||||
private List<JaxbOneToMany> oneToMany;
|
private List<JaxbOneToManyImpl> oneToMany;
|
||||||
private List<JaxbManyToMany> manyToMany;
|
private List<JaxbManyToManyImpl> manyToMany;
|
||||||
private List<JaxbTransient> _transient;
|
private List<JaxbTransientImpl> _transient;
|
||||||
|
|
||||||
private List<JaxbPrePersist> prePersist;
|
private List<JaxbPrePersistImpl> prePersist;
|
||||||
private List<JaxbPostPersist> postPersist;
|
private List<JaxbPostPersistImpl> postPersist;
|
||||||
private List<JaxbPreRemove> preRemove;
|
private List<JaxbPreRemoveImpl> preRemove;
|
||||||
private List<JaxbPostRemove> postRemove;
|
private List<JaxbPostRemoveImpl> postRemove;
|
||||||
private List<JaxbPreUpdate> preUpdate;
|
private List<JaxbPreUpdateImpl> preUpdate;
|
||||||
private List<JaxbPostUpdate> postUpdate;
|
private List<JaxbPostUpdateImpl> postUpdate;
|
||||||
private List<JaxbPostLoad> postLoad;
|
private List<JaxbPostLoadImpl> postLoad;
|
||||||
|
|
||||||
public PropertyMappingElementCollector(String propertyName) {
|
public PropertyMappingElementCollector(String propertyName) {
|
||||||
this.propertyName = propertyName;
|
this.propertyName = propertyName;
|
||||||
|
@ -97,11 +97,10 @@ public final class PropertyMappingElementCollector {
|
||||||
return list == null ? Collections.emptyList() : list;
|
return list == null ? Collections.emptyList() : list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void collectPersistentAttributesIfMatching(AttributesContainer container) {
|
public void collectPersistentAttributesIfMatching(JaxbAttributesContainer container) {
|
||||||
if ( container instanceof JaxbAttributes ) {
|
if ( container instanceof JaxbAttributesContainerImpl jaxbAttributes ) {
|
||||||
final JaxbAttributes jaxbAttributes = (JaxbAttributes) container;
|
id = collectIfMatching( id, jaxbAttributes.getIdAttributes(), PERSISTENT_ATTRIBUTE_NAME );
|
||||||
id = collectIfMatching( id, jaxbAttributes.getId(), PERSISTENT_ATTRIBUTE_NAME );
|
embeddedId = collectIfMatching( embeddedId, jaxbAttributes.getEmbeddedIdAttribute(), PERSISTENT_ATTRIBUTE_NAME );
|
||||||
embeddedId = collectIfMatching( embeddedId, jaxbAttributes.getEmbeddedId(), PERSISTENT_ATTRIBUTE_NAME );
|
|
||||||
version = collectIfMatching( version, jaxbAttributes.getVersion(), PERSISTENT_ATTRIBUTE_NAME );
|
version = collectIfMatching( version, jaxbAttributes.getVersion(), PERSISTENT_ATTRIBUTE_NAME );
|
||||||
}
|
}
|
||||||
basic = collectIfMatching( basic, container.getBasicAttributes(), 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 );
|
_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 );
|
prePersist = collectIfMatching( prePersist, container.getPrePersist(), LIFECYCLE_CALLBACK_NAME );
|
||||||
postPersist = collectIfMatching( postPersist, container.getPostPersist(), LIFECYCLE_CALLBACK_NAME );
|
postPersist = collectIfMatching( postPersist, container.getPostPersist(), LIFECYCLE_CALLBACK_NAME );
|
||||||
preRemove = collectIfMatching( preRemove, container.getPreRemove(), 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 );
|
postLoad = collectIfMatching( postLoad, container.getPostLoad(), LIFECYCLE_CALLBACK_NAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void collectTenantIdIfMatching(ManagedType managedType) {
|
public void collectTenantIdIfMatching(JaxbManagedType managedType) {
|
||||||
if ( managedType instanceof JaxbEntity ) {
|
if ( managedType instanceof JaxbEntityImpl ) {
|
||||||
JaxbTenantId tenantId = ( (JaxbEntity) managedType ).getTenantId();
|
JaxbTenantIdImpl tenantId = ( (JaxbEntityImpl) managedType ).getTenantId();
|
||||||
basic = collectIfMatching( basic, tenantId, PERSISTENT_ATTRIBUTE_NAME );
|
basic = collectIfMatching( basic, tenantId, PERSISTENT_ATTRIBUTE_NAME );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,75 +150,75 @@ public final class PropertyMappingElementCollector {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbId> getId() {
|
public List<JaxbIdImpl> getId() {
|
||||||
return defaultToEmpty( id );
|
return defaultToEmpty( id );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbEmbeddedId> getEmbeddedId() {
|
public List<JaxbEmbeddedIdImpl> getEmbeddedId() {
|
||||||
return defaultToEmpty( embeddedId );
|
return defaultToEmpty( embeddedId );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbBasic> getBasic() {
|
public List<JaxbBasicImpl> getBasic() {
|
||||||
return defaultToEmpty( basic );
|
return defaultToEmpty( basic );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbVersion> getVersion() {
|
public List<JaxbVersionImpl> getVersion() {
|
||||||
return defaultToEmpty( version );
|
return defaultToEmpty( version );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbManyToOne> getManyToOne() {
|
public List<JaxbManyToOneImpl> getManyToOne() {
|
||||||
return defaultToEmpty( manyToOne );
|
return defaultToEmpty( manyToOne );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbOneToMany> getOneToMany() {
|
public List<JaxbOneToManyImpl> getOneToMany() {
|
||||||
return defaultToEmpty( oneToMany );
|
return defaultToEmpty( oneToMany );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbOneToOne> getOneToOne() {
|
public List<JaxbOneToOneImpl> getOneToOne() {
|
||||||
return defaultToEmpty( oneToOne );
|
return defaultToEmpty( oneToOne );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbManyToMany> getManyToMany() {
|
public List<JaxbManyToManyImpl> getManyToMany() {
|
||||||
return defaultToEmpty( manyToMany );
|
return defaultToEmpty( manyToMany );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbElementCollection> getElementCollection() {
|
public List<JaxbElementCollectionImpl> getElementCollection() {
|
||||||
return defaultToEmpty( elementCollection );
|
return defaultToEmpty( elementCollection );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbEmbedded> getEmbedded() {
|
public List<JaxbEmbeddedImpl> getEmbedded() {
|
||||||
return defaultToEmpty( embedded );
|
return defaultToEmpty( embedded );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbTransient> getTransient() {
|
public List<JaxbTransientImpl> getTransient() {
|
||||||
return defaultToEmpty( _transient );
|
return defaultToEmpty( _transient );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbPrePersist> getPrePersist() {
|
public List<JaxbPrePersistImpl> getPrePersist() {
|
||||||
return defaultToEmpty( prePersist );
|
return defaultToEmpty( prePersist );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbPostPersist> getPostPersist() {
|
public List<JaxbPostPersistImpl> getPostPersist() {
|
||||||
return defaultToEmpty( postPersist );
|
return defaultToEmpty( postPersist );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbPreRemove> getPreRemove() {
|
public List<JaxbPreRemoveImpl> getPreRemove() {
|
||||||
return defaultToEmpty( preRemove );
|
return defaultToEmpty( preRemove );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbPostRemove> getPostRemove() {
|
public List<JaxbPostRemoveImpl> getPostRemove() {
|
||||||
return defaultToEmpty( postRemove );
|
return defaultToEmpty( postRemove );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbPreUpdate> getPreUpdate() {
|
public List<JaxbPreUpdateImpl> getPreUpdate() {
|
||||||
return defaultToEmpty( preUpdate );
|
return defaultToEmpty( preUpdate );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbPostUpdate> getPostUpdate() {
|
public List<JaxbPostUpdateImpl> getPostUpdate() {
|
||||||
return defaultToEmpty( postUpdate );
|
return defaultToEmpty( postUpdate );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbPostLoad> getPostLoad() {
|
public List<JaxbPostLoadImpl> getPostLoad() {
|
||||||
return defaultToEmpty( postLoad );
|
return defaultToEmpty( postLoad );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,15 +14,15 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.hibernate.AnnotationException;
|
import org.hibernate.AnnotationException;
|
||||||
import org.hibernate.boot.internal.ClassmateContext;
|
import org.hibernate.boot.internal.ClassmateContext;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbConverter;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbConverterImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntityListener;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenerImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntityListeners;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenersImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbMappedSuperclass;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbManagedType;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitDefaults;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbMappedSuperclassImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitMetadata;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitDefaultsImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.ManagedType;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitMetadataImpl;
|
||||||
import org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor;
|
import org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor;
|
||||||
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
|
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
|
||||||
import org.hibernate.boot.model.convert.spi.ConverterRegistry;
|
import org.hibernate.boot.model.convert.spi.ConverterRegistry;
|
||||||
|
@ -49,10 +49,10 @@ public class XMLContext implements Serializable {
|
||||||
private final ClassmateContext classmateContext;
|
private final ClassmateContext classmateContext;
|
||||||
|
|
||||||
private Default globalDefaults;
|
private Default globalDefaults;
|
||||||
private final Map<String, ManagedType> managedTypeOverride = new HashMap<>();
|
private final Map<String, JaxbManagedType> managedTypeOverride = new HashMap<>();
|
||||||
private final Map<String, JaxbEntityListener> entityListenerOverride = new HashMap<>();
|
private final Map<String, JaxbEntityListenerImpl> entityListenerOverride = new HashMap<>();
|
||||||
private final Map<String, Default> defaultsOverride = 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 final List<String> defaultEntityListeners = new ArrayList<>();
|
||||||
private boolean hasContext = false;
|
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.
|
* 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;
|
hasContext = true;
|
||||||
|
|
||||||
final List<String> addedClasses = new ArrayList<>();
|
final List<String> addedClasses = new ArrayList<>();
|
||||||
|
|
||||||
//global defaults
|
//global defaults
|
||||||
final JaxbPersistenceUnitMetadata metadata = entityMappings.getPersistenceUnitMetadata();
|
final JaxbPersistenceUnitMetadataImpl metadata = entityMappings.getPersistenceUnitMetadata();
|
||||||
if ( metadata != null ) {
|
if ( metadata != null ) {
|
||||||
if ( globalDefaults == null ) {
|
if ( globalDefaults == null ) {
|
||||||
globalDefaults = new Default();
|
globalDefaults = new Default();
|
||||||
|
@ -84,7 +84,7 @@ public class XMLContext implements Serializable {
|
||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
|
|
||||||
final JaxbPersistenceUnitDefaults defaultElement = metadata.getPersistenceUnitDefaults();
|
final JaxbPersistenceUnitDefaultsImpl defaultElement = metadata.getPersistenceUnitDefaults();
|
||||||
if ( defaultElement != null ) {
|
if ( defaultElement != null ) {
|
||||||
globalDefaults.setSchema( defaultElement.getSchema() );
|
globalDefaults.setSchema( defaultElement.getSchema() );
|
||||||
globalDefaults.setCatalog( defaultElement.getCatalog() );
|
globalDefaults.setCatalog( defaultElement.getCatalog() );
|
||||||
|
@ -119,8 +119,8 @@ public class XMLContext implements Serializable {
|
||||||
return addedClasses;
|
return addedClasses;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addClass(List<? extends ManagedType> managedTypes, String packageName, Default defaults, List<String> addedClasses) {
|
private void addClass(List<? extends JaxbManagedType> managedTypes, String packageName, Default defaults, List<String> addedClasses) {
|
||||||
for (ManagedType element : managedTypes) {
|
for ( JaxbManagedType element : managedTypes) {
|
||||||
String className = buildSafeClassName( element.getClazz(), packageName );
|
String className = buildSafeClassName( element.getClazz(), packageName );
|
||||||
if ( managedTypeOverride.containsKey( className ) ) {
|
if ( managedTypeOverride.containsKey( className ) ) {
|
||||||
//maybe switch it to warn?
|
//maybe switch it to warn?
|
||||||
|
@ -140,20 +140,20 @@ public class XMLContext implements Serializable {
|
||||||
defaultsOverride.put( className, mergedDefaults );
|
defaultsOverride.put( className, mergedDefaults );
|
||||||
|
|
||||||
LOG.debugf( "Adding XML overriding information for %s", className );
|
LOG.debugf( "Adding XML overriding information for %s", className );
|
||||||
if ( element instanceof JaxbEntity ) {
|
if ( element instanceof JaxbEntityImpl ) {
|
||||||
addEntityListenerClasses( ( (JaxbEntity) element ).getEntityListeners(), packageName, addedClasses );
|
addEntityListenerClasses( ( (JaxbEntityImpl) element ).getEntityListeners(), packageName, addedClasses );
|
||||||
}
|
}
|
||||||
else if ( element instanceof JaxbMappedSuperclass ) {
|
else if ( element instanceof JaxbMappedSuperclassImpl ) {
|
||||||
addEntityListenerClasses( ( (JaxbMappedSuperclass) element ).getEntityListeners(), packageName, addedClasses );
|
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<>();
|
List<String> localAddedClasses = new ArrayList<>();
|
||||||
if ( listeners != null ) {
|
if ( listeners != null ) {
|
||||||
List<JaxbEntityListener> elements = listeners.getEntityListener();
|
List<JaxbEntityListenerImpl> elements = listeners.getEntityListener();
|
||||||
for ( JaxbEntityListener listener : elements ) {
|
for ( JaxbEntityListenerImpl listener : elements ) {
|
||||||
String listenerClassName = buildSafeClassName( listener.getClazz(), packageName );
|
String listenerClassName = buildSafeClassName( listener.getClazz(), packageName );
|
||||||
if ( entityListenerOverride.containsKey( listenerClassName ) ) {
|
if ( entityListenerOverride.containsKey( listenerClassName ) ) {
|
||||||
LOG.duplicateListener( listenerClassName );
|
LOG.duplicateListener( listenerClassName );
|
||||||
|
@ -168,8 +168,8 @@ public class XMLContext implements Serializable {
|
||||||
return localAddedClasses;
|
return localAddedClasses;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setLocalAttributeConverterDefinitions(List<JaxbConverter> converterElements, String packageName) {
|
private void setLocalAttributeConverterDefinitions(List<JaxbConverterImpl> converterElements, String packageName) {
|
||||||
for ( JaxbConverter converterElement : converterElements ) {
|
for ( JaxbConverterImpl converterElement : converterElements ) {
|
||||||
final String className = converterElement.getClazz();
|
final String className = converterElement.getClazz();
|
||||||
final boolean autoApply = Boolean.TRUE.equals( converterElement.isAutoApply() );
|
final boolean autoApply = Boolean.TRUE.equals( converterElement.isAutoApply() );
|
||||||
|
|
||||||
|
@ -217,15 +217,15 @@ public class XMLContext implements Serializable {
|
||||||
return xmlDefault;
|
return xmlDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ManagedType getManagedTypeOverride(String className) {
|
public JaxbManagedType getManagedTypeOverride(String className) {
|
||||||
return managedTypeOverride.get( className );
|
return managedTypeOverride.get( className );
|
||||||
}
|
}
|
||||||
|
|
||||||
public JaxbEntityListener getEntityListenerOverride(String className) {
|
public JaxbEntityListenerImpl getEntityListenerOverride(String className) {
|
||||||
return entityListenerOverride.get( className );
|
return entityListenerOverride.get( className );
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<JaxbEntityMappings> getAllDocuments() {
|
public List<JaxbEntityMappingsImpl> getAllDocuments() {
|
||||||
return defaultElements;
|
return defaultElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.hibernate.Internal;
|
import org.hibernate.Internal;
|
||||||
import org.hibernate.boot.MetadataSources;
|
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.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
|
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
|
||||||
import org.hibernate.boot.model.process.spi.ManagedResources;
|
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<Class<?>> annotatedClassReferences = new LinkedHashSet<>();
|
||||||
private final Set<String> annotatedClassNames = new LinkedHashSet<>();
|
private final Set<String> annotatedClassNames = new LinkedHashSet<>();
|
||||||
private final Set<String> annotatedPackageNames = 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;
|
private Map<String, Class<?>> extraQueryImports;
|
||||||
|
|
||||||
public static ManagedResourcesImpl baseline(MetadataSources sources, BootstrapContext bootstrapContext) {
|
public static ManagedResourcesImpl baseline(MetadataSources sources, BootstrapContext bootstrapContext) {
|
||||||
|
@ -71,7 +71,7 @@ public class ManagedResourcesImpl implements ManagedResources {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Binding<BindableMappingDescriptor>> getXmlMappingBindings() {
|
public Collection<Binding<JaxbBindableMappingDescriptor>> getXmlMappingBindings() {
|
||||||
return Collections.unmodifiableList( mappingFileBindings );
|
return Collections.unmodifiableList( mappingFileBindings );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public class ManagedResourcesImpl implements ManagedResources {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Internal
|
@Internal
|
||||||
public void addXmlBinding(Binding<BindableMappingDescriptor> binding) {
|
public void addXmlBinding(Binding<JaxbBindableMappingDescriptor> binding) {
|
||||||
mappingFileBindings.add( binding );
|
mappingFileBindings.add( binding );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ package org.hibernate.boot.model.process.spi;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
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.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.model.convert.spi.ConverterDescriptor;
|
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.
|
* @return The list of bindings for all known XML mapping files.
|
||||||
*/
|
*/
|
||||||
Collection<Binding<BindableMappingDescriptor>> getXmlMappingBindings();
|
Collection<Binding<JaxbBindableMappingDescriptor>> getXmlMappingBindings();
|
||||||
|
|
||||||
Map<String,Class<?>> getExtraQueryImports();
|
Map<String,Class<?>> getExtraQueryImports();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ import org.hibernate.boot.jaxb.Origin;
|
||||||
import org.hibernate.boot.jaxb.SourceType;
|
import org.hibernate.boot.jaxb.SourceType;
|
||||||
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
|
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
|
||||||
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
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.BindableMappingDescriptor;
|
import org.hibernate.boot.jaxb.spi.JaxbBindableMappingDescriptor;
|
||||||
import org.hibernate.boot.jaxb.spi.Binding;
|
import org.hibernate.boot.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.model.TypeContributions;
|
import org.hibernate.boot.model.TypeContributions;
|
||||||
import org.hibernate.boot.model.TypeContributor;
|
import org.hibernate.boot.model.TypeContributor;
|
||||||
|
@ -406,7 +406,7 @@ public class MetadataBuildingProcess {
|
||||||
private final EntityHierarchyBuilder hierarchyBuilder = new EntityHierarchyBuilder();
|
private final EntityHierarchyBuilder hierarchyBuilder = new EntityHierarchyBuilder();
|
||||||
|
|
||||||
private List<Class<?>> additionalEntityClasses;
|
private List<Class<?>> additionalEntityClasses;
|
||||||
private List<JaxbEntityMappings> additionalJaxbMappings;
|
private List<JaxbEntityMappingsImpl> additionalJaxbMappings;
|
||||||
private boolean extraHbmXml = false;
|
private boolean extraHbmXml = false;
|
||||||
|
|
||||||
private String currentContributor;
|
private String currentContributor;
|
||||||
|
@ -437,19 +437,19 @@ public class MetadataBuildingProcess {
|
||||||
@Override
|
@Override
|
||||||
public void contributeBinding(InputStream xmlStream) {
|
public void contributeBinding(InputStream xmlStream) {
|
||||||
final Origin origin = new Origin( SourceType.INPUT_STREAM, null );
|
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 ) {
|
if ( bindingRoot instanceof JaxbHbmHibernateMapping ) {
|
||||||
contributeBinding( (JaxbHbmHibernateMapping) bindingRoot );
|
contributeBinding( (JaxbHbmHibernateMapping) bindingRoot );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
contributeBinding( (JaxbEntityMappings) bindingRoot );
|
contributeBinding( (JaxbEntityMappingsImpl) bindingRoot );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void contributeBinding(JaxbEntityMappings mappingJaxbBinding) {
|
public void contributeBinding(JaxbEntityMappingsImpl mappingJaxbBinding) {
|
||||||
if ( ! options.isXmlMappingEnabled() ) {
|
if ( ! options.isXmlMappingEnabled() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,15 +12,11 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
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.MetadataProviderInjector;
|
||||||
import org.hibernate.annotations.common.reflection.ReflectionManager;
|
import org.hibernate.annotations.common.reflection.ReflectionManager;
|
||||||
import org.hibernate.annotations.common.reflection.XClass;
|
import org.hibernate.annotations.common.reflection.XClass;
|
||||||
import org.hibernate.boot.internal.MetadataBuildingContextRootImpl;
|
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.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.model.convert.spi.ConverterRegistry;
|
import org.hibernate.boot.model.convert.spi.ConverterRegistry;
|
||||||
import org.hibernate.boot.model.internal.AnnotationBinder;
|
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.jandex.IndexView;
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
|
import jakarta.persistence.AttributeConverter;
|
||||||
|
import jakarta.persistence.Converter;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.MappedSuperclass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
|
@ -85,10 +86,10 @@ public class AnnotationMetadataSourceProcessorImpl implements MetadataSourceProc
|
||||||
( (MetadataProviderInjector) reflectionManager ).getMetadataProvider();
|
( (MetadataProviderInjector) reflectionManager ).getMetadataProvider();
|
||||||
for ( Binding<?> xmlBinding : managedResources.getXmlMappingBindings() ) {
|
for ( Binding<?> xmlBinding : managedResources.getXmlMappingBindings() ) {
|
||||||
Object root = xmlBinding.getRoot();
|
Object root = xmlBinding.getRoot();
|
||||||
if ( !( root instanceof JaxbEntityMappings ) ) {
|
if ( !( root instanceof JaxbEntityMappingsImpl ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
final JaxbEntityMappings entityMappings = (JaxbEntityMappings) xmlBinding.getRoot();
|
final JaxbEntityMappingsImpl entityMappings = (JaxbEntityMappingsImpl) xmlBinding.getRoot();
|
||||||
|
|
||||||
final List<String> classNames = jpaMetadataProvider.getXMLContext().addDocument( entityMappings );
|
final List<String> classNames = jpaMetadataProvider.getXMLContext().addDocument( entityMappings );
|
||||||
for ( String className : classNames ) {
|
for ( String className : classNames ) {
|
||||||
|
@ -115,7 +116,7 @@ public class AnnotationMetadataSourceProcessorImpl implements MetadataSourceProc
|
||||||
*/
|
*/
|
||||||
public static void processAdditionalMappings(
|
public static void processAdditionalMappings(
|
||||||
List<Class<?>> additionalClasses,
|
List<Class<?>> additionalClasses,
|
||||||
List<JaxbEntityMappings> additionalJaxbMappings,
|
List<JaxbEntityMappingsImpl> additionalJaxbMappings,
|
||||||
MetadataBuildingContextRootImpl rootMetadataBuildingContext) {
|
MetadataBuildingContextRootImpl rootMetadataBuildingContext) {
|
||||||
final AnnotationMetadataSourceProcessorImpl processor = new AnnotationMetadataSourceProcessorImpl( rootMetadataBuildingContext );
|
final AnnotationMetadataSourceProcessorImpl processor = new AnnotationMetadataSourceProcessorImpl( rootMetadataBuildingContext );
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
|
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.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.model.process.spi.ManagedResources;
|
import org.hibernate.boot.model.process.spi.ManagedResources;
|
||||||
import org.hibernate.boot.model.source.spi.MetadataSourceProcessor;
|
import org.hibernate.boot.model.source.spi.MetadataSourceProcessor;
|
||||||
|
@ -42,14 +42,14 @@ public class HbmMetadataSourceProcessorImpl implements MetadataSourceProcessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public HbmMetadataSourceProcessorImpl(
|
public HbmMetadataSourceProcessorImpl(
|
||||||
Collection<Binding<BindableMappingDescriptor>> xmlBindings,
|
Collection<Binding<JaxbBindableMappingDescriptor>> xmlBindings,
|
||||||
MetadataBuildingContext rootBuildingContext) {
|
MetadataBuildingContext rootBuildingContext) {
|
||||||
this.rootBuildingContext = rootBuildingContext;
|
this.rootBuildingContext = rootBuildingContext;
|
||||||
final EntityHierarchyBuilder hierarchyBuilder = new EntityHierarchyBuilder();
|
final EntityHierarchyBuilder hierarchyBuilder = new EntityHierarchyBuilder();
|
||||||
|
|
||||||
this.mappingDocuments = new ArrayList<>();
|
this.mappingDocuments = new ArrayList<>();
|
||||||
|
|
||||||
for ( Binding<BindableMappingDescriptor> xmlBinding : xmlBindings ) {
|
for ( Binding<JaxbBindableMappingDescriptor> xmlBinding : xmlBindings ) {
|
||||||
if ( !(xmlBinding.getRoot() instanceof JaxbHbmHibernateMapping) ) {
|
if ( !(xmlBinding.getRoot() instanceof JaxbHbmHibernateMapping) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.io.InputStream;
|
||||||
|
|
||||||
import org.hibernate.Incubating;
|
import org.hibernate.Incubating;
|
||||||
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
|
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.AuxiliaryDatabaseObject;
|
||||||
import org.hibernate.boot.model.relational.Sequence;
|
import org.hibernate.boot.model.relational.Sequence;
|
||||||
import org.hibernate.mapping.Table;
|
import org.hibernate.mapping.Table;
|
||||||
|
@ -38,7 +38,7 @@ public interface AdditionalMappingContributions {
|
||||||
* Contribute mappings in the form of {@code hbm.xml} JAXB bindings.
|
* Contribute mappings in the form of {@code hbm.xml} JAXB bindings.
|
||||||
*
|
*
|
||||||
* @deprecated {@code hbm.xml} mapping file support is deprecated. Use
|
* @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.
|
* bindings instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -47,7 +47,7 @@ public interface AdditionalMappingContributions {
|
||||||
/**
|
/**
|
||||||
* Contribute mappings in the form of (extended) {@code orm.xml} JAXB bindings
|
* Contribute mappings in the form of (extended) {@code orm.xml} JAXB bindings
|
||||||
*/
|
*/
|
||||||
void contributeBinding(JaxbEntityMappings mappingJaxbBinding);
|
void contributeBinding(JaxbEntityMappingsImpl mappingJaxbBinding);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contribute a materialized Table
|
* Contribute a materialized Table
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.hibernate.boot.jaxb.internal.FileXmlSource;
|
||||||
import org.hibernate.boot.jaxb.internal.InputStreamXmlSource;
|
import org.hibernate.boot.jaxb.internal.InputStreamXmlSource;
|
||||||
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
||||||
import org.hibernate.boot.jaxb.internal.UrlXmlSource;
|
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.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
||||||
import org.hibernate.service.ServiceRegistry;
|
import org.hibernate.service.ServiceRegistry;
|
||||||
|
@ -57,7 +57,7 @@ public class XmlMappingBinderAccess {
|
||||||
/**
|
/**
|
||||||
* Create a {@linkplain Binding binding} from a named URL resource
|
* 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 );
|
LOG.tracef( "reading mappings from resource : %s", resource );
|
||||||
|
|
||||||
final Origin origin = new Origin( SourceType.RESOURCE, 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
|
* 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() );
|
final Origin origin = new Origin( SourceType.FILE, file.getPath() );
|
||||||
LOG.tracef( "reading mappings from file : %s", origin.getName() );
|
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
|
* 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() );
|
LOG.tracef( "reading mappings from InputStreamAccess : %s", xmlInputStreamAccess.getStreamName() );
|
||||||
|
|
||||||
final Origin origin = new Origin( SourceType.INPUT_STREAM, 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
|
* 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" );
|
LOG.trace( "reading mappings from InputStream" );
|
||||||
final Origin origin = new Origin( SourceType.INPUT_STREAM, null );
|
final Origin origin = new Origin( SourceType.INPUT_STREAM, null );
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
|
@ -120,7 +120,7 @@ public class XmlMappingBinderAccess {
|
||||||
/**
|
/**
|
||||||
* Create a {@linkplain Binding binding} from a URL
|
* 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();
|
final String urlExternalForm = url.toExternalForm();
|
||||||
LOG.debugf( "Reading mapping document from URL : %s", urlExternalForm );
|
LOG.debugf( "Reading mapping document from URL : %s", urlExternalForm );
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
|
@ -33,7 +33,7 @@ import org.hibernate.boot.cfgxml.spi.LoadedConfig;
|
||||||
import org.hibernate.boot.cfgxml.spi.MappingReference;
|
import org.hibernate.boot.cfgxml.spi.MappingReference;
|
||||||
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
|
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
|
||||||
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmRootEntityType;
|
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.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.model.TypeContributor;
|
import org.hibernate.boot.model.TypeContributor;
|
||||||
import org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor;
|
import org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor;
|
||||||
|
@ -351,8 +351,8 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil
|
||||||
if ( classLoader == null ) {
|
if ( classLoader == null ) {
|
||||||
throw persistenceException( "Enhancement requires a temp class loader, but none was given." );
|
throw persistenceException( "Enhancement requires a temp class loader, but none was given." );
|
||||||
}
|
}
|
||||||
for ( Binding<BindableMappingDescriptor> binding : metadataSources.getXmlBindings() ) {
|
for ( Binding<JaxbBindableMappingDescriptor> binding : metadataSources.getXmlBindings() ) {
|
||||||
final BindableMappingDescriptor root = binding.getRoot();
|
final JaxbBindableMappingDescriptor root = binding.getRoot();
|
||||||
if ( root instanceof JaxbHbmHibernateMapping ) {
|
if ( root instanceof JaxbHbmHibernateMapping ) {
|
||||||
final JaxbHbmHibernateMapping hibernateMapping = (JaxbHbmHibernateMapping) root;
|
final JaxbHbmHibernateMapping hibernateMapping = (JaxbHbmHibernateMapping) root;
|
||||||
final String packageName = hibernateMapping.getPackage();
|
final String packageName = hibernateMapping.getPackage();
|
||||||
|
|
|
@ -18,7 +18,6 @@ import org.hibernate.Filter;
|
||||||
import org.hibernate.Incubating;
|
import org.hibernate.Incubating;
|
||||||
import org.hibernate.Internal;
|
import org.hibernate.Internal;
|
||||||
import org.hibernate.annotations.ConcreteProxy;
|
import org.hibernate.annotations.ConcreteProxy;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
|
|
||||||
import org.hibernate.engine.OptimisticLockStyle;
|
import org.hibernate.engine.OptimisticLockStyle;
|
||||||
import org.hibernate.engine.spi.LoadQueryInfluencers;
|
import org.hibernate.engine.spi.LoadQueryInfluencers;
|
||||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||||
|
@ -66,7 +65,7 @@ public interface EntityMappingType
|
||||||
* <p/>
|
* <p/>
|
||||||
* For most entities, this will be the fully-qualified name
|
* For most entities, this will be the fully-qualified name
|
||||||
* of the entity class. The alternative is an explicit
|
* 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
|
* @apiNote Different from {@link Entity#name()}, which is just a glorified
|
||||||
* SQM "import" name
|
* SQM "import" name
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
~ Hibernate, Relational Persistence for Idiomatic Java
|
~ Hibernate, Relational Persistence for Idiomatic Java
|
||||||
~
|
~
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -85,7 +85,7 @@
|
||||||
|
|
||||||
|
|
||||||
<jaxb:bindings node="//xsd:element[@name='hibernate-mapping']/xsd:complexType">
|
<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>
|
||||||
|
|
||||||
<jaxb:bindings node="//xsd:complexType[@name='ToolingHintContainer']">
|
<jaxb:bindings node="//xsd:complexType[@name='ToolingHintContainer']">
|
||||||
|
|
|
@ -6,19 +6,19 @@
|
||||||
extensionBindingPrefixes="inheritance"
|
extensionBindingPrefixes="inheritance"
|
||||||
version="3.0">
|
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>
|
<schemaBindings>
|
||||||
<package name="org.hibernate.boot.jaxb.mapping" />
|
<package name="org.hibernate.boot.jaxb.mapping.spi" />
|
||||||
<nameXmlTransform>
|
<nameXmlTransform>
|
||||||
<typeName prefix="Jaxb" />
|
<typeName prefix="Jaxb" suffix="Impl"/>
|
||||||
<elementName prefix="Jaxb" />
|
<elementName prefix="Jaxb" suffix="Impl"/>
|
||||||
<modelGroupName prefix="Jaxb" />
|
<modelGroupName prefix="Jaxb" suffix="Impl"/>
|
||||||
<anonymousTypeName prefix="Jaxb" />
|
<anonymousTypeName prefix="Jaxb" suffix="Impl"/>
|
||||||
</nameXmlTransform>
|
</nameXmlTransform>
|
||||||
</schemaBindings>
|
</schemaBindings>
|
||||||
|
|
||||||
<bindings node="//xsd:element[@name='entity-mappings']/xsd:complexType">
|
<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']">
|
<bindings node=".//xsd:element[@name='filter-def']">
|
||||||
<property name="filterDefinitions"/>
|
<property name="filterDefinitions"/>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<bindings node=".//xsd:element[@name='fetch-profile']">
|
<bindings node=".//xsd:element[@name='fetch-profile']">
|
||||||
<property name="fetchProfiles"/>
|
<property name="fetchProfiles"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='identifier-generator']">
|
<bindings node=".//xsd:element[@name='generic-generator']">
|
||||||
<property name="genericGenerators"/>
|
<property name="genericGenerators"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='sequence-generator']">
|
<bindings node=".//xsd:element[@name='sequence-generator']">
|
||||||
|
@ -95,19 +95,78 @@
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='entity']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='embeddable']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='mapped-superclass']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='attributes']">
|
<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']">
|
<bindings node=".//xsd:element[@name='basic']">
|
||||||
<property name="basicAttributes"/>
|
<property name="basicAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
@ -121,7 +180,7 @@
|
||||||
<property name="manyToOneAttributes"/>
|
<property name="manyToOneAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='any']">
|
<bindings node=".//xsd:element[@name='any']">
|
||||||
<property name="discriminatedAssociations"/>
|
<property name="anyMappingAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='element-collection']">
|
<bindings node=".//xsd:element[@name='element-collection']">
|
||||||
<property name="elementCollectionAttributes"/>
|
<property name="elementCollectionAttributes"/>
|
||||||
|
@ -133,14 +192,16 @@
|
||||||
<property name="manyToManyAttributes"/>
|
<property name="manyToManyAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='many-to-any']">
|
<bindings node=".//xsd:element[@name='many-to-any']">
|
||||||
<property name="pluralDiscriminatedAssociations"/>
|
<property name="pluralAnyMappingAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='transient']">
|
<bindings node=".//xsd:element[@name='transient']">
|
||||||
<property name="transients"/>
|
<property name="transients"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='embeddable-attributes']">
|
<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']">
|
<bindings node=".//xsd:element[@name='basic']">
|
||||||
<property name="basicAttributes"/>
|
<property name="basicAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
@ -154,7 +215,7 @@
|
||||||
<property name="manyToOneAttributes"/>
|
<property name="manyToOneAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='any']">
|
<bindings node=".//xsd:element[@name='any']">
|
||||||
<property name="discriminatedAssociations"/>
|
<property name="anyMappingAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='element-collection']">
|
<bindings node=".//xsd:element[@name='element-collection']">
|
||||||
<property name="elementCollectionAttributes"/>
|
<property name="elementCollectionAttributes"/>
|
||||||
|
@ -166,7 +227,7 @@
|
||||||
<property name="manyToManyAttributes"/>
|
<property name="manyToManyAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='many-to-any']">
|
<bindings node=".//xsd:element[@name='many-to-any']">
|
||||||
<property name="pluralDiscriminatedAssociations"/>
|
<property name="pluralAnyMappingAttributes"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
<bindings node=".//xsd:element[@name='transient']">
|
<bindings node=".//xsd:element[@name='transient']">
|
||||||
<property name="transients"/>
|
<property name="transients"/>
|
||||||
|
@ -174,94 +235,182 @@
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='id']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='embedded-id']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='version']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='basic']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='embedded']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='one-to-one']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='many-to-one']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='hbm-any-mapping']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='element-collection']">
|
<bindings node="//xsd:complexType[@name='element-collection']">
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.CollectionAttribute</inheritance:implements>
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='one-to-many']">
|
<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.spi.JaxbPluralAttribute</inheritance:implements>
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.AssociationAttribute</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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='many-to-many']">
|
<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.spi.JaxbPluralAttribute</inheritance:implements>
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.AssociationAttribute</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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='hbm-many-to-any']">
|
<bindings node="//xsd:complexType[@name='hbm-many-to-any']">
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatedAssociation</inheritance:implements>
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='hbm-any-discriminator']">
|
<bindings node="//xsd:complexType[@name='any-discriminator']">
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatedAssociation.Discriminator</inheritance:implements>
|
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping.Discriminator</inheritance:implements>
|
||||||
<bindings node=".//xsd:element[@name='mapping']">
|
<bindings node=".//xsd:element[@name='mapping']">
|
||||||
<property name="valueMappings"/>
|
<property name="valueMappings"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='hbm-any-discriminator-value-mapping']">
|
<bindings node="//xsd:complexType[@name='any-discriminator-value-mapping']">
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatorMapping</inheritance:implements>
|
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbDiscriminatorMapping</inheritance:implements>
|
||||||
<property name="correspondingEntityName"/>
|
<property name="correspondingEntityName"/>
|
||||||
<bindings node=".//xsd:attribute[@name='value']">
|
<bindings node=".//xsd:attribute[@name='value']">
|
||||||
<property name="discriminatorValue"/>
|
<property name="discriminatorValue"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='hbm-any-key']">
|
<bindings node="//xsd:complexType[@name='any-key']">
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.DiscriminatedAssociation.Key</inheritance:implements>
|
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping.Key</inheritance:implements>
|
||||||
<bindings node=".//xsd:element[@name='column']">
|
<bindings node=".//xsd:element[@name='column']">
|
||||||
<property name="columns"/>
|
<property name="columns"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='secondary-table']">
|
<bindings node="//xsd:complexType[@name='natural-id']">
|
||||||
<inheritance:implements>org.hibernate.boot.jaxb.mapping.SchemaAware</inheritance:implements>
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='table']">
|
<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>
|
||||||
|
|
||||||
|
<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']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='collection-table']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='table-generator']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='sequence-generator']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='database-object']">
|
<bindings node="//xsd:complexType[@name='database-object']">
|
||||||
<bindings node=".//xsd:element[@name='dialect-scope']">
|
<bindings node=".//xsd:element[@name='dialect-scope']">
|
||||||
|
@ -269,38 +418,70 @@
|
||||||
</bindings>
|
</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']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='pre-persist']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='pre-remove']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='pre-update']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='post-load']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='post-remove']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='post-update']">
|
<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>
|
||||||
<bindings node="//xsd:complexType[@name='post-persist']">
|
<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>
|
||||||
|
|
||||||
<bindings node="//xsd:complexType[@name='named-native-query']">
|
<bindings node="//xsd:complexType[@name='named-native-query']">
|
||||||
<bindings node=".//xsd:element[@name='synchronize']">
|
<bindings node=".//xsd:element[@name='synchronize']">
|
||||||
<property name="synchronizations"/>
|
<property name="synchronizations"/>
|
||||||
</bindings>
|
</bindings>
|
||||||
|
<bindings node=".//xsd:element[@name='hint']">
|
||||||
|
<property name="hints"/>
|
||||||
|
</bindings>
|
||||||
</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>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -311,122 +492,128 @@
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='access-type']">
|
<bindings node="//xsd:simpleType[@name='access-type']">
|
||||||
<javaType name="jakarta.persistence.AccessType"
|
<javaType name="jakarta.persistence.AccessType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.AccessTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.AccessTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.AccessTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.AccessTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='cache-access-type']">
|
<bindings node="//xsd:simpleType[@name='cache-access-type']">
|
||||||
<javaType name="org.hibernate.cache.spi.access.AccessType"
|
<javaType name="org.hibernate.cache.spi.access.AccessType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheAccessTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.CacheAccessTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheAccessTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.CacheAccessTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='hbm-cache-mode-type']">
|
<bindings node="//xsd:simpleType[@name='hbm-cache-mode-type']">
|
||||||
<javaType name="org.hibernate.CacheMode"
|
<javaType name="org.hibernate.CacheMode"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheModeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.CacheModeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.CacheModeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.CacheModeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='discriminator-type']">
|
<bindings node="//xsd:simpleType[@name='discriminator-type']">
|
||||||
<javaType name="jakarta.persistence.DiscriminatorType"
|
<javaType name="jakarta.persistence.DiscriminatorType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.DiscriminatorTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.DiscriminatorTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.DiscriminatorTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.DiscriminatorTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='enum-type']">
|
<bindings node="//xsd:simpleType[@name='enum-type']">
|
||||||
<javaType name="jakarta.persistence.EnumType"
|
<javaType name="jakarta.persistence.EnumType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.EnumTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.EnumTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.EnumTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.EnumTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='fetch-type']">
|
<bindings node="//xsd:simpleType[@name='fetch-type']">
|
||||||
<javaType name="jakarta.persistence.FetchType"
|
<javaType name="jakarta.persistence.FetchType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.FetchTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.FetchTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.FetchTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.FetchTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='flush-mode-type']">
|
<bindings node="//xsd:simpleType[@name='flush-mode-type']">
|
||||||
<javaType name="org.hibernate.FlushMode"
|
<javaType name="org.hibernate.FlushMode"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.FlushModeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.FlushModeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.FlushModeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.FlushModeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='lock-mode-type']">
|
<bindings node="//xsd:simpleType[@name='lock-mode-type']">
|
||||||
<javaType name="jakarta.persistence.LockModeType"
|
<javaType name="jakarta.persistence.LockModeType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.LockModeTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.LockModeTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.LockModeTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.LockModeTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='optimistic-locking-type']">
|
<bindings node="//xsd:simpleType[@name='optimistic-locking-type']">
|
||||||
<javaType name="org.hibernate.engine.OptimisticLockStyle"
|
<javaType name="org.hibernate.engine.OptimisticLockStyle"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.OptimisticLockStyleMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.OptimisticLockStyleMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.OptimisticLockStyleMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.OptimisticLockStyleMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='parameter-mode']">
|
<bindings node="//xsd:simpleType[@name='parameter-mode']">
|
||||||
<javaType name="jakarta.persistence.ParameterMode"
|
<javaType name="jakarta.persistence.ParameterMode"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.ParameterModeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.ParameterModeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.ParameterModeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.ParameterModeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='custom-sql-check-type']">
|
<bindings node="//xsd:simpleType[@name='custom-sql-result-check-type']">
|
||||||
<javaType name="org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle"
|
<javaType name="org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.ResultCheckStyleMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.ResultCheckStyleMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.ResultCheckStyleMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.ResultCheckStyleMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='on-delete-type']">
|
<bindings node="//xsd:simpleType[@name='on-delete-type']">
|
||||||
<javaType name="org.hibernate.annotations.OnDeleteAction"
|
<javaType name="org.hibernate.annotations.OnDeleteAction"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.OnDeleteActionMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.OnDeleteActionMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.OnDeleteActionMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.OnDeleteActionMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='polymorphism-type']">
|
<bindings node="//xsd:simpleType[@name='polymorphism-type']">
|
||||||
<javaType name="org.hibernate.annotations.PolymorphismType"
|
<javaType name="org.hibernate.annotations.PolymorphismType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.PolymorphismTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.PolymorphismTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.PolymorphismTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.PolymorphismTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='temporal-type']">
|
<bindings node="//xsd:simpleType[@name='temporal-type']">
|
||||||
<javaType name="jakarta.persistence.TemporalType"
|
<javaType name="jakarta.persistence.TemporalType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.TemporalTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.TemporalTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.TemporalTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.TemporalTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='inheritance-type']">
|
<bindings node="//xsd:simpleType[@name='inheritance-type']">
|
||||||
<javaType name="jakarta.persistence.InheritanceType"
|
<javaType name="jakarta.persistence.InheritanceType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.InheritanceTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.InheritanceTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.InheritanceTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.InheritanceTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='generation-type']">
|
<bindings node="//xsd:simpleType[@name='generation-type']">
|
||||||
<javaType name="jakarta.persistence.GenerationType"
|
<javaType name="jakarta.persistence.GenerationType"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTypeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTypeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTypeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTypeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='basic-generation-timing-type']">
|
<bindings node="//xsd:simpleType[@name='basic-generation-timing-type']">
|
||||||
<javaType name="org.hibernate.tuple.GenerationTiming"
|
<javaType name="org.hibernate.tuple.GenerationTiming"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTimingMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTimingMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.GenerationTimingMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.GenerationTimingMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='constraint-mode']">
|
<bindings node="//xsd:simpleType[@name='constraint-mode']">
|
||||||
<javaType name="jakarta.persistence.ConstraintMode"
|
<javaType name="jakarta.persistence.ConstraintMode"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.ConstraintModeMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.ConstraintModeMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.ConstraintModeMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.ConstraintModeMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='collection-classifications']">
|
<bindings node="//xsd:simpleType[@name='collection-classification-enum']">
|
||||||
<javaType name="org.hibernate.metamodel.CollectionClassification"
|
<javaType name="org.hibernate.metamodel.CollectionClassification"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.CollectionClassificationMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.CollectionClassificationMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.CollectionClassificationMarshalling.toXml" />
|
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>
|
||||||
|
|
||||||
<bindings node="//xsd:simpleType[@name='uuid-generator-style']">
|
<bindings node="//xsd:simpleType[@name='uuid-generator-style']">
|
||||||
<javaType name="org.hibernate.annotations.UuidGenerator.Style"
|
<javaType name="org.hibernate.annotations.UuidGenerator.Style"
|
||||||
parseMethod="org.hibernate.boot.jaxb.mapping.marshall.UuidGeneratorStyleMarshalling.fromXml"
|
parseMethod="org.hibernate.boot.jaxb.mapping.internal.UuidGeneratorStyleMarshalling.fromXml"
|
||||||
printMethod="org.hibernate.boot.jaxb.mapping.marshall.UuidGeneratorStyleMarshalling.toXml" />
|
printMethod="org.hibernate.boot.jaxb.mapping.internal.UuidGeneratorStyleMarshalling.toXml" />
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
|
@ -11,7 +11,7 @@ import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import org.hibernate.annotations.Columns;
|
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.JPAXMLOverriddenAnnotationReader;
|
||||||
import org.hibernate.boot.model.internal.XMLContext;
|
import org.hibernate.boot.model.internal.XMLContext;
|
||||||
import org.hibernate.orm.test.internal.util.xml.XMLMappingHelper;
|
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 {
|
private XMLContext buildContext(String ormfile) throws IOException {
|
||||||
XMLMappingHelper xmlHelper = new XMLMappingHelper();
|
XMLMappingHelper xmlHelper = new XMLMappingHelper();
|
||||||
JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings( ormfile );
|
JaxbEntityMappingsImpl mappings = xmlHelper.readOrmXmlMappings( ormfile );
|
||||||
XMLContext context = new XMLContext( bootstrapContext );
|
XMLContext context = new XMLContext( bootstrapContext );
|
||||||
context.addDocument( mappings );
|
context.addDocument( mappings );
|
||||||
return context;
|
return context;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.orm.test.annotations.reflection;
|
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.boot.model.internal.XMLContext;
|
||||||
import org.hibernate.orm.test.internal.util.xml.XMLMappingHelper;
|
import org.hibernate.orm.test.internal.util.xml.XMLMappingHelper;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public class XMLContextTest {
|
||||||
XMLMappingHelper xmlHelper = new XMLMappingHelper();
|
XMLMappingHelper xmlHelper = new XMLMappingHelper();
|
||||||
final XMLContext context = new XMLContext( bootstrapContext );
|
final XMLContext context = new XMLContext( bootstrapContext );
|
||||||
|
|
||||||
JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings(
|
JaxbEntityMappingsImpl mappings = xmlHelper.readOrmXmlMappings(
|
||||||
"org/hibernate/orm/test/annotations/reflection/orm.xml" );
|
"org/hibernate/orm/test/annotations/reflection/orm.xml" );
|
||||||
context.addDocument( mappings );
|
context.addDocument( mappings );
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.io.InputStream;
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.lang.reflect.AnnotatedElement;
|
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.JPAXMLOverriddenAnnotationReader;
|
||||||
import org.hibernate.boot.model.internal.XMLContext;
|
import org.hibernate.boot.model.internal.XMLContext;
|
||||||
import org.hibernate.orm.test.internal.util.xml.XMLMappingHelper;
|
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 {
|
protected XMLContext getContext(InputStream is, String resourceName) throws Exception {
|
||||||
XMLMappingHelper xmlHelper = new XMLMappingHelper();
|
XMLMappingHelper xmlHelper = new XMLMappingHelper();
|
||||||
JaxbEntityMappings mappings = xmlHelper.readOrmXmlMappings( is, resourceName );
|
JaxbEntityMappingsImpl mappings = xmlHelper.readOrmXmlMappings( is, resourceName );
|
||||||
XMLContext context = new XMLContext( bootstrapContext );
|
XMLContext context = new XMLContext( bootstrapContext );
|
||||||
context.addDocument( mappings );
|
context.addDocument( mappings );
|
||||||
return context;
|
return context;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import javax.xml.stream.XMLEventFactory;
|
||||||
import javax.xml.stream.XMLEventReader;
|
import javax.xml.stream.XMLEventReader;
|
||||||
|
|
||||||
import org.hibernate.boot.jaxb.internal.stax.MappingEventReader;
|
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.registry.classloading.spi.ClassLoaderService;
|
||||||
import org.hibernate.boot.xsd.MappingXsdSupport;
|
import org.hibernate.boot.xsd.MappingXsdSupport;
|
||||||
import org.hibernate.orm.test.boot.jaxb.JaxbHelper;
|
import org.hibernate.orm.test.boot.jaxb.JaxbHelper;
|
||||||
|
@ -46,8 +46,8 @@ public class BasicMappingJaxbTests {
|
||||||
final XMLEventFactory xmlEventFactory = XMLEventFactory.newInstance();
|
final XMLEventFactory xmlEventFactory = XMLEventFactory.newInstance();
|
||||||
final XMLEventReader reader = new MappingEventReader( staxEventReader, xmlEventFactory );
|
final XMLEventReader reader = new MappingEventReader( staxEventReader, xmlEventFactory );
|
||||||
try {
|
try {
|
||||||
final JAXBContext jaxbCtx = JAXBContext.newInstance( org.hibernate.boot.jaxb.mapping.JaxbEntityMappings.class );
|
final JAXBContext jaxbCtx = JAXBContext.newInstance( JaxbEntityMappingsImpl.class );
|
||||||
final JaxbEntityMappings entityMappings = JaxbHelper.VALIDATING.jaxb( reader, MappingXsdSupport._310.getSchema(), jaxbCtx );
|
final JaxbEntityMappingsImpl entityMappings = JaxbHelper.VALIDATING.jaxb( reader, MappingXsdSupport._310.getSchema(), jaxbCtx );
|
||||||
assertThat( entityMappings ).isNotNull();
|
assertThat( entityMappings ).isNotNull();
|
||||||
assertThat( entityMappings.getEntities() ).hasSize( 1 );
|
assertThat( entityMappings.getEntities() ).hasSize( 1 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.HbmXmlTransformer;
|
||||||
import org.hibernate.boot.jaxb.hbm.transform.UnsupportedFeatureHandling;
|
import org.hibernate.boot.jaxb.hbm.transform.UnsupportedFeatureHandling;
|
||||||
import org.hibernate.boot.jaxb.internal.stax.HbmEventReader;
|
import org.hibernate.boot.jaxb.internal.stax.HbmEventReader;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
|
||||||
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.registry.classloading.spi.ClassLoaderService;
|
||||||
import org.hibernate.boot.xsd.MappingXsdSupport;
|
import org.hibernate.boot.xsd.MappingXsdSupport;
|
||||||
import org.hibernate.orm.test.boot.jaxb.JaxbHelper;
|
import org.hibernate.orm.test.boot.jaxb.JaxbHelper;
|
||||||
|
@ -56,7 +56,7 @@ public class HbmTransformationJaxbTests {
|
||||||
assertThat( hbmMapping ).isNotNull();
|
assertThat( hbmMapping ).isNotNull();
|
||||||
assertThat( hbmMapping.getClazz() ).hasSize( 1 );
|
assertThat( hbmMapping.getClazz() ).hasSize( 1 );
|
||||||
|
|
||||||
final JaxbEntityMappings transformed = HbmXmlTransformer.transform(
|
final JaxbEntityMappingsImpl transformed = HbmXmlTransformer.transform(
|
||||||
hbmMapping,
|
hbmMapping,
|
||||||
new Origin( SourceType.RESOURCE, resourceName ),
|
new Origin( SourceType.RESOURCE, resourceName ),
|
||||||
() -> UnsupportedFeatureHandling.ERROR
|
() -> UnsupportedFeatureHandling.ERROR
|
||||||
|
@ -66,19 +66,19 @@ public class HbmTransformationJaxbTests {
|
||||||
assertThat( transformed.getEntities() ).hasSize( 1 );
|
assertThat( transformed.getEntities() ).hasSize( 1 );
|
||||||
assertThat( transformed.getPackage() ).isEqualTo( "org.hibernate.orm.test.boot.jaxb.mapping" );
|
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.getName() ).isNull();
|
||||||
assertThat( ormEntity.getClazz() ).isEqualTo( "SimpleEntity" );
|
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().getBasicAttributes() ).hasSize( 1 );
|
||||||
assertThat( ormEntity.getAttributes().getEmbeddedAttributes() ).isEmpty();
|
assertThat( ormEntity.getAttributes().getEmbeddedAttributes() ).isEmpty();
|
||||||
assertThat( ormEntity.getAttributes().getOneToOneAttributes() ).isEmpty();
|
assertThat( ormEntity.getAttributes().getOneToOneAttributes() ).isEmpty();
|
||||||
assertThat( ormEntity.getAttributes().getManyToOneAttributes() ).isEmpty();
|
assertThat( ormEntity.getAttributes().getManyToOneAttributes() ).isEmpty();
|
||||||
assertThat( ormEntity.getAttributes().getDiscriminatedAssociations() ).isEmpty();
|
assertThat( ormEntity.getAttributes().getAnyMappingAttributes() ).isEmpty();
|
||||||
assertThat( ormEntity.getAttributes().getOneToManyAttributes() ).isEmpty();
|
assertThat( ormEntity.getAttributes().getOneToManyAttributes() ).isEmpty();
|
||||||
assertThat( ormEntity.getAttributes().getManyToManyAttributes() ).isEmpty();
|
assertThat( ormEntity.getAttributes().getManyToManyAttributes() ).isEmpty();
|
||||||
assertThat( ormEntity.getAttributes().getPluralDiscriminatedAssociations() ).isEmpty();
|
assertThat( ormEntity.getAttributes().getPluralAnyMappingAttributes() ).isEmpty();
|
||||||
}
|
}
|
||||||
catch (JAXBException e) {
|
catch (JAXBException e) {
|
||||||
throw new RuntimeException( "Error during JAXB processing", e );
|
throw new RuntimeException( "Error during JAXB processing", e );
|
||||||
|
|
|
@ -9,8 +9,8 @@ package org.hibernate.orm.test.boot.jaxb.mapping;
|
||||||
import org.hibernate.boot.jaxb.Origin;
|
import org.hibernate.boot.jaxb.Origin;
|
||||||
import org.hibernate.boot.jaxb.SourceType;
|
import org.hibernate.boot.jaxb.SourceType;
|
||||||
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
|
||||||
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.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
||||||
|
|
||||||
|
@ -30,17 +30,17 @@ public class PartialJaxbTests {
|
||||||
final MappingBinder mappingBinder = new MappingBinder( scope.getRegistry() );
|
final MappingBinder mappingBinder = new MappingBinder( scope.getRegistry() );
|
||||||
scope.withService( ClassLoaderService.class, (cls) -> {
|
scope.withService( ClassLoaderService.class, (cls) -> {
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
final Binding<JaxbEntityMappings> binding = mappingBinder.bind(
|
final Binding<JaxbEntityMappingsImpl> binding = mappingBinder.bind(
|
||||||
cls.locateResourceStream( "xml/jaxb/mapping/partial/caching.xml" ),
|
cls.locateResourceStream( "xml/jaxb/mapping/partial/caching.xml" ),
|
||||||
new Origin( SourceType.RESOURCE, "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 ).isNotNull();
|
||||||
assertThat( entityMappings.getEntities() ).hasSize( 1 );
|
assertThat( entityMappings.getEntities() ).hasSize( 1 );
|
||||||
assertThat( entityMappings.getPackage() ).isEqualTo( "org.hibernate.orm.test.boot.jaxb.mapping" );
|
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.getName() ).isNull();
|
||||||
assertThat( ormEntity.getClazz() ).isEqualTo( "SimpleEntity" );
|
assertThat( ormEntity.getClazz() ).isEqualTo( "SimpleEntity" );
|
||||||
assertThat( ormEntity.isCacheable() ).isTrue();
|
assertThat( ormEntity.isCacheable() ).isTrue();
|
||||||
|
|
|
@ -12,7 +12,7 @@ import java.io.InputStream;
|
||||||
import org.hibernate.boot.jaxb.Origin;
|
import org.hibernate.boot.jaxb.Origin;
|
||||||
import org.hibernate.boot.jaxb.SourceType;
|
import org.hibernate.boot.jaxb.SourceType;
|
||||||
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
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.boot.jaxb.spi.Binding;
|
||||||
|
|
||||||
import org.hibernate.testing.boot.ClassLoaderServiceTestingImpl;
|
import org.hibernate.testing.boot.ClassLoaderServiceTestingImpl;
|
||||||
|
@ -28,17 +28,17 @@ public final class XMLMappingHelper {
|
||||||
binder = new MappingBinder( ClassLoaderServiceTestingImpl.INSTANCE, MappingBinder.VALIDATING );
|
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 ) ) {
|
try ( InputStream is = ClassLoaderServiceTestingImpl.INSTANCE.locateResourceStream( name ) ) {
|
||||||
return readOrmXmlMappings( is, name );
|
return readOrmXmlMappings( is, name );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public JaxbEntityMappings readOrmXmlMappings(InputStream is, String name) {
|
public JaxbEntityMappingsImpl readOrmXmlMappings(InputStream is, String name) {
|
||||||
try {
|
try {
|
||||||
Assert.assertNotNull( "Resource not found: " + name, is );
|
Assert.assertNotNull( "Resource not found: " + name, is );
|
||||||
Binding<?> binding = binder.bind( is, new Origin( SourceType.JAR, name ) );
|
Binding<?> binding = binder.bind( is, new Origin( SourceType.JAR, name ) );
|
||||||
return (JaxbEntityMappings) binding.getRoot();
|
return (JaxbEntityMappingsImpl) binding.getRoot();
|
||||||
}
|
}
|
||||||
catch (RuntimeException e) {
|
catch (RuntimeException e) {
|
||||||
throw new IllegalStateException( "Could not parse orm.xml mapping '" + name + "': " + e.getMessage(), e );
|
throw new IllegalStateException( "Could not parse orm.xml mapping '" + name + "': " + e.getMessage(), e );
|
||||||
|
|
|
@ -16,11 +16,11 @@ import javax.xml.transform.stream.StreamSource;
|
||||||
import org.hibernate.boot.jaxb.Origin;
|
import org.hibernate.boot.jaxb.Origin;
|
||||||
import org.hibernate.boot.jaxb.SourceType;
|
import org.hibernate.boot.jaxb.SourceType;
|
||||||
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
import org.hibernate.boot.jaxb.internal.MappingBinder;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntity;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntityListener;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListenerImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbEntityMappings;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbEntityMappingsImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitDefaults;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitDefaultsImpl;
|
||||||
import org.hibernate.boot.jaxb.mapping.JaxbPersistenceUnitMetadata;
|
import org.hibernate.boot.jaxb.mapping.spi.JaxbPersistenceUnitMetadataImpl;
|
||||||
import org.hibernate.boot.jaxb.spi.Binding;
|
import org.hibernate.boot.jaxb.spi.Binding;
|
||||||
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
|
||||||
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
|
import org.hibernate.jpa.boot.internal.ParsedPersistenceXmlDescriptor;
|
||||||
|
@ -43,19 +43,19 @@ public class JakartaXmlSmokeTests {
|
||||||
final MappingBinder mappingBinder = new MappingBinder( cls, MappingBinder.VALIDATING );
|
final MappingBinder mappingBinder = new MappingBinder( cls, MappingBinder.VALIDATING );
|
||||||
final InputStream inputStream = cls.locateResourceStream( "xml/jakarta/simple/orm.xml" );
|
final InputStream inputStream = cls.locateResourceStream( "xml/jakarta/simple/orm.xml" );
|
||||||
try {
|
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()
|
assertThat( binding.getRoot()
|
||||||
.getEntities()
|
.getEntities()
|
||||||
.stream()
|
.stream()
|
||||||
.map( JaxbEntity::getClazz ) ).containsOnly( "Lighter", "ApplicationServer" );
|
.map( JaxbEntityImpl::getClazz ) ).containsOnly( "Lighter", "ApplicationServer" );
|
||||||
|
|
||||||
final JaxbPersistenceUnitMetadata puMetadata = binding.getRoot().getPersistenceUnitMetadata();
|
final JaxbPersistenceUnitMetadataImpl puMetadata = binding.getRoot().getPersistenceUnitMetadata();
|
||||||
final JaxbPersistenceUnitDefaults puDefaults = puMetadata.getPersistenceUnitDefaults();
|
final JaxbPersistenceUnitDefaultsImpl puDefaults = puMetadata.getPersistenceUnitDefaults();
|
||||||
final Stream<String> listenerNames = puDefaults.getEntityListeners()
|
final Stream<String> listenerNames = puDefaults.getEntityListeners()
|
||||||
.getEntityListener()
|
.getEntityListener()
|
||||||
.stream()
|
.stream()
|
||||||
.map( JaxbEntityListener::getClazz );
|
.map( JaxbEntityListenerImpl::getClazz );
|
||||||
assertThat( listenerNames ).containsOnly( "org.hibernate.jpa.test.pack.defaultpar.IncrementListener" );
|
assertThat( listenerNames ).containsOnly( "org.hibernate.jpa.test.pack.defaultpar.IncrementListener" );
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
|
@ -58,8 +58,8 @@ dependencyResolutionManagement {
|
||||||
|
|
||||||
versionCatalogs {
|
versionCatalogs {
|
||||||
jdks {
|
jdks {
|
||||||
version "baseline", "11"
|
version "baseline", "17"
|
||||||
version "compatible", "11, 17 or 21"
|
version "compatible", "17 or 21"
|
||||||
version "jdbc", "4.2" // Bundled with JDK 11
|
version "jdbc", "4.2" // Bundled with JDK 11
|
||||||
|
|
||||||
// Gradle does bytecode transformation on tests.
|
// Gradle does bytecode transformation on tests.
|
||||||
|
|
Loading…
Reference in New Issue