コード例 #1
0
  private void addOuterJoinDirectCollectionTest() {
    ExpressionBuilder emp = new ExpressionBuilder();
    Expression expression =
        emp.get("firstName")
            .equal("Nancy")
            .or(emp.anyOfAllowingNone("responsibilitiesList").equal("Write lots of Java code."));

    ReadAllExpressionTest test = new ReadAllOuterJoinExpressionTest(Employee.class, 2);
    test.setName("OuterJoinDirectCollectionTest");
    test.setDescription("Tests direct collection relationships with outer joins");
    test.setExpression(expression);

    addTest(test);
  }
コード例 #2
0
  private void addOuterJoinManyToManyTest() {
    ExpressionBuilder emp = new ExpressionBuilder();
    Expression expression =
        emp.get("firstName")
            .like("%")
            .or(emp.anyOfAllowingNone("projects").get("description").like("%"));

    ReadAllExpressionTest test = new ReadAllOuterJoinExpressionTest(Employee.class, 12);
    test.setName("OuterJoinManytoManyTest");
    test.setDescription("Tests manytomany relationships with outer joins");
    test.setExpression(expression);

    addTest(test);
  }
コード例 #3
0
  private void addOuterJoinOrAnyWhereClauseTest() {
    ExpressionBuilder emp = new ExpressionBuilder();
    Expression expression =
        emp.get("firstName")
            .like("Sarah%")
            .or(emp.anyOfAllowingNone("phoneNumbers").get("areaCode").equal("613"));

    ReadAllExpressionTest test = new ReadAllOuterJoinExpressionTest(Employee.class, 10);
    test.setName("OuterJoinOrAnyWhereClauseTest");
    test.setDescription("Test expression anyof with outer joins");
    test.setExpression(expression);

    addTest(test);
  }