3 import org.yaz4j.jni.SWIGTYPE_p_ZOOM_connection_p;
4 import org.yaz4j.jni.SWIGTYPE_p_ZOOM_record_p;
5 import org.yaz4j.jni.SWIGTYPE_p_ZOOM_resultset_p;
6 import org.yaz4j.jni.yaz4jlib;
10 private SWIGTYPE_p_ZOOM_resultset_p resultSet;
11 private SWIGTYPE_p_ZOOM_connection_p connection;
12 private long size = 0 ;
13 private Record[] records = null ;
14 private boolean disposed = false;
16 ResultSet(SWIGTYPE_p_ZOOM_resultset_p resultSet, SWIGTYPE_p_ZOOM_connection_p connection)
18 this.resultSet = resultSet ;
19 this.connection = connection ;
20 size = yaz4jlib.ZOOM_resultset_size(this.resultSet);
21 records = new Record[(int)size];
24 public void finalize()
29 ResultSetOptionsCollection getResultSetOptions()
31 return new ResultSetOptionsCollection(resultSet);
34 public Record getRecord(int index)
36 if ( records[index] == null)
38 SWIGTYPE_p_ZOOM_record_p recordTemp = yaz4jlib.ZOOM_resultset_record(resultSet, index);
39 records[index] = new Record(recordTemp, this);
42 return this.records[index];
54 for( int i=0 ; i<records.length ; i++)
56 if (records[i] != null)
60 yaz4jlib.ZOOM_resultset_destroy(resultSet);