Enum RetrievalSemantics
- java.lang.Object
-
- java.lang.Enum<RetrievalSemantics>
-
- org.optaplanner.core.impl.score.stream.common.RetrievalSemantics
-
- All Implemented Interfaces:
Serializable
,Comparable<RetrievalSemantics>
public enum RetrievalSemantics extends Enum<RetrievalSemantics>
Determines the behavior of joins and conditional propagation based on whether they are coming off of a constraint stream started by eitherConstraintFactory.from(Class)
orConstraintFactory.forEach(Class)
family of methods.For classes which are not planning entities, all of their instances are always retrieved. For classes which are planning entities, the difference in behavior depends on whether they use nullable planning variables. (See
PlanningVariable
.)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LEGACY
Deprecated, for removal: This API element is subject to removal in a future version.this semantics is deprecated and kept around for backward compatibility reasons.STANDARD
Joins do not include entities with null planning variables, unless specifically requested by join(forEachIncludingNullVars(...)).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RetrievalSemantics
valueOf(String name)
Returns the enum constant of this type with the specified name.static RetrievalSemantics[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STANDARD
public static final RetrievalSemantics STANDARD
Joins do not include entities with null planning variables, unless specifically requested by join(forEachIncludingNullVars(...)). Conditional propagation does not include null planning variables, unless specifically requested using a *IncludingNullVars() method overload.Applies when the stream comes off of a
ConstraintFactory.forEach(Class)
family of methods.
-
LEGACY
@Deprecated(forRemoval=true) public static final RetrievalSemantics LEGACY
Deprecated, for removal: This API element is subject to removal in a future version.this semantics is deprecated and kept around for backward compatibility reasons. It will be removed in 9.0 together with the from() family of methods, along with this entire enum.Joins include entities with null planning variables if these variables are nullable. Conditional propagation always includes entities with null planning variables, regardless of whether their planning variables are nullable.Applies when the stream comes off of a
ConstraintFactory.from(Class)
family of methods.
-
-
Method Detail
-
values
public static RetrievalSemantics[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RetrievalSemantics c : RetrievalSemantics.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RetrievalSemantics valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-