@InheritConstructors class MongoDbDataStoreSpringInitializer extends AbstractDatastoreInitializer
Used to initialize GORM for MongoDB outside of Grails
| Modifiers | Name | Description |
|---|---|---|
static String |
DATASTORE_TYPE |
|
static String |
DEFAULT_DATABASE_NAME |
|
protected String |
databaseName |
|
protected MongoClient |
mongo |
|
protected String |
mongoBeanName |
|
protected MongoClientSettings |
mongoOptions |
| Fields inherited from class | Fields |
|---|---|
class AbstractDatastoreInitializer |
TRANSACTION_MANAGER_BEAN, ENTITY_CLASS_RESOURCE_PATTERN, OSIV_CLASS_NAME, __$stMC |
| Constructor and description |
|---|
MongoDbDataStoreSpringInitializer() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
ApplicationContext |
configure()Configures for an existing Mongo instance |
|
Closure |
getBeanDefinitions(BeanDefinitionRegistry beanDefinitionRegistry) |
|
protected Class<AbstractDatastorePersistenceContextInterceptor> |
getPersistenceInterceptorClass() |
|
protected boolean |
isMappedClass(String datastoreType, Class cls) |
|
void |
setDatabaseName(String databaseName)Sets the name of the MongoDB database to use |
|
void |
setMongoClient(MongoClient mongoClient)Sets a pre-existing Mongo instance to configure for |
|
void |
setMongoOptions(MongoClientSettings mongoOptions)Sets the MongoOptions instance to use when constructing the Mongo instance |
Configures for an existing Mongo instance
mongo - The instance of MongoSets the name of the MongoDB database to use
Sets a pre-existing Mongo instance to configure for
mongoClient - The Mongo instanceSets the MongoOptions instance to use when constructing the Mongo instance