From ee58b4d6e471354c5d68d62e86576df14525a7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Basl=C3=A9?= Date: Thu, 10 Mar 2016 12:13:55 +0100 Subject: [PATCH] DATACOUCH-216 - Add template getter on repository interface --- .../data/couchbase/repository/CouchbaseRepository.java | 6 ++++++ .../repository/support/SimpleCouchbaseRepository.java | 8 ++------ 2 files changed, 8 insertions(+), 6 deletions(-) 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; }