Style Intelligence v12.0

inetsoft.uql.util
Class HierQuery

java.lang.Object
  extended by inetsoft.uql.XQuery
      extended by inetsoft.uql.util.HierQuery
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable
Direct Known Subclasses:
DerivedQuery, ObjectQuery, SoapQuery, XMLQuery

public abstract class HierQuery
extends XQuery

Base class for all hierarchical query classes.

See Also:
Serialized Form

Field Summary
protected  Map attrmap
           
protected  boolean distinct
           
protected  XNode inparams
           
protected  String item
           
protected  String select
           
protected  boolean showFlds
           
protected  XNodePath xpath
           
protected  XSelection xselect
           
 
Fields inherited from class inetsoft.uql.XQuery
DERIVED, HINT_DEFAULT_MAX_ROWS, HINT_IGNORE_MAX_ROWS, HINT_MAX_ROWS, HINT_TIMEOUT
 
Constructor Summary
HierQuery(String type)
          Create a query object.
 
Method Summary
 Object clone()
          Create a clone of this object.
 Object deepClone()
          Deep clone.
protected  void findVariables(Map varmap)
          Find all varialbes in the query.
 String getAttribute(String name)
          Get an attribute of this query.
 XNode getCustomParameters()
          Get the query parameter defined in this query.
 XNodePath getNodePath()
          Get the node path in the query.
 XTypeNode getOutputType(Object session, boolean full)
          Get the output type of the query.
 String getRequest()
          Get the request name for this query.
 XNode getRequestParameters()
          Get the parameters defined in the data source for this type of queries.
 XSelection getSelection()
          Get the XSelection object for converting a tree to a table.
 String getSelectionAsString()
          Get the XSelection object's string representation.
 XTypeNode getSourceType()
          Get the output type of the data source, without filtering.
 XTypeNode getSourceType(Object session)
          Get the output type of the data source, without filtering.
 boolean isDistinct()
          Get whether the query result is distinct.
 boolean isShowFlds()
          Check whether the selection is show selected only or not.
 void parseXML(Element root)
          Parse the XML element that contains information on this query.
 void setAttribute(String name, String val)
          Set an attribute in this query.
 void setCustomParameters(XNode param)
          Set the query request parameter.
 void setDistinct(boolean distinct)
          Set the query result distinct.
 void setNodePath(XNodePath xpath)
          Set the node path for this query.
 void setRequest(String method)
          Set the request name for this query.
 void setSelection(XSelection xselect)
          Set the XSelection object for converting a tree to a table.
 void setSelectionAsString(String select)
          Set the XSelection object using its string form.
 void setShowFlds(boolean showFlds)
          Set the selection show state.
 void writeXML(PrintWriter writer)
          Generate the XML segment to represent this query.
 
Methods inherited from class inetsoft.uql.XQuery
addVariable, equals, findVariables, findVariables, findVariables, findVariables, getAllDefinedVariables, getDataSource, getDefinedVariables, getDescription, getEstimatedTime, getFolder, getMaxRows, getName, getOutputType, getPartition, getProperty, getTimeout, getType, getVariable, getVariableNames, hashCode, isOutputTypeAvailable, isVisible, removeVariable, revalidate, setDataSource, setDescription, setEstimatedTime, setFolder, setMaxRows, setName, setPartition, setProperty, setTimeout, setVisible, toString, updateQueryVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

item

protected String item

select

protected String select

xpath

protected XNodePath xpath

inparams

protected XNode inparams

xselect

protected XSelection xselect

attrmap

protected Map attrmap

distinct

protected boolean distinct

showFlds

protected boolean showFlds
Constructor Detail

HierQuery

public HierQuery(String type)
Create a query object.

Method Detail

getNodePath

public XNodePath getNodePath()
Get the node path in the query. The node path is used to select a subtree from the query input.


setNodePath

public void setNodePath(XNodePath xpath)
Set the node path for this query.


getSelection

public XSelection getSelection()
Get the XSelection object for converting a tree to a table.

Specified by:
getSelection in class XQuery

setSelection

public void setSelection(XSelection xselect)
Set the XSelection object for converting a tree to a table.


getSelectionAsString

public String getSelectionAsString()
Get the XSelection object's string representation.


setSelectionAsString

public void setSelectionAsString(String select)
                          throws Exception
Set the XSelection object using its string form.

Throws:
Exception

setAttribute

public void setAttribute(String name,
                         String val)
Set an attribute in this query.


getAttribute

public String getAttribute(String name)
Get an attribute of this query.


setRequest

public void setRequest(String method)
Set the request name for this query. The request name is one of the requests defined in the corresponding data source.


getRequest

public String getRequest()
Get the request name for this query.


setDistinct

public void setDistinct(boolean distinct)
Set the query result distinct.


isDistinct

public boolean isDistinct()
Get whether the query result is distinct.


setShowFlds

public void setShowFlds(boolean showFlds)
Set the selection show state.


isShowFlds

public boolean isShowFlds()
Check whether the selection is show selected only or not.


getRequestParameters

public XNode getRequestParameters()
Get the parameters defined in the data source for this type of queries.


getCustomParameters

public XNode getCustomParameters()
Get the query parameter defined in this query. If the query parameter is defined in the query, it overrides the parameter defined in the data source.


setCustomParameters

public void setCustomParameters(XNode param)
Set the query request parameter.


getSourceType

public XTypeNode getSourceType()
Get the output type of the data source, without filtering.


getSourceType

public XTypeNode getSourceType(Object session)
Get the output type of the data source, without filtering.


getOutputType

public XTypeNode getOutputType(Object session,
                               boolean full)
Get the output type of the query. The return value is either the root of a subtree of the a type tree, or a one level tree with each child representing a table column.

Specified by:
getOutputType in class XQuery
Parameters:
session - the session object
full - true to fetch full name

findVariables

protected void findVariables(Map varmap)
Find all varialbes in the query.

Overrides:
findVariables in class XQuery

parseXML

public void parseXML(Element root)
              throws Exception
Parse the XML element that contains information on this query.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Overrides:
parseXML in class XQuery
Throws:
Exception

writeXML

public void writeXML(PrintWriter writer)
Generate the XML segment to represent this query.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Overrides:
writeXML in class XQuery

clone

public Object clone()
Create a clone of this object.

Overrides:
clone in class XQuery

deepClone

public Object deepClone()
Deep clone.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.