Package org.apache.cayenne.commitlog
Class CommitLogModuleExtender
- java.lang.Object
-
- org.apache.cayenne.commitlog.CommitLogModuleExtender
-
public class CommitLogModuleExtender extends Object
A builder of a custom extensions module forCommitLogModulethat customizes its services and installs application-specific commit log listeners.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommitLogModuleExtenderaddListener(Class<? extends CommitLogListener> type)CommitLogModuleExtenderaddListener(CommitLogListener instance)CommitLogModuleExtendercommitLogAnnotationEntitiesOnly()Installs entity filter that would only include entities annotated withCommitLogon the callbacks.CommitLogModuleExtenderentityFactory(Class<? extends CommitLogEntityFactory> entityFactoryType)Installs a custom factory forCommitLogEntityobjects that allows implementors to use their own annotations, etc.CommitLogModuleExtenderexcludeFromTransaction()If called, events will be dispatched outside of the main commit transaction.org.apache.cayenne.di.Modulemodule()Creates a DI module that would installCommitLogFilterand its listeners in Cayenne.
-
-
-
Method Detail
-
addListener
public CommitLogModuleExtender addListener(Class<? extends CommitLogListener> type)
-
addListener
public CommitLogModuleExtender addListener(CommitLogListener instance)
-
excludeFromTransaction
public CommitLogModuleExtender excludeFromTransaction()
If called, events will be dispatched outside of the main commit transaction. By default events are dispatched within the transaction, so listeners can commit their code together with the main commit.
-
commitLogAnnotationEntitiesOnly
public CommitLogModuleExtender commitLogAnnotationEntitiesOnly()
Installs entity filter that would only include entities annotated withCommitLogon the callbacks. AlsoCommitLog.confidential()properties will be obfuscated andCommitLog.ignoredProperties()- excluded from the change collection.
-
entityFactory
public CommitLogModuleExtender entityFactory(Class<? extends CommitLogEntityFactory> entityFactoryType)
Installs a custom factory forCommitLogEntityobjects that allows implementors to use their own annotations, etc.
-
module
public org.apache.cayenne.di.Module module()
Creates a DI module that would installCommitLogFilterand its listeners in Cayenne.
-
-