@SuppressWarnings(value: rawtypes) @CompileStatic @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 |
| Fields inherited from class | Fields |
|---|---|
class Collection |
__$stMC, __$stMC |
| Type | Name and description |
|---|---|
String |
databaseThe database to use |
Query.Order |
sort |
WriteConcern |
writeConcern
|
| Constructor and description |
|---|
MongoCollection() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
MongoCollection |
compoundIndex(Map compoundIndex)Sets a compound index definition |
|
List<Map> |
getCompoundIndices()Return all defined compound indices |
|
List<Index> |
getIndices() |
|
Query.Order |
getSort() |
|
Entity<Attribute> |
id(Closure identityConfig) |
|
void |
index(Map<String, Object> definition)Defines an index |
|
void |
index(Map<String, Object> definition, Map<String, Object> options)Defines an index |
|
protected MongoAttribute |
newProperty() |
|
Entity |
property(String name, Closure propertyConfig) |
|
MongoAttribute |
property(Closure propertyConfig) |
|
MongoAttribute |
property(Map propertyConfig) |
|
void |
setCompoundIndex(Map compoundIndex)Sets a compound index definition |
|
MongoCollection |
setSort(Object s)Sets the default sorting |
|
MongoCollection |
sort(Query.Order sort)Sets the default sorting |
|
MongoCollection |
sort(Map sort)Sets the default sorting |
|
Entity |
version(Closure versionConfig) |
| Methods inherited from class | Name |
|---|---|
class Collection |
$getLookup, autoTimestamp, autowire, clone, clone, clone, collection, configureExisting, connection, connections, connections, datasource, datasources, defaultSort, equals, getAutoTimestamp, getAutowire, getClass, getCollection, getDatasources, getDefaultSort, getMetaClass, getProperty, getPropertyConfig, getPropertyConfigs, getSort, getStateless, getVersion, hashCode, id, id, invokeMethod, isAutoTimestamp, isAutowire, isStateless, isVersion, isVersioned, methodMissing, notify, notifyAll, property, property, property, property, propertyMissing, setAutoTimestamp, setAutowire, setCollection, setDatasources, setDefaultSort, setMetaClass, setProperty, setSort, setStateless, setVersion, stateless, super$1$clone, tenantId, toString, version, version, version, wait, wait, wait |
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