@ View ( name = "by_consent_decision" , map = "function(doc) {emit([doc.principal, doc.service], doc)}" ) public List < CouchDbConsentDecision > findConsentDecision ( final String principal , final String service ) { val view = createQuery ( "by_consent_decision" ) . key ( ComplexKey . of ( principal , service ) ) . includeDocs ( true ) ; return db . queryView ( view , CouchDbConsentDecision . class ) ; }
Find all consent decisions for a given principal service pair . Should only be one .