Class CMISQLtoNXQL

java.lang.Object
org.nuxeo.ecm.core.opencmis.impl.server.CMISQLtoNXQL

public class CMISQLtoNXQL extends Object
Transformer of CMISQL queries into NXQL queries.
  • Field Details

    • CMIS_PREFIX

      protected static final String CMIS_PREFIX
      See Also:
    • NX_PREFIX

      protected static final String NX_PREFIX
      See Also:
    • NXQL_DOCUMENT

      protected static final String NXQL_DOCUMENT
      See Also:
    • NXQL_RELATION

      protected static final String NXQL_RELATION
      See Also:
    • NXQL_DC_TITLE

      protected static final String NXQL_DC_TITLE
      See Also:
    • NXQL_DC_DESCRIPTION

      protected static final String NXQL_DC_DESCRIPTION
      See Also:
    • NXQL_DC_CREATOR

      protected static final String NXQL_DC_CREATOR
      See Also:
    • NXQL_DC_CREATED

      protected static final String NXQL_DC_CREATED
      See Also:
    • NXQL_DC_MODIFIED

      protected static final String NXQL_DC_MODIFIED
      See Also:
    • NXQL_DC_LAST_CONTRIBUTOR

      protected static final String NXQL_DC_LAST_CONTRIBUTOR
      See Also:
    • NXQL_REL_SOURCE

      protected static final String NXQL_REL_SOURCE
      See Also:
    • NXQL_REL_TARGET

      protected static final String NXQL_REL_TARGET
      See Also:
    • NULL_IS_FALSE_COLUMNS

      protected static final Set<String> NULL_IS_FALSE_COLUMNS
    • supportsProxies

      protected final boolean supportsProxies
    • typeInfo

      protected Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> typeInfo
    • coreSession

      protected CoreSession 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

      protected Map<String,String> realColumns
      The real columns, CMIS name mapped to NXQL.
    • virtualColumns

      protected Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumns
      The non-real-columns we'll return as well.
    • JOIN

      protected static final String JOIN
      See Also:
    • WHERE

      protected static final String WHERE
      See Also:
    • ORDER_BY

      protected static final String 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 QueryParseException
      Gets the NXQL from a CMISQL query.
      Throws:
      QueryParseException
    • getIterableQueryResult

      public IterableQueryResult getIterableQueryResult(IterableQueryResult it, NuxeoCmisService service)
    • convertToCMIS

    • isFacetsColumn

      protected boolean isFacetsColumn(String name)
    • 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

      protected String getColumn(org.apache.chemistry.opencmis.server.support.query.ColumnReference col)
      Finds a NXQL column from a CMIS reference.
    • getColumn

      protected String getColumn(String propertyId)
      Finds a NXQL column from a CMIS reference.
    • getSystemColumn

      protected String getSystemColumn(String propertyId)
      Finds a NXQL system column from a CMIS system property id.
    • cmisToNxqlFulltextQuery

      protected static String cmisToNxqlFulltextQuery(String statement)
    • convertOrderBy

      protected String convertOrderBy(String orderBy, TypeManagerImpl typeManager)
      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)