Monday, 14 September 2015

ResultSet by Hibernate

In hibernate you can use 3 types of Scrollable ResultSet:
  1. TYPE_SCROLL_INSENSITIVE - it is possible to get selected row of data and retrieve data forward and backward. There is not sensitive for external changes in db, so as I got to know refresh is impossible.
  2. TYPE_SCROLL_SENSITIVE - the same as above but it is sensitive for external changes in db. After calling refresh you get new entity from db.
  3. TYPE_FORWARD_ONLY - it is possible to get data only forward order, you can't get selected row. It is necessary to go in loop by next method.

No comments:

Post a Comment