@ManyToOne @FilterExpressionPath("editor") @ReadPermission(expression = "Field path editor check") public Editor getEditor() { return editor; }
/** * 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); } }
@Transient @ComputedRelationship @OneToOne @FilterExpressionPath("this") @ReadPermission(expression = "Field path editor check") public Editor getEditor() { return this; }
/** * 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); } }
@Transient @ComputedRelationship @OneToOne @FilterExpressionPath("publisher.editor") @ReadPermission(expression = "Field path editor check") public Editor getEditor() { return getPublisher().getEditor(); } }