Class NamedMongoScript
java.lang.Object
org.springframework.data.mongodb.core.script.NamedMongoScript
Deprecated.
An
ExecutableMongoScript
assigned to a name that allows calling the function by its name once it
has been saved to the MongoDatabase
instance.- Since:
- 1.7
- Author:
- Christoph Strobl, Oliver Gierke
-
Constructor Summary
ConstructorDescriptionNamedMongoScript
(String name, String rawScript) Deprecated.Creates newNamedMongoScript
that can be saved to theMongoDatabase
instance.NamedMongoScript
(String name, ExecutableMongoScript script) Deprecated.Creates newNamedMongoScript
. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()
Deprecated.Returns the actual script code.getName()
Deprecated.Returns the name of the script.Deprecated.Returns the underlyingExecutableMongoScript
.
-
Constructor Details
-
NamedMongoScript
Deprecated.Creates newNamedMongoScript
that can be saved to theMongoDatabase
instance.- Parameters:
name
- must not be null or empty.rawScript
- theString
representation of the JavaScript function. Must not be null or empty.
-
NamedMongoScript
Deprecated.Creates newNamedMongoScript
.- Parameters:
name
- must not be null or empty.script
- must not be null.
-
-
Method Details
-
getCode
Deprecated.Returns the actual script code.- Returns:
- will never be null.
-
getScript
Deprecated.Returns the underlyingExecutableMongoScript
.- Returns:
- will never be null.
-
getName
Deprecated.Returns the name of the script.- Returns:
- will never be null or empty.
-
eval
command has been removed without replacement in MongoDB Server 4.2.0.