KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jalisto > se > query > constraint > BinaryBooleanOperatorConstraint


1 /*
2  * Jalisto - JAva LIght STOrage
3  * Copyright (C) 2000-2005 Xcalia http://www.xcalia.com
4  *
5  * This library 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 library 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 library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18  *
19  * Xcalia
20  * 71, rue Desnouettes
21  * 75014 Paris - France
22  * http://www.xcalia.com
23  */

24 package org.objectweb.jalisto.se.query.constraint;
25
26 import org.objectweb.jalisto.se.query.exception.QueryEngineException;
27 import org.objectweb.jalisto.se.api.query.Constraint;
28
29 public class BinaryBooleanOperatorConstraint extends ConstraintImpl {
30
31     public BinaryBooleanOperatorConstraint(Constraint c1, Constraint c2, short operator) {
32         this.left = c1;
33         this.right = c2;
34         this.operator = operator;
35     }
36
37     public Constraint contains() {
38         throw new QueryEngineException();
39     }
40
41     public Constraint equal() {
42         throw new QueryEngineException();
43     }
44
45     public Object JavaDoc getObject() {
46         throw new QueryEngineException();
47     }
48
49     public Constraint greater() {
50         throw new QueryEngineException();
51     }
52
53     public Constraint identity() {
54         throw new QueryEngineException();
55     }
56
57     public Constraint like() {
58         throw new QueryEngineException();
59     }
60
61     public Constraint not() {
62         return this;
63     }
64
65     public Constraint smaller() {
66         throw new QueryEngineException();
67     }
68
69     public Constraint getLeft() {
70         return left;
71     }
72
73     public Constraint getRight() {
74         return right;
75     }
76
77     public boolean isAndOperator() {
78         return operator == AND_OP;
79     }
80
81
82     private Constraint left;
83     private Constraint right;
84     private short operator;
85
86     public final static short AND_OP = 0;
87     public final static short OR_OP = 1;
88
89 }
90
Popular Tags