static Selector convertLike ( Selector arg , String pattern , String escape ) { try { pattern = reduceStringLiteralToken ( pattern ) ; boolean escaped = false ; char esc = 0 ; if ( escape != null ) { escape = reduceStringLiteralToken ( escape ) ; if ( escape . length ( ) != 1 ) return null ; escaped = true ; esc = escape . charAt ( 0 ) ; } return Matching . getInstance ( ) . createLikeOperator ( arg , pattern , escaped , esc ) ; } catch ( Exception e ) { // No FFDC Code Needed. // FFDC driven by wrapper class. FFDC . processException ( cclass , "com.ibm.ws.sib.matchspace.selector.impl.ParseUtil.convertLike" , e , "1:183:1.19" ) ; // This should never occur as to get into this we should be missing // the sib.matchspace jar file, but we are already in it. throw new RuntimeException ( e ) ; } }
Convert a partially parsed LIKE expression in which the pattern and escape are in the form of token images to the proper Selector expression to represent the LIKE expression