+
+ case Query.IMAPNUM: {
+ try {
+ // translate queries in terms of imap numbers into queries in terms of uids
+ // RELIES ON THE FACT THAT UIDS ARE MONOTONICALLY INCREASING
+ int[] set = new int[q.set==null ? 2 : q.set.length];
+ if (q.set==null) { set[0] = q.min; set[1] = q.max; }
+ else System.arraycopy(q.set, 0, set, 0, q.set.length);
+ for(int i=0; i<set.length; i++) {
+ int uid = queryUidForImapNum(set[i]);
+ if (uid==-1) {
+ Log.info(SqliteMailbox.class, "PROBLEM => resorting to superclass: " + q);
+ throw new UnsupportedQueryException();
+ }
+ set[i] = uid;
+ }
+ return getWhereClause(Query.uid(set));
+ } catch (SQLException e) {
+ Log.error(this, e);
+ Log.info(SqliteMailbox.class, "resorting to superclass: " + q);
+ throw new UnsupportedQueryException();
+ }
+ }
+