Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.tag
Class TagQueryMaker

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker
      extended by org.nuxeo.ecm.platform.tag.TagQueryMaker
All Implemented Interfaces:
QueryMaker

public class TagQueryMaker
extends NXQLQueryMaker

Query Maker specialized for tagging queries that need joins.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker
NXQLQueryMaker.DocKind
 
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.storage.sql.jdbc.QueryMaker
QueryMaker.Query, QueryMaker.QueryCannotMatchException, QueryMaker.QueryMakerException
 
Field Summary
static String COUNT_SOURCE
          Adds a COUNT() on the relation source, to count documents.
static String NXTAG
          The NXTAG query type.
static String PROPERTY_SOURCE
           
static String PROPERTY_TARGET
           
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.
 
Fields inherited from class org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker
TYPE_DOCUMENT, TYPE_RELATION
 
Constructor Summary
TagQueryMaker()
           
 
Method Summary
 boolean accepts(String queryType)
          Checks if this query maker accepts a given query.
 QueryMaker.Query buildQuery(SQLInfo sqlInfo, Model model, Session.PathResolver pathResolver, String query, QueryFilter queryFilter, Object... params)
          Builds the query.
 String getName()
          Gets the name for this query maker.
 
Methods inherited from class org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker
canonicalXPath, simpleXPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NXTAG

public static final String NXTAG
The NXTAG query type.

See Also:
Constant Field Values

SCHEMA_TAG

public static final String SCHEMA_TAG
See Also:
Constant Field Values

SCHEMA_RELATION

public static final String SCHEMA_RELATION
See Also:
Constant Field Values

PROPERTY_SOURCE

public static final String PROPERTY_SOURCE
See Also:
Constant Field Values

PROPERTY_TARGET

public static final String PROPERTY_TARGET
See Also:
Constant Field Values

TAG_IS_TARGET

public static final String TAG_IS_TARGET
Makes sure the Tag table is joined with the relation target instead of the hierarchy id.

See Also:
Constant Field Values

COUNT_SOURCE

public static final String COUNT_SOURCE
Adds a COUNT() on the relation source, to count documents.

See Also:
Constant Field Values
Constructor Detail

TagQueryMaker

public TagQueryMaker()
Method Detail

getName

public String getName()
Description copied from interface: QueryMaker
Gets the name for this query maker.

Specified by:
getName in interface QueryMaker
Overrides:
getName in class NXQLQueryMaker

accepts

public boolean accepts(String queryType)
Description copied from interface: QueryMaker
Checks if this query maker accepts a given query.

Called first.

Specified by:
accepts in interface QueryMaker
Overrides:
accepts in class NXQLQueryMaker
Parameters:
queryType - the query
Returns:
true if the query is accepted

buildQuery

public QueryMaker.Query buildQuery(SQLInfo sqlInfo,
                                   Model model,
                                   Session.PathResolver pathResolver,
                                   String query,
                                   QueryFilter queryFilter,
                                   Object... params)
                            throws StorageException
Description copied from interface: QueryMaker
Builds the query.

Specified by:
buildQuery in interface QueryMaker
Overrides:
buildQuery in class NXQLQueryMaker
Parameters:
sqlInfo - the sql info
model - the model
pathResolver - the path resolver
query - the query
queryFilter - the query filter
params - additional parameters, maker-specific
Throws:
StorageException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.