KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > sqls > Case


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.ws.jaxme.sqls;
17
18
19 /** Interface of a "case value when x then a when y then b else c end" statement
20  */

21 public interface Case {
22     /** Interface of a single "when x then a" clause.
23      */

24     public interface When {
25         /** Returns the condition. In a "when x then a" clause
26          * the condition is "x".
27          */

28         public Object JavaDoc getCondition();
29         /** Returns the value. In a "when x then a" clause
30          * the condition is "a".
31          */

32         public Object JavaDoc getValue();
33     }
34
35     /** Sets the value being checked.
36      */

37     public void setCheckedValue(Object JavaDoc pValue);
38     /** Returns the value being checked.
39      */

40     public Object JavaDoc getCheckedValue();
41     /** Adds a new clause "when pCondition then pValue".
42      */

43     public void addWhen(Object JavaDoc pCondition, Object JavaDoc pValue);
44     /** Adds a new when clause.
45      */

46     public void addWhen(When pWhen);
47     /** Sets the value for the "else" clause.
48      */

49     public void setElseValue(Object JavaDoc pValue);
50     /** Returns the value for the "else" clause.
51      */

52     public Object JavaDoc getElseValue();
53     /** Returns the case clauses type.
54      */

55     public Column.Type getType();
56     /** Returns the array of "when" clauses.
57      */

58     public When[] getWhens();
59 }
60
Popular Tags