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

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

public class ScrollableResultsDecorator
extends Object
implements org.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.1 $ $Date: 2005/10/20 16:45:24 $
Author:
Andrej Zachar

Constructor Summary
ScrollableResultsDecorator(org.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)
           
 BigInteger getBigInteger(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)
           
 org.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(org.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(org.hibernate.ScrollableResults scrollableResults,
                                  ObjectValidator validator)
Default contructor of decorator;

Method Detail

beforeFirst

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

first

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

isFirst

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

afterLast

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

last

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

isLast

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

next

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

previous

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

scroll

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

setRowNumber

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

getRowNumber

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

get

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

get

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

close

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

getBigDecimal

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

getBigInteger

public BigInteger getBigInteger(int arg0)
                         throws org.hibernate.HibernateException
Specified by:
getBigInteger in interface org.hibernate.ScrollableResults
Throws:
org.hibernate.HibernateException
See Also:
ScrollableResults.getBigInteger(int)

getBinary

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

getBlob

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

getBoolean

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

getByte

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

getCalendar

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

getClob

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

getDate

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

getDouble

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

getFloat

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

getCharacter

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

getInteger

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

getLocale

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

getLong

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

getShort

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

getString

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

getText

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

getTimeZone

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

getType

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

setScrollableResults

public void setScrollableResults(org.hibernate.ScrollableResults scrollableResults)

setValidator

public void setValidator(ObjectValidator validator)


Copyright © 2003-2006 mlavilson. All Rights Reserved.