Query q = session.createQuery(sql);
q.setFirstResult(0);
q.setMaxResults(2);
QueryPos qPos = QueryPos.getInstance(q);
if (bindObjectType) {
if (objectType != null) {
qPos.add(objectType);
}
}
if (bindMbox) {
if (mbox != null) {
qPos.add(mbox);
}
}
if (bindMbox_sha1sum) {
if (mbox_sha1sum != null) {
qPos.add(mbox_sha1sum);
}
}
if (bindOpenid) {
if (openid != null) {
qPos.add(openid);
}
}
if (bindAccount) {
if (account != null) {
qPos.add(account);
}
}
if (orderByComparator != null) {
Object[] values = orderByComparator.getOrderByConditionValues(lfTincanActor);
for (Object value : values) {
qPos.add(value);
}
}
List<LFTincanActor> list = q.list();