Skip to content

Commit ec5bbe4

Browse files
committed
HHH-18534 - Remove the org.hibernate.boot.models.categorize package
1 parent f65f393 commit ec5bbe4

File tree

56 files changed

+114
-4131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+114
-4131
lines changed

hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
6060
import org.hibernate.boot.model.source.internal.ImplicitColumnNamingSecondPass;
6161
import org.hibernate.boot.model.source.spi.LocalMetadataBuildingContext;
62-
import org.hibernate.boot.models.categorize.internal.ClassLoaderServiceLoading;
62+
import org.hibernate.boot.models.internal.ClassLoaderServiceLoading;
6363
import org.hibernate.boot.models.internal.GlobalRegistrationsImpl;
6464
import org.hibernate.boot.models.internal.ModelsHelper;
6565
import org.hibernate.boot.models.spi.GlobalRegistrations;

hibernate-core/src/main/java/org/hibernate/boot/model/process/spi/MetadataBuildingProcess.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ public static MetadataImplementor complete(
230230
return metadataCollector.buildMetadataInstance( rootMetadataBuildingContext );
231231
}
232232

233-
private static void coordinateProcessors(
233+
@Internal
234+
public static void coordinateProcessors(
234235
ManagedResources managedResources,
235236
MetadataBuildingOptions options,
236237
MetadataBuildingContextRootImpl rootMetadataBuildingContext,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* SPDX-License-Identifier: LGPL-2.1-or-later
3+
* Copyright Red Hat Inc. and Hibernate Authors
4+
*/
5+
package org.hibernate.boot.models;
6+
7+
/**
8+
* An enum defining the nature (categorization) of a persistent attribute.
9+
*
10+
* @see jakarta.persistence.metamodel.Attribute.PersistentAttributeType
11+
*/
12+
public enum AttributeNature {
13+
BASIC,
14+
EMBEDDED,
15+
ANY,
16+
TO_ONE,
17+
ELEMENT_COLLECTION,
18+
MANY_TO_ANY,
19+
MANY_TO_MANY,
20+
ONE_TO_MANY
21+
}

hibernate-core/src/main/java/org/hibernate/boot/models/Copied.java

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* SPDX-License-Identifier: LGPL-2.1-or-later
33
* Copyright Red Hat Inc. and Hibernate Authors
44
*/
5-
package org.hibernate.boot.models.categorize.spi;
5+
package org.hibernate.boot.models;
66

77
/**
88
* JPA defines 2 ways events callbacks can happen...

hibernate-core/src/main/java/org/hibernate/boot/models/MultipleAttributeNaturesException.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@
66

77
import java.util.EnumSet;
88

9-
import org.hibernate.MappingException;
10-
import org.hibernate.boot.models.categorize.spi.AttributeMetadata;
9+
import org.hibernate.AnnotationException;
10+
import org.hibernate.Incubating;
1111

1212
/**
13-
* Condition where an attribute indicates multiple {@linkplain AttributeMetadata.AttributeNature natures}
13+
* Condition where an attribute indicates multiple {@linkplain AttributeNature natures}
1414
*
1515
* @author Steve Ebersole
1616
*/
17-
public class MultipleAttributeNaturesException extends MappingException {
17+
@Incubating
18+
public class MultipleAttributeNaturesException extends AnnotationException {
1819
private final String attributeName;
1920

2021
public MultipleAttributeNaturesException(
2122
String attributeName,
22-
EnumSet<AttributeMetadata.AttributeNature> natures) {
23+
EnumSet<AttributeNature> natures) {
2324
super( craftMessage( attributeName, natures ) );
2425
this.attributeName = attributeName;
2526
}
@@ -28,12 +29,12 @@ public String getAttributeName() {
2829
return attributeName;
2930
}
3031

31-
private static String craftMessage(String attributeName, EnumSet<AttributeMetadata.AttributeNature> natures) {
32+
private static String craftMessage(String attributeName, EnumSet<AttributeNature> natures) {
3233
final StringBuilder buffer = new StringBuilder( "Attribute `" )
3334
.append( attributeName )
3435
.append( "` expressed multiple natures [" );
3536
String separator = "";
36-
for ( AttributeMetadata.AttributeNature nature : natures ) {
37+
for ( AttributeNature nature : natures ) {
3738
buffer.append( separator );
3839
buffer.append( nature.name() );
3940
separator = ",";

hibernate-core/src/main/java/org/hibernate/boot/models/categorize/ModelCategorizationLogging.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/boot/models/categorize/internal/AbstractIdentifiableTypeMetadata.java

Lines changed: 0 additions & 244 deletions
This file was deleted.

0 commit comments

Comments
 (0)