添加字段列表

@param fieldNames 字段列表
@return 自身
965595
public Entity addFieldNames(String... fieldNames) {
		if (ArrayUtil.isNotEmpty(fieldNames)) {
			if (null == this.fieldNames) {
				return setFieldNames(fieldNames);
			} else {
				for (String fieldName : fieldNames) {
					this.fieldNames.add(fieldName);
				}
			}
		}
		return this;
	}
672602
public void add(HttpFields fields)
    {
        if (fields==null)
            return;

        Enumeration enm = fields.getFieldNames();
        while( enm.hasMoreElements() )
        {
            String name = (String)enm.nextElement();
            Enumeration values = fields.getValues(name);
            while(values.hasMoreElements())
                add(name,(String)values.nextElement());
        }
    }
58460
public FieldsFilter withFields(String fields, boolean includeFields) {
        parameters.put("fields", fields);
        parameters.put("include_fields", includeFields);
        return this;
    }
28253
public ArrayList getFields(String fieldNames) throws NoSuchFieldException
    {
        ArrayList          result    = new ArrayList();
        FieldDescriptorDef fieldDef;
        String             name;

        for (CommaListIterator it = new CommaListIterator(fieldNames); it.hasNext();)
        {
            name = it.getNext();
            fieldDef = getField(name);
            if (fieldDef == null)
            {
                throw new NoSuchFieldException(name);
            }
            result.add(fieldDef);
        }
        return result;
    }
719242
public List<String> getExtraFieldNames()
    {
        List<String> result = new ArrayList<String>();

        for (Method method : getExtraFieldMethods())
        {
            ExtraField extraField = method.getAnnotation( ExtraField.class );
            result.add( extraField.value() );
        }

        return result;
    }
1234389
private Set<String> collidingFieldNames(ImmutableList<Field> fields) {
    Set<String> fieldNames = new LinkedHashSet<>();
    Set<String> collidingNames = new LinkedHashSet<>();
    for (Field field : fields) {
      if (!fieldNames.add(field.name())) {
        collidingNames.add(field.name());
      }
    }
    return collidingNames;
  }
1317057
public List<String> getDeclaredFieldNames() {
		if (this.declaredFieldNames == null) {
			this.declaredFieldNames = new ArrayList<String>(this.declaredFields.size());
			for (DOField f : this.declaredFields) {
				this.declaredFieldNames.add(f.getName());
			}
		}
		return this.declaredFieldNames;
	}
1306430
private static String[] fieldNames(Class<?> beanType) {
        Field[] fields = Stream.of(beanType.getDeclaredFields())
                .filter(f -> !Modifier.isStatic(f.getModifiers()) && f.getAnnotation(PropertyDefinition.class) != null)
                .toArray(Field[]::new);
        List<String> fieldNames = new ArrayList<>();
        for (int i = 0; i < fields.length; i++) {
            fieldNames.add(fields[i].getName());
        }
        return fieldNames.toArray(new String[fieldNames.size()]);
    }
1274110
public String[] wrap(String... fields){
		if(ArrayUtil.isEmpty(fields)) {
			return fields;
		}
		
		String[] wrappedFields = new String[fields.length];
		for(int i = 0; i < fields.length; i++) {
			wrappedFields[i] = wrap(fields[i]);
		}
		
		return wrappedFields;
	}
1182850
public StatsOptions addFacet(String fieldName) {

		Assert.hasText(fieldName, "Fieldname for facet statistics must not be blank.");

		return addFacet(new SimpleField(fieldName));
	}
274992
private void getFields(ArrayList<JField> fieldList)
  {
    for (JField field : getDeclaredFields()) {
      if (! fieldList.contains(field))
        fieldList.add(field);
    }

    if (getSuperClass() != null) {
      for (JField field : getSuperClass().getFields()) {
        if (! fieldList.contains(field))
          fieldList.add(field);
      }
    }
  }
117775
public void addReadFields(FieldSet readFields) {
		if(this.readFields == null) {
			this.readFields = new FieldSet(readFields);
		} else {
			this.readFields.addAll(readFields);
		}
	}
75492
public HighlightOptions addFields(Collection<String> fieldnames) {
		Assert.notNull(fieldnames, "Fieldnames must not be null!");

		for (String fieldname : fieldnames) {
			addField(fieldname);
		}
		return this;
	}
335610
public SqlInfo buildInSql(String fieldText, Object[] values) {
        if (values == null || values.length == 0) {
            return sqlInfo;
        }

        // 遍历数组，并遍历添加in查询的替换符和参数
        this.suffix = StringHelper.isBlank(this.suffix) ? ZealotConst.IN_SUFFIX : this.suffix;
        join.append(prefix).append(fieldText).append(this.suffix).append("(");
        int len = values.length;
        for (int i = 0; i < len; i++) {
            if (i == len - 1) {
                join.append("?) ");
            } else {
                join.append("?, ");
            }
            params.add(values[i]);
        }

        return sqlInfo.setJoin(join).setParams(params);
    }
1150844
public Collection<String> wrap(Collection<String> fields){
		if(CollectionUtil.isEmpty(fields)) {
			return fields;
		}
		
		return Arrays.asList(wrap(fields.toArray(new String[fields.size()])));
	}
186595
protected List<String> getGetterNameAlternatives(String fieldName) {
        String base = capitalize(fieldName);
        List<String> res = new ArrayList<>();
        res.add("get" + capitalize(fieldName));
        res.add(fieldName);
        String alt = "is" + base;
        if (alt.startsWith("isIs")) {
            res.add("i" + alt.substring(3));
        }
        res.add(alt);
        alt = "has" + base;
        if (!alt.startsWith("hasIs")) {
            if (alt.startsWith("hasHas")) {
                res.add("h" + alt.substring(4));
            } else {
                res.add(alt);
            }
        }
        return res;
    }
496314
public Set<String> getFieldNamesCollection() {
        final Set<String> set = new HashSet<>(_size);
        for (HttpField f : this) {
            if (f != null)
                set.add(f.getName());
        }
        return set;
    }