com.metamatrix.query.sql.lang
Class Option

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

public class Option
extends java.lang.Object
implements LanguageObject

Represents MetaMatrix extension options to normal SQL. Options are declared in a list after the OPTION keyword, such as: "OPTION SHOWPLAN DEBUG".

See Also:
Serialized Form

Field Summary
static java.lang.String MAKEDEP
           
static java.lang.String MAKENOTDEP
           
static java.lang.String OPTIONAL
           
 
Constructor Summary
Option()
          Construct a default instance of the Option clause.
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 void addDependentGroup(java.lang.String group)
          Add group to make dependent
 void addNoCacheGroup(java.lang.String group)
          Add group that overrides the default behavior of Materialized View feautre to route the query to the primary virtual group transformation instead of the Materialized View transformation.
 void addNotDependentGroup(java.lang.String group)
          Add group to make dependent
 java.lang.Object clone()
          Return deep copy of this option object
 boolean equals(java.lang.Object obj)
          Compare two Option clauses for equality.
 boolean getDebug()
          Get flag for whether to dump debug info on the server
 java.util.List getDependentGroups()
          Get all groups to make dependent
 java.util.List getNoCacheGroups()
          Get all groups that override the default behavior of Materialized View feautre to route the query to the primary virtual group transformation instead of the Materialized View transformation.
 java.util.List getNotDependentGroups()
          Get all groups to make dependent
 boolean getPlanOnly()
          Get flag for whether to return the query plan without the results
 boolean getShowPlan()
          Get flag for whether to return the query plan with the results
 int hashCode()
          Get hash code for Option.
 boolean isNoCache()
           
 void setDebug(boolean flag)
          Set flag to dump debug info on the server
 void setNoCache(boolean noCache)
           
 void setPlanOnly(boolean planOnly)
          Set flag for returning only the query plan without executing the query
 void setShowPlan(boolean flag)
          Set flag for returning the query plan with the results
 java.lang.String toString()
          Returns a string representation of an instance of this class.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAKEDEP

public static final java.lang.String MAKEDEP
See Also:
Constant Field Values

MAKENOTDEP

public static final java.lang.String MAKENOTDEP
See Also:
Constant Field Values

OPTIONAL

public static final java.lang.String OPTIONAL
See Also:
Constant Field Values
Constructor Detail

Option

public Option()
Construct a default instance of the Option clause.

Method Detail

setShowPlan

public void setShowPlan(boolean flag)
Set flag for returning the query plan with the results

Parameters:
flag - True to return the query plan with the results, false otherwise

getShowPlan

public boolean getShowPlan()
Get flag for whether to return the query plan with the results

Returns:
True to return the query plan with the results

setPlanOnly

public void setPlanOnly(boolean planOnly)
Set flag for returning only the query plan without executing the query

Parameters:
flag - True to return the query plan without the results, false otherwise

getPlanOnly

public boolean getPlanOnly()
Get flag for whether to return the query plan without the results

Returns:
True to return the query plan without the results

setDebug

public void setDebug(boolean flag)
Set flag to dump debug info on the server

Parameters:
flag - True to dump debug info for this query, false otherwise

getDebug

public boolean getDebug()
Get flag for whether to dump debug info on the server

Returns:
True if debug info should be dumped on the server, false otherwise

addDependentGroup

public void addDependentGroup(java.lang.String group)
Add group to make dependent

Parameters:
group - Group to make dependent

getDependentGroups

public java.util.List getDependentGroups()
Get all groups to make dependent

Returns:
List of String defining groups to be made dependent, may be null if no groups

addNotDependentGroup

public void addNotDependentGroup(java.lang.String group)
Add group to make dependent

Parameters:
group - Group to make dependent

getNotDependentGroups

public java.util.List getNotDependentGroups()
Get all groups to make dependent

Returns:
List of String defining groups to be made dependent, may be null if no groups

addNoCacheGroup

public void addNoCacheGroup(java.lang.String group)
Add group that overrides the default behavior of Materialized View feautre to route the query to the primary virtual group transformation instead of the Materialized View transformation.

Parameters:
group - Group that overrides the default behavior of Materialized View

getNoCacheGroups

public java.util.List getNoCacheGroups()
Get all groups that override the default behavior of Materialized View feautre to route the query to the primary virtual group transformation instead of the Materialized View transformation.

Returns:
List of String defining groups that overrides the default behavior of Materialized View, may be null if there are no groups

isNoCache

public boolean isNoCache()

setNoCache

public void setNoCache(boolean noCache)

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.

Specified by:
acceptVisitor in interface LanguageObject
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 java.lang.Object
Returns:
String representation of object

equals

public boolean equals(java.lang.Object obj)
Compare two Option clauses for equality.

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

hashCode

public int hashCode()
Get hash code for Option.

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

clone

public java.lang.Object clone()
Return deep copy of this option object

Specified by:
clone in interface LanguageObject
Overrides:
clone in class java.lang.Object
Returns:
Deep copy of the object


Copyright © 2009. All Rights Reserved.