Postgres Aggregate Into Arraylist Syntax In Java