all sql passed to java

all except recursive methods