1
19
20 package com.liferay.portal.dao.orm.hibernate;
21
22 import com.liferay.portal.kernel.dao.orm.ORMException;
23 import com.liferay.portal.kernel.dao.orm.ScrollableResults;
24
25
31 public class ScrollableResultsImpl implements ScrollableResults {
32
33 public ScrollableResultsImpl(
34 org.hibernate.ScrollableResults scrollableResults) {
35
36 _scrollableResults = scrollableResults;
37 }
38
39 public boolean first() throws ORMException {
40 try {
41 return _scrollableResults.first();
42 }
43 catch (Exception e) {
44 throw ExceptionTranslator.translate(e);
45 }
46 }
47
48 public Object get(int i) throws ORMException {
49 try {
50 return _scrollableResults.get(i);
51 }
52 catch (Exception e) {
53 throw ExceptionTranslator.translate(e);
54 }
55 }
56
57 public boolean last() throws ORMException {
58 try {
59 return _scrollableResults.last();
60 }
61 catch (Exception e) {
62 throw ExceptionTranslator.translate(e);
63 }
64 }
65
66 public boolean next() throws ORMException {
67 try {
68 return _scrollableResults.next();
69 }
70 catch (Exception e) {
71 throw ExceptionTranslator.translate(e);
72 }
73 }
74
75 public boolean previous() throws ORMException {
76 try {
77 return _scrollableResults.previous();
78 }
79 catch (Exception e) {
80 throw ExceptionTranslator.translate(e);
81 }
82 }
83
84 public boolean scroll(int i) throws ORMException {
85 try {
86 return _scrollableResults.scroll(i);
87 }
88 catch (Exception e) {
89 throw ExceptionTranslator.translate(e);
90 }
91
92 }
93
94 private org.hibernate.ScrollableResults _scrollableResults;
95
96 }