@Test public void shouldBuildOrConditionWithBraces() { ConditionalCriteria criteria = criteriaFor(Person.class).lbrace().withProperty(aaa()).eq(1234).or() .withProperty(bbb()).eq("zzz").rbrace() .buildSingle(); assertNull(criteria.getPropertyName()); assertEquals(ConditionalCriteria.Operator.Or, criteria.getOperator()); ConditionalCriteria left = (ConditionalCriteria) criteria.getFirstOperant(); assertEquals("aaa", left.property.getName()); ConditionalCriteria right = (ConditionalCriteria) criteria.getSecondOperant(); assertEquals("bbb", right.property.getName()); }
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);  }