KickJava   Java API By Example, From Geeks To Geeks.

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


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  */

17 package org.apache.ws.jaxme.sqls;
18
19 import java.util.Iterator JavaDoc;
20
21 /**
22  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
23  */

24 public interface Parts {
25   /** <p>Inserts a constant value.</p>
26    */

27   public void addPart(Value pValue);
28
29   /** <p>Inserts a column reference.</p>
30    */

31   public void addPart(ColumnReference pColumn);
32
33   /** <p>Inserts a set of column references.</p>
34    */

35   public void addPart(ColumnReference[] pPart);
36
37   /** Inserts a "case foo when x then a when y then b else c end"
38    * clause.
39    */

40   public void addPart(Case pCase);
41
42   /** <p>Inserts a subselect.</p>
43    */

44   public void addPart(SelectStatement pPart);
45   
46   /** <p>Inserts a String. The String will be properly escaped.</p>
47    * @throws NullPointerException The paremeter <code>pString</code> is null.
48    */

49   public void addPart(String JavaDoc pString);
50   
51   /** <p>Inserts a NULL value.</p>
52    */

53   public void addPart();
54   
55   /** <p>Inserts a byte value, which will be inserted without quotes.</p>
56    */

57   public void addPart(byte pByte);
58   
59   /** <p>Inserts an int value, which will be inserted without quotes.</p>
60    */

61   public void addPart(int pInt);
62   
63   /** <p>Inserts a long value, which will be inserted without quotes.</p>
64    */

65   public void addPart(long pLong);
66   
67   /** <p>Inserts a short value, which will be inserted without quotes.</p>
68    */

69   public void addPart(short pShort);
70   
71   /** <p>Inserts a float value, which will be inserted without quotes.</p>
72    */

73   public void addPart(float pFloat);
74   
75   /** <p>Inserts a double value, which will be inserted without quotes.</p>
76    */

77   public void addPart(double pDouble);
78   
79   /** <p>Inserts a boolean value, which will be inserted as the word
80    * <code>TRUE</code>, or <code>FALSE</code>, respectively.</p>
81    */

82   public void addPart(boolean pBoolean);
83
84   /** <p>Inserts a function.</p>
85    */

86   public void addPart(Function pFunction);
87
88   /** Inserts an arithmetic expression.
89    */

90   public void addPart(Expression pExpression);
91
92   /** <p>Inserts raw SQL code.</p>
93    */

94   public void addRawSQLPart(String JavaDoc pRawSQL);
95   
96   /** <p>Inserts a placeholder.</p>
97    */

98   public void addPlaceholder();
99   
100   /** <p>Returns the number of parts.</p>
101    */

102   public int getNumParts();
103
104   /** Returns the minimum number of parts.
105    */

106   public int getMinimumParts();
107
108   /** Returns the maximum number of parts. Zero indicates unlimited.
109    */

110   public int getMaximumParts();
111
112   /** <p>Returns an Iterator to the parts that have been added.</p>
113    */

114   public Iterator JavaDoc getParts();
115
116     /** Creates an arithmetic sum.
117      */

118     public Expression createSUM();
119
120     /** Creates an arithmetic product.
121      */

122     public Expression createPRODUCT();
123
124     /** Creates an arithmetic difference.
125      */

126     public Expression createDIFFERENCE();
127
128     /** Creates an arithmetic quotient.
129      */

130     public Expression createQUOTIENT();
131 }
132
Popular Tags