## org.eclipse.datatools.sqltools.plan
Class EPVFacade

    java.lang.Object
      org.eclipse.datatools.sqltools.plan.EPVFacade

    public class EPVFacade

extends java.lang.Object

The facade of EPV (SQL Execution Plan View).

Author:
  Dafan Yang

Method Summary
`boolean` `createNewPlanInstance(PlanRequest request)` Creates an instance of execution plan, to display an execution plan on EPV, consumers must create a new plan instance first
`static EPVFacade` `getInstance()` Returns the instance of `EPVFacade`
`int` `getStatus(PlanRequest request)` Returns the status of the plan request
`void` `planFailed(PlanRequest request, java.lang.Throwable th)` Informs the EPV that error occurs when getting the execution plan from the data server.
`void` `planGenerated(PlanRequest request, java.lang.String rawPlan)` Informs the EPV that the plan raw data of the given plan request is successfully generated.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createNewPlanInstance

    public boolean createNewPlanInstance(PlanRequest request)

  Creates an instance of execution plan, to display an execution plan on EPV, consumers must create a new plan instance first

  Parameters:
    `request` - the plan request
  Returns:
    `true` if creation succeeds, `false` otherwise

### getInstance

    public static EPVFacade getInstance()

  Returns the instance of `EPVFacade`

  Returns:
    the instance of `EPVFacade`

### planFailed

    public void planFailed(PlanRequest request,
                           java.lang.Throwable th)

  Informs the EPV that error occurs when getting the execution plan from the data server. The error information will be displayed on EPV.

  Parameters:
    `request` - the plan request
    `th` - the exception thrown out when retrieving the plan

### planGenerated

    public void planGenerated(PlanRequest request,
                              java.lang.String rawPlan)

  Informs the EPV that the plan raw data of the given plan request is successfully generated. The raw data of the execution plan will be set to the plan instance.

  Note that the `IPlanParser` will be responsible for parsing the raw data of plan into modeled data.

  Parameters:
    `request` - the plan request
    `rawPlan` - the raw data of execution plan
  See Also:
    `IPlanParser`

### getStatus

    public int getStatus(PlanRequest request)

  Returns the status of the plan request

  Parameters:
    `request` - the plan request
  Returns:
    the status of the plan request