001 package org.odmg;
002
003
004
005 /**
006
007 * This exception is thrown when attempting to bind a name to an object
008
009 * when the name is already bound to another object.
010
011 * @author David Jordan (as Java Editor of the Object Data Management Group)
012
013 * @version ODMG 3.0
014
015 * @see org.odmg.Database#bind
016
017 */
018
019
020
021 public class ObjectNameNotUniqueException extends ODMGException
022
023 {
024
025 /*
026
027 private Object o;
028
029 private String n;
030
031 public ObjectNameNotUniqueException(Object obj, String name)
032
033 {
034
035 super();
036
037 o = obj;
038
039 n = name;
040
041 }
042
043
044
045
046
047 * Get the object that was passed to Database.bind.
048
049 * @return The object that was being bound to a name.
050
051
052
053 public Object getObject()
054
055 {
056
057 return o;
058
059 }
060
061
062
063
064
065 * Get the name that is not unique.
066
067 * @return The name that is already associated with another object.
068
069
070
071 public String getName()
072
073 {
074
075 return n;
076
077 }
078
079 */
080
081 /*
082
083 private Object o;
084
085 private String n;
086
087 public ObjectNameNotUniqueException(Object obj, String name)
088
089 {
090
091 super();
092
093 o = obj;
094
095 n = name;
096
097 }
098
099
100
101
102
103 * Get the object that was passed to Database.bind.
104
105 * @return The object that was being bound to a name.
106
107
108
109 public Object getObject()
110
111 {
112
113 return o;
114
115 }
116
117
118
119
120
121 * Get the name that is not unique.
122
123 * @return The name that is already associated with another object.
124
125
126
127 public String getName()
128
129 {
130
131 return n;
132
133 }
134
135 */
136
137 /*
138
139 private Object o;
140
141 private String n;
142
143 public ObjectNameNotUniqueException(Object obj, String name)
144
145 {
146
147 super();
148
149 o = obj;
150
151 n = name;
152
153 }
154
155
156
157
158
159 * Get the object that was passed to Database.bind.
160
161 * @return The object that was being bound to a name.
162
163
164
165 public Object getObject()
166
167 {
168
169 return o;
170
171 }
172
173
174
175
176
177 * Get the name that is not unique.
178
179 * @return The name that is already associated with another object.
180
181
182
183 public String getName()
184
185 {
186
187 return n;
188
189 }
190
191 */
192
193 /**
194
195 * Construct an instance of the exception.
196
197 */
198
199 public ObjectNameNotUniqueException()
200
201 {
202
203 super();
204
205 }
206
207
208
209 /**
210
211 * Construct an instance of the exception with a descriptive message.
212
213 * @param msg A message containing a description of the exception.
214
215 */
216
217 public ObjectNameNotUniqueException(String msg)
218
219 {
220
221 super(msg);
222
223 }
224
225 /*
226
227 private Object o;
228
229 private String n;
230
231 public ObjectNameNotUniqueException(Object obj, String name)
232
233 {
234
235 super();
236
237 o = obj;
238
239 n = name;
240
241 }
242
243
244
245
246
247 * Get the object that was passed to Database.bind.
248
249 * @return The object that was being bound to a name.
250
251
252
253 public Object getObject()
254
255 {
256
257 return o;
258
259 }
260
261
262
263
264
265 * Get the name that is not unique.
266
267 * @return The name that is already associated with another object.
268
269
270
271 public String getName()
272
273 {
274
275 return n;
276
277 }
278
279 */
280
281 }
282