net.ontopia.topicmaps.query.parser
Class TologQuery

java.lang.Object
  extended by net.ontopia.topicmaps.query.parser.TologStatement
      extended by net.ontopia.topicmaps.query.parser.TologQuery

public class TologQuery
extends TologStatement

INTERNAL: Used to represent parsed SELECT queries.


Field Summary
protected  java.util.Set<Variable> allVariables
           
protected  java.util.Map arguments
           
protected  java.util.List clauses
           
protected  java.util.Set<Variable> countVariables
           
protected  int limit
           
protected  int offset
           
protected  java.util.List orderBy
           
protected  java.util.Set<java.lang.String> orderDescending
           
protected  java.util.Map ptypemap
           
protected  java.util.List selected_variables
           
protected  int TYPE_Number
           
protected  int TYPE_String
           
protected  int TYPE_TMObjectIF
           
protected  java.util.List<Variable> variables
           
protected  java.util.Map vartypemap
           
 
Fields inherited from class net.ontopia.topicmaps.query.parser.TologStatement
options
 
Constructor Summary
TologQuery()
           
 
Method Summary
 void addCountVariable(Variable variable)
           
 void addOrderBy(Variable variable, boolean ascending)
           
 void addVariable(Variable variable)
           
 void close()
           
 java.util.Collection getAllVariables()
           
 java.lang.Object getArgument(java.lang.String name)
           
 java.util.Map getArguments()
           
 java.util.List getClauses()
           
 java.util.Collection getCountedVariables()
           
 int getLimit()
           
 int getOffset()
           
 java.util.List getOrderBy()
           
 java.util.Map getParameterTypes()
           
 java.lang.String[] getSelectedVariableNames()
           
 java.util.List getSelectedVariables()
           
 java.util.Map getVariableTypes()
           
 boolean hasSelectClause()
           
 boolean isOrderedAscending(java.lang.String name)
           
 void setArguments(java.util.Map arguments)
           
 void setClauseList(java.util.List clauses)
           
 void setLimit(int limit)
           
 void setOffset(int offset)
           
 void setSelectedVariables(java.util.List<Variable> vars)
          Used to override the actual query string and set the projection from code.
 java.lang.String toString()
           
static java.lang.String toString(java.util.List clauses)
           
protected  java.lang.String toStringFromPart()
           
 
Methods inherited from class net.ontopia.topicmaps.query.parser.TologStatement
getOptions, setOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clauses

protected java.util.List clauses

arguments

protected java.util.Map arguments

vartypemap

protected java.util.Map vartypemap

ptypemap

protected java.util.Map ptypemap

variables

protected java.util.List<Variable> variables

countVariables

protected java.util.Set<Variable> countVariables

allVariables

protected java.util.Set<Variable> allVariables

orderBy

protected java.util.List orderBy

orderDescending

protected java.util.Set<java.lang.String> orderDescending

limit

protected int limit

offset

protected int offset

selected_variables

protected java.util.List selected_variables

TYPE_TMObjectIF

protected int TYPE_TMObjectIF

TYPE_String

protected int TYPE_String

TYPE_Number

protected int TYPE_Number
Constructor Detail

TologQuery

public TologQuery()
Method Detail

getClauses

public java.util.List getClauses()

setClauseList

public void setClauseList(java.util.List clauses)

getArguments

public java.util.Map getArguments()

setArguments

public void setArguments(java.util.Map arguments)

getArgument

public java.lang.Object getArgument(java.lang.String name)
                             throws InvalidQueryException
Throws:
InvalidQueryException

getVariableTypes

public java.util.Map getVariableTypes()

getParameterTypes

public java.util.Map getParameterTypes()

getSelectedVariables

public java.util.List getSelectedVariables()

setSelectedVariables

public void setSelectedVariables(java.util.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 java.lang.String[] getSelectedVariableNames()

getAllVariables

public java.util.Collection getAllVariables()

getCountedVariables

public java.util.Collection getCountedVariables()

getOrderBy

public java.util.List getOrderBy()

isOrderedAscending

public boolean isOrderedAscending(java.lang.String name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public static java.lang.String toString(java.util.List clauses)

toStringFromPart

protected java.lang.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 class TologStatement
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()


Copyright © 2000-2012 Ontopia.