Changed usage of Session criteria to hibernate template criteria