Java Code Examples for javax.persistence.criteria.From#fetch()
The following examples show how to use
javax.persistence.criteria.From#fetch() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JpaUtils.java From jdal with Apache License 2.0 | 5 votes |
/** * Copy Fetches * @param from source From * @param to destination From */ public static void copyFetches(From<?, ?> from, From<?, ?> to) { for (Fetch<?, ?> f : from.getFetches()) { Fetch<?, ?> toFetch = to.fetch(f.getAttribute().getName()); copyFetches(f, toFetch); } }
Example 2
Source File: FetchBuilder.java From deltaspike with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) private void fetchSingular(From path) { if (joinType == null) { path.fetch(singular); } else { path.fetch(singular, joinType); } }
Example 3
Source File: FetchBuilder.java From deltaspike with Apache License 2.0 | 5 votes |
@SuppressWarnings({ "rawtypes", "unchecked" }) private void fetchPlural(From path) { if (joinType == null) { path.fetch(plural); } else { path.fetch(plural, joinType); } }