com.atlassian.jira.jql.operand
Class QueryLiteral

java.lang.Object
  extended by com.atlassian.jira.jql.operand.QueryLiteral

public class QueryLiteral
extends java.lang.Object

Used to communicate literal values, Strings or Longs, as input into the Operands.

When writing JqlFunctions that must return QueryLiterals, try to return the more specific QueryLiteral where possible, to avoid unnecessary resolving. "More specific" here means the form that is used by the index (if applicable), as this value can then be used directly when constructing index queries.

QueryLiterals contain an operand source, this is the Operand of the JQL that produced the QueryLiteral. For instance in the JQL query project = HSP the "HSP" QueryLiteral will have the operand source of a SingleValueOperand with value "HSP". Notably QueryLiterals produced by JqlFunctions must set the FunctionOperand as the operand source.

Since:
v4.0

Constructor Summary
QueryLiteral()
           
QueryLiteral(Operand sourceOperand)
           
QueryLiteral(Operand sourceOperand, java.lang.Long longValue)
           
QueryLiteral(Operand sourceOperand, java.lang.String stringValue)
           
 
Method Summary
 java.lang.String asString()
           
 boolean equals(java.lang.Object o)
           
 java.lang.Long getLongValue()
           
 Operand getSourceOperand()
           
 java.lang.String getStringValue()
           
 int hashCode()
           
 boolean isEmpty()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryLiteral

public QueryLiteral()

QueryLiteral

public QueryLiteral(Operand sourceOperand)

QueryLiteral

public QueryLiteral(Operand sourceOperand,
                    java.lang.Long longValue)

QueryLiteral

public QueryLiteral(Operand sourceOperand,
                    java.lang.String stringValue)
Method Detail

getStringValue

public java.lang.String getStringValue()

getLongValue

public java.lang.Long getLongValue()

getSourceOperand

public Operand getSourceOperand()

isEmpty

public boolean isEmpty()

asString

public java.lang.String asString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2002-2010 Atlassian. All Rights Reserved.