Class BooleanQueryResult
java.lang.Object
net.ontopia.topicmaps.query.impl.rdbms.BooleanQueryResult
- All Implemented Interfaces:
AutoCloseable,QueryResultIF
INTERNAL: Query result representating queries have no variables and
evaluate to either true or false.
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanQueryResult(String[] colnames, boolean result) BooleanQueryResult(String[] colnames, Object[] values, boolean result) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()PUBLIC: Closes the query result, which allows it to free its resources.getColumnName(int ix) PUBLIC: Returns the name of the given column.String[]PUBLIC: Returns the names of the columns.intPUBLIC: Returns the index of the named column.getValue(int ix) PUBLIC: Returns the value in the given column in the current match.PUBLIC: Returns the value in the given column in the current match.Object[]PUBLIC: Returns the current match as an array of values.Object[]PUBLIC: Reads the values of the current match into the specified array.intgetWidth()PUBLIC: Returns the number of columns in the result.booleannext()PUBLIC: Steps to the next match, returning true if a valid match was found, and false if there are no more matches.
-
Constructor Details
-
BooleanQueryResult
-
BooleanQueryResult
-
-
Method Details
-
next
public boolean next()Description copied from interface:QueryResultIFPUBLIC: Steps to the next match, returning true if a valid match was found, and false if there are no more matches. Must be called before values can be returned.- Specified by:
nextin interfaceQueryResultIF
-
getValue
Description copied from interface:QueryResultIFPUBLIC: Returns the value in the given column in the current match. The column index is zero-based. Requiresnext()to have been called first.- Specified by:
getValuein interfaceQueryResultIF
-
getValue
Description copied from interface:QueryResultIFPUBLIC: Returns the value in the given column in the current match. Requiresnext()to have been called first.- Specified by:
getValuein interfaceQueryResultIF
-
getWidth
public int getWidth()Description copied from interface:QueryResultIFPUBLIC: Returns the number of columns in the result.- Specified by:
getWidthin interfaceQueryResultIF
-
getIndex
Description copied from interface:QueryResultIFPUBLIC: Returns the index of the named column. Returns -1 if the column does not exist. The column index is zero-based.- Specified by:
getIndexin interfaceQueryResultIF
-
getColumnNames
Description copied from interface:QueryResultIFPUBLIC: Returns the names of the columns.- Specified by:
getColumnNamesin interfaceQueryResultIF
-
getColumnName
Description copied from interface:QueryResultIFPUBLIC: Returns the name of the given column. The column index is zero-based.- Specified by:
getColumnNamein interfaceQueryResultIF
-
getValues
Description copied from interface:QueryResultIFPUBLIC: Returns the current match as an array of values. Note that the returned array should not be modified as it may lead to undefined results. Requiresnext()to have been called first.- Specified by:
getValuesin interfaceQueryResultIF
-
getValues
Description copied from interface:QueryResultIFPUBLIC: Reads the values of the current match into the specified array. Requiresnext()to have been called first.- Specified by:
getValuesin interfaceQueryResultIF
-
close
public void close()Description copied from interface:QueryResultIFPUBLIC: Closes the query result, which allows it to free its resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceQueryResultIF
-