Class ValidatingCouchbaseEventListener
java.lang.Object
org.springframework.data.couchbase.core.mapping.event.AbstractCouchbaseEventListener<Object>
org.springframework.data.couchbase.core.mapping.event.ValidatingCouchbaseEventListener
- All Implemented Interfaces:
EventListener
,ApplicationListener<CouchbaseMappingEvent<?>>
javax.validation dependant entities validator. When it is registered as Spring component its automatically invoked
before entities are saved in database.
- Author:
- Maciej Walkowiak, Michael Nitschinger, Mark Paluch, Michael Reiche
-
Constructor Summary
ConstructorDescriptionValidatingCouchbaseEventListener
(jakarta.validation.Validator validator) Creates a newValidatingCouchbaseEventListener
using the givenValidator
. -
Method Summary
Methods inherited from class org.springframework.data.couchbase.core.mapping.event.AbstractCouchbaseEventListener
onAfterDelete, onAfterSave, onApplicationEvent, onBeforeConvert, onBeforeDelete
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
ValidatingCouchbaseEventListener
public ValidatingCouchbaseEventListener(jakarta.validation.Validator validator) Creates a newValidatingCouchbaseEventListener
using the givenValidator
.- Parameters:
validator
- must not be null.
-
-
Method Details
-
onBeforeSave
- Overrides:
onBeforeSave
in classAbstractCouchbaseEventListener<Object>
-