Annotation Type PersistenceFunction


@Retention(RUNTIME)
@Target(METHOD)
public @interface PersistenceFunction
Defines the persistence related rendering of a declaratively defined domain function as template string. The domain function arguments are rendered into placeholders. A function like @DomainFunction("IS_OLD") @FunctionExpression("?1.age > 18") static Boolean isOld(@DomainFunctionParam("person") User user) { return user.getAge() > 18; } will render for the use of the function like IS_OLD(me) to something like meJpqlAlias.age > 18
Since:
1.0.0
Author:
Christian Beikov
  • Required Element Summary

    Required Elements 
    Modifier and Type Required Element Description
    String value
    The function expression template.
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    boolean predicate
    Whether a predicate is rendered by the function expression.
  • Element Details

    • value

      String value
      The function expression template.
      Returns:
      the function expression template
    • predicate

      boolean predicate
      Whether a predicate is rendered by the function expression.
      Returns:
      whether a predicate is rendered by the function expression
      Default:
      false