code: private void appendValue(StringBuilder builder, Class fieldClazz, Object value, boolean useToken)
      {
          // To allow handle byte array class object by converting it to string
  
          if (fieldClazz != null && fieldClazz.isAssignableFrom(byte[].class))
          {
              value = value != null ? value : ByteBufferUtil.EMPTY_BYTE_BUFFER.array();
              StringBuilder hexstr = new StringBuilder("0x");
              builder.append(hexstr.append((Hex.encodeHex((byte[]) value))));
          }
          else
          {
              if (useToken)
              {
                  builder.append(TOKEN);
              }
  
              if (fieldClazz != null
                      && value != null
                      && (fieldClazz.isAssignableFrom(String.class) || isDate(fieldClazz)
                              || fieldClazz.isAssignableFrom(char.class) || fieldClazz.isAssignableFrom(Character.class) || value instanceof Enum))
              {
  
                  if (fieldClazz.isAssignableFrom(String.class))
                  {
                      // To allow escape character
                      value = ((String) value).replaceAll("'", "''");
                  }
                  builder.append("'");
  
                  if (isDate(fieldClazz)) // For CQL, date has to
                                          // be in date.getTime()
                  {
                      builder.append(PropertyAccessorFactory.getPropertyAccessor(fieldClazz).toString(value));
                  }
                  else if (value instanceof Enum)
                  {
                      builder.append(((Enum) value).name());
                  }
  
                  else
                  {
                      builder.append(value);
                  }
                  builder.append("'");
              }
              else
              {
                  builder.append(value);
              }
  
          }
          if (useToken)
          {
              builder.append(CLOSE_BRACKET);
          }
      }
docs: Append value.
  
  @param builder
  the builder
  @param fieldClazz
  the field clazz
  @param value
  the value
  @param useToken
  the use token