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