73
73
public class JSqlParserQueryEnhancer implements QueryEnhancer {
74
74
75
75
private final DeclaredQuery query ;
76
- private final Statement statement ;
77
76
private final ParsedType parsedType ;
78
77
private final boolean hasConstructorExpression ;
79
78
private final @ Nullable String primaryAlias ;
@@ -88,15 +87,15 @@ public class JSqlParserQueryEnhancer implements QueryEnhancer {
88
87
public JSqlParserQueryEnhancer (DeclaredQuery query ) {
89
88
90
89
this .query = query ;
91
- this . statement = parseStatement (query .getQueryString (), Statement .class );
90
+ Statement statement = parseStatement (query .getQueryString (), Statement .class );
92
91
93
92
this .parsedType = detectParsedType (statement );
94
93
this .hasConstructorExpression = QueryUtils .hasConstructorExpression (query .getQueryString ());
95
- this .primaryAlias = detectAlias (this .parsedType , this . statement );
96
- this .projection = detectProjection (this . statement );
97
- this .selectAliases = Collections .unmodifiableSet (getSelectionAliases (this . statement ));
98
- this .joinAliases = Collections .unmodifiableSet (getJoinAliases (this . statement ));
99
- this .serialized = SerializationUtils .serialize (this . statement );
94
+ this .primaryAlias = detectAlias (this .parsedType , statement );
95
+ this .projection = detectProjection (statement );
96
+ this .selectAliases = Collections .unmodifiableSet (getSelectionAliases (statement ));
97
+ this .joinAliases = Collections .unmodifiableSet (getJoinAliases (statement ));
98
+ this .serialized = SerializationUtils .serialize (statement );
100
99
}
101
100
102
101
/**
@@ -215,8 +214,8 @@ private static Set<String> getJoinAliases(Statement statement) {
215
214
* @param statement
216
215
* @param mapper
217
216
* @param fallback
218
- * @return
219
217
* @param <T>
218
+ * @return
220
219
*/
221
220
private static <T > T doWithPlainSelect (Statement statement , java .util .function .Function <PlainSelect , T > mapper ,
222
221
Supplier <T > fallback ) {
@@ -236,8 +235,8 @@ private static <T> T doWithPlainSelect(Statement statement, java.util.function.F
236
235
* @param skipIf
237
236
* @param mapper
238
237
* @param fallback
239
- * @return
240
238
* @param <T>
239
+ * @return
241
240
*/
242
241
private static <T > T doWithPlainSelect (Statement statement , Predicate <PlainSelect > skipIf ,
243
242
java .util .function .Function <PlainSelect , T > mapper , Supplier <T > fallback ) {
0 commit comments