com.atlassian.query.clause
Class WasClauseImpl

java.lang.Object
  extended by com.atlassian.query.clause.WasClauseImpl
All Implemented Interfaces:
Clause, TerminalClause, WasClause

public final class WasClauseImpl
extends Object
implements WasClause

Represents the clause for the "WAS mode" of change history querying. This clause selects issues on the basis of a previous value of a field being equal to a given value (the 'operand').

Since:
v4.3

Constructor Summary
WasClauseImpl(String field, Operator operator, Operand operand, HistoryPredicate predicate)
           
WasClauseImpl(WasClause clause)
           
 
Method Summary
<R> R
accept(ClauseVisitor<R> visitor)
          Allows us to perform operations over the clauses based on the passed in visitor.
 boolean equals(Object o)
           
 List<Clause> getClauses()
           
 String getDisplayString()
           
 String getField()
           
 String getName()
          The name of the individual clause, this should be unique amongst the implementations otherwise the clauses will be treated as the "same" type of clause.
 Operand getOperand()
           
 Operator getOperator()
           
 HistoryPredicate getPredicate()
           
 com.atlassian.fugue.Option<Property> getProperty()
           
 int hashCode()
           
 String toString()
          Return a string representation of the clause.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WasClauseImpl

public WasClauseImpl(String field,
                     Operator operator,
                     Operand operand,
                     HistoryPredicate predicate)

WasClauseImpl

public WasClauseImpl(WasClause clause)
Method Detail

accept

public <R> R accept(ClauseVisitor<R> visitor)
Description copied from interface: Clause
Allows us to perform operations over the clauses based on the passed in visitor. This method calls the visit method on the visitor with this reference.

Specified by:
accept in interface Clause
Parameters:
visitor - the visitor to accept.
Returns:
the result of the visit operation who's type is specified by the incoming visitor.

getName

public String getName()
Description copied from interface: Clause
The name of the individual clause, this should be unique amongst the implementations otherwise the clauses will be treated as the "same" type of clause.

Specified by:
getName in interface Clause
Returns:
the name of the individual clause.

getClauses

public List<Clause> getClauses()
Specified by:
getClauses in interface Clause
Returns:
child clauses if the clause has any, empty list if it has none.

getOperand

public Operand getOperand()
Specified by:
getOperand in interface TerminalClause
Returns:
the right hand side value of the expression. This can be a composite of more Operands or it can be SingleValueOperands that resolve to constant values.

getOperator

public Operator getOperator()
Specified by:
getOperator in interface TerminalClause
Returns:
the operator used by the clause Operator.

getProperty

public com.atlassian.fugue.Option<Property> getProperty()
Specified by:
getProperty in interface TerminalClause
Returns:
the name of the property or absent.

getField

public String getField()
Specified by:
getField in interface WasClause

getPredicate

public HistoryPredicate getPredicate()
Specified by:
getPredicate in interface WasClause

toString

public String toString()
Description copied from interface: Clause
Return a string representation of the clause. This string representation should not be used to represent the clause to the user as it may not be valid. For example, this method makes no attempt to escape invalid names and strings.

Specified by:
toString in interface Clause
Overrides:
toString in class Object
Returns:
the string representation of the clause.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getDisplayString

public String getDisplayString()


Copyright © 2002-2014 Atlassian. All Rights Reserved.