Example usage for javax.persistence.criteria FetchParent getFetches

List of usage examples for javax.persistence.criteria FetchParent getFetches

Introduction

In this page you can find the example usage for javax.persistence.criteria FetchParent getFetches.

Prototype

java.util.Set<Fetch<X, ?>> getFetches();

Source Link

Document

Return the fetch joins that have been made from this type.

Usage

From source file:com.ocs.dynamo.dao.query.JpaQueryBuilder.java

private static boolean isCollectionFetch(FetchParent<?, ?> parent) {
    boolean result = false;

    for (Fetch<?, ?> fetch : parent.getFetches()) {
        Attribute<?, ?> attribute = fetch.getAttribute();

        boolean nested = isCollectionFetch(fetch);
        result = result || attribute.isCollection() || nested;
    }// ww  w. java2  s.  c  om
    return result;
}