Interface GridQueryTypeDescriptor

  • All Known Implementing Classes:
    QueryTypeDescriptorImpl

    public interface GridQueryTypeDescriptor
    Value descriptor which allows to extract fields from value object of given type.
    • Method Detail

      • cacheName

        String cacheName()
        Gets cache name of this type.
        Returns:
        Cache name.
      • name

        String name()
        Gets type name which uniquely identifies this type.
        Returns:
        Type name which uniquely identifies this type.
      • schemaName

        String schemaName()
        Gets schema name for type (database schema means here).
        Returns:
        Schema name.
      • tableName

        String tableName()
        Gets table name for type.
        Returns:
        Table name.
      • fields

        Map<String,​Class<?>> fields()
        Gets mapping from field name to its type.
        Returns:
        Fields that can be indexed, participate in queries and can be queried using method.
      • valueClass

        Class<?> valueClass()
        Gets value class.
        Returns:
        Value class.
      • keyClass

        Class<?> keyClass()
        Gets key class.
        Returns:
        Key class.
      • keyTypeName

        String keyTypeName()
        Gets key type name.
        Returns:
        Key type name.
      • valueTypeName

        String valueTypeName()
        Gets value type name.
        Returns:
        Value type name.
      • valueTextIndex

        boolean valueTextIndex()
        Returns true if string representation of value should be indexed as text.
        Returns:
        If string representation of value should be full-text indexed.
      • affinityKey

        String affinityKey()
        Returns affinity key field name or null for default.
        Returns:
        Affinity key.
      • customAffinityKeyMapper

        boolean customAffinityKeyMapper()
        Returns:
        Whether custom affinity key mapper exists.
      • typeId

        int typeId()
        Returns:
        BinaryObject's type ID if indexed value is BinaryObject, otherwise value class' hash code.
      • matchType

        boolean matchType​(CacheObject val)
        Parameters:
        val - Value cache object.
        Returns:
        true If the type of the given value cache object matches this descriptor.
      • keyFieldName

        String keyFieldName()
        Gets key field name.
        Returns:
        Key field name.
      • valueFieldName

        String valueFieldName()
        Gets value field name.
        Returns:
        value field name.
      • keyFieldAlias

        @Nullable
        @Nullable String keyFieldAlias()
        Gets key field alias.
        Returns:
        Key field alias.
      • valueFieldAlias

        @Nullable
        @Nullable String valueFieldAlias()
        Gets value field alias.
        Returns:
        value field alias.
      • validateKeyAndValue

        void validateKeyAndValue​(Object key,
                                 Object val)
                          throws IgniteCheckedException
        Performs validation of given key and value against configured constraints. Throws runtime exception if validation fails.
        Parameters:
        key - Key.
        val - Value.
        Throws:
        IgniteCheckedException
      • primaryKeyFields

        Set<String> primaryKeyFields()
        Gets primary key fields if defined, or empty collection otherwise.
      • primaryKeyFields

        void primaryKeyFields​(Set<String> keys)
        Sets primary key fields.
        Parameters:
        keys - Primary keys.
      • implicitPk

        boolean implicitPk()
        Gets whether a primary key should be autogenerated.
      • implicitPk

        void implicitPk​(boolean implicitPk)
        Sets whether a primary key should be autogenerated.
        Parameters:
        implicitPk - Whether a PK should be autogenerated.
      • fillAbsentPKsWithDefaults

        boolean fillAbsentPKsWithDefaults()
        Returns:
        true if absent PK parts should be filled with defaults, false otherwise.
      • setFillAbsentPKsWithDefaults

        void setFillAbsentPKsWithDefaults​(boolean fillAbsentPKsWithDefaults)
        Sets up fillAbsentPKsWithDefaults flag.
        Parameters:
        fillAbsentPKsWithDefaults - Flag.
      • primaryKeyInlineSize

        int primaryKeyInlineSize()
        Gets primary key index INLINE_SIZE.
      • primaryKeyInlineSize

        void primaryKeyInlineSize​(int pkInlineSize)
        Sets primary key index INLINE_SIZE.
      • affinityFieldInlineSize

        int affinityFieldInlineSize()
        Gets affinity fields index INLINE_SIZE.
      • affinityFieldInlineSize

        void affinityFieldInlineSize​(int affFieldInlineSize)
        Sets affinity fields index INLINE_SIZE.