KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > pss > generator > common > api > StorageTypeMapping


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Christophe Demarey.
23 Contributor(s): ________________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.pss.generator.common.api;
28
29 //Package dependencies
30
import org.objectweb.openccm.ast.api.StorageTypeDecl;
31 import org.objectweb.openccm.generator.common.api.GeneratorBase;
32 import org.objectweb.openccm.generator.common.lib.GenerationException;
33
34 /**
35  * Interface to get Mapping from PSDL Storage Types.
36  *
37  * @author <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</A>
38  *
39  * @version 0.1
40  */

41
42 public interface StorageTypeMapping
43 {
44     /**
45      * Set the Storage Type Declaration to map.
46      *
47      * @param st - The Storage Type Declaration to map.
48      */

49      public void
50      setStorageType(StorageTypeDecl st);
51
52     /**
53      * Get the list of all state members that will be mapped.
54      *
55      * @param generator - A base generator to get declarationss.
56      *
57      * @return The list of all state members.
58      **/

59     public java.util.List JavaDoc
60     getAllStates(GeneratorBase generator);
61
62     /**
63      * Get the list of all state members that will be mapped to native types.
64      *
65      * @param generator - A base generator to get declarationss.
66      *
67      * @return The list of all state members mapped to native types.
68      **/

69     public java.util.List JavaDoc
70     getStatesToNative(GeneratorBase generator);
71
72     /**
73      * Get the list of all state members that will be mapped to an IOR.
74      *
75      * @param generator - A base generator to get declarationss.
76      *
77      * @return The list of all state members mapped to an IOR.
78      **/

79     public java.util.List JavaDoc
80     getStatesToIOR(GeneratorBase generator);
81
82     /**
83      * Get the list of all state members that will be mapped to a byte array.
84      *
85      * @param generator - A base generator to get declarationss.
86      *
87      * @return The list of all state members mapped to a byte array.
88      **/

89     public java.util.List JavaDoc
90     getStatesToCodec(GeneratorBase generator);
91
92     /**
93      * Get the list of all state members that will be mapped to a byte array.
94      *
95      * @param generator - A base generator to get declarationss.
96      *
97      * @return The list of all state members mapped to a byte array.
98      **/

99     public java.util.List JavaDoc
100     getStatesToClass(GeneratorBase generator);
101
102     /**
103      * Generate a java persistent capable class for this storage type.
104      *
105      * @param storage_object - If true, generates mapping for a storage object.
106      * @param generator - The PSDL to Java generator.
107      */

108     public void
109     toJava(boolean storage_object,
110            PSDL2JavaGenerator generator)
111     throws GenerationException;
112 }
113
Popular Tags