Class StructureQueryBuilder.RelationConstraintStartStep<B extends StructureQueryBuilder<B>>

Object
RelationConstraintStartStep<B>
Direct Known Subclasses:
StructureQueryBuilder.StartStep
Enclosing class:
StructureQueryBuilder<B extends StructureQueryBuilder<B>>

public abstract static class StructureQueryBuilder.RelationConstraintStartStep<B extends StructureQueryBuilder<B>> extends Object
This class allows you to continue building relational constraint by adding another relation.
  • Field Details

    • child

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> child
      Row is a child (sub-row) of another row in a forest.
    • parent

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> parent
      Row is a parent of another row in a forest.
    • descendant

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> descendant
      Row is a descendant (sub- or sub-sub-...-row) of another row in a forest.
    • ancestor

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> ancestor
      Row is an ancestor (parent, parent-of-parent, or parent-of-parent-...-of-parent) of another row in a forest.
    • prevSibling

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> prevSibling

      Row is a previous (preceding) sibling of another row in a forest.

      Row A is a preceding sibling of row B in a forest if:

      • they share the same parent, and
      • A is higher than B (A comes before B).
    • nextSibling

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> nextSibling

      Row is a next (following) sibling of another row in a forest.

      Row A is a following sibling of row B in a forest if:

      • they share the same parent, and
      • A is lower than B (A comes after B).
    • sibling

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> sibling
      Row is a sibling of another row in a forest. Row A is a sibling of row B if they share the same parent.

      This is equivalent to prevSibling.or().nextSibling.

    • self

      This is a relation of a row to itself. It makes a relational constraint work like its basicConstraint, so, for example, self.in.jql(someJql) matches the same rows as jql(someJql).

      It is useful when you combine it via or() with another relation, so that you add rows matched by basicConstraint to the result set.

      For example, consider query q6 from the examples in the class documentation. Constraint ancestor.in.jql(versionQuery) returns all sub-(sub-...)-rows of issues that match match JQL versionQuery, but not the issues themselves. To match them, use ancestor.or().self.in.jql(versionQuery).

      Note that this relation works for all types of rows - issues, projects, users, etc. To match only issues, use issue.

      For an illustration of difference between self and issue, consider query q8 from the examples in the class documentation. Relational constraint parent.of.issueKey("TS-129") yields parent rows of issue TS-129, which may be issues, users, and all other kinds of items. To match these parents and all their siblings, we use

      self.or().sibling.of.sub().<relational constraint>.
      But if we were to use
      issue.or().sibling.of.sub().<relational constraint>,
      we would still match all siblings, but parent rows will be matched only if they are issues.
    • issue

      public final StructureQueryBuilder.OpStep<B extends StructureQueryBuilder<B>> issue

      This is a relation of an issue to itself - same as self, but it matches only issues.

      See Also:
    • myHelper

      protected final StructureQueryBuilder.StartStepHelper<B extends StructureQueryBuilder<B>> myHelper
  • Constructor Details