public class TagQueryMaker extends NXQLQueryMaker
NXQLQueryMaker.ColumnInfo, NXQLQueryMaker.DocKind, NXQLQueryMaker.QueryAnalyzer, NXQLQueryMaker.WhereBuilder
QueryMaker.Query, QueryMaker.QueryCannotMatchException
Modifier and Type | Field and Description |
---|---|
static String |
COUNT_SOURCE
Adds a COUNT() on the relation source, to count documents.
|
protected Column |
firstSelectedColumn |
static String |
NXTAG
The NXTAG query type.
|
static String |
PROPERTY_SOURCE |
static String |
PROPERTY_TARGET |
protected Table |
relationTable |
static String |
SCHEMA_RELATION |
static String |
SCHEMA_TAG |
static String |
TAG_IS_TARGET
Makes sure the Tag table is joined with the relation target instead of the hierarchy id.
|
protected String |
type |
AGGREGATE_FUNCTIONS, aliases, aliasesByName, AVG_FUNCTION, COL_ALIAS_PREFIX, COUNT_FUNCTION, database, dataHierTable, DATE_CAST, dialect, ECM_SIMPLE_ACP_BEGIN, ECM_SIMPLE_ACP_CREATOR, ECM_SIMPLE_ACP_END, ECM_SIMPLE_ACP_GRANT, ECM_SIMPLE_ACP_NAME, ECM_SIMPLE_ACP_PERMISSION, ECM_SIMPLE_ACP_POS, ECM_SIMPLE_ACP_PRINCIPAL, ECM_SIMPLE_ACP_STATUS, ECM_TAG_STAR, FACETED_TAG, FACETED_TAG_LABEL, fragJoinCount, HAS_FINAL_WILDCARD_INDEX, HAS_WILDCARD_INDEX, hierTable, INDEX, INDEX_SLASH, joins, model, neverPerInstanceMixins, NON_CANON_INDEX, pathResolver, propertyFragmentTables, proxyClause, proxyClauseReason, proxyTable, READ_ACL_ALIAS, READ_ACL_USER_MAP_ALIAS, RELATION_TABLE, selectCollectionNotNull, sqlInfo, SUBQUERY_ARRAY_ALIAS, TABLE_FRAG_ALIAS, TABLE_HIER_ALIAS, TYPE_DOCUMENT, TYPE_RELATION, TYPE_TAGGING, UNION_ALIAS, whereClauses, whereParams, WITH_ALIAS_PREFIX
Constructor and Description |
---|
TagQueryMaker() |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(String queryType)
Checks if this query maker accepts a given query.
|
protected void |
addJoin(int kind,
String alias,
Table table,
String column,
Table contextTable,
String contextColumn,
String name,
int index,
String primaryType)
Patches the Tag join to join on the relation target instead of the hierarchy id.
|
QueryMaker.Query |
buildQuery(SQLInfo sqlInfo,
Model model,
Session.PathResolver pathResolver,
String query,
QueryFilter queryFilter,
Object... params)
Builds the query.
|
protected void |
fixInitialJoins()
Adds an initial join on the Relation table, and records it.
|
protected void |
fixSelect(Select select) |
protected void |
fixWhatColumns(List<Column> whatColumns) |
String |
getName()
Gets the name for this query maker.
|
protected String |
getSelectColName(Column col) |
canonicalXPath, findFulltextIndexOrField, getFragmentTable, getFragmentTable, getSelectColName, getSerializableLiteral, getSerializableLiterals, getStringLiterals, hasFinalWildcardIndex, hasWildcardIndex, keyForPos, newQueryAnalyzer, newWhereBuilder, simpleXPath
public static final String NXTAG
public static final String SCHEMA_TAG
public static final String SCHEMA_RELATION
public static final String PROPERTY_SOURCE
public static final String PROPERTY_TARGET
public static final String TAG_IS_TARGET
public static final String COUNT_SOURCE
protected Table relationTable
protected Column firstSelectedColumn
public TagQueryMaker()
public String getName()
QueryMaker
getName
in interface QueryMaker
getName
in class NXQLQueryMaker
public boolean accepts(String queryType)
QueryMaker
Called first.
accepts
in interface QueryMaker
accepts
in class NXQLQueryMaker
queryType
- the querytrue
if the query is acceptedpublic QueryMaker.Query buildQuery(SQLInfo sqlInfo, Model model, Session.PathResolver pathResolver, String query, QueryFilter queryFilter, Object... params)
QueryMaker
buildQuery
in interface QueryMaker
buildQuery
in class NXQLQueryMaker
sqlInfo
- the sql infomodel
- the modelpathResolver
- the path resolverquery
- the queryqueryFilter
- the query filterparams
- additional parameters, maker-specificprotected void fixInitialJoins()
fixInitialJoins
in class NXQLQueryMaker
protected void addJoin(int kind, String alias, Table table, String column, Table contextTable, String contextColumn, String name, int index, String primaryType)
addJoin
in class NXQLQueryMaker
protected String getSelectColName(Column col)
getSelectColName
in class NXQLQueryMaker
protected void fixWhatColumns(List<Column> whatColumns)
fixWhatColumns
in class NXQLQueryMaker
protected void fixSelect(Select select)
fixSelect
in class NXQLQueryMaker
Copyright © 2018 Nuxeo. All rights reserved.