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>
allVariables
protected Map
arguments
protected List
clauses
protected Set<Variable>
countVariables
protected int
limit
protected int
offset
protected List
orderBy
protected Set<String>
orderDescending
protected Map
ptypemap
protected List
selected_variables
protected int
TYPE_Number
protected int
TYPE_String
protected int
TYPE_TMObjectIF
protected List<Variable>
variables
protected Map
vartypemap
-
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 void
addCountVariable(Variable variable)
void
addOrderBy(Variable variable, boolean ascending)
void
addVariable(Variable variable)
void
close()
Collection
getAllVariables()
Object
getArgument(String name)
Map
getArguments()
List
getClauses()
Collection
getCountedVariables()
int
getLimit()
int
getOffset()
List
getOrderBy()
Map
getParameterTypes()
String[]
getSelectedVariableNames()
List
getSelectedVariables()
Map
getVariableTypes()
boolean
hasSelectClause()
boolean
isOrderedAscending(String name)
void
setArguments(Map arguments)
void
setClauseList(List clauses)
void
setLimit(int limit)
void
setOffset(int offset)
void
setSelectedVariables(List<Variable> vars)
Used to override the actual query string and set the projection from code.String
toString()
static String
toString(List clauses)
protected String
toStringFromPart()
-
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:
close
in 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()
-
-