@Test public void shouldBuildAndConditionWithoutAndKeyword() { ConditionalCriteria criteria = criteriaFor(Person.class).withProperty(aaa()).eq(1234).withProperty(bbb()).eq( "zzz") .buildSingle(); assertEquals(ConditionalCriteria.Operator.And, criteria.getOperator()); ConditionalCriteria firstOperant = (ConditionalCriteria) criteria.getFirstOperant(); ConditionalCriteria secondOperant = (ConditionalCriteria) criteria.getSecondOperant(); assertEquals("aaa", firstOperant.property.getName()); assertEquals("bbb", secondOperant.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);  }