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 Description QueryEntityTypeDescriptor(@NotNull Class<?> keyCls, @NotNull Class<?> valCls)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFieldToIndex(String idxName, String field, int orderNum, boolean descending)Adds field to index.voidaddFieldToTextIndex(String field)Adds field to text index.QueryEntityIndexDescriptoraddIndex(String idxName, QueryIndexType type, int inlineSize)Adds index.voidaddNotNullField(String field)Adds a notNull field.voidaddPrecision(String field, Integer precision)Adds fieldsPrecision info.voidaddProperty(QueryEntityClassProperty prop, QuerySqlField sqlAnn, boolean key, boolean failOnDuplicate)Adds property to the type descriptor.voidaddScale(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()StringtoString()Class<?>valueClass()booleanvalueTextIndex()voidvalueTextIndex(boolean valTextIdx)Sets if this value should be text indexed.
-
-
-
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 benull.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.
-
properties
public Map<String,QueryEntityClassProperty> properties()
- Returns:
- Class properties.
-
valueTextIndex
public boolean valueTextIndex()
- Returns:
trueIf 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.
-
-