Thanks JC. That post is dealing with an uncommon pattern however. The best information on how to build complex queries is in the docs:
http://ormlite.com/docs/building-queries
In your case you would do something like:
qb = invoiceDao.queryBuilder();
where = qb.where();
where.and(where.between(Invoice.MYDATE_FIELD, 1234, 12345),
where.or(where.like(Invoice.UUID_FIELD, "%ASDF%"),
where.in(Invoice.ID_FIELD, selectInvoiceIdQuery)
)
);
Notice that the between goes from low to high. Not sure if it works to do it the other way around. Also,
where.in() can take a bunch of objects _or_ it can take a sub-query like your example here.
gray
p.s. I was very proud of that StackOverflow post in that I beat Jon Skreet for the check-mark after the fact. Then again, he didn't write ORMLite so maybe I have an advantage? :-)