Example #1
0
  @Test
  public void testJoin() {
    JoinExecutor joinExecutor = new JoinExecutor();
    joinExecutor.join(UserAccessGroup.class, "userId", User.class, "id");

    assertEquals(
        "join useraccessgroup on useraccessgroup.userId = user.id ", joinExecutor.getQuery());
  }
Example #2
0
  @Test
  public void testRightOuterJoin() {
    JoinExecutor joinExecutor = new JoinExecutor();
    joinExecutor.setJoinType(JoinType.RIGHT_OUTER);
    joinExecutor.join(UserAccessGroup.class, "userId", User.class, "id");

    assertEquals(
        "right outer join useraccessgroup on useraccessgroup.userId = user.id ",
        joinExecutor.getQuery());
  }