Class BooleanQueryResult
- java.lang.Object
-
- net.ontopia.topicmaps.query.impl.rdbms.BooleanQueryResult
-
- All Implemented Interfaces:
AutoCloseable
,QueryResultIF
public class BooleanQueryResult extends Object implements QueryResultIF
INTERNAL: Query result representating queries have no variables and evaluate to either true or false.
-
-
Constructor Summary
Constructors Constructor Description BooleanQueryResult(String[] colnames, boolean result)
BooleanQueryResult(String[] colnames, Object[] values, boolean result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
PUBLIC: Closes the query result, which allows it to free its resources.String
getColumnName(int ix)
PUBLIC: Returns the name of the given column.String[]
getColumnNames()
PUBLIC: Returns the names of the columns.int
getIndex(String colname)
PUBLIC: Returns the index of the named column.Object
getValue(int ix)
PUBLIC: Returns the value in the given column in the current match.Object
getValue(String colname)
PUBLIC: Returns the value in the given column in the current match.Object[]
getValues()
PUBLIC: Returns the current match as an array of values.Object[]
getValues(Object[] values)
PUBLIC: Reads the values of the current match into the specified array.int
getWidth()
PUBLIC: Returns the number of columns in the result.boolean
next()
PUBLIC: Steps to the next match, returning true if a valid match was found, and false if there are no more matches.
-
-
-
Method Detail
-
next
public boolean next()
Description copied from interface:QueryResultIF
PUBLIC: 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:
next
in interfaceQueryResultIF
-
getValue
public Object getValue(int ix)
Description copied from interface:QueryResultIF
PUBLIC: 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:
getValue
in interfaceQueryResultIF
-
getValue
public Object getValue(String colname)
Description copied from interface:QueryResultIF
PUBLIC: Returns the value in the given column in the current match. Requiresnext()
to have been called first.- Specified by:
getValue
in interfaceQueryResultIF
-
getWidth
public int getWidth()
Description copied from interface:QueryResultIF
PUBLIC: Returns the number of columns in the result.- Specified by:
getWidth
in interfaceQueryResultIF
-
getIndex
public int getIndex(String colname)
Description copied from interface:QueryResultIF
PUBLIC: Returns the index of the named column. Returns -1 if the column does not exist. The column index is zero-based.- Specified by:
getIndex
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
-
getValues
public Object[] getValues()
Description copied from interface:QueryResultIF
PUBLIC: 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:
getValues
in interfaceQueryResultIF
-
getValues
public Object[] getValues(Object[] values)
Description copied from interface:QueryResultIF
PUBLIC: Reads the values of the current match into the specified array. Requiresnext()
to have been called first.- Specified by:
getValues
in interfaceQueryResultIF
-
close
public void close()
Description copied from interface:QueryResultIF
PUBLIC: Closes the query result, which allows it to free its resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceQueryResultIF
-
-