KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > extractor > algebra > OuterJoinPredicate


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 Universite de Versailles Saint-Quentin.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
18  * You can also get it at http://www.gnu.org/licenses/lgpl.html
19  *
20  * For more information on this software, see http://www.xquark.org.
21  */

22
23 package org.xquark.extractor.algebra;
24
25 import java.util.List JavaDoc;
26
27 import org.xquark.extractor.common.SqlWrapperException;
28 import org.xquark.extractor.sql.SqlExpression;
29 // TODO: not used ?
30
public final class OuterJoinPredicate extends Expression
31 {
32
33     private static final String JavaDoc RCSRevision = "$Revision: 1.3 $";
34     private static final String JavaDoc RCSName = "$Name: $";
35
36     protected RenameRelation _outerTable;
37     protected Expression _predicate;
38
39     /**
40     @roseuid 3BD17CA900A8
41      */

42     public OuterJoinPredicate()
43     {
44
45     }
46
47     /**
48     @param predicate
49     @param outerTable
50     @roseuid 3BD17C1F02BC
51      */

52     public OuterJoinPredicate(Expression predicate, RenameRelation outerTable)
53     {
54         setPredicate (predicate);
55         setOuterTable (outerTable);
56     }
57
58     /**
59     Access method for the _outerTable property.
60
61     @return the current value of the _outerTable property
62      */

63     public RenameRelation getOuterTable()
64     {
65         return _outerTable;
66     }
67
68     public List JavaDoc getOperands()
69     {
70         return null;
71     }
72
73     /**
74     Sets the value of the _outerTable property.
75
76     @param aOuterTable the new value of the _outerTable property
77      */

78     public void setOuterTable(RenameRelation aOuterTable)
79     {
80         _outerTable = aOuterTable;
81     }
82
83     /**
84     Access method for the _predicate property.
85
86     @return the current value of the _predicate property
87      */

88     public Expression getPredicate()
89     {
90         return _predicate;
91     }
92
93     /**
94     Sets the value of the _predicate property.
95
96     @param aPredicate the new value of the _predicate property
97      */

98     public void setPredicate(Expression aPredicate)
99     {
100         _predicate = aPredicate;
101     }
102
103     public SqlExpression accept (GenSqlVisitor visitor) throws SqlWrapperException
104     {
105         return visitor.visit(this);
106     }
107
108     /**
109     @param visitor
110     @roseuid 3BD17E0D02E4
111      */

112     public void accept (AlgebraVisitor visitor) throws SqlWrapperException
113     {
114         visitor.visit(this);
115     }
116
117     /**
118      * @see Expression#deepEquals(Object)
119      */

120     public boolean deepEquals(Object JavaDoc o)
121     {
122         if (o instanceof OuterJoinPredicate)
123         {
124             OuterJoinPredicate cast = (OuterJoinPredicate)o;
125             return _outerTable.deepEquals(cast.getOuterTable())
126                         && _predicate.deepEquals(cast.getPredicate());
127         }
128         return false;
129     }
130 }
131
Popular Tags