KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cayenne > map > MappingNamespace


1 /*****************************************************************
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  ****************************************************************/

19
20 package org.apache.cayenne.map;
21
22 import java.util.Collection JavaDoc;
23
24 import org.apache.cayenne.query.Query;
25
26 /**
27  * Defines API of a container of DbEntities, ObjEntities, Procedures, Queries and other
28  * mapping objects.
29  *
30  * @since 1.1
31  * @author Andrus Adamchik
32  */

33 public interface MappingNamespace {
34
35     /**
36      * Returns an {@link Embeddable} matching class name or null if such Embeddable is not
37      * mapped.
38      *
39      * @since 3.0
40      */

41     Embeddable getEmbeddable(String JavaDoc className);
42
43     /**
44      * Returns an {@link EntityListener} matching class name or null if such
45      * EntityListener is not mapped.
46      *
47      * @since 3.0
48      */

49     EntityListener getEntityListener(String JavaDoc className);
50
51     /**
52      * Returns DbEntity for a given name, or null if no such DbEntity is found in the
53      * MappingNamespace.
54      */

55     DbEntity getDbEntity(String JavaDoc name);
56
57     /**
58      * Returns ObjEntity for a given name, or null if no such ObjEntity is found in the
59      * MappingNamespace.
60      */

61     ObjEntity getObjEntity(String JavaDoc name);
62
63     /**
64      * Returns Procedure for a given name, or null if no such Procedure is found in the
65      * MappingNamespace.
66      */

67     Procedure getProcedure(String JavaDoc name);
68
69     /**
70      * Returns Query for a given name, or null if no such Query is found in the
71      * MappingNamespace.
72      */

73     Query getQuery(String JavaDoc name);
74
75     /**
76      * Returns all DbEntities in the namespace.
77      */

78     Collection JavaDoc getDbEntities();
79
80     /**
81      * Returns all ObjEntities in the namespace.
82      */

83     Collection JavaDoc getObjEntities();
84
85     /**
86      * Returns all Procedures in the namespace.
87      */

88     Collection JavaDoc getProcedures();
89
90     /**
91      * Returns all Queries in the namespace.
92      */

93     Collection JavaDoc getQueries();
94 }
95
Popular Tags