public class NXQLQueryBuilder extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SELECT_STATEMENT |
static String |
DEFAULT_SPECIAL_CHARACTERS_REGEXP
Prepares a statement for a fulltext field by converting FULLTEXT virtual operators to a syntax that the search
syntax accepts.
|
static String |
IGNORED_CHARS_KEY |
static String |
REGEXP_EXCLUDE_DOUBLE_QUOTE |
static String |
REGEXP_EXCLUDE_QUOTE |
static String |
REGEXP_NAMED_PARAMETER |
static String |
SORTED_COLUMN |
Modifier and Type | Method and Description |
---|---|
static void |
appendStringList(StringBuilder queryBuilder,
List<?> listParam,
boolean quoteParameters,
boolean escape) |
protected static String |
atomicQueryElement(DocumentModel model,
PredicateDefinition predicateDescriptor,
Escaper escaper) |
static Boolean |
getBooleanValue(DocumentModel model,
PredicateFieldDefinition fieldDescriptor) |
protected static DateFormat |
getDateFormat() |
static String |
getFieldType(DocumentModel model,
PredicateFieldDefinition fieldDescriptor) |
static Integer |
getIntValue(DocumentModel model,
PredicateFieldDefinition fieldDescriptor) |
static List<String> |
getListValue(DocumentModel model,
PredicateFieldDefinition fieldDescriptor) |
static String |
getPlainStringValue(DocumentModel model,
PredicateFieldDefinition fieldDescriptor) |
static String |
getQuery(DocumentModel model,
WhereClauseDefinition whereClause,
Object[] params,
SortInfo... sortInfos) |
static String |
getQuery(String pattern,
Object[] params,
boolean quoteParameters,
boolean escape,
DocumentModel searchDocumentModel,
SortInfo... sortInfos) |
static String |
getQueryElement(DocumentModel model,
PredicateDefinition predicateDescriptor,
Escaper escaper) |
static String |
getQueryElement(DocumentModel model,
WhereClauseDefinition whereClause,
Object[] params) |
static Object |
getRawValue(DocumentModel model,
PredicateFieldDefinition fieldDescriptor) |
static String |
getSortClause(SortInfo... sortInfos) |
static String |
getStringValue(DocumentModel model,
PredicateFieldDefinition fieldDescriptor) |
static String |
prepareStringLiteral(String s,
boolean quoteParameter,
boolean escape)
Return the string literal in a form ready to embed in an NXQL statement.
|
static String |
replaceStringList(String pattern,
List<?> listParams,
boolean quoteParameters,
boolean escape,
String key) |
static String |
sanitizeFulltextInput(String value)
Remove any special character that could be mis-interpreted as a low level full-text query operator.
|
static String |
serializeFullText(String value) |
protected static String |
serializeUnary(String parameter,
String operator,
String rvalue) |
protected static String |
subClauseQueryElement(DocumentModel model,
PredicateDefinition predicateDescriptor) |
public static final String DEFAULT_SELECT_STATEMENT
public static final String SORTED_COLUMN
public static final String REGEXP_NAMED_PARAMETER
public static final String REGEXP_EXCLUDE_QUOTE
public static final String REGEXP_EXCLUDE_DOUBLE_QUOTE
public static final String DEFAULT_SPECIAL_CHARACTERS_REGEXP
public static final String IGNORED_CHARS_KEY
public static String getSortClause(SortInfo... sortInfos)
public static String getQuery(DocumentModel model, WhereClauseDefinition whereClause, Object[] params, SortInfo... sortInfos)
public static String getQueryElement(DocumentModel model, WhereClauseDefinition whereClause, Object[] params)
public static String getQuery(String pattern, Object[] params, boolean quoteParameters, boolean escape, DocumentModel searchDocumentModel, SortInfo... sortInfos)
public static void appendStringList(StringBuilder queryBuilder, List<?> listParam, boolean quoteParameters, boolean escape)
public static String replaceStringList(String pattern, List<?> listParams, boolean quoteParameters, boolean escape, String key)
public static String prepareStringLiteral(String s, boolean quoteParameter, boolean escape)
public static String getQueryElement(DocumentModel model, PredicateDefinition predicateDescriptor, Escaper escaper)
protected static String subClauseQueryElement(DocumentModel model, PredicateDefinition predicateDescriptor)
protected static String atomicQueryElement(DocumentModel model, PredicateDefinition predicateDescriptor, Escaper escaper)
public static String sanitizeFulltextInput(String value)
public static String serializeFullText(String value)
protected static String serializeUnary(String parameter, String operator, String rvalue)
public static String getPlainStringValue(DocumentModel model, PredicateFieldDefinition fieldDescriptor)
public static Integer getIntValue(DocumentModel model, PredicateFieldDefinition fieldDescriptor)
public static String getFieldType(DocumentModel model, PredicateFieldDefinition fieldDescriptor)
public static Object getRawValue(DocumentModel model, PredicateFieldDefinition fieldDescriptor)
public static String getStringValue(DocumentModel model, PredicateFieldDefinition fieldDescriptor)
protected static DateFormat getDateFormat()
public static List<String> getListValue(DocumentModel model, PredicateFieldDefinition fieldDescriptor)
public static Boolean getBooleanValue(DocumentModel model, PredicateFieldDefinition fieldDescriptor)
Copyright © 2015 Nuxeo SA. All rights reserved.