# Class: QueryField

## QueryField(nameopt, typeNameopt)

Class representing one Query Field element of QueryEntity of Ignite CacheConfiguration.

All configuration settings are optional and have defaults which are defined on a server side.

See Apache Ignite documentation for details of every configuration setting.

## Constructor

#### new QueryField(nameopt, typeNameopt)

Public constructor.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`name` | string | <optional> | null |
`typeName` | string | <optional> | null |

Source:
  - CacheConfiguration.js, line 400

### Methods

#### (async) getDefaultValue(valueTypeopt) → {*}

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`valueType` | ObjectType.PRIMITIVE_TYPE | CompositeType | <optional> | null | type of the default value: either a type code of primitive (simple) type or an instance of class representing non-primitive (composite) type or null (or not specified) that means the type is not specified

Source:
  - CacheConfiguration.js, line 536

##### Returns:

Type
  *

#### getIsKeyField() → {boolean}

Source:
  - CacheConfiguration.js, line 482

##### Returns:

Type
  boolean

#### getIsNotNull() → {boolean}

Source:
  - CacheConfiguration.js, line 503

##### Returns:

Type
  boolean

#### getName() → {string}

Source:
  - CacheConfiguration.js, line 440

##### Returns:

Type
  string

#### getPrecision() → {number}

Source:
  - CacheConfiguration.js, line 572

##### Returns:

Type
  number

#### getScale() → {number}

Source:
  - CacheConfiguration.js, line 594

##### Returns:

Type
  number

#### getTypeName() → {string}

Source:
  - CacheConfiguration.js, line 461

##### Returns:

Type
  string

#### setDefaultValue(defaultValue, valueTypeopt) → {QueryField}

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`defaultValue` | * |  |  |
`valueType` | ObjectType.PRIMITIVE_TYPE | CompositeType | <optional> | null | type of the default value: either a type code of primitive (simple) type or an instance of class representing non-primitive (composite) type or null (or not specified) that means the type is not specified

Source:
  - CacheConfiguration.js, line 518

##### Returns:

- the same instance of the QueryField.

Type
  QueryField

#### setIsKeyField(isKeyField) → {QueryField}

##### Parameters:

Name | Type | Description
--- | --- | ---
`isKeyField` | boolean |

Source:
  - CacheConfiguration.js, line 472

##### Returns:

- the same instance of the QueryField.

Type
  QueryField

#### setIsNotNull(isNotNull) → {QueryField}

##### Parameters:

Name | Type | Description
--- | --- | ---
`isNotNull` | boolean |

Source:
  - CacheConfiguration.js, line 493

##### Returns:

- the same instance of the QueryField.

Type
  QueryField

#### setName(name) → {QueryField}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string |

Source:
  - CacheConfiguration.js, line 430

##### Returns:

- the same instance of the QueryField.

Type
  QueryField

#### setPrecision(precision) → {QueryField}

##### Parameters:

Name | Type | Description
--- | --- | ---
`precision` | number |

Source:
  - CacheConfiguration.js, line 561

##### Returns:

- the same instance of the QueryField.

Type
  QueryField

#### setScale(scale) → {QueryField}

##### Parameters:

Name | Type | Description
--- | --- | ---
`scale` | number |

Source:
  - CacheConfiguration.js, line 583

##### Returns:

- the same instance of the QueryField.

Type
  QueryField

#### setTypeName(typeName) → {QueryField}

##### Parameters:

Name | Type | Description
--- | --- | ---
`typeName` | string |

Source:
  - CacheConfiguration.js, line 451

##### Returns:

- the same instance of the QueryField.

Type
  QueryField