code: public static List<String> getFilterableOrRestrictableFieldNames(Class<?> entityClass) {
          List<Field> allFields = FieldUtils.getAllFieldsList(entityClass);
          List<String> restrictableFields = new ArrayList<String>();
          for (Field field : allFields) {
              final Class<?> fieldType = field.getType();
              final String fieldName = field.getName();
              final int fieldModifiers = field.getModifiers();
  
              final boolean isPrimitiveOrWrapper = ClassUtils.isPrimitiveOrWrapper(fieldType);
              final boolean isString = fieldType.equals(String.class);
              final boolean isStatic = Modifier.isStatic(fieldModifiers);
              final boolean isPrivate = Modifier.isPrivate(fieldModifiers);
  
              // extract only non-static private fields that are primitive or
              // primitive wrapper types or String
              if ((isPrimitiveOrWrapper || isString) && isPrivate && !isStatic) {
                  restrictableFields.add(fieldName);
              }
          }
          return restrictableFields;
      }
docs: Returns a list of fieldNames of the passed class that can be used to either
  <p>
  <ul>
  <li>filter results with, see {@link #validFieldNamesWithCastedValues}, or</li>
  <li>restrict output of queries, see {@link #determineRestrictFields} </li>
  </ul>
  
  @param entityClass
  @return