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 @Override
032 public boolean first() throws ORMException {
033 try {
034 return _scrollableResults.first();
035 }
036 catch (Exception e) {
037 throw ExceptionTranslator.translate(e);
038 }
039 }
040
041 @Override
042 public Object[] get() throws ORMException {
043 try {
044 return _scrollableResults.get();
045 }
046 catch (Exception e) {
047 throw ExceptionTranslator.translate(e);
048 }
049 }
050
051 @Override
052 public Object get(int i) throws ORMException {
053 try {
054 return _scrollableResults.get(i);
055 }
056 catch (Exception e) {
057 throw ExceptionTranslator.translate(e);
058 }
059 }
060
061 @Override
062 public boolean last() throws ORMException {
063 try {
064 return _scrollableResults.last();
065 }
066 catch (Exception e) {
067 throw ExceptionTranslator.translate(e);
068 }
069 }
070
071 @Override
072 public boolean next() throws ORMException {
073 try {
074 return _scrollableResults.next();
075 }
076 catch (Exception e) {
077 throw ExceptionTranslator.translate(e);
078 }
079 }
080
081 @Override
082 public boolean previous() throws ORMException {
083 try {
084 return _scrollableResults.previous();
085 }
086 catch (Exception e) {
087 throw ExceptionTranslator.translate(e);
088 }
089 }
090
091 @Override
092 public boolean scroll(int i) throws ORMException {
093 try {
094 return _scrollableResults.scroll(i);
095 }
096 catch (Exception e) {
097 throw ExceptionTranslator.translate(e);
098 }
099 }
100
101 private org.hibernate.ScrollableResults _scrollableResults;
102
103 }