code: protected void appendPattern(StringBuilder sb, QPathEntry entry, boolean indexConstraint)
     {
        String pattern = entry.getAsString(false);
        sb.append("(I.NAME");
        if (pattern.contains("*"))
        {
           sb.append(" LIKE '");
           sb.append(escapeSpecialChars(pattern));
           sb.append("' ESCAPE '");
           sb.append(getLikeExpressionEscape());
           sb.append("'");
        }
        else
        {
           sb.append("='");
           sb.append(escape(pattern));
           sb.append("'");
        }
  
        if (indexConstraint && entry.getIndex() != -1)
        {
           sb.append(" and I.I_INDEX=");
           sb.append(entry.getIndex());
        }
        sb.append(")");
     }
docs: Append pattern expression.
  Appends String "I.NAME LIKE 'escaped pattern' ESCAPE 'escapeString'" or "I.NAME='pattern'"
  to String builder sb.
  
  @param sb StringBuilder
  @param entry
  @param indexConstraint