Class ParsedQuery
java.lang.Object
net.ontopia.topicmaps.query.impl.rdbms.ParsedQuery
- All Implemented Interfaces:
ParsedQueryIF,ParsedStatementIF
INTERNAL: Class used to represent parsed queries. The class wraps a query
executer and a tolog query intance (as generated by the parser). The actual
query execution is delegated to the query executer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected QueryProcessorprotected QueryComponentIF[]protected booleanprotected intprotected TologQueryprotected QueryProcessorprotected SQLGeneratorIFprotected QueryIF -
Constructor Summary
ConstructorsConstructorDescriptionParsedQuery(QueryProcessor rprocessor, QueryProcessor bprocessor, TologQuery query) -
Method Summary
Modifier and TypeMethodDescriptionprotected net.ontopia.topicmaps.query.impl.rdbms.ParsedQuery.QueryContextcompile(QueryBuilder builder, List clauses) protected voidcompileQuery(QueryBuilder builder, TologQuery query) execute()PUBLIC: Executes the query, returning the query result.PUBLIC: Executes the query binding the parameters in the query to the values given in the 'arguments' map, returning the query result.PUBLIC: Returns all the variables used in the query, in no particular order.PUBLIC: Returns the variables that are counted in the select clause of the query.PUBLIC: Returns the variables listed in the order by clause in the order they are given there.PUBLIC: Returns the variables in the select clause of the query, in the order given there.protected ListgetVariables(Collection varnames) protected booleanisIndependent(JDOExpressionIF expr) protected booleanisOrderableTypes(TologQuery query) booleanisOrderedAscending(String name) PUBLIC: Returns true if the named variable is to be sorted in ascending order.protected booleanisSupportedArguments(QueryBuilder builder, List arguments) protected JDOQuerymakeJDOQuery(QueryBuilder builder, net.ontopia.topicmaps.query.impl.rdbms.ParsedQuery.QueryContext qcontext, boolean aggfunc, boolean orderby) protected QueryMatchesprepareQueryMatches(Map arguments) protected voidprescan(QueryBuilder builder, List clauses) toString()
-
Field Details
-
query
-
rprocessor
-
bprocessor
-
components
-
sqlquery
-
qresult
protected int qresult -
has_bclauses
protected boolean has_bclauses -
sqlgen
-
-
Constructor Details
-
ParsedQuery
public ParsedQuery(QueryProcessor rprocessor, QueryProcessor bprocessor, TologQuery query) throws InvalidQueryException - Throws:
InvalidQueryException
-
-
Method Details
-
compileQuery
- Throws:
InvalidQueryException
-
makeJDOQuery
protected JDOQuery makeJDOQuery(QueryBuilder builder, net.ontopia.topicmaps.query.impl.rdbms.ParsedQuery.QueryContext qcontext, boolean aggfunc, boolean orderby) throws InvalidQueryException - Throws:
InvalidQueryException
-
getClauses
-
getSelectedVariables
Description copied from interface:ParsedQueryIFPUBLIC: Returns the variables in the select clause of the query, in the order given there. If there is no select clause all the variables used in the query are returned, in no particular order.- Specified by:
getSelectedVariablesin interfaceParsedQueryIF- Returns:
- An immutable List of String objects.
-
getAllVariables
Description copied from interface:ParsedQueryIFPUBLIC: Returns all the variables used in the query, in no particular order.- Specified by:
getAllVariablesin interfaceParsedQueryIF- Returns:
- An immutable Collection of String objects.
-
getCountedVariables
Description copied from interface:ParsedQueryIFPUBLIC: Returns the variables that are counted in the select clause of the query. They are returned in no particular order. If there are no counted variables, or if there is no select clause an empty collection is returned.- Specified by:
getCountedVariablesin interfaceParsedQueryIF- Returns:
- An immutable Collection of String objects.
-
getOrderBy
Description copied from interface:ParsedQueryIFPUBLIC: Returns the variables listed in the order by clause in the order they are given there. In order to see which ones are ascending and which descending, use the isOrderedAscending method.- Specified by:
getOrderByin interfaceParsedQueryIF- Returns:
- An immutable List of String objects.
-
isOrderedAscending
Description copied from interface:ParsedQueryIFPUBLIC: Returns true if the named variable is to be sorted in ascending order.- Specified by:
isOrderedAscendingin interfaceParsedQueryIF
-
getVariables
-
execute
Description copied from interface:ParsedQueryIFPUBLIC: Executes the query, returning the query result. Query results are not cached, so results are up to date.- Specified by:
executein interfaceParsedQueryIF- Throws:
InvalidQueryException
-
execute
Description copied from interface:ParsedQueryIFPUBLIC: Executes the query binding the parameters in the query to the values given in the 'arguments' map, returning the query result. Query results are not cached, so results are up to date.- Specified by:
executein interfaceParsedQueryIF- Throws:
InvalidQueryException
-
prepareQueryMatches
-
prescan
-
isSupportedArguments
-
compile
protected net.ontopia.topicmaps.query.impl.rdbms.ParsedQuery.QueryContext compile(QueryBuilder builder, List clauses) throws InvalidQueryException - Throws:
InvalidQueryException
-
isIndependent
-
isOrderableTypes
-
toString
-