@java.lang.SuppressWarnings(value: rawtypes) @groovy.transform.CompileStatic @groovy.transform.builder.Builder(builderStrategy: SimpleStrategy, prefix: ) class MongoCollection extends java.util.Collection
Provides configuration options for mapping Mongo DBCollection instances
Modifiers | Name | Description |
---|---|---|
static class |
MongoCollection.Index |
Definition of an index |
Modifiers | Name | Description |
---|---|---|
private java.util.List<java.util.Map> |
compoundIndices |
|
private java.lang.String |
database |
The database to use |
private java.util.List<Index> |
indices |
|
private com.mongodb.WriteConcern |
writeConcern |
|
Type | Name and description |
---|---|
java.lang.String |
database The database to use |
Order |
sort |
com.mongodb.WriteConcern |
writeConcern
|
Constructor and description |
---|
MongoCollection
() |
Type Params | Return Type | Name and description |
---|---|---|
|
MongoCollection |
compoundIndex(java.util.Map compoundIndex) Sets a compound index definition |
|
java.util.List<java.util.Map> |
getCompoundIndices() Return all defined compound indices |
|
java.util.List<Index> |
getIndices() |
|
Order |
getSort() |
|
Entity<Attribute> |
id(groovy.lang.Closure identityConfig) |
|
void |
index(java.util.Map<java.lang.String, java.lang.Object> definition) Defines an index |
|
void |
index(java.util.Map<java.lang.String, java.lang.Object> definition, java.util.Map<java.lang.String, java.lang.Object> options) Defines an index |
|
protected MongoAttribute |
newProperty() |
|
Entity |
property(java.lang.String name, groovy.lang.Closure propertyConfig) |
|
MongoAttribute |
property(groovy.lang.Closure propertyConfig) |
|
MongoAttribute |
property(java.util.Map propertyConfig) |
|
void |
setCompoundIndex(java.util.Map compoundIndex) Sets a compound index definition |
|
MongoCollection |
setSort(java.lang.Object s) Sets the default sorting |
|
MongoCollection |
sort(Order sort) Sets the default sorting |
|
MongoCollection |
sort(java.util.Map sort) Sets the default sorting |
|
Entity |
version(groovy.lang.Closure versionConfig) |
Methods inherited from class | Name |
---|---|
interface java.util.Collection |
java.util.Collection#add(java.lang.Object), java.util.Collection#remove(java.lang.Object), java.util.Collection#equals(java.lang.Object), java.util.Collection#hashCode(), java.util.Collection#clear(), java.util.Collection#isEmpty(), java.util.Collection#contains(java.lang.Object), java.util.Collection#size(), java.util.Collection#toArray(java.util.function.IntFunction), java.util.Collection#toArray(), java.util.Collection#toArray([Ljava.lang.Object;), java.util.Collection#iterator(), java.util.Collection#spliterator(), java.util.Collection#addAll(java.util.Collection), java.util.Collection#stream(), java.util.Collection#containsAll(java.util.Collection), java.util.Collection#retainAll(java.util.Collection), java.util.Collection#removeAll(java.util.Collection), java.util.Collection#removeIf(java.util.function.Predicate), java.util.Collection#parallelStream(), java.util.Collection#forEach(java.util.function.Consumer) |
The database to use
The database to use
Sets a compound index definition
compoundIndex
- The compount indexReturn all defined compound indices
Defines an index
definition
- The index definitionDefines an index
definition
- The index definitionoptions
- The index optionsSets a compound index definition
compoundIndex
- The compount indexSets the default sorting
s
- The sort objectSets the default sorting
s
- The sort objectSets the default sorting
s
- The sort objectGroovy Documentation