1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.jdo.model.jdo;
19
20 import java.beans.PropertyChangeListener;
21 import java.beans.VetoableChangeListener;
22
23 import org.apache.jdo.model.ModelException;
24
25 /***
26 * This is the super interface for JDO metadata elements,
27 * such as JDOClass, JDOField and JDORelationship.
28 *
29 * @author Michael Bouschen
30 */
31 public interface JDOElement
32 {
33 /***
34 * Remove the supplied vendor extension from the collection of extensions
35 * maintained by this JDOElement.
36 * @exception ModelException if impossible
37 */
38 public void removeJDOExtension(JDOExtension vendorExtension)
39 throws ModelException;
40
41 /***
42 * Returns the collection of vendor extensions for this JDOElement
43 * in the form of an array.
44 * @return the vendor extensions for this JDOClass
45 */
46 public JDOExtension[] getJDOExtensions();
47
48 /***
49 * Creates a new JDOExtension instance and attaches it to the specified
50 * JDOElement object.
51 * @exception ModelException if impossible
52 */
53 public JDOExtension createJDOExtension()
54 throws ModelException;
55
56 /***
57 * Add a property change listener.
58 * @param l the listener to add
59 * @exception ModelException if impossible
60 */
61 public void addPropertyChangeListener(PropertyChangeListener l)
62 throws ModelException;
63
64 /***
65 * Remove a property change listener.
66 * @param l the listener to remove
67 * @exception ModelException if impossible
68 */
69 public void removePropertyChangeListener(PropertyChangeListener l)
70 throws ModelException;
71
72 /***
73 * Add a vetoable change listener.
74 * @param l the listener to add
75 * @exception ModelException if impossible
76 */
77 public void addVetoableChangeListener(VetoableChangeListener l)
78 throws ModelException;
79
80 /***
81 * Remove a vetoable change listener.
82 * @param l the listener to remove
83 * @exception ModelException if impossible
84 */
85 public void removeVetoableChangeListener(VetoableChangeListener l)
86 throws ModelException;
87
88 }