Class BaseForQueryPlan

java.lang.Object
se.liu.ida.hefquin.engine.queryplan.base.impl.BaseForQueryPlan
All Implemented Interfaces:
QueryPlan
Direct Known Subclasses:
LogicalPlanWithBinaryRootImpl, LogicalPlanWithNaryRootImpl, LogicalPlanWithNullaryRootImpl, LogicalPlanWithUnaryRootImpl, PhysicalPlanWithBinaryRootImpl, PhysicalPlanWithNaryRootImpl, PhysicalPlanWithNullaryRootImpl, PhysicalPlanWithUnaryRootImpl

public abstract class BaseForQueryPlan extends Object implements QueryPlan
This is an abstract base class for classes that implement concrete specializations (sub-interfaces) of the QueryPlan interface. This base class implements the QueryPlanningInfo-related methods of QueryPlan.
  • Field Details

    • id

      protected final int id
  • Constructor Details

    • BaseForQueryPlan

      protected BaseForQueryPlan(QueryPlanningInfo qpInfo)
      Use this constructor only if the plan is meant to be constructed with an already existing QueryPlanningInfo object. This object may later be extended with additional properties for this plan. Therefore, do not create multiple plans with the same QueryPlanningInfo object; instead, make copies of such an object if needed. One way to create such a copy is to use the BaseForQueryPlan(Iterable) constructor instead, passing QueryPlanningInfo.getProperties() of the QueryPlanningInfo object to be copied.
    • BaseForQueryPlan

      protected BaseForQueryPlan(Iterable<QueryPlanProperty> qpInfo)
      Use this constructor to create the plan with a QueryPlanningInfo object that is initialized with the given properties. This object may later be extended with additional properties for this plan.

      If the given argument is null or an empty iterable, then this constructor does not associate a QueryPlanningInfo with the plan.

    • BaseForQueryPlan

      protected BaseForQueryPlan()
  • Method Details

    • getID

      public int getID()
      Description copied from interface: QueryPlan
      Returns an identifier of this (sub-)plan, which should be distinct from the identifiers of all other sub-plans within the same plan.
      Specified by:
      getID in interface QueryPlan
    • hasQueryPlanningInfo

      public boolean hasQueryPlanningInfo()
      Description copied from interface: QueryPlan
      Returns true if this plan already has a QueryPlanningInfo object associated with it.
      Specified by:
      hasQueryPlanningInfo in interface QueryPlan
    • getQueryPlanningInfo

      public QueryPlanningInfo getQueryPlanningInfo()
      Description copied from interface: QueryPlan
      Returns an object that captures query-planning-related information about this plan. This object is meant to be requested and populated by the query planner.

      If this plan does not yet have a QueryPlanningInfo object associated with it, then this function creates a new (empty) one and returns that.

      Specified by:
      getQueryPlanningInfo in interface QueryPlan
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object