DATACOUCH-216 - Add template getter on repository interface

This commit is contained in:
Simon Baslé
2016-03-10 12:13:55 +01:00
parent 67373e501e
commit ee58b4d6e4
2 changed files with 8 additions and 6 deletions

View File

@@ -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<T, ID extends Serializable> extends CrudRepository<T, ID> {
/**
* @return a reference to the underlying {@link CouchbaseOperations operation template}.
*/
CouchbaseOperations getCouchbaseOperations();
}

View File

@@ -191,12 +191,8 @@ public class SimpleCouchbaseRepository<T, ID extends Serializable> implements Co
}
}
/**
* Returns the underlying operation template.
*
* @return the underlying template.
*/
protected CouchbaseOperations getCouchbaseOperations() {
@Override
public CouchbaseOperations getCouchbaseOperations() {
return couchbaseOperations;
}