Module spring.data.elasticsearch
Record Class ScriptData
java.lang.Object
java.lang.Record
org.springframework.data.elasticsearch.core.query.ScriptData
public record ScriptData(ScriptType type, String language, String script, String scriptName, Map<String,Object> params)
extends Record
value class combining script information.
- Since:
- 4.4
- Author:
- Peter-Josef Meisch
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionScriptData(ScriptType type, String language, String script, String scriptName, Map<String, Object> params) Creates an instance of aScriptDatarecord class. -
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.language()Returns the value of thelanguagerecord component.static ScriptDataof(Function<ScriptData.Builder, ScriptData.Builder> builderFunction) static ScriptDataparams()Returns the value of theparamsrecord component.script()Returns the value of thescriptrecord component.Returns the value of thescriptNamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ScriptData
public ScriptData(ScriptType type, @Nullable String language, @Nullable String script, @Nullable String scriptName, @Nullable Map<String, Object> params) Creates an instance of aScriptDatarecord class.- Parameters:
type- the value for thetyperecord componentlanguage- the value for thelanguagerecord componentscript- the value for thescriptrecord componentscriptName- the value for thescriptNamerecord componentparams- the value for theparamsrecord component
-
-
Method Details
-
of
public static ScriptData of(ScriptType type, @Nullable String language, @Nullable String script, @Nullable String scriptName, @Nullable Map<String, Object> params) - Since:
- 5.2
-
of
-
builder
- Since:
- 5.2
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
script
Returns the value of thescriptrecord component.- Returns:
- the value of the
scriptrecord component
-
scriptName
Returns the value of thescriptNamerecord component.- Returns:
- the value of the
scriptNamerecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-