JSQLB (Java SQL Builder) is a little Java library for dynamically generating SQL
SQL:
INSERT INTO table1 ( column1, column3, column4, column5 ) VALUES ( ?, ?, ?, ? ) RETURNING *
JSQLB:
new PostgreSQL().insert(table1, table1.getColumnsExcept(table1.getColumn("column2"))).returning().getSQL()
Another methods you can find in test , and/or in this project.