Style Intelligence v12.0

inetsoft.uql.jdbc
Class JDBCQuery

java.lang.Object
  extended by inetsoft.uql.XQuery
      extended by inetsoft.uql.jdbc.JDBCQuery
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable

public class JDBCQuery
extends XQuery

JDBC query stored JDBC query definition. It could be a freeform SQL string, a structured SQL definition, or a stored procedure call.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.XQuery
DERIVED, HINT_DEFAULT_MAX_ROWS, HINT_IGNORE_MAX_ROWS, HINT_MAX_ROWS, HINT_TIMEOUT
 
Constructor Summary
JDBCQuery()
          Create a JDBC query.
 
Method Summary
 void addVariable(XVariable var)
          Add a variable to this query.
 void applyVariableTable(VariableTable vars)
          Apply variables to the contained sql.
 Object clone()
          Create a clone of this object.
 boolean equals(Object obj)
          Check if equals another object.
protected  void findVariables(Map varmap)
          Find variables in the query.
 XTypeNode getOutputType(Object session, boolean full)
          Get the output type of the query.
 XTypeNode getOutputTypeForNonParseableSQL(XTypeNode output, VariableTable vtable, Object session)
          Get the output of an unparseable sql.
 XSelection getSelection()
          Get the XSelection object.
 String getSQLAsString()
          Get the SQL as a string.
 inetsoft.uql.jdbc.SQLDefinition getSQLDefinition()
          Get the SQL definition.
 boolean isOutputTypeAvailable()
          Check if is output type of the query is available.
 boolean isVPMEnabled()
          Check if to add vpm condition is enabled.
 void parseXML(Element root)
          Parse the XML element that contains information on this data source.
 void removeTable(VariableTable vars)
          Remove the useless tables.
 void setSQLDefinition(inetsoft.uql.jdbc.SQLDefinition sql)
          Set the SQL definition.
 void setVPMEnabled(boolean enabled)
          Set the vpm condition enabled flag.
 String toString()
          Get the string representation.
 void validateConditions(VariableTable params)
          Set condition to a true condition if one of parameters in it has no value.
 void writeXML(PrintWriter writer)
          Generate the XML segment to represent this data source.
 
Methods inherited from class inetsoft.uql.XQuery
findVariables, findVariables, findVariables, findVariables, getAllDefinedVariables, getDataSource, getDefinedVariables, getDescription, getEstimatedTime, getFolder, getMaxRows, getName, getOutputType, getPartition, getProperty, getTimeout, getType, getVariable, getVariableNames, hashCode, isVisible, removeVariable, revalidate, setDataSource, setDescription, setEstimatedTime, setFolder, setMaxRows, setName, setPartition, setProperty, setTimeout, setVisible, updateQueryVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDBCQuery

public JDBCQuery()
Create a JDBC query.

Method Detail

addVariable

public void addVariable(XVariable var)
Add a variable to this query.

Overrides:
addVariable in class XQuery
Parameters:
var - variable definition.

isOutputTypeAvailable

public boolean isOutputTypeAvailable()
Check if is output type of the query is available. For a non-parse SQL, output type may not be available.

Overrides:
isOutputTypeAvailable in class XQuery

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

getOutputTypeForNonParseableSQL

public XTypeNode getOutputTypeForNonParseableSQL(XTypeNode output,
                                                 VariableTable vtable,
                                                 Object session)
Get the output of an unparseable sql.


getSelection

public XSelection getSelection()
Get the XSelection object.

Specified by:
getSelection in class XQuery

getSQLDefinition

public inetsoft.uql.jdbc.SQLDefinition getSQLDefinition()
Get the SQL definition.


setSQLDefinition

public void setSQLDefinition(inetsoft.uql.jdbc.SQLDefinition sql)
Set the SQL definition.


getSQLAsString

public String getSQLAsString()
Get the SQL as a string. If the SQL is specified as structured SQL object, it is converted to a string conforming to SQL standard.


validateConditions

public void validateConditions(VariableTable params)
Set condition to a true condition if one of parameters in it has no value.


toString

public String toString()
Description copied from class: XQuery
Get the string representation.

Overrides:
toString in class XQuery

findVariables

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

Overrides:
findVariables in class XQuery

equals

public boolean equals(Object obj)
Description copied from class: XQuery
Check if equals another object.

Overrides:
equals in class XQuery

isVPMEnabled

public boolean isVPMEnabled()
Check if to add vpm condition is enabled.

Returns:
true if enabled, false otherwise.

setVPMEnabled

public void setVPMEnabled(boolean enabled)
Set the vpm condition enabled flag.

Parameters:
enabled - true if enabled, false otherwise.

clone

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

Overrides:
clone in class XQuery

parseXML

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

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 data source.

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

removeTable

public void removeTable(VariableTable vars)
Remove the useless tables.


applyVariableTable

public void applyVariableTable(VariableTable vars)
Apply variables to the contained sql.


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