public < P extends ParaObject > List < P > findTerms ( String type , Map < String , ? > terms , boolean matchAll , Pager ... pager ) { if ( terms == null ) { return Collections . emptyList ( ) ; } MultivaluedMap < String , String > params = new MultivaluedHashMap <> ( ) ; params . putSingle ( "matchall" , Boolean . toString ( matchAll ) ) ; LinkedList < String > list = new LinkedList <> ( ) ; for ( Map . Entry < String , ? extends Object > term : terms . entrySet ( ) ) { String key = term . getKey ( ) ; Object value = term . getValue ( ) ; if ( value != null ) { list . add ( key . concat ( Config . SEPARATOR ) . concat ( value . toString ( ) ) ) ; } } if ( ! terms . isEmpty ( ) ) { params . put ( "terms" , list ) ; } params . putSingle ( Config . _TYPE , type ) ; params . putAll ( pagerToParams ( pager ) ) ; return getItems ( find ( "terms" , params ) , pager ) ; }
Searches for objects that have properties matching some given values . A terms query .