org.apache.ignite.internal.processors.cache.query

## Class QueryEntityTypeDescriptor

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.query.QueryEntityTypeDescriptor

    public class QueryEntityTypeDescriptor
    extends Object

Descriptor of type.

### Constructor Summary

Constructors
Constructor and Description
`QueryEntityTypeDescriptor(@NotNull Class<?> keyCls, @NotNull Class<?> valCls)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addFieldToIndex(String idxName, String field, int orderNum, boolean descending)` Adds field to index.
`void` `addFieldToTextIndex(String field)` Adds field to text index.
`QueryEntityIndexDescriptor` `addIndex(String idxName, QueryIndexType type, int inlineSize)` Adds index.
`void` `addNotNullField(String field)` Adds a notNull field.
`void` `addPrecision(String field, Integer precision)` Adds fieldsPrecision info.
`void` `addProperty(QueryEntityClassProperty prop, QuerySqlField sqlAnn, boolean key, boolean failOnDuplicate)` Adds property to the type descriptor.
`void` `addScale(String field, int scale)` Adds fieldsScale info.
`Map<String,Integer>` `fieldsPrecision()`
`Map<String,Integer>` `fieldsScale()`
`Map<String,GridQueryIndexDescriptor>` `indexes()`
`Class<?>` `keyClass()`
`Set<String>` `keyProperties()`
`Set<String>` `notNullFields()`
`Map<String,QueryEntityClassProperty>` `properties()`
`String` `toString()`
`Class<?>` `valueClass()`
`boolean` `valueTextIndex()`
`void` `valueTextIndex(boolean valTextIdx)` Sets if this value should be text indexed.

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### QueryEntityTypeDescriptor

    public QueryEntityTypeDescriptor(@NotNull
                                     @NotNull Class<?> keyCls,
                                     @NotNull
                                     @NotNull Class<?> valCls)

Constructor.

Parameters:
  `keyCls` - QueryEntity key class.
  `valCls` - QueryEntity value class.

### Method Detail

#### indexes

    public Map<String,GridQueryIndexDescriptor> indexes()

Returns:
  Indexes.

#### addIndex

    public QueryEntityIndexDescriptor addIndex(String idxName,
                                               QueryIndexType type,
                                               int inlineSize)

Adds index.

Parameters:
  `idxName` - Index name.
  `type` - Index type.
  `inlineSize` - Inline size.
Returns:
  Index descriptor.

#### addFieldToIndex

    public void addFieldToIndex(String idxName,
                                String field,
                                int orderNum,
                                boolean descending)

Adds field to index.

Parameters:
  `idxName` - Index name.
  `field` - Field name.
  `orderNum` - Fields order number in index.
  `descending` - Sorting order.

#### addFieldToTextIndex

    public void addFieldToTextIndex(String field)

Adds field to text index.

Parameters:
  `field` - Field name.

#### valueClass

    public Class<?> valueClass()

Returns:
  Value class.

#### keyClass

    public Class<?> keyClass()

Returns:
  Key class.

#### addProperty

    public void addProperty(QueryEntityClassProperty prop,
                            QuerySqlField sqlAnn,
                            boolean key,
                            boolean failOnDuplicate)

Adds property to the type descriptor.

Parameters:
  `prop` - Property.
  `sqlAnn` - SQL annotation, can be `null`.
  `key` - Property ownership flag (key or not).
  `failOnDuplicate` - Fail on duplicate flag.

#### addNotNullField

    public void addNotNullField(String field)

Adds a notNull field.

Parameters:
  `field` - notNull field.

#### addPrecision

    public void addPrecision(String field,
                             Integer precision)

Adds fieldsPrecision info.

Parameters:
  `field` - Field.
  `precision` - Precision.

#### addScale

    public void addScale(String field,
                         int scale)

Adds fieldsScale info.

Parameters:
  `field` - Field.
  `scale` - Scale.

#### notNullFields

    public Set<String> notNullFields()

Returns:
  notNull fields.

#### fieldsPrecision

    public Map<String,Integer> fieldsPrecision()

Returns:
  Precision info for fields.

#### fieldsScale

    public Map<String,Integer> fieldsScale()

Returns:
  Scale info for fields.

#### properties

    public Map<String,QueryEntityClassProperty> properties()

Returns:
  Class properties.

#### keyProperties

    public Set<String> keyProperties()

Returns:
  Properties keys.

#### valueTextIndex

    public boolean valueTextIndex()

Returns:
  `true` If we need to have a fulltext index on value.

#### valueTextIndex

    public void valueTextIndex(boolean valTextIdx)

Sets if this value should be text indexed.

Parameters:
  `valTextIdx` - Flag value.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020