public class CMISQLtoNXQL extends Object
Modifier and Type | Class and Description |
---|---|
class |
CMISQLtoNXQL.AnalyzingWalker
Walker of the WHERE clause that doesn't parse fulltext expressions.
|
class |
CMISQLtoNXQL.GeneratingWalker
Walker of the WHERE clause that generates NXQL.
|
static class |
CMISQLtoNXQL.NXQLtoCMISIterableQueryResult
IterableQueryResult wrapping the one from the NXQL query to turn values into CMIS ones.
|
Modifier and Type | Field and Description |
---|---|
protected static String |
CMIS_PREFIX |
protected CoreSession |
coreSession |
protected org.apache.chemistry.opencmis.commons.definitions.TypeDefinition |
fromType |
protected static org.joda.time.format.DateTimeFormatter |
ISO_DATE_TIME_FORMAT |
protected static String |
JOIN |
protected static Set<String> |
NULL_IS_FALSE_COLUMNS |
protected static String |
NX_PREFIX |
protected static String |
NXQL_DC_CREATED |
protected static String |
NXQL_DC_CREATOR |
protected static String |
NXQL_DC_DESCRIPTION |
protected static String |
NXQL_DC_LAST_CONTRIBUTOR |
protected static String |
NXQL_DC_MODIFIED |
protected static String |
NXQL_DC_TITLE |
protected static String |
NXQL_DOCUMENT |
protected static String |
NXQL_REL_SOURCE |
protected static String |
NXQL_REL_TARGET |
protected static String |
NXQL_RELATION |
protected static String |
ORDER_BY |
protected org.apache.chemistry.opencmis.server.support.query.QueryObject |
query |
protected Map<String,String> |
realColumns
The real columns, CMIS name mapped to NXQL.
|
protected boolean |
skipDeleted |
protected Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> |
typeInfo |
protected Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> |
virtualColumns
The non-real-columns we'll return as well.
|
protected static String |
WHERE |
Constructor and Description |
---|
CMISQLtoNXQL() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSystemColumns() |
protected static String |
cmisToNxqlFulltextQuery(String statement) |
protected String |
convertOrderBy(String orderBy,
TypeManagerImpl typeManager)
Convert an ORDER BY part from CMISQL to NXQL.
|
protected String |
getColumn(org.apache.chemistry.opencmis.server.support.query.ColumnReference col)
Finds a NXQL column from a CMIS reference.
|
protected String |
getColumn(String propertyId)
Finds a NXQL column from a CMIS reference.
|
IterableQueryResult |
getIterableQueryResult(IterableQueryResult it,
NuxeoCmisService service) |
String |
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.
|
protected static final String CMIS_PREFIX
protected static final String NX_PREFIX
protected static final String NXQL_DOCUMENT
protected static final String NXQL_RELATION
protected static final String NXQL_DC_TITLE
protected static final String NXQL_DC_DESCRIPTION
protected static final String NXQL_DC_CREATOR
protected static final String NXQL_DC_CREATED
protected static final String NXQL_DC_MODIFIED
protected static final String NXQL_DC_LAST_CONTRIBUTOR
protected static final String NXQL_REL_SOURCE
protected static final String NXQL_REL_TARGET
protected static final org.joda.time.format.DateTimeFormatter ISO_DATE_TIME_FORMAT
protected static final Set<String> NULL_IS_FALSE_COLUMNS
protected Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> typeInfo
protected CoreSession coreSession
protected org.apache.chemistry.opencmis.server.support.query.QueryObject query
protected org.apache.chemistry.opencmis.commons.definitions.TypeDefinition fromType
protected boolean skipDeleted
protected Map<String,String> realColumns
protected Map<String,org.apache.chemistry.opencmis.server.support.query.ColumnReference> virtualColumns
protected static final String JOIN
protected static final String WHERE
protected static final String ORDER_BY
public CMISQLtoNXQL()
public String getNXQL(String cmisql, NuxeoCmisService service, Map<String,org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition<?>> typeInfo, boolean searchAllVersions) throws QueryParseException
QueryParseException
public IterableQueryResult getIterableQueryResult(IterableQueryResult it, NuxeoCmisService service)
protected boolean isFacetsColumn(String name)
protected void addSystemColumns()
protected void recordSelectSelector(org.apache.chemistry.opencmis.server.support.query.CmisSelector sel)
protected void recordSelector(org.apache.chemistry.opencmis.server.support.query.CmisSelector sel, String clauseType)
protected String getColumn(org.apache.chemistry.opencmis.server.support.query.ColumnReference col)
protected String getSystemColumn(String propertyId)
protected static String cmisToNxqlFulltextQuery(String statement)
protected String convertOrderBy(String orderBy, TypeManagerImpl typeManager)
Copyright © 2015 Nuxeo SA. All rights reserved.