Exposing hibernate operations as rest service