Interface StarPredicate

All Known Subinterfaces:
StarColumnPredicate
All Known Implementing Classes:
AbstractColumnPredicate, AndPredicate, ListColumnPredicate, ListPredicate, LiteralStarPredicate, MemberColumnPredicate, MemberTuplePredicate, MinusStarPredicate, OrPredicate, RangeColumnPredicate, ValueColumnPredicate

public interface StarPredicate
Condition which constrains a set of values of a single RolapStar.Column or a set of columns.

For example, the predicate Range([Time].[1997].[Q3], [Time].[1998].[Q2]) constrains the year and quarter columns:

  ((year = 1997 and quarter >= 'Q3')
    or (year > 1997))
and ((year = 1998 and quarter <= 'Q2')
    or (year < 1998))
Since:
Jan 15, 2007
Author:
jhyde
  • Field Details

  • Method Details

    • getConstrainedColumnList

      List<RolapStar.Column> getConstrainedColumnList()
      Returns a list of constrained columns.
      Returns:
      List of constrained columns
    • getConstrainedColumnBitKey

      BitKey getConstrainedColumnBitKey()
      Returns a bitmap of constrained columns to speed up comparison
      Returns:
      bitmap representing all constraining columns.
    • describe

      void describe(StringBuilder buf)
      Appends a description of this predicate to a StringBuilder. For example:
      • =any
      • =5
      • in (2, 4, 6)
      Parameters:
      buf - Builder to append to
    • evaluate

      boolean evaluate(List<Object> valueList)
      Evaluates a constraint against a list of values.

      If one of the values is WILDCARD, returns true if constraint is true for all possible values of that column.

      Parameters:
      valueList - List of values, one for each constrained column
      Returns:
      Whether constraint holds for given set of values
    • equalConstraint

      boolean equalConstraint(StarPredicate that)
      Returns whether this Predicate has the same constraining effect as the other constraint. This is weaker than Object.equals(Object): it is possible for two different members to constrain the same column in the same way.
      Parameters:
      that - Other predicate
      Returns:
      whether the other predicate is equivalent
    • minus

      StarPredicate minus(StarPredicate predicate)
      Returns the logical inverse of this Predicate. The result is a Predicate which holds whenever this predicate holds but the other does not.
      Parameters:
      predicate - Predicate
      Returns:
      Combined predicate
    • or

      Returns this union of this Predicate with another. The result is a Predicate which holds whenever either predicate holds.
      Parameters:
      predicate - Predicate
      Returns:
      Combined predicate
    • and

      StarPredicate and(StarPredicate predicate)
      Returns this intersection of this Predicate with another. The result is a Predicate which holds whenever both predicates hold.
      Parameters:
      predicate - Predicate
      Returns:
      Combined predicate
    • toSql

      void toSql(SqlQuery sqlQuery, StringBuilder buf)