public class NamedMongoScript extends Object
ExecutableMongoScript
assigned to a name that allows calling the function by its name once it
has been saved to the DB
instance.Constructor and Description |
---|
NamedMongoScript(String name,
ExecutableMongoScript script)
Creates new
NamedMongoScript . |
NamedMongoScript(String name,
String rawScript)
Creates new
NamedMongoScript that can be saved to the DB instance. |
Modifier and Type | Method and Description |
---|---|
String |
getCode()
Returns the actual script code.
|
String |
getName()
Returns the name of the script.
|
ExecutableMongoScript |
getScript()
Returns the underlying
ExecutableMongoScript . |
public NamedMongoScript(String name, String rawScript)
NamedMongoScript
that can be saved to the DB
instance.name
- must not be null or empty.rawScript
- the String
representation of the JavaScript function. Must not be
null or empty.public NamedMongoScript(String name, ExecutableMongoScript script)
NamedMongoScript
.name
- must not be null or empty.script
- must not be null.public String getCode()
public ExecutableMongoScript getScript()
ExecutableMongoScript
.public String getName()
Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.