public class PartialUpdate extends Object implements Update
Update to be used when performing atomic updates against solr. SolrOperations.saveBean(Object)| Constructor and Description |
|---|
PartialUpdate(Field idField,
Object idFieldValue) |
PartialUpdate(String idFieldName,
Object idFieldValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String fieldName,
Object value)
Add field with given name and value to the fields to be updated.
|
void |
add(UpdateField field)
Add
UpdateField to the list of fields to be updated |
void |
addValueToField(String fieldName,
Object value)
Add field with given name and value using
UpateAction.ADD to the fields to be updated. |
ValueHoldingField |
getIdField()
get id field of document to update
|
List<UpdateField> |
getUpdates()
List of fields and values to update
|
Object |
getVersion()
Document Version
_version_ |
void |
increaseValueOfField(String fieldName,
Object value)
Add field with given name and value using
UpateAction.INC to the fields to be updated. |
void |
setValueOfField(String fieldName,
Object value)
Add field with given name and value using
UpateAction.SET to the fields to be updated. |
void |
setVersion(Object documentVersion)
set
_version_ of document to apply update to. |
public ValueHoldingField getIdField()
UpdategetIdField in interface Updatepublic void add(String fieldName, Object value)
UpateAction will be
UpateAction.SET.fieldName - value - public void add(UpdateField field)
UpdateField to the list of fields to be updatedfield - public void addValueToField(String fieldName, Object value)
UpateAction.ADD to the fields to be updated.fieldName - value - public void setValueOfField(String fieldName, Object value)
UpateAction.SET to the fields to be updated.fieldName - value - public void increaseValueOfField(String fieldName, Object value)
UpateAction.INC to the fields to be updated.fieldName - value - public List<UpdateField> getUpdates()
UpdategetUpdates in interface Updatepublic Object getVersion()
Update_version_getVersion in interface Updatepublic void setVersion(Object documentVersion)
_version_ of document to apply update to. Use null to skip version check in solr.documentVersion - Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.