com.metamatrix.jdbc.api.tools
Class QueryPlanDisplayHelper

java.lang.Object
  extended by com.metamatrix.jdbc.api.tools.QueryPlanDisplayHelper
All Implemented Interfaces:
DisplayHelper

public class QueryPlanDisplayHelper
extends java.lang.Object
implements DisplayHelper


Constructor Summary
QueryPlanDisplayHelper()
          Default constructor
 
Method Summary
 java.lang.String getDescription(PlanNode node)
          Get the description to use for this plan node, which is usually displayed after the name as a short description.
 java.lang.String getName(PlanNode node)
          Get the name to use for this plan node.
 java.util.List getOrderedProperties(PlanNode node)
          This methods returns a List of sorted property names.
 java.util.Map getOrderedPropertiesMap(PlanNode node)
           
 java.lang.String getProperty(java.lang.String property)
           
 java.lang.String getPropertyName(java.lang.String property)
          Get display name for a particular property name.
 java.lang.String getType(PlanNode node)
           
 void setMaxDescriptionLength(int maxLength)
          A max description length so that the description can be truncated when necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryPlanDisplayHelper

public QueryPlanDisplayHelper()
Default constructor

Method Detail

getName

public java.lang.String getName(PlanNode node)
Description copied from interface: DisplayHelper
Get the name to use for this plan node. An obvious implementation is to use the node's type.

Specified by:
getName in interface DisplayHelper
Parameters:
node - The node
Returns:
The name, based on the node's information

getDescription

public java.lang.String getDescription(PlanNode node)
Description copied from interface: DisplayHelper
Get the description to use for this plan node, which is usually displayed after the name as a short description. The description should pull out the most important information for a particular node type.

Specified by:
getDescription in interface DisplayHelper
Parameters:
node - The node
Returns:
The description

getType

public java.lang.String getType(PlanNode node)

getOrderedPropertiesMap

public java.util.Map getOrderedPropertiesMap(PlanNode node)

getOrderedProperties

public java.util.List getOrderedProperties(PlanNode node)
This methods returns a List of sorted property names.

Specified by:
getOrderedProperties in interface DisplayHelper
Parameters:
node - The node
Returns:
List of property names

setMaxDescriptionLength

public void setMaxDescriptionLength(int maxLength)
Description copied from interface: DisplayHelper
A max description length so that the description can be truncated when necessary.

Specified by:
setMaxDescriptionLength in interface DisplayHelper
Parameters:
maxLength - Max string length

getProperty

public java.lang.String getProperty(java.lang.String property)

getPropertyName

public java.lang.String getPropertyName(java.lang.String property)
Description copied from interface: DisplayHelper
Get display name for a particular property name.

Specified by:
getPropertyName in interface DisplayHelper
Parameters:
property - The property name, as used in the node's properties
Returns:
The desired display name for the property


Copyright © 2009. All Rights Reserved.