public String processSearchRequest ( final SearchRequest request ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( "Search for " ) ; if ( request . getDatabaseCode ( ) != null ) { builder . append ( "code " ) ; builder . append ( request . getDatabaseCode ( ) ) ; } if ( request . getQuery ( ) != null ) { builder . append ( " with query " ) ; builder . append ( request . getQuery ( ) ) ; } if ( request . getPageNumber ( ) != null ) { builder . append ( " page " ) ; builder . append ( request . getPageNumber ( ) ) ; } if ( request . getMaxPerPage ( ) != null ) { builder . append ( " limited to " ) ; builder . append ( request . getMaxPerPage ( ) ) ; builder . append ( " per page" ) ; } return builder . toString ( ) ; }
Process a search request into a descriptive title string .