private Join<?,?> clone(Join<?,?> join) {
List<Members.SingularAttributeImpl<?,?>> members = new ArrayList<Members.SingularAttributeImpl<?,?>>();
List<JoinType> jts = new ArrayList<JoinType>();
FromImpl<?,?> root = getMembers(join, members, jts);
Members.SingularAttributeImpl<?,?> member = members.get(0);
JoinType jt = jts.get(0);
Join<?,?> join1 = makeJoin(root, member, jt);
for (int i = 1; i < members.size(); i++) {
join1 = makeJoin((FromImpl<?,?>)join1, members.get(i), jts.get(i));
}
return join1;