Package 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
Modifier and TypeMethodDescriptionencodeFieldName
(String fieldName) Encode the passed string into a safe JQL field name.encodeFunctionArgument
(String argument) Encode the passed string into a safe JQL function argument.encodeFunctionName
(String functionName) Encode the passed string into a safe JQL function name.encodeStringValue
(String value) Encode the passed string value into a safe JQL value if necessary.encodeValue
(String value) Encode the passed string value into a safe JQL value if necessary.generateJqlString
(Clause clause) Generates a JQL string representation for the passed clause.generateJqlString
(Query query) Generates a JQL string representation for the passed query.
-
Method Details
-
encodeStringValue
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
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 toencodeStringValue(String)
since it will not add quotes around long values.- Parameters:
value
- the value to encode.- Returns:
- the encoded string.
-
encodeFunctionArgument
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
Encode the passed string into a safe JQL function name. This value will not be encoded if it is already safe.- Parameters:
functionName
- the string to encode.- Returns:
- the encoded string.
-
encodeFieldName
Encode the passed string into a safe JQL field name. This value will not be encoded if it is already safe.- Parameters:
fieldName
- the string to encode.- Returns:
- the encoded string.
-
generateJqlString
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
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
- Returns:
- all the reserved words for the JQL language.
-