Record Class ScriptData
java.lang.Object
java.lang.Record
org.springframework.data.elasticsearch.core.query.ScriptData
- Record Components:
language- the language when the script is passed in the script parameterscript- the script to use as inline scriptscriptName- the name when using a stored scriptparams- the script parameters
public record ScriptData(@Nullable String language, @Nullable String script, @Nullable String scriptName, @Nullable Map<String,Object> params)
extends Record
value class combining script information.
A script is either an inline script, then the script parameters must be set or it refers to a stored script, then the name parameter is required.
- Since:
- 4.4
- Author:
- Peter-Josef Meisch
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ScriptData.Builderbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringlanguage()Returns the value of thelanguagerecord component.static ScriptDataof(@Nullable String language, @Nullable String script, @Nullable String scriptName, @Nullable Map<String, Object> params) factory method to create a ScriptData object.static ScriptDataof(Function<ScriptData.Builder, ScriptData.Builder> builderFunction) factory method to create a ScriptData object using a ScriptBuilder callback.params()Returns the value of theparamsrecord component.@Nullable Stringscript()Returns the value of thescriptrecord component.@Nullable StringReturns the value of thescriptNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScriptData
public ScriptData(@Nullable String language, @Nullable String script, @Nullable String scriptName, @Nullable Map<String, Object> params) Creates an instance of aScriptDatarecord class.- Parameters:
language- the value for thelanguagerecord componentscript- the value for thescriptrecord componentscriptName- the value for thescriptNamerecord componentparams- the value for theparamsrecord component
-
-
Method Details
-
of
-
of
factory method to create a ScriptData object using a ScriptBuilder callback.- Parameters:
builderFunction- function called to populate the builder- Returns:
-
builder
- Since:
- 5.2
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
language
-
script
-
scriptName
Returns the value of thescriptNamerecord component.- Returns:
- the value of the
scriptNamerecord component
-
params
-