diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/EffectiveEntityGraph.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/EffectiveEntityGraph.java index 7277460ec5..1e8a1af40d 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/EffectiveEntityGraph.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/EffectiveEntityGraph.java @@ -112,13 +112,13 @@ public class EffectiveEntityGraph implements AppliedGraph, Serializable { return; } - RootGraphImplementor fetchHint = (RootGraphImplementor) properties.get( GraphSemantic.FETCH.getJpaHintName() ); - RootGraphImplementor loadHint = (RootGraphImplementor) properties.get( GraphSemantic.LOAD.getJpaHintName() ); + RootGraphImplementor> fetchHint = (RootGraphImplementor>) properties.get( GraphSemantic.FETCH.getJpaHintName() ); + RootGraphImplementor> loadHint = (RootGraphImplementor>) properties.get( GraphSemantic.LOAD.getJpaHintName() ); if (fetchHint == null) { - fetchHint = (RootGraphImplementor) properties.get( GraphSemantic.FETCH.getJakartaHintName() ); + fetchHint = (RootGraphImplementor>) properties.get( GraphSemantic.FETCH.getJakartaHintName() ); } if (loadHint == null) { - loadHint = (RootGraphImplementor) properties.get( GraphSemantic.LOAD.getJakartaHintName() ); + loadHint = (RootGraphImplementor>) properties.get( GraphSemantic.LOAD.getJakartaHintName() ); } if ( fetchHint == null && loadHint == null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/EntityUniqueKey.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/EntityUniqueKey.java index 421a5186dc..344c58eda2 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/EntityUniqueKey.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/EntityUniqueKey.java @@ -18,7 +18,7 @@ import org.hibernate.type.Type; * Used to uniquely key an entity instance in relation to a particular session * by some unique property reference, as opposed to identifier. *
- * Uniqueing information consists of the entity-name, the referenced + * Uniqueing information consists of the entity name, the referenced * property name, and the referenced property value. * * @author Gavin King diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ExceptionConverter.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ExceptionConverter.java index 586693bc82..6abff1dcd8 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ExceptionConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ExceptionConverter.java @@ -26,9 +26,9 @@ public interface ExceptionConverter { RuntimeException convertCommitException(RuntimeException e); /** - * Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use - * of exceptions outside its exception hierarchy, though they are all runtime exceptions. - * + * Converts a Hibernate-specific exception into a JPA-specified exception; + * note that the JPA specification makes use of exceptions outside its + * exception hierarchy, though they are all runtime exceptions. * * @param e The Hibernate exception. * @param lockOptions The lock options in effect at the time of exception (can be null) @@ -38,9 +38,9 @@ public interface ExceptionConverter { RuntimeException convert(HibernateException e, LockOptions lockOptions); /** - * Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use - * of exceptions outside its exception hierarchy, though they are all runtime exceptions. - * + * Converts a Hibernate-specific exception into a JPA-specified exception; + * note that the JPA specification makes use of exceptions outside its + * exception hierarchy, though they are all runtime exceptions. * * @param e The Hibernate exception. * diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ExecuteUpdateResultCheckStyle.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ExecuteUpdateResultCheckStyle.java index 61deefacde..0dea5d84c2 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ExecuteUpdateResultCheckStyle.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ExecuteUpdateResultCheckStyle.java @@ -7,8 +7,8 @@ package org.hibernate.engine.spi; /** - * For persistence operations (INSERT, UPDATE, DELETE) what style of determining - * results (success/failure) is to be used. + * For persistence operations (INSERT, UPDATE, DELETE) what style of + * determining results (success/failure) is to be used. * * @author Steve Ebersole */ @@ -22,7 +22,7 @@ public enum ExecuteUpdateResultCheckStyle { NONE( "none" ), /** - * Perform row-count checking. Row counts are the int values returned by both + * Perform row count checking. Row counts are the int values returned by both * {@link java.sql.PreparedStatement#executeUpdate()} and * {@link java.sql.Statement#executeBatch()}. These values are checked * against some expected count. @@ -39,7 +39,7 @@ public enum ExecuteUpdateResultCheckStyle { private final String name; - private ExecuteUpdateResultCheckStyle(String name) { + ExecuteUpdateResultCheckStyle(String name) { this.name = name; } diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ExtendedSelfDirtinessTracker.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ExtendedSelfDirtinessTracker.java index df93c0d471..e2165c11ac 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ExtendedSelfDirtinessTracker.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ExtendedSelfDirtinessTracker.java @@ -11,8 +11,9 @@ import org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterc import org.hibernate.engine.spi.SelfDirtinessTracker; /** - * A self dirtiness tracker that declares additional methods that are intended for internal communication. This - * interface can be implemented optionally instead of the plain {@link SelfDirtinessTracker}. + * A self dirtiness tracker that declares additional methods that are intended for + * internal communication. This interface can be implemented optionally instead of + * the plain {@link SelfDirtinessTracker}. */ public interface ExtendedSelfDirtinessTracker extends SelfDirtinessTracker { diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/FilterDefinition.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/FilterDefinition.java index 9bba5d9b14..ccaa4a5809 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/FilterDefinition.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/FilterDefinition.java @@ -16,8 +16,9 @@ import org.hibernate.metamodel.mapping.JdbcMapping; /** * Represents the definition of a {@link org.hibernate.Filter filter}. * This information includes the {@linkplain #filterName name} of the - * filter, along with the {@linkplain #parameterTypes name and type} - * of every parameter of the filter. A filter may optionally have a + * filter, along with the {@linkplain #getParameterJdbcMapping(String) + * names} and {@linkplain #getParameterJdbcMapping(String) types} of + * every parameter of the filter. A filter may optionally have a * {@linkplain #defaultFilterCondition default condition}. * * @see org.hibernate.annotations.FilterDef diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/IdentifierValue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/IdentifierValue.java index 591a152fcc..aebc6487ae 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/IdentifierValue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/IdentifierValue.java @@ -30,7 +30,7 @@ public class IdentifierValue implements UnsavedValueStrategy { */ public static final IdentifierValue ANY = new IdentifierValue() { @Override - public final Boolean isUnsaved(Object id) { + public Boolean isUnsaved(Object id) { LOG.trace( "ID unsaved-value strategy ANY" ); return Boolean.TRUE; } @@ -51,7 +51,7 @@ public class IdentifierValue implements UnsavedValueStrategy { */ public static final IdentifierValue NONE = new IdentifierValue() { @Override - public final Boolean isUnsaved(Object id) { + public Boolean isUnsaved(Object id) { LOG.trace( "ID unsaved-value strategy NONE" ); return Boolean.FALSE; } @@ -73,7 +73,7 @@ public class IdentifierValue implements UnsavedValueStrategy { */ public static final IdentifierValue NULL = new IdentifierValue() { @Override - public final Boolean isUnsaved(Object id) { + public Boolean isUnsaved(Object id) { LOG.trace( "ID unsaved-value strategy NULL" ); return id == null; } @@ -94,7 +94,7 @@ public class IdentifierValue implements UnsavedValueStrategy { */ public static final IdentifierValue UNDEFINED = new IdentifierValue() { @Override - public final Boolean isUnsaved(Object id) { + public Boolean isUnsaved(Object id) { LOG.trace( "ID unsaved-value strategy UNDEFINED" ); return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/PersistenceContext.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/PersistenceContext.java index 4dc7128aef..c9e703e28d 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/PersistenceContext.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/PersistenceContext.java @@ -741,7 +741,6 @@ public interface PersistenceContext { /** * Registers an {@link EntityKey} as nullifiable on this {@link PersistenceContext}. - * @param key */ void registerNullifiableEntityKey(EntityKey key); @@ -772,8 +771,7 @@ public interface PersistenceContext { /** * Adds a collection in the collections-by-key map. - * @param collectionKey - * @param persistentCollection + * * @return the previous collection, it the key was already mapped. */ PersistentCollection> addCollectionByKey(CollectionKey collectionKey, PersistentCollection> persistentCollection); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SelfDirtinessTracker.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SelfDirtinessTracker.java index 292bc810f2..6cb4cf3bb9 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SelfDirtinessTracker.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SelfDirtinessTracker.java @@ -14,7 +14,7 @@ import org.hibernate.bytecode.enhance.spi.CollectionTracker; * * Entity classes are free to implement this contract themselves. This contract is * also introduced into the entity when using bytecode enhancement and requesting - * that entities track there own dirtiness. + * that entities track their own dirtiness. * * @author Ståle W. Pedersen */ diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionBuilderImplementor.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionBuilderImplementor.java index f918aa9b4f..4abcd091ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionBuilderImplementor.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionBuilderImplementor.java @@ -9,8 +9,8 @@ package org.hibernate.engine.spi; import org.hibernate.SessionBuilder; /** - * Defines the internal contract between the {@code SessionBuilder} and other parts of - * Hibernate.. + * Defines the internal contract between the {@link SessionBuilder} and + * other parts of Hibernate. * * @see SessionBuilder * diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryDelegatingImpl.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryDelegatingImpl.java index 124d8b1e1c..3fa7e0c142 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryDelegatingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryDelegatingImpl.java @@ -60,7 +60,6 @@ import jakarta.persistence.SynchronizationType; * * @author Steve Ebersole */ -@SuppressWarnings({"deprecation", "unused"}) public class SessionFactoryDelegatingImpl implements SessionFactoryImplementor, SessionFactory { private final SessionFactoryImplementor delegate; @@ -107,17 +106,17 @@ public class SessionFactoryDelegatingImpl implements SessionFactoryImplementor, return delegate.openStatelessSession( connection ); } - @Override + @Override @Deprecated public ClassMetadata getClassMetadata(@SuppressWarnings("rawtypes") Class entityClass) { return delegate.getClassMetadata( entityClass ); } - @Override + @Override @Deprecated public ClassMetadata getClassMetadata(String entityName) { return delegate.getClassMetadata( entityName ); } - @Override + @Override @Deprecated public CollectionMetadata getCollectionMetadata(String roleName) { return delegate.getCollectionMetadata( roleName ); } @@ -367,7 +366,7 @@ public class SessionFactoryDelegatingImpl implements SessionFactoryImplementor, return delegate.getCriteriaBuilder(); } - @Override + @Override @SuppressWarnings("deprecation") public MetamodelImplementor getMetamodel() { return delegate.getMetamodel(); } diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryImplementor.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryImplementor.java index eb1ca10fae..d2d4aeb581 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryImplementor.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SessionFactoryImplementor.java @@ -128,14 +128,10 @@ public interface SessionFactoryImplementor void addObserver(SessionFactoryObserver observer); - /** - * @todo make a Service ? - */ + //todo make a Service ? CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy(); - /** - * @todo make a Service ? - */ + //todo make a Service ? CurrentTenantIdentifierResolver getCurrentTenantIdentifierResolver(); /** diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java index a54113bbb8..62d8ee7fbf 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java @@ -66,11 +66,6 @@ public final class TypedValue implements Serializable { } private void initTransients() { - this.hashcode = new ValueHolder<>( new ValueHolder.DeferredInitializer+ * "Merge entity" and "mergeEntity" method parameter refer to an entity that is + * (or will be) merged via {@link EventSource#merge(Object mergeEntity)}. + *
+ * "Managed entity" and "managedEntity" method parameter refer to the managed entity + * that is the result of merging an entity. + *
+ * A merge entity can be transient, detached, or managed. If it is managed, then it + * must be the same as its associated entity result. + *
* If {@link #put(Object mergeEntity, Object managedEntity)} is called, and this * MergeContext already contains an entry with a different entity as the key, but - * with the same (managedEntity) value, this means that multiple entity representations - * for the same persistent entity are being merged. If this happens, + * with the same (managedEntity) value, this means that multiple entity + * representations for the same persistent entity are being merged. If this happens, * {@link EntityCopyObserver#entityCopyDetected( * Object managedEntity, Object mergeEntity1, Object mergeEntity2, EventSource)} * will be called. It is up to that method to determine the property course of * action for this situation. - * + *
* There are several restrictions. *
mergeEntity
, then managedEntity
must be the
- * same as what is already associated with mergeEntity
in this
- * MergeContext.
- * * The following method is intended to be used by a merge event listener (and other * classes) in the same package to add a merge entity and its corresponding * managed entity to a MergeContext and indicate if the merge operation is - * being performed on the merge entity yet.
+ * being performed on the merge entity yet. + ** {@link MergeContext#put(Object mergeEntity, Object managedEntity, boolean isOperatedOn)} - *
+ ** The following method is intended to be used by a merge event listener (and other * classes) in the same package to indicate whether the merge operation is being - * performed on a merge entity already in the MergeContext: + * performed on a merge entity already in the {@link MergeContext}: + *
* {@link MergeContext#setOperatedOn(Object mergeEntity, boolean isOperatedOn)} * * @author Gail Badner */ public class MergeContext implements Map { - private static final Logger LOG = Logger.getLogger( MergeContext.class ); private final EventSource session; private final EntityCopyObserver entityCopyObserver; - private Map