for (int i = 0; i < criteriaJoins.size(); i++)
{
Join join = criteriaJoins.get(i);
// Check the join type and add the join to the
// appropriate places in the query
JoinType joinType = join.getJoinType();
if (joinType == null)
{
// Do not treat join as explicit join, but add
// the join condition to the where clauses