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
ConstructorsConstructorDescriptionValidatingCouchbaseEventListener(jakarta.validation.Validator validator) Creates a newValidatingCouchbaseEventListenerusing the givenValidator. -
Method Summary
Methods inherited from class AbstractCouchbaseEventListener
onAfterDelete, onAfterSave, onApplicationEvent, onBeforeConvert, onBeforeDeleteMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
ValidatingCouchbaseEventListener
public ValidatingCouchbaseEventListener(jakarta.validation.Validator validator) Creates a newValidatingCouchbaseEventListenerusing the givenValidator.- Parameters:
validator- must not be null.
-
-
Method Details
-
onBeforeSave
- Overrides:
onBeforeSavein classAbstractCouchbaseEventListener<Object>
-