@Test public void testBuild() throws Exception { setUp(getJoinClauseList()); JPQLJoinStatementBuilder jpqlJoinStatementBuilder = new JPQLJoinStatementBuilder(context); try { JPQLStatement jpqlStatement = jpqlJoinStatementBuilder.build(); assertEquals( "SELECT mat FROM SOHeader soh JOIN soh.soItem soi JOIN soi.material mat WHERE soh.buyerId = 2 AND " + "soh.createdBy = 'Peter' AND soi.shId = soh.soId AND mat.id = 'abc' " + "ORDER BY mat.buyerId asc , mat.city desc", jpqlStatement.toString()); } catch (ODataJPARuntimeException e) { fail("Should not have come here"); } }
@Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); this.context.setJPQLStatement(jpqlStatement.toString()); return jpqlStatement; }
JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); this.context.setJPQLStatement(jpqlStatement.toString()); return jpqlStatement; } }
JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); this.context.setJPQLStatement(jpqlStatement.toString()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); }
JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); this.context.setJPQLStatement(jpqlStatement.toString()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build(); }
JPQLJoinStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); this.context.setJPQLStatement(jpqlStatement.toString()); return jpqlStatement; } JPQLJoinStatementBuilder(final JPQLContextView context); @Override JPQLStatement build();  }