All Packages Class Hierarchy This Package Previous Next Index
Class ShoeKb.ResultSet
java.lang.Object
|
+----ShoeKb.ResultSet
- public class ResultSet
- extends Object
A set of results that is returned by a query.
-
ResultSet(String[])
- Constructs a new result set for the variables in varnames.
-
ResultSet(String[], int)
- Constructs a new result set to hold rowCapacity rows of
varNum variable bindings.
-
ResultSet(String[], String[][])
- Constructs a new result set given an ordering of the variables
and a matrix of variable bindings.
-
addResult(String[])
- Adds a single set of variable bindings to the result set.
-
getColNameIndex(String)
- Returns column index of named variable, or -1 if error--
eg, name not there.
-
getColVar(int)
- Returns the variable name associated with the requested column.
-
getColVars()
- Returns an array of the variable names used in the query, using
the order that the results occur in.
-
getNumColumns()
- Returns the number of variables in the result set.
-
getNumResults()
- Returns the number of results in the set.
-
getResult(int)
- Returns one set of bindings for the query as an array.
-
getValue(int, int)
- Returns a single binding for a single variable.
-
getValueMatrix()
- Returns a matrix of the result set, where each column represents
a different variable and each row represents a different set of
bindings.
-
removeDuplicates()
- Removes duplicate rows from the result set.
-
selectColumn(int)
- Selects a particular variable (based on its order in the results)
and returns its set of bindings as an array.
-
toString()
-
ResultSet
public ResultSet(String varNames[])
- Constructs a new result set for the variables in varnames.
ResultSet
public ResultSet(String varNames[],
int rowCapacity)
- Constructs a new result set to hold rowCapacity rows of
varNum variable bindings.
ResultSet
public ResultSet(String varOrder[],
String bindings[][])
- Constructs a new result set given an ordering of the variables
and a matrix of variable bindings.
getNumResults
public int getNumResults()
- Returns the number of results in the set.
getNumColumns
public int getNumColumns()
- Returns the number of variables in the result set.
getColVar
public String getColVar(int col)
- Returns the variable name associated with the requested column.
getColVars
public String[] getColVars()
- Returns an array of the variable names used in the query, using
the order that the results occur in.
getColNameIndex
public int getColNameIndex(String varName)
- Returns column index of named variable, or -1 if error--
eg, name not there.
getValue
public String getValue(int row,
int col)
- Returns a single binding for a single variable.
getResult
public String[] getResult(int pos)
- Returns one set of bindings for the query as an array.
getValueMatrix
public String[][] getValueMatrix()
- Returns a matrix of the result set, where each column represents
a different variable and each row represents a different set of
bindings.
selectColumn
public String[] selectColumn(int cnum)
- Selects a particular variable (based on its order in the results)
and returns its set of bindings as an array.
removeDuplicates
public boolean removeDuplicates()
- Removes duplicate rows from the result set.
toString
public String toString()
- Overrides:
- toString in class Object
addResult
public void addResult(String res[])
- Adds a single set of variable bindings to the result set. This
function is used to construct result sets incrementally.
All Packages Class Hierarchy This Package Previous Next Index