DATACOUCH-97: Expose the CouchbaseClient in the template.

This commit is contained in:
Michael Nitschinger
2014-08-26 10:06:23 +02:00
parent f8474f631a
commit 6844364a35
2 changed files with 12 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
package org.springframework.data.couchbase.core;
import com.couchbase.client.CouchbaseClient;
import com.couchbase.client.protocol.views.Query;
import com.couchbase.client.protocol.views.ViewResponse;
import net.spy.memcached.PersistTo;
@@ -273,4 +274,11 @@ public interface CouchbaseOperations {
*/
CouchbaseConverter getConverter();
/**
* Returns the linked {@link CouchbaseClient} to this template.
*
* @return the client used for the template.
*/
CouchbaseClient getCouchbaseClient();
}

View File

@@ -486,4 +486,8 @@ public class CouchbaseTemplate implements CouchbaseOperations, ApplicationEventP
}
}
@Override
public CouchbaseClient getCouchbaseClient() {
return client;
}
}