KickJava   Java API By Example, From Geeks To Geeks.

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


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.Calendar JavaDoc;
20 import java.util.Iterator JavaDoc;
21
22
23 /** A common base interface for {@link org.apache.ws.jaxme.sqls.InsertStatement}
24  * and {@link org.apache.ws.jaxme.sqls.UpdateStatement}.
25  */

26 public interface SetStatement extends Statement {
27     /** A tupel of column name and value being assigned.
28      */

29     public interface SetValue {
30         /** Returns the column being set.
31          */

32         public ColumnReference getColumnReference();
33         /** Returns the value to which the column is being set.
34          */

35         public Object JavaDoc getValue();
36     }
37
38     /** Returns an {@link Iterator} to all values being set.
39      * Any element in the iterator is an instance of {@link SetValue}.
40      */

41     public Iterator JavaDoc getSetValues();
42
43     /** Adds a SET clause setting the given column to NULL.
44      */

45     public void addSetNull(Column pColumn);
46     /** Adds a SET clause setting the given column to NULL.
47      */

48     public void addSetNull(Column.Name pColumn);
49     /** Adds a SET clause setting the given column to NULL.
50      */

51     public void addSetNull(String JavaDoc pColumn);
52     
53     /** Adds a SET clause setting the given column to a value
54      * given by a placeholder.
55      */

56     public void addSet(Column pColumn);
57     /** Adds a SET clause setting the given column to a value
58      * given by a placeholder.
59      */

60     public void addSet(Column.Name pColumn);
61     /** Adds a SET clause setting the given column to a value
62      * given by a placeholder.
63      */

64     public void addSet(String JavaDoc pColumn);
65     
66     /** Adds a SET clause setting the given column to the value
67      * <code>pValue<code>.
68      */

69     public void addSet(Column pColumn, byte pValue);
70     /** Adds a SET clause setting the given column to the value
71      * <code>pValue</code>.
72      */

73     public void addSet(Column.Name pColumn, byte pValue);
74     /** Adds a SET clause setting the given column to the value
75      * <code>pValue</code>.
76      */

77     public void addSet(String JavaDoc pColumn, byte pValue);
78
79     /** Adds a SET clause setting the given column to the value
80      * <code>pValue<code>.
81      */

82     public void addSet(Column pColumn, short pValue);
83     /** Adds a SET clause setting the given column to the value
84      * <code>pValue</code>.
85      */

86     public void addSet(Column.Name pColumn, short pValue);
87     /** Adds a SET clause setting the given column to the value
88      * <code>pValue</code>.
89      */

90     public void addSet(String JavaDoc pColumn, short pValue);
91     
92     /** Adds a SET clause setting the given column to the value
93      * <code>pValue<code>.
94      */

95     public void addSet(Column pColumn, int pValue);
96     /** Adds a SET clause setting the given column to the value
97      * <code>pValue</code>.
98      */

99     public void addSet(Column.Name pColumn, int pValue);
100     /** Adds a SET clause setting the given column to the value
101      * <code>pValue</code>.
102      */

103     public void addSet(String JavaDoc pColumn, int pValue);
104     
105     /** Adds a SET clause setting the given column to the value
106      * <code>pValue<code>.
107      */

108     public void addSet(Column pColumn, long pValue);
109     /** Adds a SET clause setting the given column to the value
110      * <code>pValue</code>.
111      */

112     public void addSet(Column.Name pColumn, long pValue);
113     /** Adds a SET clause setting the given column to the value
114      * <code>pValue</code>.
115      */

116     public void addSet(String JavaDoc pColumn, long pValue);
117     
118     
119     /** Adds a SET clause setting the given column to the value
120      * <code>pValue<code>.
121      */

122     public void addSet(Column pColumn, float pValue);
123     /** Adds a SET clause setting the given column to the value
124      * <code>pValue</code>.
125      */

126     public void addSet(Column.Name pColumn, float pValue);
127     /** Adds a SET clause setting the given column to the value
128      * <code>pValue</code>.
129      */

130     public void addSet(String JavaDoc pColumn, float pValue);
131     
132     /** Adds a SET clause setting the given column to the value
133      * TRUE or FALSE, depending on <code>pValue<code>.
134      */

135     public void addSet(Column pColumn, boolean pValue);
136     /** Adds a SET clause setting the given column to the value
137      * TRUE or FALSE, depending on <code>pValue<code>.
138      */

139     public void addSet(Column.Name pColumn, boolean pValue);
140     /** Adds a SET clause setting the given column to the value
141      * TRUE or FALSE, depending on <code>pValue<code>.
142      */

143     public void addSet(String JavaDoc pColumn, boolean pValue);
144     
145     /** Adds a SET clause setting the given column to the value
146      * <code>pValue<code>.
147      */

148     public void addSet(Column pColumn, String JavaDoc pValue);
149     /** Adds a SET clause setting the given column to the value
150      * <code>pValue</code>.
151      */

152     public void addSet(Column.Name pColumn, String JavaDoc pValue);
153     /** Adds a SET clause setting the given column to the value
154      * <code>pValue</code>.
155      */

156     public void addSet(String JavaDoc pColumn, String JavaDoc pValue);
157     
158     /** Adds a SET clause setting the given column to the datetime
159      * value <code>pValue<code>.
160      */

161     public void addSetDateTime(Column pColumn, Calendar JavaDoc pValue);
162     /** Adds a SET clause setting the given column to the datetime
163      * value <code>pValue</code>.
164      */

165     public void addSetDateTime(Column.Name pColumn, Calendar JavaDoc pValue);
166     /** Adds a SET clause setting the given column to the datetime
167      * value <code>pValue</code>.
168      */

169     public void addSetDateTime(String JavaDoc pColumn, Calendar JavaDoc pValue);
170     
171     /** Adds a SET clause setting the given column to the time value
172      * <code>pValue<code>. Shortcut for
173      * <code>addSet(getTable().newColumnReference(pColumn), pValue)</code>.
174      */

175     public void addSetTime(Column pColumn, Calendar JavaDoc pValue);
176     /** Adds a SET clause setting the given column to the time value
177      * <code>pValue</code>. Shortcut for
178      * <code>addSet(getTable().newColumnReference(pColumn), pValue)</code>.
179      */

180     public void addSetTime(Column.Name pColumn, Calendar JavaDoc pValue);
181     /** Adds a SET clause setting the given column to the time value
182      * <code>pValue</code>.
183      */

184     public void addSetTime(String JavaDoc pColumn, Calendar JavaDoc pValue);
185     
186     /** Adds a SET clause setting the given column to the date value
187      * <code>pValue<code>.
188      */

189     public void addSetDate(Column pColumn, Calendar JavaDoc pValue);
190     /** Adds a SET clause setting the given column to the date value
191      * <code>pValue</code>.
192      */

193     public void addSetDate(Column.Name pColumn, Calendar JavaDoc pValue);
194     /** Adds a SET clause setting the given column to the date value
195      * <code>pValue</code>.
196      */

197     public void addSetDate(String JavaDoc pColumn, Calendar JavaDoc pValue);
198     /** Adds a SET clause setting the given column to the given value.
199      * The value may be, for example, a subselect, a function, or a
200      * piece of raw SQL code.
201      */

202     public void addSet(Column pColumn, Object JavaDoc pObject);
203     /** Adds a SET clause setting the given column to the given value.
204      * The value may be, for example, a subselect, a function, or a
205      * piece of raw SQL code.
206      */

207     public void addSet(String JavaDoc pColumn, Object JavaDoc pObject);
208     /** Adds a SET clause setting the given column to the given value.
209      * The value may be, for example, a subselect, a function, or a
210      * piece of raw SQL code.
211      */

212     public void addSet(Column.Name pColumn, Object JavaDoc pObject);
213 }
214
Popular Tags