/** * Converts FieldExpressionPath value to corresponding list of Predicates * * @param type entity * @param requestScope request scope * @param method associated check method name containing FieldExpressionPath * @param defaultPath path to use if no FieldExpressionPath defined * @return Predicates */ protected static Path getFieldPath(Class<?> type, RequestScope requestScope, String method, String defaultPath) { EntityDictionary dictionary = coreScope(requestScope).getDictionary(); try { FilterExpressionPath fep = getFilterExpressionPath(type, method, dictionary); return new Path(type, dictionary, fep == null ? defaultPath : fep.value()); } catch (NoSuchMethodException | SecurityException e) { throw new IllegalStateException(e); } }
/** * Converts FieldExpressionPath value to corresponding list of Predicates * * @param type entity * @param requestScope request scope * @param method associated check method name containing FieldExpressionPath * @param defaultPath path to use if no FieldExpressionPath defined * @return Predicates */ protected static Path getFieldPath(Class<?> type, RequestScope requestScope, String method, String defaultPath) { EntityDictionary dictionary = coreScope(requestScope).getDictionary(); try { FilterExpressionPath fep = getFilterExpressionPath(type, method, dictionary); return new Path(type, dictionary, fep == null ? defaultPath : fep.value()); } catch (NoSuchMethodException | SecurityException e) { throw new IllegalStateException(e); } }