return "";
}
StringBuilder builder = new StringBuilder(255);
for (Join join : joins) {
if (join instanceof RelationshipJoin) {
RelationshipJoin rj = (RelationshipJoin) join;
if (rj.getJoinType() == JoinType.LEFT) {
builder.append(" left ");
}
if (rj instanceof RelationshipFetch) {
builder.append(" join fetch ");
} else if (rj instanceof SimpleRelationshipJoin) {
builder.append(" join ");
}
builder.append(rj.isAliasedRelationship() ? "" : "o.");
builder.append(rj.getRelationshipProperty());
builder.append(" ");
builder.append(rj.getAlias().equals("") ? rj.getDefaultAlias()
: rj.getAlias());
}
}
return builder.toString();
}