Class MongoSync4ChangeEntryRepository<CHANGE_ENTRY extends io.changock.driver.api.entry.ChangeEntry>
java.lang.Object
com.github.cloudyrock.mongock.driver.mongodb.sync.v4.repository.MongoSync4RepositoryBase<CHANGE_ENTRY>
com.github.cloudyrock.mongock.driver.mongodb.sync.v4.repository.MongoSync4ChangeEntryRepository<CHANGE_ENTRY>
- All Implemented Interfaces:
io.changock.driver.api.entry.ChangeEntryService<CHANGE_ENTRY>,io.changock.driver.core.common.Repository<CHANGE_ENTRY,org.bson.Document>,io.changock.driver.core.entry.ChangeEntryRepository<CHANGE_ENTRY,org.bson.Document>,io.changock.utils.Process
public class MongoSync4ChangeEntryRepository<CHANGE_ENTRY extends io.changock.driver.api.entry.ChangeEntry> extends MongoSync4RepositoryBase<CHANGE_ENTRY> implements io.changock.driver.core.entry.ChangeEntryRepository<CHANGE_ENTRY,org.bson.Document>
-
Field Summary
Fields inherited from class com.github.cloudyrock.mongock.driver.mongodb.sync.v4.repository.MongoSync4RepositoryBase
collection -
Constructor Summary
Constructors Constructor Description MongoSync4ChangeEntryRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection, boolean indexCreation) -
Method Summary
Modifier and Type Method Description protected org.bson.conversions.BsonbuildSearchQueryDBObject(java.lang.String changeSetId, java.lang.String author)Check if a changeSet with given changeSetId and author and (state == EXECUTED OR state == null OR estate doesn't exists)booleanisAlreadyExecuted(java.lang.String changeSetId, java.lang.String author)voidsave(CHANGE_ENTRY changeEntry)Methods inherited from class com.github.cloudyrock.mongock.driver.mongodb.sync.v4.repository.MongoSync4RepositoryBase
cleanResidualUniqueKeys, createRequiredUniqueIndex, doesNeedToBeRemoved, dropIndex, getIndexDocument, initialize, isIdIndex, isIndexFine, isRequiredIndexCreated, isRightIndex, isUniqueIndex, mapFieldInstances
-
Constructor Details
-
MongoSync4ChangeEntryRepository
public MongoSync4ChangeEntryRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection, boolean indexCreation)
-
-
Method Details
-
isAlreadyExecuted
public boolean isAlreadyExecuted(java.lang.String changeSetId, java.lang.String author) throws io.changock.migration.api.exception.ChangockException- Specified by:
isAlreadyExecutedin interfaceio.changock.driver.api.entry.ChangeEntryService<CHANGE_ENTRY extends io.changock.driver.api.entry.ChangeEntry>- Throws:
io.changock.migration.api.exception.ChangockException
-
save
public void save(CHANGE_ENTRY changeEntry) throws io.changock.migration.api.exception.ChangockException- Specified by:
savein interfaceio.changock.driver.api.entry.ChangeEntryService<CHANGE_ENTRY extends io.changock.driver.api.entry.ChangeEntry>- Throws:
io.changock.migration.api.exception.ChangockException
-
buildSearchQueryDBObject
protected org.bson.conversions.Bson buildSearchQueryDBObject(java.lang.String changeSetId, java.lang.String author)Check if a changeSet with given changeSetId and author and (state == EXECUTED OR state == null OR estate doesn't exists)- Parameters:
changeSetId- changeSetIdauthor- author- Returns:
- true if a changeSet with given changeSetId and author is already executed, false otherwise
-