Class Criteria

    • Constructor Detail

      • Criteria

        public Criteria()
        Constructs a default instance of this class.
    • Method Detail

      • clone

        public abstract Object clone()
        Abstract clone method
        Specified by:
        clone in interface LanguageObject
        clone in class Object
        Deep clone of this criteria
      • toString

        public String toString()
        Return the parser string.
        toString in class Object
      • separateCriteriaByAnd

        public static List<Criteria> separateCriteriaByAnd​(Criteria crit)
        This utility method will pull apart a tree of criteria by breaking all compound AND criteria apart. For instance, ((A=1 AND B=2) AND C=3) will be broken into A=1, B=2, C=3.
        crit - Criteria to break apart
        List of Criteria, empty list if crit is null
      • combineCriteria

        public static Criteria combineCriteria​(Criteria primaryCrit,
                                               Criteria additionalCrit)
        This utility method can be used to combine two criteria using an AND. If both criteria are null, then null will be returned. If either is null, then the other will be returned. If neither is null and the primaryCrit is a CompoundCriteria, then the additionalCrit will be added to the primaryCrit and the primaryCrit will be returned. If the primaryCrit is not compound, a new CompoundCriteria will be created and both criteria will be added to it.
        primaryCrit - Primary criteria - may be modified
        additionalCrit - Won't be modified, but will likely be attached to the returned crit
        Combined criteria
      • combineCriteria

        public static Criteria combineCriteria​(Criteria primaryCrit,
                                               Criteria additionalCrit,
                                               boolean disjunctively)
      • getType

        public Class<?> getType()
        Description copied from interface: Expression
        Get the return type of this expression.
        Specified by:
        getType in interface Expression
        Java class may be null prior to being resolved