Class SameElementItem

  • All Implemented Interfaces:
    Cloneable

    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.
    Author:
    baldersheim
    • Constructor Detail

      • SameElementItem

        public SameElementItem​(String commonPath)
    • Method Detail

      • appendHeadingString

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

        protected void appendBodyString​(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.
        Overrides:
        appendBodyString in class CompositeItem
      • 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 String getName()
        Description copied from class: Item
        Returns the name of this item
        Specified by:
        getName in class Item
      • getFieldName

        public String getFieldName()
      • equals

        public boolean equals​(Object other)
        Description copied from class: CompositeItem
        Returns whether this item is of the same class and contains the same state as the given item
        Overrides:
        equals in class CompositeItem