Class SameElementItem

  • All Implemented Interfaces:

    public class SameElementItem
    extends NonReducibleCompositeItem
    This represents a query where all terms are required to match in the same element id. The primary usecase is to allow efficient search in arrays and maps of struct. The common path is the field name containing the struct.
    • Constructor Detail

      • SameElementItem

        public SameElementItem​(java.lang.String commonPath)
    • Method Detail

      • encodeThis

        protected void encodeThis​(java.nio.ByteBuffer buffer)
        Description copied from class: CompositeItem
        Encodes just this item, not it's usual subitems, to the given buffer.
        encodeThis in class CompositeItem
      • appendHeadingString

        protected void appendHeadingString​(java.lang.StringBuilder buffer)
        Description copied from class: Item
        Appends the heading of this string. As default getName() followed by a space.
        appendHeadingString in class Item
      • appendBodyString

        protected void appendBodyString​(java.lang.StringBuilder buffer)
        Description copied from class: Item
        Override to append the item body in the canonical query language of this item. An item is usually represented by the string
         ([itemName] [body])
        The body must be appended appended by this method.
        appendBodyString in class CompositeItem
      • extractSingleChild

        public java.util.Optional<Item> extractSingleChild()
        Description copied from class: CompositeItem
        Will return its single child if itself can safely be omitted.
        extractSingleChild in class NonReducibleCompositeItem
        a valid Item or empty Optional if it can not be done
      • getItemType

        public Item.ItemType getItemType()
        Description copied from class: Item
        Return the enumerated type of this item.
        Specified by:
        getItemType in class Item
      • getName

        public java.lang.String getName()
        Description copied from class: Item
        Returns the name of this item
        Specified by:
        getName in class Item
      • getFieldName

        public java.lang.String getFieldName()