KickJava   Java API By Example, From Geeks To Geeks.

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


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.util.monolog.api.Logger;
27
28 import java.util.Collection JavaDoc;
29
30 /**
31  * Defines the way to access the map clusters used to define and instanciate
32  * the mapping structures.
33  * @author P. Dechamboux
34  */

35 public interface PMappingStructuresManager {
36
37     /**
38      * Declares a persistent class. This call crerates the PMapCluster.
39      * @param jcname
40      */

41     void declareClass(String JavaDoc jcname);
42
43     /**
44      * Asks for the map cluster associated with a JORM class.
45      * @param jcname The JORM class name.
46      * @return The relevant map cluster.
47      * @throws PException This class has not been mapped.
48      */

49     PMapCluster getPMapCluster(String JavaDoc jcname) throws PException;
50
51     /**
52      * Asks for all the map clusters defined within this mapper.
53      * @return The Iterator over the collection of map clusters.
54      */

55     Collection JavaDoc getPMapClusters();
56
57     /**
58      * Adds a dependency between a defined class and another class.
59      * @param jcname1 is the class name of a defined class
60      * @param jcname2 is the name of the class which the first depends on it.
61      * @throws PException if the first jorm class name is not defined (no
62      * cluster found)
63      */

64     void addDependency(String JavaDoc jcname1, String JavaDoc jcname2) throws PException;
65
66     /**
67      * Indicates that a jorm class is defined.
68      * @param jcname which is defined.
69      */

70     void classDefined(String JavaDoc jcname) throws PException;
71
72     /**
73      * Assigns a mapper to this schema manager.
74      * @param pm The concerned mapper.
75      */

76     void setPMapper(PMapper pm);
77
78     /**
79      * Assigns a logger to this schema manager.
80      * @param l The concerned logger.
81      */

82     void setLogger(Logger l);
83 }
84
Popular Tags