io.milvus.response

## Class FieldDataWrapper

- java.lang.Object
- - io.milvus.response.FieldDataWrapper

    public class FieldDataWrapper
    extends java.lang.Object

Utility class to wrap response of `query/search` interface.

### Constructor Summary

Constructors
Constructor and Description
`FieldDataWrapper(@NonNull io.milvus.grpc.FieldData fieldData)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.lang.Object` `get(int index, java.lang.String paramName)` Gets a field's value by field name.
`java.lang.Boolean` `getAsBool(int index, java.lang.String paramName)`
`java.lang.Double` `getAsDouble(int index, java.lang.String paramName)`
`java.lang.Integer` `getAsInt(int index, java.lang.String paramName)`
`java.lang.String` `getAsString(int index, java.lang.String paramName)`
`int` `getDim()` Gets the dimension value of a vector field.

`java.util.List<?>`

`getFieldData()`
Returns the field data according to its type: FloatVector field returns List of List Float, BinaryVector/Float16Vector/BFloat16Vector fields return List of ByteBuffer SparseFloatVector field returns List of SortedMap[Long, Float] Int64 field returns List of Long Int32/Int16/Int8 fields return List of Integer Bool field returns List of Boolean Float field returns List of Float Double field returns List of Double Varchar field returns List of String Array field returns List of List JSON field returns List of String; etc.

`long` `getRowCount()` Gets the row count of a field.
`boolean` `isDynamicField()`
`boolean` `isJsonField()`
`boolean` `isVectorField()`
`static com.google.gson.JsonElement` `ParseJSONObject(java.lang.Object object)`
`java.lang.Object` `valueByIdx(int index)`
`static java.lang.Object` `ValueOfJSONElement(com.google.gson.JsonElement element)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FieldDataWrapper

    public FieldDataWrapper(@NonNull
                            @NonNull io.milvus.grpc.FieldData fieldData)

### Method Detail

#### isVectorField

    public boolean isVectorField()

#### isJsonField

    public boolean isJsonField()

#### isDynamicField

    public boolean isDynamicField()

#### getDim

    public int getDim()
               throws IllegalResponseException

Gets the dimension value of a vector field. Throw `IllegalResponseException` if the field is not a vector filed.

Returns:
  `int` dimension of the vector field
Throws:
  `IllegalResponseException`

#### getRowCount

    public long getRowCount()
                     throws IllegalResponseException

Gets the row count of a field. * Throws `IllegalResponseException` if the field type is illegal.

Returns:
  `long` row count of the field
Throws:
  `IllegalResponseException`

#### getFieldData

    public java.util.List<?> getFieldData()
                                   throws IllegalResponseException

Returns the field data according to its type: FloatVector field returns List of List Float, BinaryVector/Float16Vector/BFloat16Vector fields return List of ByteBuffer SparseFloatVector field returns List of SortedMap[Long, Float] Int64 field returns List of Long Int32/Int16/Int8 fields return List of Integer Bool field returns List of Boolean Float field returns List of Float Double field returns List of Double Varchar field returns List of String Array field returns List of List JSON field returns List of String; etc. Throws `IllegalResponseException` if the field type is illegal.

Returns:
  `List`
Throws:
  `IllegalResponseException`

#### getAsInt

    public java.lang.Integer getAsInt(int index,
                                      java.lang.String paramName)
                               throws IllegalResponseException

Throws:
  `IllegalResponseException`

#### getAsString

    public java.lang.String getAsString(int index,
                                        java.lang.String paramName)
                                 throws IllegalResponseException

Throws:
  `IllegalResponseException`

#### getAsBool

    public java.lang.Boolean getAsBool(int index,
                                       java.lang.String paramName)
                                throws IllegalResponseException

Throws:
  `IllegalResponseException`

#### getAsDouble

    public java.lang.Double getAsDouble(int index,
                                        java.lang.String paramName)
                                 throws IllegalResponseException

Throws:
  `IllegalResponseException`

#### get

    public java.lang.Object get(int index,
                                java.lang.String paramName)
                         throws IllegalResponseException

Gets a field's value by field name.

Parameters:
  `index` - which row
  `paramName` - which field
Returns:
  returns Long for integer value, returns Double for decimal value, returns String for string value, returns JsonElement for JSON object and Array.
Throws:
  `IllegalResponseException`

#### valueByIdx

    public java.lang.Object valueByIdx(int index)
                                throws ParamException

Throws:
  `ParamException`

#### ParseJSONObject

    public static com.google.gson.JsonElement ParseJSONObject(java.lang.Object object)

#### ValueOfJSONElement

    public static java.lang.Object ValueOfJSONElement(com.google.gson.JsonElement element)