public class MongoDBConverter extends Object
Modifier and Type | Class and Description |
---|---|
class |
MongoDBConverter.UpdateBuilder
Update list builder to prevent several updates of the same field.
|
Modifier and Type | Field and Description |
---|---|
protected String |
idKey |
protected boolean |
useCustomId |
Constructor and Description |
---|
MongoDBConverter(String idKey) |
Modifier and Type | Method and Description |
---|---|
String |
bsonToKey(String key) |
State |
bsonToState(com.mongodb.DBObject ob) |
Serializable |
bsonToValue(Object value) |
List<com.mongodb.DBObject> |
diffToBson(State.StateDiff diff)
Constructs a list of MongoDB updates from the given
State.StateDiff . |
String |
keyToBson(String key) |
List<Object> |
listToBson(List<Object> values) |
Serializable |
scalarToSerializable(Object val) |
Class<?> |
scalarToSerializableClass(Class<?> klass) |
Object |
serializableToBson(Object value) |
com.mongodb.DBObject |
stateToBson(State state) |
Object |
valueToBson(Object value) |
protected final boolean useCustomId
public MongoDBConverter(String idKey)
public List<com.mongodb.DBObject> diffToBson(State.StateDiff diff)
State.StateDiff
.
We need a list because some cases need two operations to avoid conflicts.
public Object valueToBson(Object value)
public com.mongodb.DBObject stateToBson(State state)
public List<Object> listToBson(List<Object> values)
public State bsonToState(com.mongodb.DBObject ob)
public Serializable bsonToValue(Object value)
public Object serializableToBson(Object value)
public Serializable scalarToSerializable(Object val)
public Class<?> scalarToSerializableClass(Class<?> klass)
Copyright © 2017 Nuxeo. All rights reserved.