com.atlassian.jira.jql.util
Interface JqlStringSupport

All Known Implementing Classes:
JqlStringSupportImpl

public interface JqlStringSupport

A utility code to help dealing with JQL strings.

Since:
v4.0

Method Summary
 java.lang.String encodeFieldName(java.lang.String fieldName)
          Encode the passed string into a safe JQL field name.
 java.lang.String encodeFunctionArgument(java.lang.String argument)
          Encode the passed string into a safe JQL function argument.
 java.lang.String encodeFunctionName(java.lang.String functionName)
          Encode the passed string into a safe JQL function name.
 java.lang.String encodeStringValue(java.lang.String value)
          Encode the passed string value into a safe JQL value if necessary.
 java.lang.String encodeValue(java.lang.String value)
          Encode the passed string value into a safe JQL value if necessary.
 java.lang.String generateJqlString(Clause clause)
          Generates a JQL string representation for the passed clause.
 java.lang.String generateJqlString(Query query)
          Generates a JQL string representation for the passed query.
 java.util.Set<java.lang.String> getJqlReservedWords()
           
 

Method Detail

encodeStringValue

java.lang.String encodeStringValue(java.lang.String value)
Encode the passed string value into a safe JQL value if necessary. The value will not be encoded if it is already safe.

Parameters:
value - the value to encode.
Returns:
the encoded string.

encodeValue

java.lang.String encodeValue(java.lang.String value)
Encode the passed string value into a safe JQL value if necessary. The value will not be encoded if it is already safe. This is different to encodeStringValue(String) since it will not add quotes around long values.

Parameters:
value - the value to encode.
Returns:
the encoded string.

encodeFunctionArgument

java.lang.String encodeFunctionArgument(java.lang.String argument)
Encode the passed string into a safe JQL function argument. The value will not be encoded if it is already safe.

Parameters:
argument - the string to encode.
Returns:
the encoded string.

encodeFunctionName

java.lang.String encodeFunctionName(java.lang.String functionName)
Encode the passed string into a safe JQL function name. This value will not be encoded if it is not already safe.

Parameters:
functionName - the string to encode.
Returns:
the encoded string.

encodeFieldName

java.lang.String encodeFieldName(java.lang.String fieldName)
Encode the passed string into a safe JQL field name. This value will not be encoded if it is not already safe.

Parameters:
fieldName - the string to encode.
Returns:
the encoded string.

generateJqlString

java.lang.String generateJqlString(Query query)
Generates a JQL string representation for the passed query. The JQL string is always generated, that is, Query.getQueryString() is completely ignored if it exists. The returned JQL is automatically escaped as necessary.

Parameters:
query - the query. Cannot be null.
Returns:
the generated JQL string representation of the passed query.

generateJqlString

java.lang.String generateJqlString(Clause clause)
Generates a JQL string representation for the passed clause. The returned JQL is automatically escaped as necessary.

Parameters:
clause - the clause. Cannot be null.
Returns:
the generated JQL string representation of the passed clause.

getJqlReservedWords

java.util.Set<java.lang.String> getJqlReservedWords()
Returns:
all the reserved words for the JQL language.


Copyright © 2002-2011 Atlassian. All Rights Reserved.