| 1 |
/* |
| 2 |
* Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 3 |
* and the EPL 1.0 (https://h2database.com/html/license.html). |
| 4 |
* Initial Developer: H2 Group |
| 5 |
*/ |
| 6 |
package org.h2.table; |
| 7 |
|
| 8 |
import org.h2.index.Index; |
| 9 |
|
| 10 |
/** |
| 11 |
* The plan item describes the index to be used, and the estimated cost when |
| 12 |
* using it. |
| 13 |
*/ |
| 14 |
public class PlanItem { |
| 15 |
|
| 16 |
/** |
| 17 |
* The cost. |
| 18 |
*/ |
| 19 |
double cost; |
| 20 |
|
| 21 |
private int[] masks; |
| 22 |
private Index index; |
| 23 |
private PlanItem joinPlan; |
| 24 |
private PlanItem nestedJoinPlan; |
| 25 |
|
| 26 |
void setMasks(int[] masks) { |
| 27 |
this.masks = masks; |
| 28 |
} |
| 29 |
|
| 30 |
int[] getMasks() { |
| 31 |
return masks; |
| 32 |
} |
| 33 |
|
| 34 |
void setIndex(Index index) { |
| 35 |
this.index = index; |
| 36 |
} |
| 37 |
|
| 38 |
public Index getIndex() { |
| 39 |
return index; |
| 40 |
} |
| 41 |
|
| 42 |
PlanItem getJoinPlan() { |
| 43 |
return joinPlan; |
| 44 |
} |
| 45 |
|
| 46 |
PlanItem getNestedJoinPlan() { |
| 47 |
return nestedJoinPlan; |
| 48 |
} |
| 49 |
|
| 50 |
void setJoinPlan(PlanItem joinPlan) { |
| 51 |
this.joinPlan = joinPlan; |
| 52 |
} |
| 53 |
|
| 54 |
void setNestedJoinPlan(PlanItem nestedJoinPlan) { |
| 55 |
this.nestedJoinPlan = nestedJoinPlan; |
| 56 |
} |
| 57 |
|
| 58 |
} |