|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.z3950.zoom.ResultSet
Represents a result set held on a Z39.50 Server, as described in the ZOOM Abstract API.
Synopsis:
ResultSet rs = conn.search(query); int size = rs.size(); for (int i = 0; i < size; i++) { System.out.println(rs.getRecord(i).render()); }
ResultSets are created only by the Connection class's
search()
method, so there is no public constructor for
this class.
Connection.search(Query)
,
zoom.z3950.org/api/zoom-1.1.html#3.4Method Summary | |
void |
delete()
Deletes this ResultSet, informing the server that it may release any resources it has allocated to it. |
Record |
getRecord(int i)
Fetches the i th record of this ResultSet from the
server on the other end of the Connection with which the
ResultSet was created. |
java.lang.String |
option(java.lang.String key)
Returns the value of the specified option in this ResultSet object, if it is defined there; otherwise returns the specified option's value in the Connection object by which this ResultSet was created. |
java.lang.String |
option(java.lang.String key,
java.lang.String val)
Sets the specified option in this ResultSet object to the specified value, returning its previous value (as would have been returned by the single-parameter version.) |
int |
size()
Returns the number of records found by the server satisfying the query with which this ResultSet was created. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.String option(java.lang.String key)
key
- the name of the requested optionConnection.option(String)
,
zoom.z3950.org/api/zoom-1.1.html#3.4.2public java.lang.String option(java.lang.String key, java.lang.String val)
key
- the name of the option to setvalue
- the value to which to set the specified optionoption(String)
,
zoom.z3950.org/api/zoom-1.1.html#3.4.2public int size()
public Record getRecord(int i)
i
th record of this ResultSet from the
server on the other end of the Connection with which the
ResultSet was created. Counting starts from zero, so that the
highest acceptable value of i
is one less than the
return value of the size()
method.i
- zero-based index of the record to fetch.public void delete()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |