Skip to content

Commit e0f848b

Browse files
committed
HHH-19216 - NamedEntityGraph annotation supporting Hibernate parseable format
HHH-19237 - Expand graph language to optionally specify entity HHH-19217 - Expose GraphParser#parse on SessionFactory
1 parent 3e61743 commit e0f848b

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

hibernate-core/src/main/java/org/hibernate/graph/internal/parse/GraphParsing.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,13 @@ public static <T> RootGraphImplementor<T> parse(
138138

139139
/**
140140
* Parse the passed graph textual representation into the passed Graph.
141+
* Essentially overlays the text representation on top of the graph.
141142
*/
142143
public static void parseInto(
143144
GraphImplementor<?> targetGraph,
144-
String graphString,
145+
CharSequence graphString,
145146
SessionFactoryImplementor sessionFactory) {
146-
final GraphLanguageLexer lexer = new GraphLanguageLexer( CharStreams.fromString( graphString ) );
147+
final GraphLanguageLexer lexer = new GraphLanguageLexer( CharStreams.fromString( graphString.toString() ) );
147148
final GraphLanguageParser parser = new GraphLanguageParser( new CommonTokenStream( lexer ) );
148149
final GraphLanguageParser.GraphContext graphContext = parser.graph();
149150

@@ -165,14 +166,4 @@ public static void parseInto(
165166
assert visitor.getGraphStack().isEmpty();
166167
}
167168
}
168-
169-
/**
170-
* Parse the passed graph textual representation into the passed Graph.
171-
*/
172-
public static void parseInto(
173-
GraphImplementor<?> targetGraph,
174-
CharSequence graphString,
175-
SessionFactoryImplementor sessionFactory) {
176-
parseInto( targetGraph, graphString.toString(), sessionFactory );
177-
}
178169
}

0 commit comments

Comments
 (0)