com.metamatrix.query.sql.lang
Class XQuery

java.lang.Object
  extended by com.metamatrix.query.sql.lang.Command
      extended by com.metamatrix.query.sql.lang.XQuery
All Implemented Interfaces:
LanguageObject, java.io.Serializable, java.lang.Cloneable

public class XQuery
extends Command

An XQuery command object

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.metamatrix.query.sql.lang.Command
tempGroupIDs, TYPE_BATCHED_UPDATE, TYPE_CREATE, TYPE_DELETE, TYPE_DROP, TYPE_DYNAMIC, TYPE_INSERT, TYPE_QUERY, TYPE_SQL, TYPE_STORED_PROCEDURE, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_UPDATE_PROCEDURE, TYPE_XQUERY
 
Constructor Summary
XQuery()
           
XQuery(java.lang.String xQuery, XQueryExpression compiledXQuery)
           
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 boolean areResultsCachable()
          Whether the results are cachable.
 java.lang.Object clone()
          Return a copy of this SQLQuery.
 boolean equals(java.lang.Object obj)
          Compare two queries for equality.
 XQueryExpression getCompiledXQuery()
           
 java.util.List getProjectedSymbols()
          Get the ordered list of all elements returned by this query.
 int getType()
          Return type of command to make it easier to build switch statements by command type.
 java.lang.String getXQuery()
           
 int hashCode()
          Get hashcode for query.
 java.lang.String toString()
          Returns a string representation of an instance of this class.
 int updatingModelCount(QueryMetadataInterface metadata)
          Return the number of updates on physical sources by this command.
 
Methods inherited from class com.metamatrix.query.sql.lang.Command
addExternalGroupsToContext, addExternalGroupToContext, copyMetadataState, getAllExternalGroups, getExternalGroupContexts, getOption, getSubCommands, getSubCommandsUpdatingModelCount, getSubCommandsUpdatingModelCount, getTemporaryMetadata, getUpdateCommandSymbol, getUpdatesCommandSymbol, getVariableValues, getVirtualGroup, isResolved, printCommandTree, printCommandTree, pushNewResolvingContext, setExternalGroupContexts, setIsResolved, setOption, setTemporaryMetadata, setVariableValues, setVirtualGroup
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XQuery

public XQuery()

XQuery

public XQuery(java.lang.String xQuery,
              XQueryExpression compiledXQuery)
Method Detail

getXQuery

public java.lang.String getXQuery()

getCompiledXQuery

public XQueryExpression getCompiledXQuery()

getType

public int getType()
Description copied from class: Command
Return type of command to make it easier to build switch statements by command type.

Specified by:
getType in class Command
Returns:
Type from TYPE constants
See Also:
Command.getType()

getProjectedSymbols

public java.util.List getProjectedSymbols()
Description copied from class: Command
Get the ordered list of all elements returned by this query. These elements may be ElementSymbols or ExpressionSymbols but in all cases each represents a single column.

Specified by:
getProjectedSymbols in class Command
Returns:
Ordered list of SingleElementSymbol
See Also:
Command.getProjectedSymbols()

equals

public boolean equals(java.lang.Object obj)
Compare two queries for equality. Queries will only evaluate to equal if they are IDENTICAL.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Other object
Returns:
True if equal

hashCode

public int hashCode()
Get hashcode for query.

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code

clone

public java.lang.Object clone()
Return a copy of this SQLQuery.

Specified by:
clone in interface LanguageObject
Specified by:
clone in class Command
Returns:
Deep or safe clone

acceptVisitor

public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface: LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.

Parameters:
visitor - Visitor being used

toString

public java.lang.String toString()
Returns a string representation of an instance of this class.

Overrides:
toString in class Command
Returns:
String representation of object

areResultsCachable

public boolean areResultsCachable()
Description copied from class: Command
Whether the results are cachable.

Specified by:
areResultsCachable in class Command
Returns:
True if the results are cachable; false otherwise.
See Also:
Command.areResultsCachable()

updatingModelCount

public int updatingModelCount(QueryMetadataInterface metadata)
                       throws MetaMatrixComponentException
Description copied from class: Command
Return the number of updates on physical sources by this command.

Specified by:
updatingModelCount in class Command
Parameters:
metadata - QueryMetadataInterface
Returns:
The number of updates on physical sources by this command.
Throws:
MetaMatrixComponentException


Copyright © 2009. All Rights Reserved.