@@ -77,7 +77,8 @@ public ExpressionDeParser(SelectVisitor selectVisitor, StringBuilder buffer) {
7777 this (selectVisitor , buffer , new OrderByDeParser ());
7878 }
7979
80- ExpressionDeParser (SelectVisitor selectVisitor , StringBuilder buffer , OrderByDeParser orderByDeParser ) {
80+ ExpressionDeParser (SelectVisitor selectVisitor , StringBuilder buffer ,
81+ OrderByDeParser orderByDeParser ) {
8182 super (buffer );
8283 this .selectVisitor = selectVisitor ;
8384 this .orderByDeParser = orderByDeParser ;
@@ -157,10 +158,11 @@ public void visit(BitwiseLeftShift expr) {
157158 visitBinaryExpression (expr , " << " );
158159 }
159160
160- public void visitOldOracleJoinBinaryExpression (OldOracleJoinBinaryExpression expression , String operator ) {
161- // if (expression.isNot()) {
162- // buffer.append(NOT);
163- // }
161+ public void visitOldOracleJoinBinaryExpression (OldOracleJoinBinaryExpression expression ,
162+ String operator ) {
163+ // if (expression.isNot()) {
164+ // buffer.append(NOT);
165+ // }
164166 expression .getLeftExpression ().accept (this );
165167 if (expression .getOldOracleJoinSyntax () == EqualsTo .ORACLE_JOIN_RIGHT ) {
166168 buffer .append ("(+)" );
@@ -186,7 +188,8 @@ public void visit(GreaterThanEquals greaterThanEquals) {
186188 @ Override
187189 public void visit (InExpression inExpression ) {
188190 inExpression .getLeftExpression ().accept (this );
189- if (inExpression .getOldOracleJoinSyntax () == SupportsOldOracleJoinSyntax .ORACLE_JOIN_RIGHT ) {
191+ if (inExpression
192+ .getOldOracleJoinSyntax () == SupportsOldOracleJoinSyntax .ORACLE_JOIN_RIGHT ) {
190193 buffer .append ("(+)" );
191194 }
192195 if (inExpression .isNot ()) {
@@ -212,8 +215,12 @@ public void visit(FullTextSearch fullTextSearch) {
212215 columnsListCommaSeperated += "," ;
213216 }
214217 }
215- buffer .append ("MATCH (" + columnsListCommaSeperated + ") AGAINST (" + fullTextSearch .getAgainstValue ()
216- + (fullTextSearch .getSearchModifier () != null ? " " + fullTextSearch .getSearchModifier () : "" ) + ")" );
218+ buffer .append ("MATCH (" + columnsListCommaSeperated + ") AGAINST ("
219+ + fullTextSearch .getAgainstValue ()
220+ + (fullTextSearch .getSearchModifier () != null
221+ ? " " + fullTextSearch .getSearchModifier ()
222+ : "" )
223+ + ")" );
217224 }
218225
219226 @ Override
@@ -269,8 +276,8 @@ public void visit(JdbcParameter jdbcParameter) {
269276
270277 @ Override
271278 public void visit (LikeExpression likeExpression ) {
272- visitBinaryExpression (likeExpression ,
273- ( likeExpression . isNot () ? " NOT" : "" ) + (likeExpression .isCaseInsensitive () ? " ILIKE " : " LIKE " ));
279+ visitBinaryExpression (likeExpression , ( likeExpression . isNot () ? " NOT" : "" )
280+ + (likeExpression .isCaseInsensitive () ? " ILIKE " : " LIKE " ));
274281 Expression escape = likeExpression .getEscape ();
275282 if (escape != null ) {
276283 buffer .append (" ESCAPE " );
@@ -314,7 +321,8 @@ public void visit(Multiplication multiplication) {
314321
315322 @ Override
316323 public void visit (NotEqualsTo notEqualsTo ) {
317- visitOldOracleJoinBinaryExpression (notEqualsTo , " " + notEqualsTo .getStringExpression () + " " );
324+ visitOldOracleJoinBinaryExpression (notEqualsTo ,
325+ " " + notEqualsTo .getStringExpression () + " " );
318326
319327 }
320328
@@ -372,7 +380,8 @@ public void visit(SubSelect subSelect) {
372380 if (selectVisitor != null ) {
373381 if (subSelect .getWithItemsList () != null ) {
374382 buffer .append ("WITH " );
375- for (Iterator <WithItem > iter = subSelect .getWithItemsList ().iterator (); iter .hasNext ();) {
383+ for (Iterator <WithItem > iter = subSelect .getWithItemsList ().iterator (); iter
384+ .hasNext ();) {
376385 iter .next ().accept (selectVisitor );
377386 if (iter .hasNext ()) {
378387 buffer .append (", " );
@@ -451,8 +460,6 @@ public void visit(Function function) {
451460
452461 if (function .getAttribute () != null ) {
453462 buffer .append ("." ).append (function .getAttribute ());
454- } else if (function .getAttributeName () != null ) {
455- buffer .append ("." ).append (function .getAttributeName ());
456463 }
457464 if (function .getKeep () != null ) {
458465 buffer .append (" " ).append (function .getKeep ());
@@ -465,7 +472,8 @@ public void visit(Function function) {
465472
466473 @ Override
467474 public void visit (ExpressionList expressionList ) {
468- new ExpressionListDeParser (this , buffer , expressionList .isUsingBrackets (), true ).deParse (expressionList .getExpressions ());
475+ new ExpressionListDeParser (this , buffer , expressionList .isUsingBrackets (), true )
476+ .deParse (expressionList .getExpressions ());
469477 }
470478
471479 @ Override
@@ -549,8 +557,8 @@ public void visit(AnyComparisonExpression anyComparisonExpression) {
549557 } else {
550558 ExpressionList expressionList = (ExpressionList ) anyComparisonExpression .getItemsList ();
551559 buffer .append ("VALUES " );
552- buffer .append (
553- PlainSelect . getStringList ( expressionList . getExpressions (), true , anyComparisonExpression .isUsingBracketsForValues ()));
560+ buffer .append (PlainSelect . getStringList ( expressionList . getExpressions (), true ,
561+ anyComparisonExpression .isUsingBracketsForValues ()));
554562 }
555563 buffer .append (" ) " );
556564 }
@@ -586,7 +594,8 @@ public void visit(CastExpression cast) {
586594 buffer .append ("CAST(" );
587595 cast .getLeftExpression ().accept (this );
588596 buffer .append (" AS " );
589- buffer .append (cast .getRowConstructor () != null ? cast .getRowConstructor () : cast .getType ());
597+ buffer .append (
598+ cast .getRowConstructor () != null ? cast .getRowConstructor () : cast .getType ());
590599 buffer .append (")" );
591600 } else {
592601 cast .getLeftExpression ().accept (this );
@@ -601,7 +610,8 @@ public void visit(TryCastExpression cast) {
601610 buffer .append ("TRY_CAST(" );
602611 cast .getLeftExpression ().accept (this );
603612 buffer .append (" AS " );
604- buffer .append (cast .getRowConstructor () != null ? cast .getRowConstructor () : cast .getType ());
613+ buffer .append (
614+ cast .getRowConstructor () != null ? cast .getRowConstructor () : cast .getType ());
605615 buffer .append (")" );
606616 } else {
607617 cast .getLeftExpression ().accept (this );
@@ -616,7 +626,8 @@ public void visit(SafeCastExpression cast) {
616626 buffer .append ("SAFE_CAST(" );
617627 cast .getLeftExpression ().accept (this );
618628 buffer .append (" AS " );
619- buffer .append (cast .getRowConstructor () != null ? cast .getRowConstructor () : cast .getType ());
629+ buffer .append (
630+ cast .getRowConstructor () != null ? cast .getRowConstructor () : cast .getType ());
620631 buffer .append (")" );
621632 } else {
622633 cast .getLeftExpression ().accept (this );
@@ -632,7 +643,8 @@ public void visit(Modulo modulo) {
632643 }
633644
634645 @ Override
635- @ SuppressWarnings ({"PMD.CyclomaticComplexity" , "PMD.ExcessiveMethodLength" , "PMD.MissingBreakInSwitch" })
646+ @ SuppressWarnings ({"PMD.CyclomaticComplexity" , "PMD.ExcessiveMethodLength" ,
647+ "PMD.MissingBreakInSwitch" })
636648 public void visit (AnalyticExpression aexpr ) {
637649 String name = aexpr .getName ();
638650 Expression expression = aexpr .getExpression ();
@@ -669,7 +681,8 @@ public void visit(AnalyticExpression aexpr) {
669681 }
670682 if (aexpr .getFuncOrderBy () != null ) {
671683 buffer .append (" ORDER BY " );
672- buffer .append (aexpr .getFuncOrderBy ().stream ().map (OrderByElement ::toString ).collect (joining (", " )));
684+ buffer .append (aexpr .getFuncOrderBy ().stream ().map (OrderByElement ::toString )
685+ .collect (joining (", " )));
673686 }
674687
675688 buffer .append (") " );
@@ -710,10 +723,11 @@ public void visit(AnalyticExpression aexpr) {
710723
711724 if (aexpr .getWindowName () != null ) {
712725 buffer .append (" " ).append (aexpr .getWindowName ());
713- } else if (aexpr .getType ()!= AnalyticType .WITHIN_GROUP_OVER ) {
726+ } else if (aexpr .getType () != AnalyticType .WITHIN_GROUP_OVER ) {
714727 buffer .append (" (" );
715728
716- if (partitionExpressionList != null && !partitionExpressionList .getExpressions ().isEmpty ()) {
729+ if (partitionExpressionList != null
730+ && !partitionExpressionList .getExpressions ().isEmpty ()) {
717731 buffer .append ("PARTITION BY " );
718732 if (aexpr .isPartitionByBrackets ()) {
719733 buffer .append ("(" );
@@ -884,12 +898,14 @@ public void visit(DateTimeLiteralExpression literal) {
884898
885899 @ Override
886900 public void visit (NextValExpression nextVal ) {
887- buffer .append (nextVal .isUsingNextValueFor () ? "NEXT VALUE FOR " : "NEXTVAL FOR " ).append (nextVal .getName ());
901+ buffer .append (nextVal .isUsingNextValueFor () ? "NEXT VALUE FOR " : "NEXTVAL FOR " )
902+ .append (nextVal .getName ());
888903 }
889904
890905 @ Override
891906 public void visit (CollateExpression col ) {
892- buffer .append (col .getLeftExpression ().toString ()).append (" COLLATE " ).append (col .getCollate ());
907+ buffer .append (col .getLeftExpression ().toString ()).append (" COLLATE " )
908+ .append (col .getCollate ());
893909 }
894910
895911 @ Override
@@ -948,7 +964,7 @@ public void visit(VariableAssignment var) {
948964
949965 @ Override
950966 public void visit (XMLSerializeExpr expr ) {
951- //xmlserialize(xmlagg(xmltext(COMMENT_LINE) ORDER BY COMMENT_SEQUENCE) as varchar(1024))
967+ // xmlserialize(xmlagg(xmltext(COMMENT_LINE) ORDER BY COMMENT_SEQUENCE) as varchar(1024))
952968 buffer .append ("xmlserialize(xmlagg(xmltext(" );
953969 expr .getExpression ().accept (this );
954970 buffer .append (")" );
@@ -992,9 +1008,7 @@ public void visit(ConnectByRootOperator connectByRootOperator) {
9921008
9931009 @ Override
9941010 public void visit (OracleNamedFunctionParameter oracleNamedFunctionParameter ) {
995- buffer
996- .append (oracleNamedFunctionParameter .getName ())
997- .append (" => " );
1011+ buffer .append (oracleNamedFunctionParameter .getName ()).append (" => " );
9981012
9991013 oracleNamedFunctionParameter .getExpression ().accept (this );
10001014 }
@@ -1023,6 +1037,7 @@ public void visit(IsDistinctExpression isDistinctExpression) {
10231037
10241038 @ Override
10251039 public void visit (GeometryDistance geometryDistance ) {
1026- visitOldOracleJoinBinaryExpression (geometryDistance , " " + geometryDistance .getStringExpression () + " " );
1040+ visitOldOracleJoinBinaryExpression (geometryDistance ,
1041+ " " + geometryDistance .getStringExpression () + " " );
10271042 }
10281043}
0 commit comments