@@ -0,0 +1,1409 @@
+package pl.openrest.filters.query.registry;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.springframework.data.mapping.PropertyPath;%0A%0Aimport com.mysema.query.types.Path;%0Aimport com.mysema.query.types.path.PathBuilder;%0Aimport com.mysema.query.types.path.PathBuilderFactory;%0A%0Apublic class JoinInformationBuilder %7B%0A%0A    private static PathBuilderFactory builderFactory;%0A%0A    public static List%3CJoinInformation%3E getJoinsInformation(String joinPath, Class%3C?%3E entityType, boolean fetch) %7B%0A        PathBuilder%3C?%3E builder = builderFactory.create(entityType);%0A        PropertyPath propertyPath = PropertyPath.from(joinPath, entityType);%0A        List%3CJoinInformation%3E joins = new ArrayList%3CJoinInformation%3E();%0A        String dotPath = %22%22;%0A        while (propertyPath != null) %7B%0A            Path%3C?%3E path = null;%0A            boolean collection = false;%0A            dotPath += dotPath.isEmpty() ? propertyPath.getSegment() : %22.%22 + propertyPath.getSegment();%0A            if (propertyPath.isCollection()) %7B%0A                path = builder.getCollection(dotPath, propertyPath.getType());%0A                collection = true;%0A            %7D else %7B%0A                path = builder.get(dotPath, propertyPath.getType());%0A            %7D%0A            joins.add(new JoinInformation(path, collection, fetch, propertyPath.getType()));%0A            propertyPath = propertyPath.next();%0A        %7D%0A        return joins;%0A    %7D%0A%7D%0A

Create JoinInformationBuilder