|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jcs.xml.resultset.ResultSetVector
A class to contain a Java Vector with the values of an SQL result set.
Constructor Summary | |
ResultSetVector(java.lang.String query,
java.lang.String server)
Constructs a ResultSetVector from the SQL result set
returned by the argument query. |
|
ResultSetVector(java.util.Vector arg)
Constructs a ResultSetVector from a plain Vector. |
Method Summary | |
java.lang.Boolean |
allString(int columnNumber,
java.lang.String compOp,
java.lang.String comparand)
Returns the universal quantification of a given comparison to a given column of the ResultSetVector . |
static java.lang.String |
checkSquare(java.util.Vector arg)
Checks that the arg vector has the shape of an SQL result set. |
java.lang.String[] |
columnArray(int j)
Returns the j-th column as a String array. |
int |
columnCount()
Returns the number of columns. |
java.util.Vector |
columnVector(int j)
Returns the j-th column as a Vector. |
java.util.Vector |
content()
Returns the content field. |
java.lang.String |
getColumn(int i,
int j)
Returns the value of row i column j as a String |
java.lang.String[] |
rowArray(int i)
Returns the i-th row as a String array. |
int |
rowCount()
Returns the number of rows. |
java.util.Vector |
rowVector(int i)
Returns the i-th row as a Vector. |
java.lang.Boolean |
someString(int columnNumber,
java.lang.String compOp,
java.lang.String comparand)
Returns the existential quantification of a given comparison to a given column of the ResultSetVector . |
java.lang.String |
toString()
Overrides the Object.toString method. |
java.lang.String |
toStringColumn(int j,
java.lang.String columnSeparator)
Returns a string representation of a given column of the result set. |
java.lang.String |
toStringRow(int i,
java.lang.String columnSeparator)
Returns a string representation of a given row of the result set. |
java.lang.String |
toStringTable(java.lang.String rowSeparator,
java.lang.String columnSeparator)
A 'toString' method for the entire result set. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ResultSetVector(java.util.Vector arg) throws java.lang.Exception
arg
- a Vector that has the characteristics of an SQL result set.
It must be a Vector of Vectors, with each sub-Vector
having the same number of elements.public ResultSetVector(java.lang.String query, java.lang.String server) throws java.lang.ClassNotFoundException, java.sql.SQLException, java.lang.Exception
ResultSetVector
from the SQL result set
returned by the argument query.
Example Java code:
ResultSetVector rsv // A client-side call = new ResultSetVector("select * from systypes", "antibes:4000?user=sa"); ResultSetVector rsv2 // A server-side call = new ResultSetVector("select * from emp, dept where emp.dno=dept.dno", "");
query
- a string that is the SQL query whose result set is to be
returned as a ResultSetVectorserver
- a string that identifies the SQL server in which to execute
the query. See the connectTo method
for a description of this parameter.Method Detail |
public java.util.Vector content()
content
field.public static java.lang.String checkSquare(java.util.Vector arg) throws java.lang.Exception
arg
- a Vector that has the characteristics of an SQL result set.public int rowCount()
public int columnCount()
public java.lang.String getColumn(int i, int j)
i
- an int that is the number of a row of the result set Vectorj
- an int that is the number of a column of the result set Vectorpublic java.lang.String toString()
Object.toString
method.public java.lang.String toStringTable(java.lang.String rowSeparator, java.lang.String columnSeparator)
rowSeparator
- a string to be inserted between rows in the outputcolumnSeparator
- a string to be inserted between columns in the outputpublic java.lang.String toStringRow(int i, java.lang.String columnSeparator)
i
- an int that is the number of a row of the result setcolumnSeparator
- a string to be inserted between columns in the outputpublic java.lang.String toStringColumn(int j, java.lang.String columnSeparator)
j
- an int that is the number of a column of the result setcolumnSeparator
- a string to be inserted between columns in the outputpublic java.util.Vector rowVector(int i)
i
- an int that is the number of a row of the result setpublic java.util.Vector columnVector(int j)
j
- an int that is the number of a column of the result setpublic java.lang.String[] rowArray(int i)
i
- an int that is the number of a row of the result setpublic java.lang.String[] columnArray(int j)
j
- an int that is the number of a column of the result setpublic java.lang.Boolean allString(int columnNumber, java.lang.String compOp, java.lang.String comparand) throws java.lang.Exception
ResultSetVector
.
Example Java code:
rsv.allString(i, "<=", "xxx")returns true iff for all elements ci of column i of rsv,
ci <= "xxx"The
allString
method performs only String comparisons.columnNumber
- the number of a column of the result setcompOp
- a string that is one of "=,==,<,>,<>,!=, >=,<=".comparand
- a string that will be the second operand of the compares.public java.lang.Boolean someString(int columnNumber, java.lang.String compOp, java.lang.String comparand) throws java.lang.Exception
ResultSetVector
.
Example Java code:
rsv.someString(i, "<=", "xxx")returns true iff for some element ci of column i of rsv,
ci <= "xxx"The
someString
method performs only String comparisons.columnNumber
- the number of a column of the result setcompOp
- a string that is one of "=,==,<,>,<>,!=, >=,<=".comparand
- a string that will be the second operand of the compares.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |