2 * Copyright (c) 1995-2013, Index Data
4 * See the file LICENSE for details.
8 import org.yaz4j.exception.ZoomException;
9 import org.yaz4j.jni.SWIGTYPE_p_ZOOM_query_p;
10 import org.yaz4j.jni.yaz4jlib;
13 * @see <a href="http://www.indexdata.com/yaz/doc/zoom.query.html">YAZ ZOOM Query</a>
16 public abstract class Query {
18 SWIGTYPE_p_ZOOM_query_p query;
19 private boolean disposed = false;
21 protected Query(String queryString) {
22 if (queryString == null)
23 throw new NullPointerException("query string cannot be null");
24 query = yaz4jlib.ZOOM_query_create();
27 public void sortBy(String strategy, String criteria) throws ZoomException {
28 int ret = yaz4jlib.ZOOM_query_sortby2(query, strategy, criteria);
30 throw new ZoomException("query sortBy failed");
34 protected void finalize() {
40 yaz4jlib.ZOOM_query_destroy(query);