Package org.nuxeo.ecm.core.storage.sql
Class CapturingQueryMaker
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.sql.CapturingQueryMaker
-
- All Implemented Interfaces:
QueryMaker
public class CapturingQueryMaker extends Object implements QueryMaker
A dummy QueryMaker usable to capture the low level sqlInfo, model and session from a high-level session, in order to further test QueryMakers.- Author:
- Florent Guillaume
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CapturingQueryMaker.Captured
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.storage.sql.jdbc.QueryMaker
QueryMaker.Query, QueryMaker.QueryCannotMatchException
-
-
Constructor Summary
Constructors Constructor Description CapturingQueryMaker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:QueryMaker
Gets the name for this query maker.- Specified by:
getName
in interfaceQueryMaker
-
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 interfaceQueryMaker
- 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)
Description copied from interface:QueryMaker
Builds the query.- Specified by:
buildQuery
in interfaceQueryMaker
- Parameters:
sqlInfo
- the sql infomodel
- the modelpathResolver
- the path resolverquery
- the queryqueryFilter
- the query filterparams
- additional parameters, maker-specific
-
-