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 boolean
lookup_identities
protected ResultSet
rs
protected SQLStatementIF
stm
protected TicketIF
ticket
-
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 void
close()
INTERNAL: Closes the query result, which allows it to free its resources.protected void
finalize()
String
getColumnName(int ix)
PUBLIC: Returns the name of the given column.String[]
getColumnNames()
PUBLIC: Returns the names of the columns.Object
getValue(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.int
getWidth()
INTERNAL: Returns the number of fields that each row in the query result set have.boolean
next()
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:QueryResultIF
INTERNAL: Returns the number of fields that each row in the query result set have.- Specified by:
getWidth
in interfaceQueryResultIF
-
getColumnNames
public String[] getColumnNames()
Description copied from interface:QueryResultIF
PUBLIC: Returns the names of the columns.- Specified by:
getColumnNames
in interfaceQueryResultIF
-
getColumnName
public String getColumnName(int ix)
Description copied from interface:QueryResultIF
PUBLIC: Returns the name of the given column. The column index is zero-based.- Specified by:
getColumnName
in interfaceQueryResultIF
-
getValue
public Object getValue(int index)
Description copied from interface:QueryResultIF
INTERNAL: Get the value of the field with the specified index from the current result row. The index is zero-based.- Specified by:
getValue
in interfaceQueryResultIF
-
getValues
public Object[] getValues()
Description copied from interface:QueryResultIF
INTERNAL: Get the values of all fields from the current result row.- Specified by:
getValues
in interfaceQueryResultIF
-
getValues
public Object[] getValues(Object[] values)
Description copied from interface:QueryResultIF
INTERNAL: Reads the values of all fields from the current result row into the specified array.- Specified by:
getValues
in interfaceQueryResultIF
-
next
public boolean next()
Description copied from interface:QueryResultIF
INTERNAL: 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:
next
in interfaceQueryResultIF
-
close
public void close()
Description copied from interface:QueryResultIF
INTERNAL: Closes the query result, which allows it to free its resources.- Specified by:
close
in interfaceQueryResultIF
-
-