Class WhereTag

  • All Implemented Interfaces:
    ITextTag

    public class WhereTag
    extends Object
    implements ITextTag
    Represent the where sentence from SQL.
    Since:
    0.0.2
    Author:
    Alisson Gomes
    • Constructor Detail

      • WhereTag

        public WhereTag​(List<ITextTag> listTestTag)
        Build a new where tag.
        Parameters:
        listTestTag - list of texts from set tag, dynamic or static texts.
    • Method Detail

      • eval

        public boolean eval​(Object rootObjects)
        Evaluate if attribute test is true. The dynamic text is building while evaluate attribute test, for each true sentence the text is appended.
        Specified by:
        eval in interface ITextTag
        Parameters:
        rootObjects - the root object for the OGNL expression.
        Returns:
        true if some test case its true, false otherwise.
        See Also:
        Ognl
      • getText

        public String getText()
        Retrieve the dynamic text from XML element.
        Specified by:
        getText in interface ITextTag
        Returns:
        text from XML element.
      • getText

        public String getText​(Object rootObjects)
        Description copied from interface: ITextTag
        Evaluate if attribute test is true or false with OGNL expression. Something
        Specified by:
        getText in interface ITextTag
        Parameters:
        rootObjects - the root object for the OGNL expression.
        Returns:
        dynamic value evaluating rootObjects.
        See Also:
        Ognl
      • isDynamic

        public boolean isDynamic()
        Indicate if text is dynamic or static.
        Specified by:
        isDynamic in interface ITextTag
        Returns:
        always true is returned, because this object save dynamic text.
      • isDynamicGroup

        public boolean isDynamicGroup()
        Description copied from interface: ITextTag
        Indicate if text contains a dynamic group of tags like: SetTag and WhereTag.
        Specified by:
        isDynamicGroup in interface ITextTag
        Returns:
        true returned if dynamic, false otherwise.
      • getTags

        public List<? extends ITextTag> getTags()
        Description copied from interface: ITextTag
        Collections from inner tags (WhereTag, SetTag...)
        Specified by:
        getTags in interface ITextTag
        Returns:
        inner tags, empty list if tag doesn't store collection.