@Test public void testMultipleInterfaces() throws Exception { ReflectivePredicateEvaluator evaluator = new ReflectivePredicateEvaluator( "SELECT true = ALL (SELECT sum(anInt) = 2 AS satisfied FROM myInterface UNION SELECT sum(anInt) = 3 AS satisfied FROM myInterface2)", MyInterface.class, MyInterface2.class); Assert.assertFalse(evaluator.evaluate(new MyImplementation(2, "foo"))); Assert.assertTrue(evaluator.evaluate(new MyImplementation(2, "foo"), new MyImplementation2(3))); Assert.assertTrue(evaluator.evaluate(new MyImplementation(1, "foo"), new MyImplementation2(3), new MyImplementation(1, "foo"))); }
public boolean evaluate(Object... objects) throws SQLException{ return evaluate(Lists.newArrayList(objects), null); }
ReflectivePredicateEvaluator implements Closeable { public boolean evaluate(Object... objects) throws SQLException{ return evaluate(Lists.newArrayList(objects), null); } }
ReflectivePredicateEvaluator implements Closeable { public boolean evaluate(Object... objects) throws SQLException{ return evaluate(Lists.newArrayList(objects), null); } ReflectivePredicateEvaluator(String sql, Class<?>... referenceInterfaces); }
ReflectivePredicateEvaluator implements Closeable { public boolean evaluate(Object... objects) throws SQLException{ return evaluate(Lists.newArrayList(objects), null); } ReflectivePredicateEvaluator(String sql, Class<?>... referenceInterfaces); boolean evaluate(Object... objects); boolean evaluate(String sql, Object... objects); boolean evaluate(List<Object> objects); boolean evaluate(List<Object> objects, String sql); @Override void close(); }
ReflectivePredicateEvaluator implements Closeable { public boolean evaluate(Object... objects) throws SQLException{ return evaluate(Lists.newArrayList(objects), null); } ReflectivePredicateEvaluator(String sql, Class<?>... referenceInterfaces); boolean evaluate(Object... objects); boolean evaluate(String sql, Object... objects); boolean evaluate(List<Object> objects); boolean evaluate(List<Object> objects, String sql); @Override void close();  }