List of usage examples for javax.persistence.criteria From fetch
<Y> Fetch<X, Y> fetch(SingularAttribute<? super X, Y> attribute, JoinType jt);
From source file:org.broadleafcommerce.admin.server.service.handler.ProductCustomPersistenceHandler.java
@Override public DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException { cto.getNonCountAdditionalFilterMappings() .add(new FilterMapping().withDirectFilterValues(new EmptyFilterValues()) .withRestriction(new Restriction().withPredicateProvider(new PredicateProvider() { public Predicate buildPredicate(CriteriaBuilder builder, FieldPathBuilder fieldPathBuilder, From root, String ceilingEntity, String fullPropertyName, Path explicitPath, List directValues) { root.fetch("defaultSku", JoinType.LEFT); root.fetch("defaultCategory", JoinType.LEFT); return null; }//w w w. j ava 2 s . c o m }))); return helper.getCompatibleModule(OperationType.BASIC).fetch(persistencePackage, cto); }