KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > commonj > sdo > Property


1 /**
2  * <copyright>
3  *
4  * Service Data Objects
5  * Version 1.0
6  * Licensed Materials - Property of BEA and IBM
7  *
8  * (c) Copyright BEA Systems, Inc. and International Business Machines Corp 2003. All rights reserved.
9  *
10  * </copyright>
11  *
12  * $Id: Property.java,v 1.1 2004/03/26 15:24:15 marcelop Exp $
13  */

14 package commonj.sdo;
15
16 /**
17  * A representation of a property in the {@link Type type} of a {@link DataObject data object}.
18  */

19 public interface Property
20 {
21   /**
22    * Returns the name of the property.
23    * @return the property name.
24    */

25   String JavaDoc getName();
26   
27   /**
28    * Returns the type of the property.
29    * @return the type.
30    */

31   Type getType();
32   
33   /**
34    * Returns whether the property is many-valued.
35    * @return <code>true</code> if the property is many-valued.
36    */

37   boolean isMany();
38   
39   /**
40    * Returns whether the property is containment, i.e., whether it represents by-value composition.
41    * @return <code>true</code> if the property is containment.
42    */

43   boolean isContainment();
44   
45   /**
46    * Returns the containing type of this property.
47    * @return the property's containing type.
48    * @see Type#getProperties()
49    */

50   Type getContainingType();
51
52   /**
53    * Returns the default value this property will have in a {@link DataObject data object} where the property hasn't been set.
54    * @return the default value.
55    */

56   Object JavaDoc getDefault();
57 }
58
Popular Tags