org.exolab.castor.jdo.engine

Class SQLEngine.SQLQuery

Enclosing Class:
SQLEngine
Implemented Interfaces:
PersistenceQuery

(package private) static final class SQLEngine.SQLQuery
extends java.lang.Object
implements PersistenceQuery

Constructor Summary

SQLQuery(SQLEngine engine, String sql, Class[] types)

Method Summary

boolean
absolute(int row)
use the jdbc 2.0 method to move to an absolute position in the resultset.
void
close()
void
execute(Object conn, AccessMode accessMode)
void
execute(Object conn, AccessMode accessMode, boolean scrollable)
Object
fetch(Object[] fields, Object identity)
int
getParameterCount()
Class
getParameterType(int index)
Class
getResultType()
Object
nextIdentity(Object identity)
void
setParameter(int index, Object value)
int
size()
Uses the underlying db's cursors to most to the last row in the result set, get the row number via getRow(), then move back to where ever the user was positioned in the resultset.

Constructor Details

SQLQuery

(package private)  SQLQuery(SQLEngine engine,
                            String sql,
                            Class[] types)

Method Details

absolute

public boolean absolute(int row)
            throws PersistenceException
use the jdbc 2.0 method to move to an absolute position in the resultset.
Specified by:
absolute in interface PersistenceQuery

close

public void close()
Specified by:
close in interface PersistenceQuery

execute

public void execute(Object conn,
                    AccessMode accessMode)
            throws QueryException,
                   PersistenceException
Specified by:
execute in interface PersistenceQuery

execute

public void execute(Object conn,
                    AccessMode accessMode,
                    boolean scrollable)
            throws QueryException,
                   PersistenceException
Specified by:
execute in interface PersistenceQuery

fetch

public Object fetch(Object[] fields,
                    Object identity)
            throws ObjectNotFoundException,
                   PersistenceException
Specified by:
fetch in interface PersistenceQuery

getParameterCount

public int getParameterCount()
Specified by:
getParameterCount in interface PersistenceQuery

getParameterType

public Class getParameterType(int index)
            throws ArrayIndexOutOfBoundsException
Specified by:
getParameterType in interface PersistenceQuery

getResultType

public Class getResultType()
Specified by:
getResultType in interface PersistenceQuery

nextIdentity

public Object nextIdentity(Object identity)
            throws PersistenceException
Specified by:
nextIdentity in interface PersistenceQuery

setParameter

public void setParameter(int index,
                         Object value)
            throws ArrayIndexOutOfBoundsException,
                   IllegalArgumentException
Specified by:
setParameter in interface PersistenceQuery

size

public int size()
            throws PersistenceException
Uses the underlying db's cursors to most to the last row in the result set, get the row number via getRow(), then move back to where ever the user was positioned in the resultset.
Specified by:
size in interface PersistenceQuery

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com