public static PathInits getFor(PathMetadata metadata, PathInits root) {
        if (metadata.isRoot()) {
            return root;
        } else if (metadata.getParent().getMetadata().isRoot()) {
            return DIRECT;
        } else {
            return DEFAULT;
        }
    }
{@code PathInits} defines path initializations that can be attached to
properties via QueryInit annotations

@author tiwe
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathInits.java