org.apache.chemistry.opencmis.server.support.query
Class QueryObject
java.lang.Object
org.apache.chemistry.opencmis.server.support.query.QueryObject
public class QueryObject
- extends Object
QueryObject is a class used to encapsulate a CMIS query. It is created from an ANTLR
parser on an incoming query string. During parsing varoius informations are collected
and stored in objects suitable for evaluating the query (like selected properties,
effected types and order statements. A query evaluator can use this information to
perform the query and build the result.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryObject
public QueryObject()
QueryObject
public QueryObject(TypeManager tm,
QueryConditionProcessor wp)
getColumnReferences
public Map<Integer,CmisSelector> getColumnReferences()
getColumnReference
public CmisSelector getColumnReference(Integer token)
getSelectReferences
public List<CmisSelector> getSelectReferences()
getTypes
public Map<String,String> getTypes()
getTypeQueryName
public String getTypeQueryName(String alias)
getTypeDefinitionFromQueryName
public TypeDefinition getTypeDefinitionFromQueryName(String queryName)
getParentType
public TypeDefinition getParentType(TypeDefinition td)
getParentType
public TypeDefinition getParentType(String typeId)
getMainFromName
public TypeDefinition getMainFromName()
getRequestedProperties
public Map<String,String> getRequestedProperties()
- return a map of all columns that have been requested in the SELECT
part of the statement.
- Returns:
- a map with a String as a key and value. key is the query name
of the property, value is the alias if an alias was given or
the query name otherwise.
getRequestedFuncs
public Map<String,String> getRequestedFuncs()
- return a map of all functions that have been requested in the SELECT
part of the statement.
- Returns:
- a map with a String as a key and value. key is the function name
of the property, value is the alias if an alias was given or
the function name otherwise.
getJoinReferences
public List<CmisSelector> getJoinReferences()
getWhereReferences
public List<CmisSelector> getWhereReferences()
getOrderBys
public List<QueryObject.SortSpec> getOrderBys()
addSortCriterium
public void addSortCriterium(org.antlr.runtime.tree.Tree node,
ColumnReference colRef,
boolean ascending)
resolveTypes
public void resolveTypes()
processWhereClause
public void processWhereClause(org.antlr.runtime.tree.Tree whereRoot)
Copyright © 2009-2010 The Apache Software Foundation. All Rights Reserved.