Class DelegatingResultRow
java.lang.Object
cz.cvut.kbss.ontodriver.iteration.DelegatingResultRow
- All Implemented Interfaces:
ResultRow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfindColumn(String columnLabel) Retrieves index of a column with the specified label.booleangetBoolean(int columnIndex) Retrieves value from column at the specified index and returns it as aboolean.booleangetBoolean(String columnLabel) Retrieves value from column with the specified label and returns it as aboolean.bytegetByte(int columnIndex) Retrieves value from column at the specified index and returns it asbyte.byteRetrieves value from column with the specified label and returns it asbyte.intGets the count of available columns.doublegetDouble(int columnIndex) Retrieves value from column at the specified index and returns it asdouble.doubleRetrieves value from column with the specified label and returns it asdouble.floatgetFloat(int columnIndex) Retrieves value from column at the specified index and returns it asfloat.floatRetrieves value from column with the specified label and returns it asfloat.intgetIndex()Gets the index of this row (first row has index 0).intgetInt(int columnIndex) Retrieves value from column at the specified index and returns it asint.intRetrieves value from column with the specified label and returns it asint.longgetLong(int columnIndex) Retrieves value from column at the specified index and returns it aslong.longRetrieves value from column with the specified label and returns it aslong.getObject(int columnIndex) Retrieves value from column at the specified index and returns it asObject.<T> TRetrieves value from column at the specified index and returns it as an instance of the specified class.Retrieves value from column with the specified label and returns it asObject.<T> TRetrieves value from column with the specified label and returns it as an instance of the specified class.shortgetShort(int columnIndex) Retrieves value of column at the specified index and returns it asshort.shortRetrieves value of column with the specified label and returns it asshort.getString(int columnIndex) Retrieves value of column at the specified index and returns it asString.Retrieves value of column with the specified label and returns it asString.booleanisBound(int variableIndex) Checks whether a value at the specified index is bound in the current result row.booleanChecks whether a value of the specified variable is bound in the current result row.
-
Constructor Details
-
DelegatingResultRow
-
-
Method Details
-
findColumn
Description copied from interface:ResultRowRetrieves index of a column with the specified label.- Specified by:
findColumnin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
- index of the column or -1 if there is no such column
-
getColumnCount
public int getColumnCount()Description copied from interface:ResultRowGets the count of available columns.This number corresponds to the number of result variables bound in the query.
- Specified by:
getColumnCountin interfaceResultRow- Returns:
- Number of columns in the result set
-
isBound
Description copied from interface:ResultRowChecks whether a value at the specified index is bound in the current result row.Note that this method will return
falsealso in case the index is out of range of the variables known to the result set as a whole.- Specified by:
isBoundin interfaceResultRow- Parameters:
variableIndex- Index of the variable- Returns:
truewhen value is bound in the current row,falseotherwise- Throws:
OntoDriverException- When unable to resolve binding status
-
isBound
Description copied from interface:ResultRowChecks whether a value of the specified variable is bound in the current result row.Note that this method will return
falsealso in case the variable is not known to the result set at all.- Specified by:
isBoundin interfaceResultRow- Parameters:
variableName- Variable name- Returns:
truewhen value is bound in the current row,falseotherwise- Throws:
OntoDriverException- When unable to resolve binding status
-
getBoolean
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it as aboolean.- Specified by:
getBooleanin interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
booleanvalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast tobooleanor there occurs some other error
-
getBoolean
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it as aboolean.- Specified by:
getBooleanin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
booleanvalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast tobooleanor there occurs some other error
-
getByte
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it asbyte.- Specified by:
getBytein interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
bytevalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast tobyteor there occurs some other error
-
getByte
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it asbyte.- Specified by:
getBytein interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
bytevalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast tobyteor there occurs some other error
-
getDouble
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it asdouble.- Specified by:
getDoublein interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
doublevalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast todoubleor there occurs some other error
-
getDouble
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it asdouble.- Specified by:
getDoublein interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
doublevalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast todoubleor there occurs some other error
-
getFloat
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it asfloat.- Specified by:
getFloatin interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
floatvalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast tofloator there occurs some other error
-
getFloat
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it asfloat.- Specified by:
getFloatin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
floatvalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast tofloator there occurs some other error
-
getInt
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it asint.- Specified by:
getIntin interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
intvalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast tointor there occurs some other error
-
getInt
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it asint.- Specified by:
getIntin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
intvalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast tointor there occurs some other error
-
getLong
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it aslong.- Specified by:
getLongin interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
longvalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast tolongor there occurs some other error
-
getLong
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it aslong.- Specified by:
getLongin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
longvalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast tolongor there occurs some other error
-
getObject
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it asObject.- Specified by:
getObjectin interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
- column value cast to
Object - Throws:
OntoDriverException- If thecolumnIndexis not a valid column index or there occurs some other error
-
getObject
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it asObject.- Specified by:
getObjectin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
- column value cast to
Object - Throws:
OntoDriverException- If there is no column with the specified label or there occurs some other error
-
getObject
Description copied from interface:ResultRowRetrieves value from column at the specified index and returns it as an instance of the specified class.The mechanism of transforming the value to the specified class is not specified, it can be merely type casting or calling a constructor of the specified type.
- Specified by:
getObjectin interfaceResultRow- Type Parameters:
T- Return type- Parameters:
columnIndex- Column index, the first column has index 0cls- Requested class type- Returns:
- Value of the column
- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast to the specified type or there occurs some other error
-
getObject
Description copied from interface:ResultRowRetrieves value from column with the specified label and returns it as an instance of the specified class.The mechanism of transforming the value to the specified class is not specified, it can be merely type casting or calling a constructor of the specified type.
- Specified by:
getObjectin interfaceResultRow- Type Parameters:
T- Return type- Parameters:
columnLabel- Label of the columncls- Requested class type- Returns:
- Value of the column.
- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast to the specified type or there occurs some other error
-
getShort
Description copied from interface:ResultRowRetrieves value of column at the specified index and returns it asshort.- Specified by:
getShortin interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
shortvalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast toshortor there occurs some other error
-
getShort
Description copied from interface:ResultRowRetrieves value of column with the specified label and returns it asshort.- Specified by:
getShortin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
shortvalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast toshortor there occurs some other error
-
getString
Description copied from interface:ResultRowRetrieves value of column at the specified index and returns it asString.- Specified by:
getStringin interfaceResultRow- Parameters:
columnIndex- Column index, the first column has index 0- Returns:
Stringvalue- Throws:
OntoDriverException- If thecolumnIndexis not a valid column index, the value cannot be cast toStringor there occurs some other error
-
getString
Description copied from interface:ResultRowRetrieves value of column with the specified label and returns it asString.- Specified by:
getStringin interfaceResultRow- Parameters:
columnLabel- Label of the column- Returns:
Stringvalue- Throws:
OntoDriverException- If there is no column with the specified label, the value cannot be cast toStringor there occurs some other error
-
getIndex
Description copied from interface:ResultRowGets the index of this row (first row has index 0).- Specified by:
getIndexin interfaceResultRow- Returns:
- Index of this row
- Throws:
OntoDriverException- If some other error occurs
-