@Override
    public <V> Observable<V> mapGet(final String docId, final String key, Class<V> valueType) {
        final Func1<DocumentFragment<Lookup>, V> mapResult = new Func1<DocumentFragment<Lookup>, V>() {
            @Override
            public V call(DocumentFragment<Lookup> documentFragment) {
                ResponseStatus status = documentFragment.status(0);
                if (status == ResponseStatus.SUCCESS) {
                    return (V) documentFragment.content(0);
                } else if (status == ResponseStatus.SUBDOC_PATH_NOT_FOUND) {
                    throw new PathNotFoundException("Key not found in map");
                } else {
                    throw new CouchbaseException(status.toString());
                }
            }
        };
        return lookupIn(docId).get(key)
                .execute()
                .map(mapResult);
    }
@ Override public < V > Observable < V > mapGet ( final String docId , final String key , Class < V > valueType ) { final Func1 < DocumentFragment < Lookup > , V > mapResult = new Func1 < DocumentFragment < Lookup > , V > ( ) { @ Override public V call ( DocumentFragment < Lookup > documentFragment ) { ResponseStatus status = documentFragment . status ( 0 ) ; if ( status == ResponseStatus . SUCCESS ) { return ( V ) documentFragment . content ( 0 ) ; } else if ( status == ResponseStatus . SUBDOC_PATH_NOT_FOUND ) { throw new PathNotFoundException ( "Key not found in map" ) ; } else { throw new CouchbaseException ( status . toString ( ) ) ; } } } ; return lookupIn ( docId ) . get ( key ) . execute ( ) . map ( mapResult ) ; }
/*-------------------------*
END OF SUB-DOCUMENT API *
-------------------------