@java.lang.SuppressWarnings(value: rawtypes) @groovy.transform.CompileStatic @groovy.transform.builder.Builder(builderStrategy: SimpleStrategy, prefix: ) class MongoCollection extends Collection
Provides configuration options for mapping Mongo DBCollection instances
| Modifiers | Name | Description |
|---|---|---|
static class |
MongoCollection.Index |
Definition of an index |
| Type | Name and description |
|---|---|
java.lang.String |
databaseThe database to use |
Order |
sort |
WriteConcern |
writeConcern
|
| Properties inherited from class | Properties |
|---|---|
class Collection |
collection |
| 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 |
|---|---|
class Collection |
newProperty |
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 object