1313import jakarta .persistence .TypedQueryReference ;
1414import org .hibernate .boot .spi .SessionFactoryOptions ;
1515import org .hibernate .engine .spi .FilterDefinition ;
16- import org .hibernate .engine .spi .SessionFactoryImplementor ;
1716import org .hibernate .graph .GraphParser ;
1817import org .hibernate .graph .InvalidGraphException ;
1918import org .hibernate .graph .RootGraph ;
108107 * SingularAttribute<Book,String>}.
109108 * </ul>
110109 * <p>
111- * Use of these statically- typed metamodel references is the preferred way of
110+ * Use of these statically typed metamodel references is the preferred way of
112111 * working with the {@linkplain jakarta.persistence.criteria.CriteriaBuilder
113112 * criteria query API}, and with {@linkplain EntityGraph}s.
114113 * <p>
@@ -266,7 +265,7 @@ default void inSession(Consumer<? super Session> action) {
266265 * @since 6.3
267266 */
268267 default void inStatelessSession (Consumer <? super StatelessSession > action ) {
269- try ( StatelessSession session = openStatelessSession () ) {
268+ try ( var session = openStatelessSession () ) {
270269 action .accept ( session );
271270 }
272271 }
@@ -308,7 +307,7 @@ default void inStatelessTransaction(Consumer<? super StatelessSession> action) {
308307 * @see #fromTransaction(Function)
309308 */
310309 default <R > R fromSession (Function <? super Session ,R > action ) {
311- try ( Session session = openSession () ) {
310+ try ( var session = openSession () ) {
312311 return action .apply ( session );
313312 }
314313 }
@@ -331,7 +330,7 @@ default <R> R fromSession(Function<? super Session,R> action) {
331330 * @since 6.3
332331 */
333332 default <R > R fromStatelessSession (Function <? super StatelessSession ,R > action ) {
334- try ( StatelessSession session = openStatelessSession () ) {
333+ try ( var session = openStatelessSession () ) {
335334 return action .apply ( session );
336335 }
337336 }
@@ -522,9 +521,7 @@ default <T> RootGraph<T> createEntityGraph(Class<T> entityType) {
522521 *
523522 * @since 7.0
524523 */
525- default <T > RootGraph <T > parseEntityGraph (Class <T > rootEntityClass , CharSequence graphText ) {
526- return GraphParser .parse ( rootEntityClass , graphText .toString (), unwrap ( SessionFactoryImplementor .class ) );
527- }
524+ <T > RootGraph <T > parseEntityGraph (Class <T > rootEntityClass , CharSequence graphText );
528525
529526 /**
530527 * Creates a {@link RootGraph} for the given {@code rootEntityName} and parses the graph
@@ -544,9 +541,7 @@ default <T> RootGraph<T> parseEntityGraph(Class<T> rootEntityClass, CharSequence
544541 * @since 7.0
545542 */
546543 @ Incubating
547- default <T > RootGraph <T > parseEntityGraph (String rootEntityName , CharSequence graphText ) {
548- return GraphParser .parse ( rootEntityName , graphText .toString (), unwrap ( SessionFactoryImplementor .class ) );
549- }
544+ <T > RootGraph <T > parseEntityGraph (String rootEntityName , CharSequence graphText );
550545
551546 /**
552547 * Creates a {@link RootGraph} based on the passed string representation. Here, the
@@ -562,9 +557,7 @@ default <T> RootGraph<T> parseEntityGraph(String rootEntityName, CharSequence gr
562557 * @since 7.0
563558 */
564559 @ Incubating
565- default <T > RootGraph <T > parseEntityGraph (CharSequence graphText ) {
566- return GraphParser .parse ( graphText .toString (), unwrap ( SessionFactoryImplementor .class ) );
567- }
560+ <T > RootGraph <T > parseEntityGraph (CharSequence graphText );
568561
569562 /**
570563 * Obtain the set of names of all {@linkplain org.hibernate.annotations.FilterDef
0 commit comments