Array of fieldNames for which counts should be produced

@param countsfields array of the field names
@return this for additional parameter setting or to query
434624
public Search counts(String[] countsfields) {
        assert (countsfields.length > 0);
        JsonArray countsJsonArray = new JsonArray();
        for(String countsfield : countsfields) {
            JsonPrimitive element = new JsonPrimitive(countsfield);
            countsJsonArray.add(element);
        }
        databaseHelper.query("counts", countsJsonArray);
        return this;
    }
389407
protected String createSortQuery(final List<DefaultKeyValue<String, Boolean>> fields) {
        StringBuilder builder = new StringBuilder("{");
        Iterator<DefaultKeyValue<String, Boolean>> iter = fields.iterator();
        while (iter.hasNext()) {
            DefaultKeyValue<String, Boolean> field = iter.next();
            builder.append("\"");
            builder.append(field.getKey());
            builder.append("\"");
            builder.append(":");
            if (field.getValue()) {
                builder.append(1);
            } else {
                builder.append(-1);
            }
            if (iter.hasNext()) {
                builder.append(",");
            }
        }
        builder.append("}");
        return builder.toString();
    }
364294
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, CODE, 30, null, null);
        if (iFieldSeq == 4)
            field = new StringField(this, DESCRIPTION, 50, null, null);
        if (iFieldSeq == 5)
            field = new QueueNameField(this, QUEUE_NAME_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 6)
            field = new MessageProcessInfoField(this, REPLY_MESSAGE_PROCESS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 7)
            field = new MessageProcessInfoField(this, LOCAL_MESSAGE_PROCESS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 8)
            field = new MessageInfoField(this, MESSAGE_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 9)
            field = new MessageTypeField(this, MESSAGE_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 10)
            field = new ProcessTypeField(this, PROCESS_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 11)
            field = new StringField(this, PROCESSOR_CLASS, 127, null, null);
        if (iFieldSeq == 12)
            field = new PropertiesField(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 13)
            field = new MessageTransportSelect(this, DEFAULT_MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 14)
            field = new BaseStatusSelect(this, INITIAL_MESSAGE_STATUS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
956037
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, NAME, 50, null, null);
        if (iFieldSeq == 4)
            field = new MenusField(this, PARENT_FOLDER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 5)
            field = new ShortField(this, SEQUENCE, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)0));
        if (iFieldSeq == 6)
            field = new XmlField(this, COMMENT, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //if (iFieldSeq == 7)
        //  field = new StringField(this, CODE, 30, null, null);
        if (iFieldSeq == 8)
            field = new MenusTypeField(this, TYPE, 10, null, null);
        if (iFieldSeq == 9)
            field = new BooleanField(this, AUTO_DESC, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(true));
        if (iFieldSeq == 10)
            field = new StringField(this, PROGRAM, 255, null, null);
        if (iFieldSeq == 11)
            field = new XMLPropertiesField(this, PARAMS, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 12)
            field = new StringField(this, ICON_RESOURCE, 255, null, null);
        if (iFieldSeq == 13)
            field = new StringField(this, KEYWORDS, 50, null, null);
        if (iFieldSeq == 14)
            field = new XmlField(this, XML_DATA, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 15)
            field = new XmlField(this, MENUS_HELP, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
795030
public int getFieldCount()
	{
		int result = 0;
		for(Argument a : arguments)
		{
			if(a instanceof FactoryDefinition.SerializedArgument)
			{
				result++;
			}
		}
		return result;
	}
852768
public SortField[] sortFields() {
        return new SortField[]{new SortField(FIELD_NAME, new FieldComparatorSource() {
            @Override
            public FieldComparator<?> newComparator(String field,
                                                    int hits,
                                                    int sort,
                                                    boolean reversed) throws IOException {
                return new ClusteringKeySorter(ClusteringKeyMapper.this, hits, field);
            }
        })};
    }
169357
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        if (iFieldSeq == kID)
            field = new CounterField(this, "ID", Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
        {
            field = super.setupField(iFieldSeq);
            if (field == null) if (iFieldSeq < kAnalysisRecordLastField)
                field = new EmptyField(this);
        }
        return field;
    }
644841
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
        {
            field = new ResourceField(this, RESOURCE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
            field.setNullable(false);
        }
        if (iFieldSeq == 4)
            field = new StringField(this, CODE, 40, null, null);
        if (iFieldSeq == 5)
        {
            field = new StringField(this, LANGUAGE, 2, null, null);
            field.setNullable(false);
        }
        if (iFieldSeq == 6)
        {
            field = new StringField(this, LOCALE, 2, null, null);
            field.setNullable(false);
        }
        if (iFieldSeq == 7)
            field = new StringField(this, KEY_VALUE, 80, null, null);
        if (iFieldSeq == 8)
            field = new MemoField(this, OBJECT_VALUE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
723564
public Collection<String> getFieldNames()
    {
        Set<String> fieldNames = new LinkedHashSet<String> ();
        
        fieldNames.addAll( keys );
        
        return fieldNames;
        
    }
149784
private static <E> Counter<Integer> collectCountCounts(Counter<E> counts) {
    Counter<Integer> cc = new ClassicCounter<Integer>(); // counts of counts
    for (Map.Entry<E, Double> entry : counts.entrySet()) {
      //E item = entry.getKey();
      Integer count = (int) Math.round(entry.getValue());
      cc.incrementCount(count);
    }
    return cc;
  }
776824
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, NAME, 50, null, null);
        //if (iFieldSeq == 4)
        //  field = new FolderField(this, PARENT_FOLDER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //if (iFieldSeq == 5)
        //  field = new ShortField(this, SEQUENCE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 6)
            field = new MemoField(this, COMMENT, 255, null, null);
        //if (iFieldSeq == 7)
        //  field = new StringField(this, CODE, 30, null, null);
        if (iFieldSeq == 8)
            field = new StringField(this, TYPE, 50, null, null);
        if (iFieldSeq == 9)
            field = new StringField(this, FIELD_VALUE, 255, null, null);
        if (iFieldSeq == 10)
            field = new StringField(this, RETURNS_VALUE, 50, null, null);
        if (iFieldSeq == 11)
            field = new IntegerField(this, MAXIMUM, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 12)
            field = new StringField(this, SYSTEM_NAME, 30, null, null);
        if (iFieldSeq == 13)
            field = new BooleanField(this, COMMENTS, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
1077667
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, CLASS_NAME, 40, null, null);
        if (iFieldSeq == 4)
            field = new IntegerField(this, SEQUENCE_NO, 4, null, null);
        if (iFieldSeq == 5)
            field = new StringField(this, KEY_NAME, 40, null, null);
        if (iFieldSeq == 6)
            field = new StringField(this, VALUE_NAME, 255, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
1164927
public void selectFields(String[] fieldNames) {
		checkNotNull(fieldNames, "fieldNames");
		this.fieldNames = fieldNames;
		RowTypeInfo rowTypeInfo = (RowTypeInfo) ParquetSchemaConverter.fromParquetType(expectedFileSchema);
		TypeInformation[] selectFieldTypes = new TypeInformation[fieldNames.length];
		for (int i = 0; i < fieldNames.length; i++) {
			try {
				selectFieldTypes[i] = rowTypeInfo.getTypeAt(fieldNames[i]);
			} catch (IndexOutOfBoundsException e) {
				throw new IllegalArgumentException(String.format("Fail to access Field %s , "
						+ "which is not contained in the file schema", fieldNames[i]), e);
			}
		}
		this.fieldTypes = selectFieldTypes;
	}
75492
public HighlightOptions addFields(Collection<String> fieldnames) {
		Assert.notNull(fieldnames, "Fieldnames must not be null!");

		for (String fieldname : fieldnames) {
			addField(fieldname);
		}
		return this;
	}
918795
@TimerJ
    public TableMetadataBuilder withClusterKey(String... fields) {
        for (String field : fields) {
            clusterKey.add(new ColumnName(tableName, field));
        }
        return this;
    }
1066445
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new ReferenceField(this, CLASS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 4)
            field = new StringField(this, CLASS_INCLUDES_CLASS, 128, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
63499
public TResult queryForFieldValues(Map<String, Object> fieldValues) {
		String where = buildWhere(fieldValues.entrySet());
		String[] whereArgs = buildWhereArgs(fieldValues.values());
		TResult result = userDb.query(getTableName(), table.getColumnNames(),
				where, whereArgs, null, null, null);
		prepareResult(result);
		return result;
	}