public abstract class Mongo3RepositoryBase<DOMAIN_CLASS> extends Object implements com.github.cloudyrock.mongock.driver.core.common.Repository<DOMAIN_CLASS,org.bson.Document>
| Modifier and Type | Field and Description |
|---|---|
protected com.mongodb.client.MongoCollection<org.bson.Document> |
collection |
| Constructor and Description |
|---|
Mongo3RepositoryBase(com.mongodb.client.MongoCollection<org.bson.Document> collection,
String[] uniqueFields,
boolean indexCreation,
ReadWriteConfiguration readWriteConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanResidualUniqueKeys() |
protected void |
createRequiredUniqueIndex() |
protected boolean |
doesNeedToBeRemoved(org.bson.Document index) |
protected void |
dropIndex(org.bson.Document index) |
protected org.bson.Document |
getIndexDocument(String[] uniqueFields) |
void |
initialize() |
protected boolean |
isIdIndex(org.bson.Document index) |
protected boolean |
isIndexFine() |
protected boolean |
isRequiredIndexCreated() |
protected boolean |
isRightIndex(org.bson.Document index) |
protected boolean |
isUniqueIndex(org.bson.Document index) |
org.bson.Document |
mapFieldInstances(List<com.github.cloudyrock.mongock.utils.field.FieldInstance> fieldInstanceList) |
public Mongo3RepositoryBase(com.mongodb.client.MongoCollection<org.bson.Document> collection,
String[] uniqueFields,
boolean indexCreation,
ReadWriteConfiguration readWriteConfiguration)
public void initialize()
initialize in interface com.github.cloudyrock.mongock.utils.Processprotected boolean isIndexFine()
protected void cleanResidualUniqueKeys()
protected boolean doesNeedToBeRemoved(org.bson.Document index)
protected boolean isIdIndex(org.bson.Document index)
protected boolean isRequiredIndexCreated()
protected void createRequiredUniqueIndex()
protected boolean isRightIndex(org.bson.Document index)
protected boolean isUniqueIndex(org.bson.Document index)
protected org.bson.Document getIndexDocument(String[] uniqueFields)
protected void dropIndex(org.bson.Document index)
public org.bson.Document mapFieldInstances(List<com.github.cloudyrock.mongock.utils.field.FieldInstance> fieldInstanceList)
mapFieldInstances in interface com.github.cloudyrock.mongock.driver.core.common.Repository<DOMAIN_CLASS,org.bson.Document>Copyright © 2021. All rights reserved.