@Test public void testToPredicate() throws InvalidQueryException { String prop = "prop"; Predicate p = new CategoryIsEmptyPredicate(prop); assertEquals(p, new IsEmptyOperator().toPredicate(prop, null)); }
@Override public Predicate toPredicate(String prop, String val) throws InvalidQueryException { if (val != null) { throw new InvalidQueryException("'isEmpty' operator shouldn't have a right operand but one exists: " + val); } return new CategoryIsEmptyPredicate(prop); }
IsEmptyOperator extends AbstractOperator implements RelationalOperator { @Override public Predicate toPredicate(String prop, String val) throws InvalidQueryException { if (val != null) { throw new InvalidQueryException("'isEmpty' operator shouldn't have a right operand but one exists: " + val); } return new CategoryIsEmptyPredicate(prop); } }
IsEmptyOperator extends AbstractOperator implements RelationalOperator { @Override public Predicate toPredicate(String prop, String val) throws InvalidQueryException { if (val != null) { throw new InvalidQueryException("'isEmpty' operator shouldn't have a right operand but one exists: " + val); } return new CategoryIsEmptyPredicate(prop); } IsEmptyOperator(); }
IsEmptyOperator extends AbstractOperator implements RelationalOperator { @Override public Predicate toPredicate(String prop, String val) throws InvalidQueryException { if (val != null) { throw new InvalidQueryException("'isEmpty' operator shouldn't have a right operand but one exists: " + val); } return new CategoryIsEmptyPredicate(prop); } IsEmptyOperator(); @Override String getName(); @Override Predicate toPredicate(String prop, String val); @Override TYPE getType(); }
IsEmptyOperator extends AbstractOperator implements RelationalOperator { @Override public Predicate toPredicate(String prop, String val) throws InvalidQueryException { if (val != null) { throw new InvalidQueryException("'isEmpty' operator shouldn't have a right operand but one exists: " + val); } return new CategoryIsEmptyPredicate(prop); } IsEmptyOperator(); @Override String getName(); @Override Predicate toPredicate(String prop, String val); @Override TYPE getType();  }