Query q = dict.getQuery("byOrderedResemblance");
ShadesORMDictionary.filterCandidate.resembles(filter, orm
.getColumnSet("nonKeyFields"));
dbSess.setParameter("first", new Integer(qp.getFirst()));
dbSess.setParameter("count", new Integer(qp.getCount()));
q.clause("ORDER BY").enable(qp.hasSort());
dbSess.setParameter("order", qp.getSort());
if (qp.isSortAsc()) {
dbSess.setParameter("direction", "ASC");
} else {
dbSess.setParameter("direction", "DESC");