Changed usage of session criteria to hibernate template criteria