01: /*
02: * Copyright (C) 1999-2004 <a href="mailto:mandarax@jbdietrich.com">Jens Dietrich</a>
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18:
19: package org.mandarax.jdbc.server.sql;
20:
21: import java.util.List;
22:
23: /**
24: * Simple interface for condition contexts (objects containing conditions).
25: * @author <A HREF="mailto:mandarax@jbdietrich.com">Jens Dietrich</A>
26: * @version 3.3.2 <29 December 2004>
27: * @since 3.0
28: */
29:
30: public interface ConditionContext {
31: /**
32: * Add a condition to this context.
33: * @param condition a condition
34: */
35: public void add(Condition condition);
36:
37: /**
38: * Add a binary connective to this context.
39: * For constant definitions, see CompoundCondition.
40: * @param connective a connective
41: */
42: public void add(int connective);
43:
44: /**
45: * Replace a child condition.
46: * @param oldCondition the old condition
47: * @param newCondition the new condition
48: */
49: public void replace(Condition oldCondition, Condition newCondition);
50:
51: /**
52: * Set the conditions (and connectives)
53: * @param newConditions a list of conditions
54: * @param newConnective a new connectives
55: */
56: public void setConditions(List newConditions, int newConnective);
57:
58: /**
59: * Negate the condition that will be added next.
60: */
61: public void negateNext();
62: }
|