Implemented DAO layer with hibernate.