Class QueryEntityTypeDescriptor


  • public class QueryEntityTypeDescriptor
    extends Object
    Descriptor of type.
    • 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

      • 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.
      • 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.