org.springframework.data.couchbase.core.mapping.event
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<?>>
public class ValidatingCouchbaseEventListener
- extends AbstractCouchbaseEventListener<Object>
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidatingCouchbaseEventListener
public ValidatingCouchbaseEventListener(javax.validation.Validator validator)
- Creates a new
ValidatingCouchbaseEventListener using the given Validator.
- Parameters:
validator - must not be null.
onBeforeSave
public void onBeforeSave(Object source,
CouchbaseDocument dbo)
- Overrides:
onBeforeSave in class AbstractCouchbaseEventListener<Object>
Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.