code: private QueryBuilder getQueryBuilder(FilterClause clause, final EntityMetadata metadata)
      {
          String condition = clause.getCondition();
          String value = clause.getValue().get(0).toString();
          String name = ((AbstractAttribute) ((MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                  metadata.getPersistenceUnit())).entity(metadata.getEntityClazz()).getAttribute(clause.getProperty()))
                  .getJPAColumnName();
  
          String likePattern = value.contains(ESConstants.PERCENTAGE) ? value.replaceAll(ESConstants.PERCENTAGE,
                  ESConstants.ASTERISK) : ESConstants.ASTERISK + value + ESConstants.ASTERISK;
  
          QueryBuilder queryBuilder = null;
          if (condition.equals(Expression.LIKE))
          {
              queryBuilder = QueryBuilders.wildcardQuery(name, likePattern);
          }
  
          return QueryBuilders.queryFilter(queryBuilder);
      }
docs: Gets the query.
  
  @param clause
  the clause
  @param metadata
  the metadata
  @return the query