for (Term t : restriction.eqValues)
{
ByteBuffer value = t.getByteBuffer(name.type, variables);
if (value.remaining() > 0xFFFF)
throw new InvalidRequestException("Index expression values may not be larger than 64K");
expressions.add(new IndexExpression(name.name.key, IndexOperator.EQ, value));
}
}
else
{
for (Bound b : Bound.values())
{
if (restriction.bound(b) != null)
{
ByteBuffer value = restriction.bound(b).getByteBuffer(name.type, variables);
if (value.remaining() > 0xFFFF)
throw new InvalidRequestException("Index expression values may not be larger than 64K");
expressions.add(new IndexExpression(name.name.key, restriction.getIndexOperator(b), value));
}
}
}
}
return expressions;