KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > metainfo > api > CompositeName


1 /**
2  * JORM: an implementation of a generic mapping system for persistent Java
3  * objects. Two mapping are supported: to RDBMS and to binary files.
4  * Copyright (C) 2001-2003 France Telecom R&D - INRIA
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * Contact: jorm-team@objectweb.org
21  *
22  */

23
24 package org.objectweb.jorm.metainfo.api;
25
26 import org.objectweb.jorm.type.api.PType;
27
28 import java.util.Iterator JavaDoc;
29 import java.util.Collection JavaDoc;
30
31
32 /**
33  * The CompositeName interface defines methods to manage composite name.
34  * Composite Name are used to define composite pname.
35  * Composite Name defines the multiple fields describing the structure os a name.
36  * @author N. De Palma
37  */

38 public interface CompositeName extends MetaObject {
39     /**
40      * Allows to know the name of the current CompositeName object.
41      * @return the string representation of the name of the CompositeName
42      */

43     String JavaDoc getName();
44
45     /**
46      * Allows to know the fully qualifed name of the current CompositeName object.
47      * @return the string representation of the name of the CompositeName
48      */

49     String JavaDoc getFQName();
50
51     /**
52      * Add an inherited composite name to the current composite name.
53      * @param cn the name of the composite name to be inherited.
54      */

55     void addInheritedCompositeName(CompositeName cn);
56
57     /**
58      * @deprecated use getSuperCompositeNames()
59      */

60     Iterator JavaDoc iterateInheritedCompositeName();
61
62     /**
63      * Provides an iterator over all the composite name inherited by the current composite name.
64      * @return the iterator embeding inherited composite name objects.
65      */

66     Collection JavaDoc getSuperCompositeNames();
67
68
69     /**
70      * Retrieve an inherited composite name form its name.
71      * @param name the name of the composite name
72      * @return the composite name
73      */

74     CompositeName getInheritedCompositeName(String JavaDoc name);
75
76     /**
77      * Retrieve a scalarfield describing the field identified by it name in the current compositename.
78      * @param fieldname the name of the field.
79      * @return the scalarfield describing the field.
80      */

81     ScalarField getScalarField(String JavaDoc fieldname);
82
83     /**
84      * Returns the number of inherited composite name for the current composite name object.
85      * @return the number of inherited compositename.
86      */

87     int getInheritedCompositeNameNumber();
88
89     /**
90      * Build a new scalarfield that describes a field in the composite name
91      * @param fieldname the name of the field
92      * @param type the ptype of the field
93      * @return the scalarfield
94      */

95     ScalarField createCompositeNameField(String JavaDoc fieldname, PType type, int size, int scale);
96
97     /**
98      * Give the number of fields composing the current composite name.
99      * @return the fields number.
100      */

101     int getFieldNumber();
102
103     /**
104      * @deprecated use getFields().
105      */

106     Iterator JavaDoc iterateField();
107
108     /**
109      * Provides an iterator over the field of the current composite name.
110      * @return the iterator embeding scalarfield object
111      */

112     Collection JavaDoc getFields();
113
114     /**
115      * @deprecated use getAllFields().
116      */

117     Iterator JavaDoc iterateAllField();
118
119     /**
120      * Provides an iterator over the field of the current composite name including the inherited fields.
121      * @return the iterator embeding scalarfield object
122      */

123     Collection JavaDoc getAllFields();
124 }
125
Popular Tags