Annotation Type PlanningVariableReference


public @interface PlanningVariableReference
A reference to a genuine PlanningVariable or a shadow variable.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Workaround for annotation limitation in entityClass().
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the planning variable that is referenced.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The PlanningEntity class of the planning variable.
  • Element Details

    • variableName

      String variableName
      The name of the planning variable that is referenced.
      Returns:
      never null, a genuine or shadow variable name
    • entityClass

      Class<?> entityClass
      The PlanningEntity class of the planning variable.

      Specified if the planning variable is on a different Class than the class that uses this referencing annotation.

      Returns:
      PlanningVariableReference.NullEntityClass when it is null (workaround for annotation limitation). Defaults to the same Class as the one that uses this annotation.
      Default:
      org.optaplanner.core.api.domain.variable.PlanningVariableReference.NullEntityClass.class