DATACOUCH-216 - Add template getter on repository interface
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user