public class QueryUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
PROP_HPI_ANNOTATED
The property to set if HPI document has an annotation.
|
protected static java.lang.String |
PROP_HPI_DOC_NOTE
The property to set if HPI document has a note.
|
protected static java.lang.String |
PROP_HPI_ISINWORKFLOW
The property to set if HPI document is in a workflow.
|
protected static java.lang.String |
PROP_HPI_REDACTED
The property to set if HPI document is redacted.
|
Constructor and Description |
---|
QueryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
convertQueryFromBeanNames(EnhancedQueryCriteriaBean query)
Converts the given query from using bean names to using repo names.
|
static void |
fixQualificationSet(QueryQualificationSet query)
All implementations MUST call this method before working with a
QueryCriteriaBean , must send in QueryCriteriaBean#getWhereClause() as the argument. |
static java.lang.String |
flattenValuesForInQuery(java.lang.String[] values)
Takes an array of strings for an IN or NOT IN query and transforms it
into a string with the appropriate delimiter
|
static java.lang.String |
getDocIdFromLegacyIdQuery(java.lang.String ticket,
java.lang.String legacyId)
Queries legacyId in the repository, returns docId if a document has the same legacyId attached to it
|
static int |
getResultLimit(EnhancedQueryCriteriaBean criteria)
Returns the result limit for the given criteria, always returns -1 when the criteria matches conditions for returning all values.
|
static int |
getResultLimit(QueryCriteriaBean criteria)
Returns the result limit for the given criteria, always returns -1 when the criteria matches conditions for returning all values.
|
static void |
processDefaultIndicators(java.lang.String ticket,
OCQuery query,
java.lang.String redactedRelationName,
java.lang.String folderNoteRelationName)
We process each oco from the query and decide which faux property gets added corresponding to whether object hasDocNotes, isInWorkflow, isAnnotated or isRedacted
|
protected static final java.lang.String PROP_HPI_REDACTED
protected static final java.lang.String PROP_HPI_DOC_NOTE
protected static final java.lang.String PROP_HPI_ANNOTATED
protected static final java.lang.String PROP_HPI_ISINWORKFLOW
public static java.lang.String flattenValuesForInQuery(java.lang.String[] values)
values
- an array of string valuespublic static void fixQualificationSet(QueryQualificationSet query)
QueryCriteriaBean
, must send in QueryCriteriaBean#getWhereClause()
as the argument.
This method creates empty arrays in place of the null arrays, because:
IQuery
implementation is invoked from a web service, empty array parameters are converted to nullQueryQualificationSet
query
- public static int getResultLimit(QueryCriteriaBean criteria)
criteria
- public static int getResultLimit(EnhancedQueryCriteriaBean criteria)
criteria
- public static void convertQueryFromBeanNames(EnhancedQueryCriteriaBean query)
query
- the query to convertpublic static void processDefaultIndicators(java.lang.String ticket, OCQuery query, java.lang.String redactedRelationName, java.lang.String folderNoteRelationName)
ticket
- query
- redactedRelationName
- foldernoteRelationName
- public static java.lang.String getDocIdFromLegacyIdQuery(java.lang.String ticket, java.lang.String legacyId)
legacyId
- the legacyId to be queriedticket
- the OC ticket