Common functions for Spring-Hibernate