protected boolean isValidQuery ( String query ) { if ( query == null ) { return true ; } return QUERY_PATTERN . matcher ( query ) . matches ( ) ; }
Returns true if the query is null or it s a properly formatted query string .