+ @Override
+ public void finalize() {
+ this._dispose();
+ }
+
+ /**
+ * Read option by name.
+ * @param name option name
+ * @return option value
+ */
+ public String option(String name) {
+ return yaz4jlib.ZOOM_resultset_option_get(resultSet, name);
+ }
+
+ /**
+ * Write option with a given name.
+ * @param name option name
+ * @param value option value
+ * @return result set (self) for chainability
+ */
+ public ResultSet option(String name, String value) {
+ yaz4jlib.ZOOM_resultset_option_set(resultSet, name, value);
+ return this;
+ }
+
+ public Record getRecord(int index) {
+ SWIGTYPE_p_ZOOM_record_p record =
+ yaz4jlib.ZOOM_resultset_record(resultSet, index);
+ return new Record(record, this);
+ }
+
+ public long getSize() {
+ return size;
+ }
+
+ void _dispose() {
+ if (!disposed) {
+ yaz4jlib.ZOOM_resultset_destroy(resultSet);
+ resultSet = null;
+ conn = null;
+ disposed = true;
+ }
+ }