Class RDBMSQueryResult
- java.lang.Object
-
- net.ontopia.persistence.query.sql.RDBMSQueryResult
-
- All Implemented Interfaces:
QueryResultIF
public class RDBMSQueryResult extends Object implements QueryResultIF
INTERNAL: QueryResultIF implementation that wraps a ResultSet.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanlookup_identitiesprotected ResultSetrsprotected SQLStatementIFstmprotected TicketIFticket
-
Constructor Summary
Constructors Constructor Description RDBMSQueryResult(SQLStatementIF stm, TicketIF ticket, ResultSet rs)RDBMSQueryResult(SQLStatementIF stm, TicketIF ticket, ResultSet rs, boolean lookup_identities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()INTERNAL: Closes the query result, which allows it to free its resources.protected voidfinalize()StringgetColumnName(int ix)PUBLIC: Returns the name of the given column.String[]getColumnNames()PUBLIC: Returns the names of the columns.ObjectgetValue(int index)INTERNAL: Get the value of the field with the specified index from the current result row.Object[]getValues()INTERNAL: Get the values of all fields from the current result row.Object[]getValues(Object[] values)INTERNAL: Reads the values of all fields from the current result row into the specified array.intgetWidth()INTERNAL: Returns the number of fields that each row in the query result set have.booleannext()INTERNAL: Skip to the next row in the query result set.
-
-
-
Field Detail
-
stm
protected SQLStatementIF stm
-
ticket
protected TicketIF ticket
-
rs
protected ResultSet rs
-
lookup_identities
protected boolean lookup_identities
-
-
Constructor Detail
-
RDBMSQueryResult
public RDBMSQueryResult(SQLStatementIF stm, TicketIF ticket, ResultSet rs)
-
RDBMSQueryResult
public RDBMSQueryResult(SQLStatementIF stm, TicketIF ticket, ResultSet rs, boolean lookup_identities)
-
-
Method Detail
-
getWidth
public int getWidth()
Description copied from interface:QueryResultIFINTERNAL: Returns the number of fields that each row in the query result set have.- Specified by:
getWidthin interfaceQueryResultIF
-
getColumnNames
public String[] getColumnNames()
Description copied from interface:QueryResultIFPUBLIC: Returns the names of the columns.- Specified by:
getColumnNamesin interfaceQueryResultIF
-
getColumnName
public String getColumnName(int ix)
Description copied from interface:QueryResultIFPUBLIC: Returns the name of the given column. The column index is zero-based.- Specified by:
getColumnNamein interfaceQueryResultIF
-
getValue
public Object getValue(int index)
Description copied from interface:QueryResultIFINTERNAL: Get the value of the field with the specified index from the current result row. The index is zero-based.- Specified by:
getValuein interfaceQueryResultIF
-
getValues
public Object[] getValues()
Description copied from interface:QueryResultIFINTERNAL: Get the values of all fields from the current result row.- Specified by:
getValuesin interfaceQueryResultIF
-
getValues
public Object[] getValues(Object[] values)
Description copied from interface:QueryResultIFINTERNAL: Reads the values of all fields from the current result row into the specified array.- Specified by:
getValuesin interfaceQueryResultIF
-
next
public boolean next()
Description copied from interface:QueryResultIFINTERNAL: Skip to the next row in the query result set. The method returns false if the skip was not valid, i.e. we're at the end of the result set.- Specified by:
nextin interfaceQueryResultIF
-
close
public void close()
Description copied from interface:QueryResultIFINTERNAL: Closes the query result, which allows it to free its resources.- Specified by:
closein interfaceQueryResultIF
-
-