/** * Return true if this path is a candidate for converting to a query join. */ private boolean isQueryJoinCandidate(String lazyLoadManyPath, OrmQueryProperties chunk) { return chunk.isFetchJoin() && !isLazyLoadManyRoot(lazyLoadManyPath, chunk) && !hasParentSecJoin(lazyLoadManyPath, chunk); }
/** * If the chunk has a parent that is a query or lazy join. In this case it does not need to be * converted. */ private boolean hasParentSecJoin(String lazyLoadManyPath, OrmQueryProperties chunk) { OrmQueryProperties parent = getParent(chunk); if (parent == null) { return false; } else { if (lazyLoadManyPath != null && lazyLoadManyPath.equals(parent.getPath())) { return false; } else { return !parent.isFetchJoin() || hasParentSecJoin(lazyLoadManyPath, parent); } } }
/** * If the chunk has a parent that is a query or lazy join. In this case it * does not need to be converted. */ private boolean hasParentSecJoin(String lazyLoadManyPath, OrmQueryProperties chunk) { OrmQueryProperties parent = getParent(chunk); if (parent == null) { return false; } else { if (lazyLoadManyPath != null && lazyLoadManyPath.equals(parent.getPath())) { return false; } else if (!parent.isFetchJoin()) { return true; } else { return hasParentSecJoin(lazyLoadManyPath, parent); } } }
/** * If the chunk has a parent that is a query or lazy join. In this case it * does not need to be converted. */ private boolean hasParentSecJoin(String lazyLoadManyPath, OrmQueryProperties chunk) { OrmQueryProperties parent = getParent(chunk); if (parent == null) { return false; } else { if (lazyLoadManyPath != null && lazyLoadManyPath.equals(parent.getPath())) { return false; } else if (!parent.isFetchJoin()) { return true; } else { return hasParentSecJoin(lazyLoadManyPath, parent); } } }
if (chunk.isFetchJoin() && !isLazyLoadManyRoot(lazyLoadManyPath, chunk) && !hasParentSecJoin(lazyLoadManyPath, chunk)) {
if (chunk.isFetchJoin() && !isLazyLoadManyRoot(lazyLoadManyPath, chunk) && !hasParentSecJoin(lazyLoadManyPath, chunk)) {