KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sql99 > dql > plan > condition > BVEAggregatePlan


1 package com.daffodilwoods.daffodildb.server.sql99.dql.plan.condition;
2
3 import com.daffodilwoods.daffodildb.server.sql99.common.*;
4 import com.daffodilwoods.daffodildb.server.sql99.expression.booleanvalueexpression.*;
5 import com.daffodilwoods.daffodildb.server.sql99.expression.booleanvalueexpression.predicates.*;
6 import com.daffodilwoods.database.resource.*;
7
8 /**
9  * It represents the plan of aggregate condition. Aggregate condition are those
10  * condition in which aggregate functions like sum,avg,max,min,count are present
11  * and which is solved on resultset of GroupBy. It is required in formation of plan
12  * of condition.
13  * <p>Title: </p>
14  * <p>Description: This Plan contains the AggregateCondition .
15  * <p>Copyright: Copyright (c) 2003</p>
16  * <p>Company: </p>
17  * @author Sunil Virmani
18  * @version 1.0
19  */

20
21 public class BVEAggregatePlan implements ExecutionPlanConstants, _BVEAggregatePlan {
22   /**
23    * It represents aggregate condition which will be solved on resultset of
24    * GroupBy .
25    */

26   private booleanvalueexpression aggregateCondition;
27
28    public BVEAggregatePlan() {
29    }
30
31    public BVEAggregatePlan(booleanvalueexpression aggregateCondition) {
32       this.aggregateCondition = aggregateCondition;
33    }
34    /**
35     * see documentation of following method in _BVEAggregatePlan
36     * @param aggregateCondition
37     * @throws DException
38     */

39    public void setAggregateCondition(booleanvalueexpression aggregateCondition) throws DException {
40       this.aggregateCondition = aggregateCondition;
41    }
42    public booleanvalueexpression getAggregateCondition() throws DException {
43       return this.aggregateCondition;
44    }
45    /**
46     * see documentation of following method in _BVEPlan
47     * @return
48     * @throws DException
49     */

50    public int getType() throws DException {
51       return BVEConstants.BVEAGGREGATEPLAN;
52    }
53    public booleanvalueexpression getRemainingCondition() throws com.daffodilwoods.database.resource.DException {
54       return null;
55    }
56
57    public _AllTablesJoinRelation getAllTableJoinRelation() throws com.daffodilwoods.database.resource.DException {
58       return null;
59    }
60
61    public _BVESingleTablePlan[] getBVESingleTablePlans() throws com.daffodilwoods.database.resource.DException {
62       return null;
63    }
64
65    public void setBVESingleTablePlans(_BVESingleTablePlan[] bveSingleTablePlans) throws DException {
66       throw new UnsupportedOperationException JavaDoc();
67    }
68
69    public void setRemainingCondition(booleanvalueexpression remainingCondition) throws DException {
70       throw new UnsupportedOperationException JavaDoc();
71    }
72
73    public TableDetails[] getTableDetails() throws DException {
74       throw new java.lang.UnsupportedOperationException JavaDoc("Method getTableNames() not yet implemented.");
75    }
76
77    /**
78     * This method is required to merge passed aggregate condition with this aggregate
79     * codition with AND logical operator and resultant merged predicate is set in
80     * this aggregate condition.
81     * @param aggregateCondition
82     * @throws DException
83     */

84    public void addAggregateCondition(booleanvalueexpression aggregateCondition) throws DException {
85       this.aggregateCondition = BVEPlanMerger.addAndConditions(this.aggregateCondition, aggregateCondition);
86    }
87
88    public String JavaDoc toString() {
89       String JavaDoc str = "BVEAGGREGATEPLAN";
90       if (aggregateCondition != null) {
91          str += "[" + aggregateCondition + "]";
92       }
93       return str;
94    }
95
96
97 }
98
Popular Tags