|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.query.clause.TerminalClauseImpl
public class TerminalClauseImpl
Used to represent a terminal node in the query tree.
Constructor Summary | |
---|---|
TerminalClauseImpl(String name,
Long... values)
A convienience constructor that will create a clause with the Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array. |
|
TerminalClauseImpl(String name,
Operator operator,
long operand)
Creates a terminal clause with the specified name, operator and turns the long value into a SingleValueOperand populated with a long value. |
|
TerminalClauseImpl(String name,
Operator operator,
Operand operand)
Creates a terminal clause with the specified name, operator and operand. |
|
TerminalClauseImpl(String name,
Operator operator,
Operand operand,
com.atlassian.fugue.Option<Property> property)
Creates a terminal clause with the specified name, operator, operand and property. |
|
TerminalClauseImpl(String name,
Operator operator,
String operand)
Creates a terminal clause with the specified name, operator and turns the string value into a SingleValueOperand populated with a string value. |
|
TerminalClauseImpl(String name,
String... values)
A convienience constructor that will create a clause with the Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array. |
Method Summary | ||
---|---|---|
|
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 |
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()
|
|
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 |
---|
public TerminalClauseImpl(String name, Operator operator, String operand)
SingleValueOperand
populated with a string value.
name
- the name for the clause.operator
- the operator for the clause.operand
- the string value that will be wrapped in a SingleValueOperand.public TerminalClauseImpl(String name, Operator operator, long operand)
SingleValueOperand
populated with a long value.
name
- the name for the clause.operator
- the operator for the clause.operand
- the long value that will be wrapped in a SingleValueOperand.public TerminalClauseImpl(String name, Operator operator, Operand operand)
name
- the name for the clause.operator
- the operator for the clause.operand
- the right-hand-side value of the clause.public TerminalClauseImpl(String name, Operator operator, Operand operand, com.atlassian.fugue.Option<Property> property)
name
- the name for the clause.operator
- the operator for the clause.operand
- the right-hand-side value of the clause.property
- the name of the property.public TerminalClauseImpl(String name, String... values)
Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array.
name
- the name for the clause.values
- the string values that will be turned into SingleValueOperand
's
containing a string value.public TerminalClauseImpl(String name, Long... values)
Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array.
name
- the name for the clause.values
- the long values that will be turned into SingleValueOperand
's
containing a long value.Method Detail |
---|
public Operand getOperand()
getOperand
in interface TerminalClause
public Operator getOperator()
getOperator
in interface TerminalClause
Operator
.public com.atlassian.fugue.Option<Property> getProperty()
getProperty
in interface TerminalClause
public String getName()
Clause
getName
in interface Clause
public List<Clause> getClauses()
getClauses
in interface Clause
public <R> R accept(ClauseVisitor<R> visitor)
Clause
accept
in interface Clause
visitor
- the visitor to accept.
public String toString()
Clause
toString
in interface Clause
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |