public class PatchRequest extends Object
Constructor and Description |
---|
PatchRequest() |
PatchRequest(PatchCommandType type,
String name,
RavenJToken value) |
Modifier and Type | Method and Description |
---|---|
static PatchRequest |
fromJson(RavenJObject patchRequestJson)
Create an instance from a json object
|
Boolean |
getAllPositions()
Only valid for collections.
|
String |
getName()
Property/field name to patch.
|
PatchRequest[] |
getNested()
Gets the nested operations to perform.
|
Integer |
getPosition()
Only valid for collection types.
|
RavenJToken |
getPrevVal()
Gets the previous value, which is compared against the current value to verify a
change isn't overwriting new values.
|
PatchCommandType |
getType()
Type of patch operation.
|
RavenJToken |
getValue()
New value.
|
void |
setAllPositions(Boolean allPositions)
Only valid for collections.
|
void |
setName(String name)
Property/field name to patch.
|
void |
setNested(PatchRequest[] nested)
Sets the nested operations to perform.
|
void |
setPosition(Integer position)
Only valid for collection types.
|
void |
setPrevVal(RavenJToken prevVal)
Sets the previous value, which is compared against the current value to verify a
change isn't overwriting new values.
|
void |
setType(PatchCommandType type)
Type of patch operation.
|
void |
setValue(RavenJToken value)
New value.
|
RavenJObject |
toJson()
Translates this instance to json
|
public PatchRequest()
public PatchRequest(PatchCommandType type, String name, RavenJToken value)
public Boolean getAllPositions()
public String getName()
public PatchRequest[] getNested()
Type
is PatchCommandType.MODIFY
public Integer getPosition()
public RavenJToken getPrevVal()
public PatchCommandType getType()
public RavenJToken getValue()
public void setAllPositions(Boolean allPositions)
allPositions
- public void setName(String name)
name
- public void setNested(PatchRequest[] nested)
Type
is PatchCommandType.MODIFY
nested
- public void setPosition(Integer position)
position
- public void setPrevVal(RavenJToken prevVal)
public void setType(PatchCommandType type)
type
- public void setValue(RavenJToken value)
value
- public RavenJObject toJson()
public static PatchRequest fromJson(RavenJObject patchRequestJson)
patchRequestJson
- Copyright © 2016. All Rights Reserved.