Package org.javers.spring.mongodb
Class TransactionalMongoJaversBuilder
- java.lang.Object
-
- org.javers.core.AbstractContainerBuilder
-
- org.javers.core.JaversBuilder
-
- org.javers.spring.mongodb.TransactionalMongoJaversBuilder
-
public final class TransactionalMongoJaversBuilder extends org.javers.core.JaversBuilderCreates transactional Javers instance ifMongoTransactionManageris provided.
Allows Javers'MongoRepositoryto participate in application's transactions managed byMongoTransactionManager.
Note that multi-document ACID transactions was introduced in MongoDB 4.0 and Spring Data MongoDB 2.1.
See https://www.baeldung.com/spring-data-mongodb-transactions, https://www.mongodb.com/blog/post/mongodb-multi-document-acid-transactions-general-availability- Since:
- 6.5
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.javers.core.Javersbuild()static TransactionalMongoJaversBuilderjavers()TransactionalMongoJaversBuilderregisterJaversRepository(org.javers.repository.api.JaversRepository mongoRepository)TransactionalMongoJaversBuilderwithTxManager(org.springframework.data.mongodb.MongoTransactionManager txManager)-
Methods inherited from class org.javers.core.JaversBuilder
assembleJaversInstance, assembleJaversInstanceAndEnsureSchema, registerCustomComparator, registerCustomType, registerEntities, registerEntity, registerEntity, registerIgnoredClass, registerIgnoredClassesStrategy, registerJsonAdvancedTypeAdapter, registerType, registerTypes, registerValue, registerValue, registerValue, registerValue, registerValueGsonTypeAdapter, registerValueObject, registerValueObject, registerValueObjects, registerValueTypeAdapter, registerValueWithCustomToString, scanTypeName, withCommitIdGenerator, withDateTimeProvider, withInitialChanges, withListCompareAlgorithm, withMappingStyle, withNewObjectsSnapshot, withObjectAccessHook, withPackagesToScan, withPrettyPrint, withPrettyPrintDateFormats, withProperties, withTerminalChanges, withTypeSafeValues, withUsePrimitiveDefaults
-
-
-
-
Method Detail
-
javers
public static TransactionalMongoJaversBuilder javers()
-
withTxManager
public TransactionalMongoJaversBuilder withTxManager(org.springframework.data.mongodb.MongoTransactionManager txManager)
- Parameters:
txManager- nullable
-
registerJaversRepository
public TransactionalMongoJaversBuilder registerJaversRepository(org.javers.repository.api.JaversRepository mongoRepository)
- Overrides:
registerJaversRepositoryin classorg.javers.core.JaversBuilder
-
build
public org.javers.core.Javers build()
- Overrides:
buildin classorg.javers.core.JaversBuilder
-
-