@Test public void shouldBuildGroupedAndOr1() { ConditionalCriteria criteria = criteriaFor(Person.class).withProperty(aaa()).eq("A").and().lbrace() .withProperty(bbb()).eq("B").or().withProperty(ccc()).eq("C").rbrace() .buildSingle(); assertEquals(ConditionalCriteria.Operator.And, criteria.getOperator()); ConditionalCriteria left1 = (ConditionalCriteria) criteria.getFirstOperant(); assertEquals(ConditionalCriteria.Operator.Equal, left1.getOperator()); assertEquals("aaa", left1.getPropertyName()); assertEquals("A", left1.getFirstOperant()); ConditionalCriteria right1 = (ConditionalCriteria) criteria.getSecondOperant(); assertEquals(ConditionalCriteria.Operator.Or, right1.getOperator()); }
public static <T> ConditionRoot<T> criteriaFor(Class<T> clazz) { return new ConditionalCriteriaBuilder<T>().new RootBuilderImpl(); }
ConditionalCriteriaBuilder { public static <T> ConditionRoot<T> criteriaFor(Class<T> clazz) { return new ConditionalCriteriaBuilder<T>().new RootBuilderImpl(); } }
ConditionalCriteriaBuilder { public static <T> ConditionRoot<T> criteriaFor(Class<T> clazz) { return new ConditionalCriteriaBuilder<T>().new RootBuilderImpl(); } private  ConditionalCriteriaBuilder(); }
ConditionalCriteriaBuilder { public static <T> ConditionRoot<T> criteriaFor(Class<T> clazz) { return new ConditionalCriteriaBuilder<T>().new RootBuilderImpl(); } private  ConditionalCriteriaBuilder(); static ConditionRoot<T> criteriaFor(Class<T> clazz); }
ConditionalCriteriaBuilder { public static <T> ConditionRoot<T> criteriaFor(Class<T> clazz) { return new ConditionalCriteriaBuilder<T>().new RootBuilderImpl(); } private  ConditionalCriteriaBuilder(); static ConditionRoot<T> criteriaFor(Class<T> clazz);  }