com.polarion.platform.persistence.IQueryHelper


FIELDS
Modifiers and TypeNameDescription
String FIELD_SQL Virtual index field for SQL queries. Works only for work items and baseline collections and its parameter must be enclosed in "()" parentheses, e.g. "SQL:(SELECT * FROM WORKITEM WHERE C_TYPE='issue')"
String HAS_VALUE Search field that contains ids of all object fields that have non-empty value.
String ALL_QUERY Nonempty query matching all objects. Used when one needs to start query with NOT condition.
METHODS
Modifiers and TypeNameDescription
String andQuery(String,String) Composes the given queries using AND. If one of the queries is empty or null, the other query is returned. If both queries are empty or null, empty string is returned.
String orQuery(String,String) Composes the given queries using OR. If one of the queries is empty or null, the other query is returned. If both queries are empty or null, empty string is returned.
String escapeQueryPart(String) Escapes special characters in query part. See http://lucene.apache.org/java/docs/queryparsersyntax.html#Escaping%20Special%20Characters
String escapeQueryForSQL(String) Escapes characters in Lucene query so that it can be used in an SQL query as argument of the LUCENE_QUERY function.
String fieldQuery(String,String) Creates a field query for the specified term that will be enclosed in double quotes and contained special characters will be escaped. If field is null, the field part will be omitted, so the query will target the default field.
String formatDateOnly(Date) Convert date to string used in queries from...to
String formatDate(Date) Convert date to string used in queries from...to
String fromToDateOnlyQuery(Date,Date) Compose [from TO to] query fragments using the DATE_NO_TIME_FORMAT format.
String expandKeywords(String) Expands keywords in simple query using asterisks.
String negateQuery(String) Adds NOT to the whole query

Back to Index