ArrayList<Parameter> paramList = query.getParameters();
if (originalParameters != null) {
for (int i = 0, size = originalParameters.size(); i < size; i++) {
Parameter orig = originalParameters.get(i);
int idx = orig.getIndex();
Value value = orig.getValue(session);
setParameter(paramList, idx, value);
}
}
int len;
if (first != null) {
len = first.getColumnCount();
} else if (last != null) {
len = last.getColumnCount();
} else {
len = 0;
}
int idx = originalParameters == null ? 0 : originalParameters.size();
idx += view.getParameterOffset();
for (int i = 0; i < len; i++) {
if (first != null) {
Value v = first.getValue(i);
if (v != null) {
int x = idx++;
setParameter(paramList, x, v);
}
}
// for equality, only one parameter is used (first == last)
if (last != null && indexMasks[i] != IndexCondition.EQUALITY) {
Value v = last.getValue(i);
if (v != null) {
int x = idx++;
setParameter(paramList, x, v);
}
}