public class Inserter extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Inserter(Mongo mongo) |
| Modifier and Type | Method and Description |
|---|---|
Doc |
into(Class<?> type)
Executes the insert statement into the given collection.
|
Doc |
into(String collection)
Executes the insert statement into the given collection.
|
Inserter |
set(Mapping key,
Object value)
Sets a field to the given value.
|
Inserter |
set(String key,
Object value)
Sets a field to the given value.
|
Inserter |
setList(Mapping key,
Object... values)
Sets a field to the given list of values.
|
Inserter |
setList(String key,
Object... values)
Sets a field to the given list of values.
|
protected Inserter(Mongo mongo)
public Inserter set(Mapping key, Object value)
key - the name of the field to setvalue - the value to set the field topublic Inserter set(String key, Object value)
key - the name of the field to setvalue - the value to set the field topublic Inserter setList(Mapping key, Object... values)
key - the name of the field to setvalues - the values to set the field topublic Inserter setList(String key, Object... values)
key - the name of the field to setvalues - the values to set the field topublic Doc into(Class<?> type)
type - the type to insert intoCopyright © 2018. All rights reserved.