View Javadoc

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