# ParamUtils

Package io.milvus.param

## Class ParamUtils

- java.lang.Object
- - io.milvus.param.ParamUtils

    public class ParamUtils
    extends java.lang.Object

Utility functions for param classes

### Nested Class Summary

Nested Classes
`static class` `ParamUtils.InsertBuilderWrapper`
`static class` `ParamUtils.InsertDataInfo`

### Constructor Summary

Constructors
`ParamUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static java.util.List<io.milvus.grpc.KeyValuePair>` `AssembleKvPair​(java.util.Map<java.lang.String,​java.lang.String> sourceMap)`
`static void` `checkFieldData​(FieldType fieldSchema, java.util.List<?> values, boolean verifyElementType)`
`static void` `CheckNullEmptyString​(java.lang.String target, java.lang.String name)` Checks if a string is empty or null.
`static void` `CheckNullString​(java.lang.String target, java.lang.String name)` Checks if a string is null.
`static io.milvus.grpc.SearchRequest` `convertAnnSearchParam​(@NonNull AnnSearchParam annSearchParam, ConsistencyLevelEnum consistencyLevel)`
`static FieldType` `ConvertField​(@NonNull io.milvus.grpc.FieldSchema field)` Convert a grpc field schema to client field schema
`static io.milvus.grpc.FieldSchema` `ConvertField​(@NonNull FieldType field)` Convert a client field schema to grpc field schema
`static io.milvus.grpc.HybridSearchRequest` `convertHybridSearchParam​(@NonNull HybridSearchParam requestParam)`
`static io.milvus.grpc.QueryRequest` `convertQueryParam​(@NonNull QueryParam requestParam)`
`static io.milvus.grpc.SearchRequest` `convertSearchParam​(@NonNull SearchParam requestParam)`
`static java.util.HashMap<io.milvus.grpc.DataType,​java.lang.String>` `getTypeErrorMsg()`
`static boolean` `isVectorDataType​(io.milvus.grpc.DataType dataType)`

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

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

### Constructor Detail

#### ParamUtils

    public ParamUtils()

### Method Detail

#### getTypeErrorMsg

    public static java.util.HashMap<io.milvus.grpc.DataType,​java.lang.String> getTypeErrorMsg()

#### checkFieldData

    public static void checkFieldData​(FieldType fieldSchema,
                                      java.util.List<?> values,
                                      boolean verifyElementType)

#### CheckNullEmptyString

    public static void CheckNullEmptyString​(java.lang.String target,
                                            java.lang.String name)
                                     throws ParamException

Checks if a string is empty or null. Throws `ParamException` if the string is empty of null.

Parameters:
  `target` - target string
  `name` - a name to describe this string
Throws:
  `ParamException`

#### CheckNullString

    public static void CheckNullString​(java.lang.String target,
                                       java.lang.String name)
                                throws ParamException

Checks if a string is null. Throws `ParamException` if the string is null.

Parameters:
  `target` - target string
  `name` - a name to describe this string
Throws:
  `ParamException`

#### convertSearchParam

    public static io.milvus.grpc.SearchRequest convertSearchParam​(@NonNull
                                                                  @NonNull SearchParam requestParam)
                                                           throws ParamException

Throws:
  `ParamException`

#### convertAnnSearchParam

    public static io.milvus.grpc.SearchRequest convertAnnSearchParam​(@NonNull
                                                                     @NonNull AnnSearchParam annSearchParam,
                                                                     ConsistencyLevelEnum consistencyLevel)

#### convertHybridSearchParam

    public static io.milvus.grpc.HybridSearchRequest convertHybridSearchParam​(@NonNull
                                                                              @NonNull HybridSearchParam requestParam)
                                                                       throws ParamException

Throws:
  `ParamException`

#### convertQueryParam

    public static io.milvus.grpc.QueryRequest convertQueryParam​(@NonNull
                                                                @NonNull QueryParam requestParam)

#### isVectorDataType

    public static boolean isVectorDataType​(io.milvus.grpc.DataType dataType)

#### ConvertField

    public static FieldType ConvertField​(@NonNull
                                         @NonNull io.milvus.grpc.FieldSchema field)

Convert a grpc field schema to client field schema

Parameters:
  `field` - FieldSchema object
Returns:
  `FieldType` schema of the field

#### ConvertField

    public static io.milvus.grpc.FieldSchema ConvertField​(@NonNull
                                                          @NonNull FieldType field)

Convert a client field schema to grpc field schema

Parameters:
  `field` - `FieldType` object
Returns:
  `FieldSchema` schema of the field

#### AssembleKvPair

    public static java.util.List<io.milvus.grpc.KeyValuePair> AssembleKvPair​(java.util.Map<java.lang.String,​java.lang.String> sourceMap)