Class TologQuery
- java.lang.Object
-
- net.ontopia.topicmaps.query.parser.TologStatement
-
- net.ontopia.topicmaps.query.parser.TologQuery
-
public class TologQuery extends TologStatement
INTERNAL: Used to represent parsed SELECT queries.
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<Variable>allVariablesprotected Mapargumentsprotected Listclausesprotected Set<Variable>countVariablesprotected intlimitprotected intoffsetprotected ListorderByprotected Set<String>orderDescendingprotected Mapptypemapprotected Listselected_variablesprotected intTYPE_Numberprotected intTYPE_Stringprotected intTYPE_TMObjectIFprotected List<Variable>variablesprotected Mapvartypemap-
Fields inherited from class net.ontopia.topicmaps.query.parser.TologStatement
options
-
-
Constructor Summary
Constructors Constructor Description TologQuery()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCountVariable(Variable variable)voidaddOrderBy(Variable variable, boolean ascending)voidaddVariable(Variable variable)voidclose()CollectiongetAllVariables()ObjectgetArgument(String name)MapgetArguments()ListgetClauses()CollectiongetCountedVariables()intgetLimit()intgetOffset()ListgetOrderBy()MapgetParameterTypes()String[]getSelectedVariableNames()ListgetSelectedVariables()MapgetVariableTypes()booleanhasSelectClause()booleanisOrderedAscending(String name)voidsetArguments(Map arguments)voidsetClauseList(List clauses)voidsetLimit(int limit)voidsetOffset(int offset)voidsetSelectedVariables(List<Variable> vars)Used to override the actual query string and set the projection from code.StringtoString()static StringtoString(List clauses)protected StringtoStringFromPart()-
Methods inherited from class net.ontopia.topicmaps.query.parser.TologStatement
getOptions, setOptions
-
-
-
-
Field Detail
-
clauses
protected List clauses
-
arguments
protected Map arguments
-
vartypemap
protected Map vartypemap
-
ptypemap
protected Map ptypemap
-
orderBy
protected List orderBy
-
limit
protected int limit
-
offset
protected int offset
-
selected_variables
protected List selected_variables
-
TYPE_TMObjectIF
protected int TYPE_TMObjectIF
-
TYPE_String
protected int TYPE_String
-
TYPE_Number
protected int TYPE_Number
-
-
Method Detail
-
getClauses
public List getClauses()
-
setClauseList
public void setClauseList(List clauses)
-
getArguments
public Map getArguments()
-
setArguments
public void setArguments(Map arguments)
-
getArgument
public Object getArgument(String name) throws InvalidQueryException
- Throws:
InvalidQueryException
-
getVariableTypes
public Map getVariableTypes()
-
getParameterTypes
public Map getParameterTypes()
-
getSelectedVariables
public List getSelectedVariables()
-
setSelectedVariables
public void setSelectedVariables(List<Variable> vars)
Used to override the actual query string and set the projection from code. Not usually used, but used by the tolog INSERT statement.
-
hasSelectClause
public boolean hasSelectClause()
-
getSelectedVariableNames
public String[] getSelectedVariableNames()
-
getAllVariables
public Collection getAllVariables()
-
getCountedVariables
public Collection getCountedVariables()
-
getOrderBy
public List getOrderBy()
-
isOrderedAscending
public boolean isOrderedAscending(String name)
-
toStringFromPart
protected String toStringFromPart()
-
addVariable
public void addVariable(Variable variable) throws AntlrWrapException
- Throws:
AntlrWrapException
-
addCountVariable
public void addCountVariable(Variable variable) throws AntlrWrapException
- Throws:
AntlrWrapException
-
addOrderBy
public void addOrderBy(Variable variable, boolean ascending)
-
close
public void close() throws InvalidQueryException- Specified by:
closein classTologStatement- Throws:
InvalidQueryException
-
setLimit
public void setLimit(int limit)
-
getLimit
public int getLimit()
-
setOffset
public void setOffset(int offset) throws InvalidQueryException- Throws:
InvalidQueryException
-
getOffset
public int getOffset()
-
-