Skip to content

Commit 603e896

Browse files
committed
get Session past spotless
1 parent c973caa commit 603e896

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

hibernate-core/src/main/java/org/hibernate/Session.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import java.util.Collection;
2727
import java.util.List;
28-
import java.util.function.Consumer;
2928

3029
/// The main runtime interface between a Java application and Hibernate. Represents the
3130
/// notion of a _persistence context_, a set of managed entity instances associated
@@ -150,7 +149,7 @@
150149
/// instance from the [SessionFactory].
151150
///
152151
/// An easy way to be sure that session and transaction management is being done correctly
153-
/// is to [let the factory do it][SessionFactory#inTransaction(Consumer)]:
152+
/// is to [let the factory do it][SessionFactory#inTransaction(java.util.function.Consumer)]:
154153
///
155154
/// ```java
156155
/// sessionFactory.inTransaction(session -> {
@@ -480,8 +479,12 @@ public interface Session extends SharedSessionContract, EntityManager {
480479
/// @implNote Note that Hibernate's implementation of this method can
481480
/// also be used for loading an entity by its [natural-id][org.hibernate.annotations.NaturalId]
482481
/// by passing [KeyType#NATURAL] as a [FindOption] and the natural-id value as the `key` to load.
482+
///
483+
/// @param entityType the entity type
484+
/// @param id an identifier
485+
/// @param options options controlling the behavior of the operation
483486
@Override
484-
<T> T find(Class<T> entityClass, Object key, FindOption... options);
487+
<T> T find(Class<T> entityType, Object id, FindOption... options);
485488

486489
/// Return the persistent instance of the named entity type with the given identifier,
487490
/// or null if there is no such persistent instance.
@@ -752,9 +755,16 @@ public interface Session extends SharedSessionContract, EntityManager {
752755
@Override
753756
void refresh(Object object);
754757

758+
/// {@inheritDoc}
759+
///
760+
/// @param object a persistent instance associated with this session
761+
/// @param options options controlling the behavior of the operation
762+
@Override
763+
void refresh(Object object, RefreshOption... options);
764+
755765
/// Mark a persistence instance associated with this session for removal from
756-
/// the underlying database. Ths operation cascades to associated instances if
757-
/// the association is mapped [jakarta.persistence.CascadeType#REMOVE].
766+
/// the underlying database. This operation cascades to associated instances
767+
/// if the association is mapped [jakarta.persistence.CascadeType#REMOVE].
758768
///
759769
/// Except when operating in fully JPA-compliant mode, this operation does,
760770
/// contrary to the JPA specification, accept a detached entity instance.

0 commit comments

Comments
 (0)