JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes. The generated hierarchy can be navigated using the Visitor Pattern
<dependency>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
<version>0.8.5</version>
</dependency>
SELECT * FROM mytable WHERE b = :param
select * from my_table where bool_func(col)
select * from taba, tabb where taba.a<tabb.a(+)
create table testTable1 (a varchar(10), b varchar(20), foreign key a references testTable2(a))
create table testTable1 (a varchar(10), b varchar(20), constraint fkIdx foreign key a references testTable2(a))
select 5 - INTERVAL '45 MINUTE' from mytable
select * from mytable where (a,b,c) in (select a,b,c from mytable2)