title: Hibernate programmatically get incremented ID
body: <p>I am using Table Generator to generate primary keys for all the tables. Recently I received a requirement which I need to get the incremented id programmatically without persisting the entity into the database.
  I believe it can be achieved by calling hibernate internal API.
  Anyway knows how to get the incremented id programmatically with hibernate?</p>