diff --git a/src/main/java/org/springframework/data/couchbase/repository/CouchbaseRepository.java b/src/main/java/org/springframework/data/couchbase/repository/CouchbaseRepository.java index ea9cce74..e596a9fc 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/CouchbaseRepository.java +++ b/src/main/java/org/springframework/data/couchbase/repository/CouchbaseRepository.java @@ -18,6 +18,7 @@ package org.springframework.data.couchbase.repository; import java.io.Serializable; +import org.springframework.data.couchbase.core.CouchbaseOperations; import org.springframework.data.repository.CrudRepository; /** @@ -27,4 +28,9 @@ import org.springframework.data.repository.CrudRepository; */ public interface CouchbaseRepository extends CrudRepository { + /** + * @return a reference to the underlying {@link CouchbaseOperations operation template}. + */ + CouchbaseOperations getCouchbaseOperations(); + } diff --git a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleCouchbaseRepository.java b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleCouchbaseRepository.java index 81acda32..28a53a1a 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleCouchbaseRepository.java +++ b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleCouchbaseRepository.java @@ -191,12 +191,8 @@ public class SimpleCouchbaseRepository implements Co } } - /** - * Returns the underlying operation template. - * - * @return the underlying template. - */ - protected CouchbaseOperations getCouchbaseOperations() { + @Override + public CouchbaseOperations getCouchbaseOperations() { return couchbaseOperations; }