public static boolean hasNoWildcards(String pattern){
  if (pattern == null)   return true;
  for (int pos=0; pos < pattern.length(); pos++) {
    char ch=pattern.charAt(pos);
    if (ch == '_' || ch == '%') {
      return false;
    }
 else     if (ch == '\\' && pos < pattern.length() - 1) {
      char nextCh=pattern.charAt(pos + 1);
      if (nextCh == '\\' || nextCh == '%' || nextCh == '_') {
        pos+=1;
      }
    }
  }
  return true;
}

public static boolean hasNoWildcards ( String pattern ) { if ( pattern == null ) return true ; for ( int pos = 0 ; pos < pattern . length ( ) ; pos ++ ) { char ch = pattern . charAt ( pos ) ; if ( ch == '_' || ch == '%' ) { return false ; } else if ( ch == '\\' && pos < pattern . length ( ) - 1 ) { char nextCh = pattern . charAt ( pos + 1 ) ; if ( nextCh == '\\' || nextCh == '%' || nextCh == '_' ) { pos += 1 ; } } } return true ; }
determine if there are no sql wildcard characters ( ' % ' or ' _ ' ) in the given pattern .
