KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > ojb > odmg > components > ODMG


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

16 package org.apache.cocoon.ojb.odmg.components;
17
18 import org.apache.avalon.framework.component.Component;
19
20 import org.odmg.Implementation;
21 import org.odmg.ODMGException;
22
23 /**
24  * Interface component to the ODMG Implementation. It is used to get
25  * the ODMG Implementation object to interact with object database
26  * through ODMG API.
27  *
28  * @author <a HREF="mailto:giacomo@apache.org">Giacomo Pati</a>
29  * @version CVS $Id: ODMG.java 155366 2005-02-25 19:54:12Z vgritsenko $
30  */

31 public interface ODMG extends Component {
32
33     /** The ROLE */
34     String JavaDoc ROLE = ODMG.class.getName();
35
36     /**
37      * Get a ODMG Instance with default settings.
38      *
39      * @return a ODMG Implementation Object
40      * @throws ODMGException DOCUMENT ME!
41      */

42     Implementation getInstance()
43     throws ODMGException;
44
45     /**
46      * Get a ODMG Instance with a specific connection definition.
47      *
48      * @param connection The connection name to be used (OJB specific connection name)
49      * @return a ODMG Implementation Object
50      * @throws ODMGException DOCUMENT ME!
51      */

52     Implementation getInstance(String JavaDoc connection)
53     throws ODMGException;
54
55     /**
56      * Get a ODMG Instance with a specific connection definition and a Database operation mode.
57      *
58      * @param connection The connection name to be used (OJB specific connection name)
59      * @param mode The Database operation mode
60      * @return a ODMG Implementation Object
61      * @throws ODMGException DOCUMENT ME!
62      */

63     Implementation getInstance(String JavaDoc connection, int mode)
64     throws ODMGException;
65
66     /**
67      * Get a ODMG Instance with a default connection definition and a Database operation mode.
68      *
69      * @param mode The Database operation mode
70      * @return a ODMG Implementation Object
71      * @throws ODMGException DOCUMENT ME!
72      */

73     Implementation getInstance(int mode)
74     throws ODMGException;
75 }
76
Popular Tags