private QueryBuilder populateLikeQuery ( LikeExpression likeExpression , EntityMetadata metadata ) { Expression patternValue = likeExpression . getPatternValue ( ) ; String field = likeExpression . getStringExpression ( ) . toString ( ) ; String likePattern = ( patternValue instanceof InputParameter ) ? kunderaQuery . getParametersMap ( ) . get ( ( patternValue ) . toParsedText ( ) ) . toString ( ) : patternValue . toParsedText ( ) . toString ( ) ; String jpaField = getField ( field ) ; log . debug ( "Pattern value for field " + field + " is: " + patternValue ) ; QueryBuilder filterBuilder = getQueryBuilder ( kunderaQuery . new FilterClause ( jpaField , Expression . LIKE , likePattern , field ) , metadata ) ; return filterBuilder ; }
Populate like query .