Class CMISQLtoNXQL
java.lang.Object
org.nuxeo.ecm.core.opencmis.impl.server.CMISQLtoNXQL
Transformer of CMISQL queries into NXQL queries.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassWalker of the WHERE clause that doesn't parse fulltext expressions.classWalker of the WHERE clause that generates NXQL.static classIterableQueryResult wrapping the one from the NXQL query to turn values into CMIS ones. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected CoreSessionprotected org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionprotected booleanprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected org.apache.chemistry.opencmis.server.support.query.QueryObjectprotected org.apache.chemistry.opencmis.server.support.query.QueryUtilStrictThe real columns, CMIS name mapped to NXQL.protected booleanprotected final booleanThe non-real-columns we'll return as well.protected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected static StringcmisToNxqlFulltextQuery(String statement) protected StringconvertOrderBy(String orderBy, TypeManagerImpl typeManager) Convert an ORDER BY part from CMISQL to NXQL.convertToCMIS(PartialList<Map<String, Serializable>> pl, NuxeoCmisService service) protected static Map<String, Serializable> convertToCMISMap(Map<String, Serializable> nxqlMap, Map<String, String> realColumns, Map<String, org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumns, NuxeoCmisService service) protected StringFinds a NXQL column from a CMIS reference.protected StringgetColumn(org.apache.chemistry.opencmis.server.support.query.ColumnReference col) Finds a NXQL column from a CMIS reference.getIterableQueryResult(IterableQueryResult it, NuxeoCmisService service) getNXQL(String cmisql, NuxeoCmisService service, Map<String, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> typeInfo, boolean searchAllVersions) Gets the NXQL from a CMISQL query.protected StringgetSystemColumn(String propertyId) Finds a NXQL system column from a CMIS system property id.protected booleanisFacetsColumn(String name) protected voidrecordSelector(org.apache.chemistry.opencmis.server.support.query.CmisSelector sel, String clauseType) Records a JOIN / WHERE / ORDER BY selector, and associates it to a database column.protected voidrecordSelectSelector(org.apache.chemistry.opencmis.server.support.query.CmisSelector sel) Records a SELECT selector, and associates it to a database column.
-
Field Details
-
CMIS_PREFIX
- See Also:
-
NX_PREFIX
- See Also:
-
NXQL_DOCUMENT
- See Also:
-
NXQL_RELATION
- See Also:
-
NXQL_DC_TITLE
- See Also:
-
NXQL_DC_DESCRIPTION
- See Also:
-
NXQL_DC_CREATOR
- See Also:
-
NXQL_DC_CREATED
- See Also:
-
NXQL_DC_MODIFIED
- See Also:
-
NXQL_DC_LAST_CONTRIBUTOR
- See Also:
-
NXQL_REL_SOURCE
- See Also:
-
NXQL_REL_TARGET
- See Also:
-
NULL_IS_FALSE_COLUMNS
-
supportsProxies
protected final boolean supportsProxies -
typeInfo
-
coreSession
-
queryUtil
protected org.apache.chemistry.opencmis.server.support.query.QueryUtilStrict queryUtil -
query
protected org.apache.chemistry.opencmis.server.support.query.QueryObject query -
fromType
protected org.apache.chemistry.opencmis.commons.definitions.TypeDefinition fromType -
skipDeleted
protected boolean skipDeleted -
hasContains
protected boolean hasContains -
realColumns
The real columns, CMIS name mapped to NXQL. -
virtualColumns
protected Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumnsThe non-real-columns we'll return as well. -
JOIN
- See Also:
-
WHERE
- See Also:
-
ORDER_BY
- See Also:
-
-
Constructor Details
-
CMISQLtoNXQL
public CMISQLtoNXQL(boolean supportsProxies)
-
-
Method Details
-
getNXQL
public String getNXQL(String cmisql, NuxeoCmisService service, Map<String, org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> typeInfo, boolean searchAllVersions) throws QueryParseExceptionGets the NXQL from a CMISQL query.- Throws:
QueryParseException
-
getIterableQueryResult
-
convertToCMIS
public PartialList<Map<String,Serializable>> convertToCMIS(PartialList<Map<String, Serializable>> pl, NuxeoCmisService service) -
isFacetsColumn
-
addSystemColumns
protected void addSystemColumns() -
recordSelectSelector
protected void recordSelectSelector(org.apache.chemistry.opencmis.server.support.query.CmisSelector sel) Records a SELECT selector, and associates it to a database column. -
recordSelector
protected void recordSelector(org.apache.chemistry.opencmis.server.support.query.CmisSelector sel, String clauseType) Records a JOIN / WHERE / ORDER BY selector, and associates it to a database column. -
getColumn
Finds a NXQL column from a CMIS reference. -
getColumn
Finds a NXQL column from a CMIS reference. -
getSystemColumn
Finds a NXQL system column from a CMIS system property id. -
cmisToNxqlFulltextQuery
-
convertOrderBy
Convert an ORDER BY part from CMISQL to NXQL.- Since:
- 6.0
-
convertToCMISMap
protected static Map<String,Serializable> convertToCMISMap(Map<String, Serializable> nxqlMap, Map<String, String> realColumns, Map<String, org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumns, NuxeoCmisService service)
-