com.metamatrix.query.analysis
Class AnalysisRecord

java.lang.Object
  extended by com.metamatrix.query.analysis.AnalysisRecord

public class AnalysisRecord
extends java.lang.Object

The AnalysisRecord holds all debug/analysis information for a particular query as it is executed. This includes:


Constructor Summary
AnalysisRecord(boolean recordQueryPlan, boolean recordAnnotations, boolean recordDebug)
           
 
Method Summary
 void addAnnotation(QueryAnnotation annotation)
          Add an annotation.
static AnalysisRecord createNonRecordingRecord()
           
 java.util.Collection getAnnotations()
          Get annotations.
 java.lang.String getDebugLog()
          Get debug trace log recorded to writer.
 java.util.Map getQueryPlan()
          Get the query plan that was created
 void println(java.lang.String debugLine)
          Add line to debug log This can only be used if recordDebug returns true.
 boolean recordAnnotations()
          Determine whether annotations should be recorded
 boolean recordDebug()
          Determine whether debug trace log should be recorded
 boolean recordQueryPlan()
          Determine whether query plan should be recorded
 void setQueryPlan(java.util.Map queryPlan)
          Set the query plan that was created
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalysisRecord

public AnalysisRecord(boolean recordQueryPlan,
                      boolean recordAnnotations,
                      boolean recordDebug)
Method Detail

createNonRecordingRecord

public static AnalysisRecord createNonRecordingRecord()

recordQueryPlan

public boolean recordQueryPlan()
Determine whether query plan should be recorded

Returns:
True to record

recordAnnotations

public boolean recordAnnotations()
Determine whether annotations should be recorded

Returns:
True to record

recordDebug

public boolean recordDebug()
Determine whether debug trace log should be recorded

Returns:
True to record

setQueryPlan

public void setQueryPlan(java.util.Map queryPlan)
Set the query plan that was created

Parameters:
queryPlan - The plan

getQueryPlan

public java.util.Map getQueryPlan()
Get the query plan that was created

Returns:
The plan

addAnnotation

public void addAnnotation(QueryAnnotation annotation)
Add an annotation. This can only be used if recordAnnotations returns true.

Parameters:
annotation - Annotation to add

getAnnotations

public java.util.Collection getAnnotations()
Get annotations.

Returns:

println

public void println(java.lang.String debugLine)
Add line to debug log This can only be used if recordDebug returns true.

Parameters:
debugLine - Text to add to debug writer

getDebugLog

public java.lang.String getDebugLog()
Get debug trace log recorded to writer. Typically this is used once at the end of query execution.

Returns:


Copyright © 2009. All Rights Reserved.