public class PutDesc extends Object implements Encodable
ObjectStore.putObjects()
Constructor and Description |
---|
PutDesc(String ref,
String obj,
OptString collectionName,
OptBoolean requireNew)
JSON-driven constructor.
|
PutDesc(String ref,
String obj,
String collectionName,
boolean requireNew)
Direct constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
collectionName()
Get the collection name.
|
JSONLiteral |
encode(EncodeControl control)
Encode this object for transmission or persistence.
|
boolean |
isRequireNew()
Test if this write must be to a new object.
|
String |
obj()
Get the object's description.
|
String |
ref()
Get the object's reference string.
|
@JSONMethod(value={"ref","obj","coll","requirenew"}) public PutDesc(String ref, String obj, OptString collectionName, OptBoolean requireNew)
ref
- Object reference of the object to write.obj
- Object description.collectionName
- Name of collection to write to, or omit to take
the configured default.requireNew
- Optional flag to force failure if object with ref
already exists.public PutDesc(String ref, String obj, String collectionName, boolean requireNew)
ref
- Object reference for the object.obj
- Object description (a JSON string describing the object).collectionName
- Name of collection to write to, or null to take
the configured default.requireNew
- If true and an object with the given ref already
exists, the write fails.public JSONLiteral encode(EncodeControl control)
public String collectionName()
public String obj()
public String ref()
public boolean isRequireNew()
Copyright © 2017. All rights reserved.