public < P extends ParaObject > List < P > getItems ( String at , Map < String , Object > result , Pager ... pager ) { if ( result != null && ! result . isEmpty ( ) && ! StringUtils . isBlank ( at ) && result . containsKey ( at ) ) { if ( pager != null && pager . length > 0 && pager [ 0 ] != null ) { if ( result . containsKey ( "totalHits" ) ) { pager [ 0 ] . setCount ( ( ( Integer ) result . get ( "totalHits" ) ) . longValue ( ) ) ; } if ( result . containsKey ( "lastKey" ) ) { pager [ 0 ] . setLastKey ( ( String ) result . get ( "lastKey" ) ) ; } } return getItemsFromList ( ( List < ? > ) result . get ( at ) ) ; } return Collections . emptyList ( ) ; }
Converts a list of Maps to a List of ParaObjects at a given path within the JSON tree structure .