@CompileStatic @Builder(builderStrategy: SimpleStrategy, prefix: ) class MongoAttribute extends Attribute
Extends Attribute class with additional Mongo specific configuration
| Modifiers | Name | Description |
|---|---|---|
static String |
INDEX_TYPE |
|
static String |
INDEX_TYPE_2D |
|
static String |
INDEX_TYPE_2DSPHERE |
| Fields inherited from class | Fields |
|---|---|
class Attribute |
__$stMC, __$stMC |
| Type | Name and description |
|---|---|
String |
field |
Map |
indexAttributes |
boolean |
referenceWhether this attribute is a database reference |
| Constructor and description |
|---|
MongoAttribute() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
MongoAttribute |
field(String name)Configures the field name to map to |
|
MongoAttribute |
geoIndex(String indexType)Sets the geo index type |
|
String |
getField()
|
|
Map |
getIndexAttributes()
|
|
MongoAttribute |
index(String type)Configures the index type |
|
MongoAttribute |
indexAttributes(Map indexAttributes)Configures the index attributes |
|
void |
initIndexAttributes() |
|
void |
setField(String name)Sets the field name to map to |
|
void |
setGeoIndex(String indexType)Sets the geo index type |
|
void |
setIndex(String type)Sets the index type |
|
void |
setIndexAttributes(Map indexAttributes)Sets index attributes |
Whether this attribute is a database reference
Configures the field name to map to
name - The name of the fieldSets the geo index type
indexType - The geo index type
Configures the index type
type - The index typeConfigures the index attributes
indexAttributes - The index attributesSets the field name to map to
name - The field nameSets the geo index type
indexType - The geo index typeSets the index type
type - The index typeSets index attributes
indexAttributes - The index attributesGroovy Documentation