protected static class MongoDBRepository.UpdateListBuilder extends Object
This happens if two operations act on two fields where one is a prefix of the other.
Example: Cannot update 'mylist.0.string' and 'mylist' at the same time (error 16837)
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
keys |
protected Set<String> |
prefixKeys |
protected com.mongodb.DBObject |
update |
protected List<com.mongodb.DBObject> |
updateList |
Modifier | Constructor and Description |
---|---|
protected |
UpdateListBuilder() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkForConflict(String key)
Checks if the key conflicts with one of the previous keys.
|
protected boolean |
conflictKeys(String key,
List<String> subkeys) |
protected List<String> |
getPrefixKeys(String key)
return a list of parents key
foo.0.bar -> [foo, foo.0, foo.0.bar]
|
protected void |
newUpdate() |
protected void |
update(String op,
String key,
Object value) |
protected List<com.mongodb.DBObject> updateList
protected com.mongodb.DBObject update
protected Set<String> prefixKeys
protected UpdateListBuilder()
protected void checkForConflict(String key)
A conflict occurs if one key is equals to or is a prefix of the other.
protected void newUpdate()
protected boolean conflictKeys(String key, List<String> subkeys)
protected List<String> getPrefixKeys(String key)
Copyright © 2016 Nuxeo SA. All rights reserved.