Class CMISQLtoNXQL
java.lang.Object
org.nuxeo.ecm.core.opencmis.impl.server.CMISQLtoNXQL
Transformer of CMISQL queries into NXQL queries.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Walker of the WHERE clause that doesn't parse fulltext expressions.class
Walker of the WHERE clause that generates NXQL.static class
IterableQueryResult wrapping the one from the NXQL query to turn values into CMIS ones. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected CoreSession
protected org.apache.chemistry.opencmis.commons.definitions.TypeDefinition
protected boolean
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected org.apache.chemistry.opencmis.server.support.query.QueryObject
protected org.apache.chemistry.opencmis.server.support.query.QueryUtilStrict
The real columns, CMIS name mapped to NXQL.protected boolean
protected final boolean
The non-real-columns we'll return as well.protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected static String
cmisToNxqlFulltextQuery
(String statement) protected String
convertOrderBy
(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 String
Finds a NXQL column from a CMIS reference.protected String
getColumn
(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 String
getSystemColumn
(String propertyId) Finds a NXQL system column from a CMIS system property id.protected boolean
isFacetsColumn
(String name) 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.protected void
recordSelectSelector
(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)
-