}
private void assertOpenRange(final HashMap<ConfigurationKey, Object> config,
final String datatype)
throws Exception {
final NodePrimitiveQuery openLeft;
final NodePrimitiveQuery openRight;
if (datatype.equals("int4")) {
openLeft = NodeNumericRangeQuery
.newIntRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, null, 10, true, true);
openLeft.setDatatype(datatype);
openRight = NodeNumericRangeQuery
.newIntRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, 10, null, true, true);
openRight.setDatatype(datatype);
} else if (datatype.equals("float4")) {
openLeft = NodeNumericRangeQuery
.newFloatRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, null, 10f, true, true);
openLeft.setDatatype(datatype);
openRight = NodeNumericRangeQuery
.newFloatRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, 10f, null, true, true);
openRight.setDatatype(datatype);
} else if (datatype.equals("long4")) {
openLeft = NodeNumericRangeQuery
.newLongRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, null, 10l, true, true);
openLeft.setDatatype(datatype);
openRight = NodeNumericRangeQuery
.newLongRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, 10l, null, true, true);
openRight.setDatatype(datatype);
} else {
openLeft = NodeNumericRangeQuery
.newDoubleRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, null, 10d, true, true);
openLeft.setDatatype(datatype);
openRight = NodeNumericRangeQuery
.newDoubleRange(SirenTestCase.DEFAULT_TEST_FIELD, 4, 10d, null, true, true);
openRight.setDatatype(datatype);
}
this._assertSirenQuery(config, new LuceneProxyNodeQuery(openLeft), datatype + "([* TO 10])");
this._assertSirenQuery(config, new LuceneProxyNodeQuery(openRight), datatype + "([10 TO *])");
}