01: package org.odmg;
02:
03: /**
04: * This exception is thrown when attempting to bind a name to an object
05: * when the name is already bound to another object.
06: * @author David Jordan (as Java Editor of the Object Data Management Group)
07: * @version ODMG 3.0
08: * @see org.odmg.Database#bind
09: */
10:
11: public class ObjectNameNotUniqueException extends ODMGException {
12: /**
13: * Construct an instance of the exception.
14: */
15: public ObjectNameNotUniqueException() {
16: super ();
17: }
18:
19: /**
20: * Construct an instance of the exception with a descriptive message.
21: * @param msg A message containing a description of the exception.
22: */
23: public ObjectNameNotUniqueException(String msg) {
24: super (msg);
25: }
26: /*
27: private Object o;
28: private String n;
29: public ObjectNameNotUniqueException(Object obj, String name)
30: {
31: super();
32: o = obj;
33: n = name;
34: }
35:
36:
37: * Get the object that was passed to Database.bind.
38: * @return The object that was being bound to a name.
39:
40: public Object getObject()
41: {
42: return o;
43: }
44:
45:
46: * Get the name that is not unique.
47: * @return The name that is already associated with another object.
48:
49: public String getName()
50: {
51: return n;
52: }
53: */
54: }
|