001
014
015 package com.liferay.portal.dao.orm.hibernate;
016
017 import com.liferay.portal.kernel.dao.orm.ORMException;
018 import com.liferay.portal.kernel.dao.orm.ScrollableResults;
019
020
023 public class ScrollableResultsImpl implements ScrollableResults {
024
025 public ScrollableResultsImpl(
026 org.hibernate.ScrollableResults scrollableResults) {
027
028 _scrollableResults = scrollableResults;
029 }
030
031 public boolean first() throws ORMException {
032 try {
033 return _scrollableResults.first();
034 }
035 catch (Exception e) {
036 throw ExceptionTranslator.translate(e);
037 }
038 }
039
040 public Object[] get() throws ORMException {
041 try {
042 return _scrollableResults.get();
043 }
044 catch (Exception e) {
045 throw ExceptionTranslator.translate(e);
046 }
047 }
048
049 public Object get(int i) throws ORMException {
050 try {
051 return _scrollableResults.get(i);
052 }
053 catch (Exception e) {
054 throw ExceptionTranslator.translate(e);
055 }
056 }
057
058 public boolean last() throws ORMException {
059 try {
060 return _scrollableResults.last();
061 }
062 catch (Exception e) {
063 throw ExceptionTranslator.translate(e);
064 }
065 }
066
067 public boolean next() throws ORMException {
068 try {
069 return _scrollableResults.next();
070 }
071 catch (Exception e) {
072 throw ExceptionTranslator.translate(e);
073 }
074 }
075
076 public boolean previous() throws ORMException {
077 try {
078 return _scrollableResults.previous();
079 }
080 catch (Exception e) {
081 throw ExceptionTranslator.translate(e);
082 }
083 }
084
085 public boolean scroll(int i) throws ORMException {
086 try {
087 return _scrollableResults.scroll(i);
088 }
089 catch (Exception e) {
090 throw ExceptionTranslator.translate(e);
091 }
092
093 }
094
095 private org.hibernate.ScrollableResults _scrollableResults;
096
097 }