net.mlw.vlh.adapter.hibernate.util
Class ScrollableResultsDecorator

java.lang.Object
  extended bynet.mlw.vlh.adapter.hibernate.util.ScrollableResultsDecorator
All Implemented Interfaces:
net.sf.hibernate.ScrollableResults

public class ScrollableResultsDecorator
extends Object
implements net.sf.hibernate.ScrollableResults

The ScrollableResultsDecorator class enable or disable putting objects into a final ResultsSet, thus into a final valueList. To check validity it uses ObjectValidator's interface. This implementation ensures that the validation method is invoked only once per object.

Version:
$Revision: 1.7 $ $Date: 2005/09/16 12:17:07 $
Author:
Andrej Zachar

Constructor Summary
ScrollableResultsDecorator(net.sf.hibernate.ScrollableResults scrollableResults, ObjectValidator validator)
          Default contructor of decorator;
 
Method Summary
 void afterLast()
           
 void beforeFirst()
           
 void close()
           
 boolean first()
           
 Object[] get()
           
 Object get(int arg0)
           
 BigDecimal getBigDecimal(int arg0)
           
 byte[] getBinary(int arg0)
           
 Blob getBlob(int arg0)
           
 Boolean getBoolean(int arg0)
           
 Byte getByte(int arg0)
           
 Calendar getCalendar(int arg0)
           
 Character getCharacter(int arg0)
           
 Clob getClob(int arg0)
           
 Date getDate(int arg0)
           
 Double getDouble(int arg0)
           
 Float getFloat(int arg0)
           
 Integer getInteger(int arg0)
           
 Locale getLocale(int arg0)
           
 Long getLong(int arg0)
           
 int getRowNumber()
           
 Short getShort(int arg0)
           
 String getString(int arg0)
           
 String getText(int arg0)
           
 TimeZone getTimeZone(int arg0)
           
 net.sf.hibernate.type.Type getType(int arg0)
           
 boolean isFirst()
           
 boolean isLast()
           
 boolean last()
           
 boolean next()
           
 boolean previous()
           
 boolean scroll(int i)
           
 boolean setRowNumber(int row)
           
 void setScrollableResults(net.sf.hibernate.ScrollableResults scrollableResults)
           
 void setValidator(ObjectValidator validator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrollableResultsDecorator

public ScrollableResultsDecorator(net.sf.hibernate.ScrollableResults scrollableResults,
                                  ObjectValidator validator)
Default contructor of decorator;

Method Detail

beforeFirst

public void beforeFirst()
                 throws net.sf.hibernate.HibernateException
Specified by:
beforeFirst in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.beforeFirst()

first

public boolean first()
              throws net.sf.hibernate.HibernateException
Specified by:
first in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.first()

isFirst

public boolean isFirst()
                throws net.sf.hibernate.HibernateException
Specified by:
isFirst in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.isFirst()

afterLast

public void afterLast()
               throws net.sf.hibernate.HibernateException
Specified by:
afterLast in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.afterLast()

last

public boolean last()
             throws net.sf.hibernate.HibernateException
Specified by:
last in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.last()

isLast

public boolean isLast()
               throws net.sf.hibernate.HibernateException
Specified by:
isLast in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.isLast()

next

public boolean next()
             throws net.sf.hibernate.HibernateException
Specified by:
next in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.next()

previous

public boolean previous()
                 throws net.sf.hibernate.HibernateException
Specified by:
previous in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.previous()

scroll

public boolean scroll(int i)
               throws net.sf.hibernate.HibernateException
Specified by:
scroll in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.scroll(int)

setRowNumber

public boolean setRowNumber(int row)
                     throws net.sf.hibernate.HibernateException
Specified by:
setRowNumber in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.setRowNumber(int)

getRowNumber

public int getRowNumber()
                 throws net.sf.hibernate.HibernateException
Specified by:
getRowNumber in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getRowNumber()

get

public Object[] get()
             throws net.sf.hibernate.HibernateException
Specified by:
get in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.get()

get

public Object get(int arg0)
           throws net.sf.hibernate.HibernateException
Specified by:
get in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.get(int)

close

public void close()
           throws net.sf.hibernate.HibernateException
Specified by:
close in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.close()

getBigDecimal

public BigDecimal getBigDecimal(int arg0)
                         throws net.sf.hibernate.HibernateException
Specified by:
getBigDecimal in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getBigDecimal(int)

getBinary

public byte[] getBinary(int arg0)
                 throws net.sf.hibernate.HibernateException
Specified by:
getBinary in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getBinary(int)

getBlob

public Blob getBlob(int arg0)
             throws net.sf.hibernate.HibernateException
Specified by:
getBlob in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getBlob(int)

getBoolean

public Boolean getBoolean(int arg0)
                   throws net.sf.hibernate.HibernateException
Specified by:
getBoolean in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getBoolean(int)

getByte

public Byte getByte(int arg0)
             throws net.sf.hibernate.HibernateException
Specified by:
getByte in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getByte(int)

getCalendar

public Calendar getCalendar(int arg0)
                     throws net.sf.hibernate.HibernateException
Specified by:
getCalendar in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getCalendar(int)

getClob

public Clob getClob(int arg0)
             throws net.sf.hibernate.HibernateException
Specified by:
getClob in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getClob(int)

getDate

public Date getDate(int arg0)
             throws net.sf.hibernate.HibernateException
Specified by:
getDate in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getDate(int)

getDouble

public Double getDouble(int arg0)
                 throws net.sf.hibernate.HibernateException
Specified by:
getDouble in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getDouble(int)

getFloat

public Float getFloat(int arg0)
               throws net.sf.hibernate.HibernateException
Specified by:
getFloat in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getFloat(int)

getCharacter

public Character getCharacter(int arg0)
                       throws net.sf.hibernate.HibernateException
Specified by:
getCharacter in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getCharacter(int)

getInteger

public Integer getInteger(int arg0)
                   throws net.sf.hibernate.HibernateException
Specified by:
getInteger in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getInteger(int)

getLocale

public Locale getLocale(int arg0)
                 throws net.sf.hibernate.HibernateException
Specified by:
getLocale in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getLocale(int)

getLong

public Long getLong(int arg0)
             throws net.sf.hibernate.HibernateException
Specified by:
getLong in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getLong(int)

getShort

public Short getShort(int arg0)
               throws net.sf.hibernate.HibernateException
Specified by:
getShort in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getShort(int)

getString

public String getString(int arg0)
                 throws net.sf.hibernate.HibernateException
Specified by:
getString in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getString(int)

getText

public String getText(int arg0)
               throws net.sf.hibernate.HibernateException
Specified by:
getText in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getText(int)

getTimeZone

public TimeZone getTimeZone(int arg0)
                     throws net.sf.hibernate.HibernateException
Specified by:
getTimeZone in interface net.sf.hibernate.ScrollableResults
Throws:
net.sf.hibernate.HibernateException
See Also:
ScrollableResults.getTimeZone(int)

getType

public net.sf.hibernate.type.Type getType(int arg0)
Specified by:
getType in interface net.sf.hibernate.ScrollableResults
See Also:
ScrollableResults.getType(int)

setScrollableResults

public void setScrollableResults(net.sf.hibernate.ScrollableResults scrollableResults)

setValidator

public void setValidator(ObjectValidator validator)


Copyright © 2003-2006 mlavilson. All Rights Reserved.