KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > api > PClassMappingCtrl


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.api;
25
26 import org.objectweb.jorm.type.api.PExceptionTyping;
27 import org.objectweb.jorm.naming.api.PNameCoder;
28
29 /**
30  * @author P. Dechamboux
31  */

32 public interface PClassMappingCtrl {
33     /**
34      * It assigns the PNameCoder used to manage the references hold by a
35      * generic class instance whose mapping is described by this PClassMapping.
36      * It should verify that the name structure for this reference is supported
37      * by the corresponding naming context.
38      * @param pnc The PNameCoder to be associated to this generic class
39      * PClassMapping for managing its reference elements.
40      * @exception PExceptionTyping It is raised when the structure of the
41      * the names that reference the DSI stored
42      * within the generic class instance is not
43      * supported by this naming context.
44      * @exception UnsupportedOperationException It is raised when this
45      * PClassMapping does not map
46      * a generic class instance, or
47      * when the elements of this
48      * generic class instance are
49      * not references.
50      */

51     void setPNameCoder(PNameCoder pnc)
52             throws PException, UnsupportedOperationException JavaDoc;
53
54     /**
55      * It assigns the PNameCoder used to manage the reference hold by a
56      * field whose type is a JORM class.
57      * It should verify that the name structure for this reference is supported
58      * by the corresponding naming context.
59      * @param fn The name of the involved field.
60      * @param pnc The PNameCoder to be associated to this field for
61      * managing the reference it may hold.
62      * @exception PExceptionTyping It is raised when the structure of the
63      * the names that reference the DSI stored
64      * within the generic class instance is not
65      * supported by this naming context.
66      * @exception UnsupportedOperationException It is raised when no naming
67      * context is associated to
68      * the corresponding field.
69      */

70     void setPNameCoder(String JavaDoc fn, PNameCoder pnc)
71             throws PException, UnsupportedOperationException JavaDoc;
72
73     /**
74      * It assigns the PNameCoder to use for the class. This PNamingContext
75      * manages also the sub classes.
76      */

77     void setClassPNameCoder(PNameCoder pnc) throws PException;
78
79     /**
80      * It assigns the GenClassMapping used to manage the reference hold by a
81      * field whose type is a JORM gen class.
82      */

83     void setGenClassMapping(PClassMapping pcm)
84             throws UnsupportedOperationException JavaDoc;
85
86     /**
87      * It assigns the GenClassMapping used to manage the reference hold by a
88      * field whose type is a JORM class.
89      */

90     void setGenClassMapping(String JavaDoc fn, PClassMapping pcm)
91             throws UnsupportedOperationException JavaDoc;
92
93     /**
94      * Assignes the project name to a PClassMapping.
95      * @param projectname to be assigned
96      */

97     void setProjectName(String JavaDoc projectname);
98 }
99
Popular Tags