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

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

All Implemented Interfaces:
  IPlanOption

    public class PlanOption

extends java.lang.Object
implements IPlanOption

A default implementation of `IPlanOption`, the vendor should implement `IPlanOption` from scratch

Author:
  Hui Cao

Field Summary
`static int` `GRAPHIC_PLAN` Graphic execution plan mask
`static java.lang.String` `GRAPHIC_PLAN_DESC`
`static int` `TEXT_PLAN` Text execution plan mask
`static java.lang.String` `TEXT_PLAN_DESC`

Fields inherited from interface org.eclipse.datatools.sqltools.plan.IPlanOption
`TYPE_EVENT, TYPE_SP, TYPE_TRIGGER, TYPE_UDF`

Constructor Summary
`PlanOption()`

Method Summary
`int` `getCurrentType()` The default implementation always returns TEXT_PLAN
`int` `getDefaultOption()` Returns the default plan type id
`java.lang.String[]` `getPlanTypes()` Returns all available plan types, in string mode.
`int` `getTypeIdByName(java.lang.String name)` Returns type id by name
`java.lang.String` `getTypeNameById(int type)` Returns type name by id
`boolean` `isGraphicPlan(int type)` Checks if the given type id is graphic type
`boolean` `supportPlan(int procType)` Returns if the execution plan is supported for the given proc type

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

Field Detail

### GRAPHIC_PLAN

    public static final int GRAPHIC_PLAN

  Graphic execution plan mask

  See Also:
    Constant Field Values

### TEXT_PLAN

    public static final int TEXT_PLAN

  Text execution plan mask

  See Also:
    Constant Field Values

### GRAPHIC_PLAN_DESC

    public static final java.lang.String GRAPHIC_PLAN_DESC

### TEXT_PLAN_DESC

    public static final java.lang.String TEXT_PLAN_DESC

Constructor Detail

### PlanOption

    public PlanOption()

Method Detail

### getCurrentType

    public int getCurrentType()

  The default implementation always returns TEXT_PLAN

  Specified by:
    `getCurrentType` in interface `IPlanOption`
  Returns:
    the current plan type

### getDefaultOption

    public int getDefaultOption()

  Description copied from interface: `IPlanOption`
  Returns the default plan type id

  Specified by:
    `getDefaultOption` in interface `IPlanOption`
  Returns:
    the default plan type id

### getTypeIdByName

    public int getTypeIdByName(java.lang.String name)

  Description copied from interface: `IPlanOption`
  Returns type id by name

  Specified by:
    `getTypeIdByName` in interface `IPlanOption`
  Parameters:
    `name` - the name of the plan type
  Returns:
    the id of the plan type

### getTypeNameById

    public java.lang.String getTypeNameById(int type)

  Description copied from interface: `IPlanOption`
  Returns type name by id

  Specified by:
    `getTypeNameById` in interface `IPlanOption`
  Parameters:
    `type` - the plan type id
  Returns:
    the plan type name

### getPlanTypes

    public java.lang.String[] getPlanTypes()

  Description copied from interface: `IPlanOption`
  Returns all available plan types, in string mode.

  Specified by:
    `getPlanTypes` in interface `IPlanOption`
  Returns:
    all plan types

### isGraphicPlan

    public boolean isGraphicPlan(int type)

  Description copied from interface: `IPlanOption`
  Checks if the given type id is graphic type

  Specified by:
    `isGraphicPlan` in interface `IPlanOption`
  Parameters:
    `type` - a given plan type
  Returns:
    `true` if the given type is grahic type, `false` otherwise

### supportPlan

    public boolean supportPlan(int procType)

  Description copied from interface: `IPlanOption`
  Returns if the execution plan is supported for the given proc type

  Specified by:
    `supportPlan` in interface `IPlanOption`
  Parameters:
    `procType` - the type of procedural object
  Returns:
    `true` if the execution plan for the given type is supported
  See Also:
    `IPlanOption.TYPE_SP`, `IPlanOption.TYPE_UDF`, `IPlanOption.TYPE_TRIGGER`, `IPlanOption.TYPE_EVENT`