Integrate hiberate into scala