public class QueryHintOption<HintValue>
extends java.lang.Object
Constructor and Description |
---|
QueryHintOption(java.lang.Class<?> optionNamespace,
java.lang.String optionLocalName,
HintValue defaultValue)
This is the recommended constructor for hint options defined as static fields within an enclosing class.
|
QueryHintOption(java.lang.String optionQualifiedName,
HintValue defaultValue)
Instantiates an option object with the given name and default value.
|
Modifier and Type | Method and Description |
---|---|
HintValue |
getDefaultValue()
Returns the default value of this hint option, which is to be used by query backends in the case no overriding value is assigned.
|
java.lang.String |
getQualifiedName()
Returns the qualified name, a unique string identifier of the option.
|
HintValue |
getValueOrDefault(QueryEvaluationHint hints)
Returns the value of this hint option from the given hint collection, or the default value if not defined.
|
HintValue |
getValueOrNull(QueryEvaluationHint hints)
Returns the value of this hint option from the given hint collection, or null if not defined.
|
HintValue |
insertOverridingValue(java.util.Map<QueryHintOption,java.lang.Object> hints,
HintValue overridingValue)
Puts a value of this hint option into an option-to-value map.
|
boolean |
isOverriddenIn(QueryEvaluationHint hints)
Returns whether this hint option is defined in the given hint collection.
|
java.lang.String |
toString() |
public QueryHintOption(java.lang.String optionQualifiedName, HintValue defaultValue)
public QueryHintOption(java.lang.Class<?> optionNamespace, java.lang.String optionLocalName, HintValue defaultValue)
public java.lang.String getQualifiedName()
public HintValue getDefaultValue()
public HintValue getValueOrDefault(QueryEvaluationHint hints)
public HintValue getValueOrNull(QueryEvaluationHint hints)
public boolean isOverriddenIn(QueryEvaluationHint hints)
public HintValue insertOverridingValue(java.util.Map<QueryHintOption,java.lang.Object> hints, HintValue overridingValue)
This method is offered in lieu of a builder API.
Use this method on any number of hint options in order to populate an option-value map.
Then instantiate the immutable QueryEvaluationHint
using the map.
Map.put(Object, Object)
.public java.lang.String toString()
toString
in class java.lang.Object