Adempiere 3.5.2a

org.compiere.model
Class POResultSet<T extends PO>

java.lang.Object
  extended by org.compiere.model.POResultSet<T>

public class POResultSet<T extends PO>
extends Object

Simple wrapper over jdbc resultset

Author:
Low Heng Sin, Teo Sarca, SC ARHIPAC SERVICE SRL
  • FR [ 1984834 ] Add POResultSet.hasNext convenient method
  • FR [ 1985134 ] POResultSet improvements

  • Constructor Summary
    POResultSet(MTable table, PreparedStatement ps, ResultSet rs, String trxName)
              Constructs the POResultSet.
     
    Method Summary
     void close()
              Release database resources.
     boolean hasNext()
               
     boolean isCloseOnError()
              Will be the PreparedStatement and ResultSet closed on any database exception
     T next()
               
     void setCloseOnError(boolean closeOnError)
              Should we automatically close the PreparedStatement and ResultSet in case we get an error.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    POResultSet

    public POResultSet(MTable table,
                       PreparedStatement ps,
                       ResultSet rs,
                       String trxName)
    Constructs the POResultSet. By default, closeOnError option is false. You need to set it explicitly.

    Parameters:
    table -
    ps -
    rs -
    trxName -
    Method Detail

    hasNext

    public boolean hasNext()
                    throws DBException
    Returns:
    true if it has next, false otherwise
    Throws:
    DBException

    next

    public T next()
                      throws DBException
    Returns:
    PO or null if reach the end of resultset
    Throws:
    DBException

    setCloseOnError

    public void setCloseOnError(boolean closeOnError)
    Should we automatically close the PreparedStatement and ResultSet in case we get an error.

    Parameters:
    closeOnError -

    isCloseOnError

    public boolean isCloseOnError()
    Will be the PreparedStatement and ResultSet closed on any database exception

    Returns:
    true if yes, false otherwise

    close

    public void close()
    Release database resources.


    Adempiere 3.5.2a

    Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.