Skip to content

Commit f45dcf4

Browse files
committed
HHH-16290 - Mark o.h.persister.entity and o.h.persister.collection as internal
1 parent 0000347 commit f45dcf4

Some content is hidden

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

41 files changed

+129
-93
lines changed

hibernate-core/src/main/java/org/hibernate/action/internal/AbstractEntityInsertAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
import org.hibernate.engine.spi.Status;
2020
import org.hibernate.event.spi.EventSource;
2121
import org.hibernate.metamodel.mapping.AttributeMapping;
22+
import org.hibernate.metamodel.mapping.AttributeMappingsList;
2223
import org.hibernate.metamodel.mapping.NaturalIdMapping;
2324
import org.hibernate.metamodel.mapping.PluralAttributeMapping;
2425
import org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping;
2526
import org.hibernate.persister.collection.CollectionPersister;
2627
import org.hibernate.persister.entity.AbstractEntityPersister;
27-
import org.hibernate.persister.entity.AttributeMappingsList;
2828
import org.hibernate.persister.entity.EntityPersister;
2929

3030
import static org.hibernate.engine.internal.Versioning.getVersion;

hibernate-core/src/main/java/org/hibernate/persister/entity/AttributeMappingsList.java renamed to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/AttributeMappingsList.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/*
22
* Hibernate, Relational Persistence for Idiomatic Java
33
*
4-
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
5-
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
4+
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5+
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
66
*/
7-
package org.hibernate.persister.entity;
7+
package org.hibernate.metamodel.mapping;
88

99
import java.util.function.Consumer;
1010

1111
import org.hibernate.Incubating;
1212
import org.hibernate.internal.util.IndexedConsumer;
13-
import org.hibernate.metamodel.mapping.AttributeMapping;
13+
import org.hibernate.metamodel.mapping.internal.ImmutableAttributeMappingList;
1414

1515
/**
1616
* This is essentially a List of AttributeMapping(s), but exposing
@@ -21,9 +21,10 @@
2121
* And additional reason for the custom interface is to allow
2222
* custom implementations which can be highly optimised as
2323
* necessary for our specific needs; for example the
24-
* implementation {@link org.hibernate.persister.internal.ImmutableAttributeMappingList}
24+
* implementation {@link ImmutableAttributeMappingList}
2525
* is able to avoid caching problems related to JDK-8180450, which would
2626
* not have been possible with a standard generic container.
27+
*
2728
* @since 6.2
2829
*/
2930
@Incubating

hibernate-core/src/main/java/org/hibernate/persister/entity/AttributeMappingsMap.java renamed to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/AttributeMappingsMap.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
/*
22
* Hibernate, Relational Persistence for Idiomatic Java
33
*
4-
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
5-
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
4+
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5+
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
66
*/
7-
package org.hibernate.persister.entity;
7+
package org.hibernate.metamodel.mapping;
88

99
import java.util.LinkedHashMap;
1010
import java.util.Objects;
1111
import java.util.function.Consumer;
1212

1313
import org.hibernate.Incubating;
14-
import org.hibernate.metamodel.mapping.AttributeMapping;
15-
import org.hibernate.persister.internal.EmptyAttributeMappingsMap;
16-
import org.hibernate.persister.internal.ImmutableAttributeMappingsMap;
14+
import org.hibernate.metamodel.mapping.internal.EmptyAttributeMappingsMap;
15+
import org.hibernate.metamodel.mapping.internal.ImmutableAttributeMappingsMap;
1716

1817
/**
19-
* Similarly to @{@link AttributeMappingsList}, this is essentially
18+
* Similar to {@link AttributeMappingsList}, this is essentially
2019
* an immutable Map of AttributeMapping(s), allowing iteration of
2120
* all mappings but also retrieval by name (a String key).
2221
* Exposing a custom interface is more suitable to our needs than
2322
* reusing the stock Map API; it expresses the immutable nature of
24-
* this structure, and might allows us to extend it with additional
23+
* this structure, and might allow us to extend it with additional
2524
* convenience methods such as needs evolve.
2625
* And additional reason for the custom interface is to allow
2726
* custom implementations which can be highly optimised as
2827
* necessary for our specific needs; for example the
29-
* implementation @{@link ImmutableAttributeMappingsMap}
28+
* implementation {@link ImmutableAttributeMappingsMap}
3029
* is able to avoid caching problems related to JDK-8180450, which would
3130
* not have been possible with a standard generic container.
31+
*
3232
* @since 6.2
3333
*/
3434
@Incubating

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/EntityMappingType.java

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import org.hibernate.metamodel.UnsupportedMappingException;
2727
import org.hibernate.metamodel.spi.EntityRepresentationStrategy;
2828
import org.hibernate.metamodel.spi.MappingMetamodelImplementor;
29-
import org.hibernate.persister.entity.AttributeMappingsList;
30-
import org.hibernate.persister.entity.AttributeMappingsMap;
3129
import org.hibernate.persister.entity.EntityPersister;
3230
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy;
3331
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy;

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/ManagedMappingType.java

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import java.util.function.Consumer;
1010

1111
import org.hibernate.internal.util.IndexedConsumer;
12-
import org.hibernate.persister.entity.AttributeMappingsList;
1312
import org.hibernate.sql.results.graph.FetchableContainer;
1413
import org.hibernate.type.descriptor.java.JavaType;
1514

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.hibernate.mapping.Value;
3232
import org.hibernate.metamodel.UnsupportedMappingException;
3333
import org.hibernate.metamodel.mapping.AttributeMapping;
34+
import org.hibernate.metamodel.mapping.AttributeMappingsList;
3435
import org.hibernate.metamodel.mapping.EmbeddableMappingType;
3536
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
3637
import org.hibernate.metamodel.mapping.EntityMappingType;
@@ -45,10 +46,7 @@
4546
import org.hibernate.metamodel.mapping.SelectablePath;
4647
import org.hibernate.metamodel.model.domain.NavigableRole;
4748
import org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy;
48-
import org.hibernate.metamodel.spi.RuntimeModelCreationContext;
49-
import org.hibernate.persister.entity.AttributeMappingsList;
5049
import org.hibernate.persister.entity.EntityPersister;
51-
import org.hibernate.persister.internal.MutableAttributeMappingList;
5250
import org.hibernate.property.access.internal.PropertyAccessStrategyBackRefImpl;
5351
import org.hibernate.property.access.spi.Getter;
5452
import org.hibernate.property.access.spi.PropertyAccess;

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddableMappingTypeImpl.java

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy;
4646
import org.hibernate.metamodel.spi.RuntimeModelCreationContext;
4747
import org.hibernate.persister.entity.EntityPersister;
48-
import org.hibernate.persister.internal.MutableAttributeMappingList;
4948
import org.hibernate.property.access.spi.PropertyAccess;
5049
import org.hibernate.spi.NavigablePath;
5150
import org.hibernate.sql.ast.tree.from.TableGroup;

hibernate-core/src/main/java/org/hibernate/persister/internal/EmptyAttributeMappingsMap.java renamed to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmptyAttributeMappingsMap.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
* Hibernate, Relational Persistence for Idiomatic Java
33
*
44
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5-
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
5+
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
66
*/
7-
package org.hibernate.persister.internal;
7+
package org.hibernate.metamodel.mapping.internal;
88

99
import java.util.Collections;
1010
import java.util.function.Consumer;
1111

1212
import org.hibernate.metamodel.mapping.AttributeMapping;
13-
import org.hibernate.persister.entity.AttributeMappingsMap;
13+
import org.hibernate.metamodel.mapping.AttributeMappingsMap;
1414

1515
public final class EmptyAttributeMappingsMap implements AttributeMappingsMap {
1616

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.hibernate.metamodel.model.domain.NavigableRole;
3030
import org.hibernate.metamodel.spi.EmbeddableRepresentationStrategy;
3131
import org.hibernate.persister.entity.EntityPersister;
32-
import org.hibernate.persister.internal.MutableAttributeMappingList;
3332
import org.hibernate.property.access.internal.PropertyAccessStrategyMapImpl;
3433
import org.hibernate.property.access.spi.PropertyAccess;
3534
import org.hibernate.spi.NavigablePath;

hibernate-core/src/main/java/org/hibernate/persister/internal/ImmutableAttributeMappingList.java renamed to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/ImmutableAttributeMappingList.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*
22
* Hibernate, Relational Persistence for Idiomatic Java
33
*
4-
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
5-
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
4+
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5+
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
66
*/
7-
package org.hibernate.persister.internal;
7+
package org.hibernate.metamodel.mapping.internal;
88

99
import java.util.ArrayList;
1010
import java.util.Iterator;
@@ -13,7 +13,7 @@
1313

1414
import org.hibernate.internal.util.IndexedConsumer;
1515
import org.hibernate.metamodel.mapping.AttributeMapping;
16-
import org.hibernate.persister.entity.AttributeMappingsList;
16+
import org.hibernate.metamodel.mapping.AttributeMappingsList;
1717

1818
public final class ImmutableAttributeMappingList implements AttributeMappingsList {
1919

hibernate-core/src/main/java/org/hibernate/persister/internal/ImmutableAttributeMappingsMap.java renamed to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/ImmutableAttributeMappingsMap.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*
22
* Hibernate, Relational Persistence for Idiomatic Java
33
*
4-
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
5-
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
4+
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5+
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
66
*/
7-
package org.hibernate.persister.internal;
7+
package org.hibernate.metamodel.mapping.internal;
88

99
import java.util.HashMap;
1010
import java.util.Iterator;
@@ -13,7 +13,7 @@
1313
import java.util.function.Consumer;
1414

1515
import org.hibernate.metamodel.mapping.AttributeMapping;
16-
import org.hibernate.persister.entity.AttributeMappingsMap;
16+
import org.hibernate.metamodel.mapping.AttributeMappingsMap;
1717

1818
public final class ImmutableAttributeMappingsMap implements AttributeMappingsMap {
1919

hibernate-core/src/main/java/org/hibernate/persister/internal/MutableAttributeMappingList.java renamed to hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MutableAttributeMappingList.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*
22
* Hibernate, Relational Persistence for Idiomatic Java
33
*
4-
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
5-
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
4+
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5+
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
66
*/
7-
package org.hibernate.persister.internal;
7+
package org.hibernate.metamodel.mapping.internal;
88

99
import java.util.ArrayList;
1010
import java.util.Iterator;
@@ -13,9 +13,8 @@
1313

1414
import org.hibernate.internal.util.IndexedConsumer;
1515
import org.hibernate.metamodel.mapping.AttributeMapping;
16+
import org.hibernate.metamodel.mapping.AttributeMappingsList;
1617
import org.hibernate.metamodel.mapping.SingularAttributeMapping;
17-
import org.hibernate.metamodel.mapping.internal.BasicAttributeMapping;
18-
import org.hibernate.persister.entity.AttributeMappingsList;
1918
import org.hibernate.sql.results.graph.Fetchable;
2019

2120
/**

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/VirtualIdEmbeddable.java

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.hibernate.metamodel.mapping.SelectableMappings;
1717
import org.hibernate.metamodel.model.domain.NavigableRole;
1818
import org.hibernate.persister.entity.EntityPersister;
19-
import org.hibernate.persister.internal.MutableAttributeMappingList;
2019
import org.hibernate.spi.NavigablePath;
2120
import org.hibernate.sql.ast.tree.from.TableGroup;
2221
import org.hibernate.sql.ast.tree.from.TableGroupProducer;

hibernate-core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.hibernate.FetchMode;
2424
import org.hibernate.Filter;
2525
import org.hibernate.HibernateException;
26+
import org.hibernate.Internal;
2627
import org.hibernate.LockOptions;
2728
import org.hibernate.MappingException;
2829
import org.hibernate.QueryException;
@@ -144,6 +145,7 @@
144145
* @see BasicCollectionPersister
145146
* @see OneToManyPersister
146147
*/
148+
@Internal
147149
public abstract class AbstractCollectionPersister
148150
implements SQLLoadableCollection, PluralAttributeMappingImpl.Aware, CollectionMutationTarget, CollectionMetadata {
149151

hibernate-core/src/main/java/org/hibernate/persister/collection/BasicCollectionPersister.java

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
package org.hibernate.persister.collection;
88

99
import org.hibernate.HibernateException;
10+
import org.hibernate.Internal;
1011
import org.hibernate.MappingException;
1112
import org.hibernate.cache.CacheException;
1213
import org.hibernate.cache.spi.access.CollectionDataAccess;
@@ -67,6 +68,7 @@
6768
*
6869
* @author Gavin King
6970
*/
71+
@Internal
7072
public class BasicCollectionPersister extends AbstractCollectionPersister {
7173
private final RowMutationOperations rowMutationOperations;
7274
private final InsertRowsCoordinator insertRowsCoordinator;

hibernate-core/src/main/java/org/hibernate/persister/collection/OneToManyPersister.java

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.util.function.Consumer;
1212

1313
import org.hibernate.HibernateException;
14+
import org.hibernate.Internal;
1415
import org.hibernate.MappingException;
1516
import org.hibernate.cache.CacheException;
1617
import org.hibernate.cache.spi.access.CollectionDataAccess;
@@ -88,6 +89,7 @@
8889
* @author Gavin King
8990
* @author Brett Meyer
9091
*/
92+
@Internal
9193
public class OneToManyPersister extends AbstractCollectionPersister {
9294
private final RowMutationOperations rowMutationOperations;
9395

hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149
import org.hibernate.metadata.ClassMetadata;
150150
import org.hibernate.metamodel.mapping.Association;
151151
import org.hibernate.metamodel.mapping.AttributeMapping;
152+
import org.hibernate.metamodel.mapping.AttributeMappingsList;
153+
import org.hibernate.metamodel.mapping.AttributeMappingsMap;
152154
import org.hibernate.metamodel.mapping.AttributeMetadata;
153155
import org.hibernate.metamodel.mapping.BasicValuedModelPart;
154156
import org.hibernate.metamodel.mapping.DiscriminatedAssociationModelPart;
@@ -198,7 +200,7 @@
198200
import org.hibernate.persister.entity.mutation.UpdateCoordinator;
199201
import org.hibernate.persister.entity.mutation.UpdateCoordinatorNoOp;
200202
import org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard;
201-
import org.hibernate.persister.internal.ImmutableAttributeMappingList;
203+
import org.hibernate.metamodel.mapping.internal.ImmutableAttributeMappingList;
202204
import org.hibernate.persister.internal.SqlFragmentPredicate;
203205
import org.hibernate.persister.spi.PersisterCreationContext;
204206
import org.hibernate.property.access.spi.PropertyAccess;
@@ -306,6 +308,7 @@
306308
*
307309
* @author Gavin King
308310
*/
311+
@Internal
309312
public abstract class AbstractEntityPersister
310313
implements OuterJoinLoadable, ClassMetadata, UniqueKeyLoadable,
311314
SQLLoadable, LazyPropertyInitializer, PostInsertIdentityPersister, Lockable,

hibernate-core/src/main/java/org/hibernate/persister/entity/BasicEntityPropertyMapping.java

+6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@
66
*/
77
package org.hibernate.persister.entity;
88

9+
import org.hibernate.Remove;
10+
911
/**
1012
* @author Gavin King
13+
*
14+
* @deprecated Replaced by {@link org.hibernate.metamodel.mapping.EntityMappingType}
1115
*/
16+
@Deprecated(since = "6", forRemoval = true)
17+
@Remove
1218
public class BasicEntityPropertyMapping extends AbstractPropertyMapping {
1319

1420
private final AbstractEntityPersister persister;

hibernate-core/src/main/java/org/hibernate/persister/entity/DirtyHelper.java

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package org.hibernate.persister.entity;
88

9+
import org.hibernate.Internal;
910
import org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer;
1011
import org.hibernate.engine.spi.SharedSessionContractImplementor;
1112
import org.hibernate.internal.util.collections.ArrayHelper;
@@ -14,6 +15,7 @@
1415
/**
1516
* Operations for searching an array of property values for modified elements.
1617
*/
18+
@Internal
1719
class DirtyHelper {
1820
/**
1921
* Determine if any of the given field values are dirty, returning an array containing

hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorType.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.util.Objects;
1414

1515
import org.hibernate.HibernateException;
16+
import org.hibernate.Internal;
1617
import org.hibernate.MappingException;
1718
import org.hibernate.engine.spi.Mapping;
1819
import org.hibernate.engine.spi.SessionFactoryImplementor;
@@ -34,10 +35,9 @@
3435
import org.hibernate.type.descriptor.jdbc.JdbcType;
3536

3637
/**
37-
* TODO : javadoc
38-
*
3938
* @author Steve Ebersole
4039
*/
40+
@Internal
4141
public class DiscriminatorType<T> extends AbstractType implements BasicType<T>, BasicValueConverter<T, Object> {
4242
private final BasicType<Object> underlyingType;
4343
private final Loadable persister;

hibernate-core/src/main/java/org/hibernate/persister/entity/DiscriminatorValueDetailsImpl.java

+2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
*/
77
package org.hibernate.persister.entity;
88

9+
import org.hibernate.Internal;
910
import org.hibernate.metamodel.mapping.EntityDiscriminatorMapping;
1011
import org.hibernate.metamodel.mapping.EntityMappingType;
1112

1213
/**
1314
* @author Steve Ebersole
1415
*/
16+
@Internal
1517
public class DiscriminatorValueDetailsImpl implements EntityDiscriminatorMapping.DiscriminatorValueDetails {
1618
private final Object value;
1719
private final String jdbcLiteral;

hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import org.hibernate.AssertionFailure;
2020
import org.hibernate.HibernateException;
21+
import org.hibernate.Internal;
2122
import org.hibernate.MappingException;
2223
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
2324
import org.hibernate.cache.spi.access.EntityDataAccess;
@@ -96,6 +97,7 @@
9697
*
9798
* @author Gavin King
9899
*/
100+
@Internal
99101
public class JoinedSubclassEntityPersister extends AbstractEntityPersister {
100102
private static final Logger log = Logger.getLogger( JoinedSubclassEntityPersister.class );
101103

0 commit comments

Comments
 (0)