@View(name = "by_principal_date",
        map = "function(doc) { if (doc.recordKey && doc.principal && doc.deviceFingerprint && doc.recordDate) { emit([doc.principal, doc.recordDate], doc) } }")
    public List<CouchDbMultifactorAuthenticationTrustRecord> findByPrincipalAfterDate(final String principal, final LocalDateTime onOrAfterDate) {
        val view = createQuery("by_principal_date")
            .startKey(ComplexKey.of(principal, onOrAfterDate)).endKey(ComplexKey.of(principal, "999999"));

        return db.queryView(view, CouchDbMultifactorAuthenticationTrustRecord.class);
    }
@ View ( name = "by_principal_date" , map = "function(doc) { if (doc.recordKey && doc.principal && doc.deviceFingerprint && doc.recordDate) { emit([doc.principal, doc.recordDate], doc) } }" ) public List < CouchDbMultifactorAuthenticationTrustRecord > findByPrincipalAfterDate ( final String principal , final LocalDateTime onOrAfterDate ) { val view = createQuery ( "by_principal_date" ) . startKey ( ComplexKey . of ( principal , onOrAfterDate ) ) . endKey ( ComplexKey . of ( principal , "999999" ) ) ; return db . queryView ( view , CouchDbMultifactorAuthenticationTrustRecord . class ) ; }
Find by principal on or after date.
@param principal Principal to search for
@param onOrAfterDate start date for search
@return records for principal after date.