"type",
getClass().getClassLoader() );
final FieldValue cheddarField = FieldFactory.getFieldValue( "cheddar" );
final Evaluator stringEqual = equals.getEvaluator( ValueType.STRING_TYPE,
Operator.EQUAL );
// type == 'cheddar'
final LiteralConstraint constraint1 = new LiteralConstraint( typeExtractor,
stringEqual,
cheddarField );
final ClassFieldReader priceExtractor = store.getReader( Cheese.class,
"price",
getClass().getClassLoader() );
final FieldValue field10 = FieldFactory.getFieldValue( 10 );
final Evaluator integerGreater = comparables.getEvaluator( ValueType.INTEGER_TYPE,
Operator.GREATER );
// price > 10
final LiteralConstraint constraint2 = new LiteralConstraint( priceExtractor,
integerGreater,
field10 );
// type == 'cheddar' && price > 10
final AndConstraint and1 = new AndConstraint();
and1.addAlphaConstraint( constraint1 );
and1.addAlphaConstraint( constraint2 );
final FieldValue stiltonField = FieldFactory.getFieldValue( "stilton" );
// type == 'stilton'
final LiteralConstraint constraint3 = new LiteralConstraint( typeExtractor,
stringEqual,
stiltonField );
final Evaluator integerLess = comparables.getEvaluator( ValueType.INTEGER_TYPE,
Operator.LESS );
// price < 10
final LiteralConstraint constraint4 = new LiteralConstraint( priceExtractor,
integerLess,