01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.ojb.odmg.components;
18:
19: import org.apache.avalon.framework.component.Component;
20:
21: import org.odmg.Implementation;
22: import org.odmg.ODMGException;
23:
24: /**
25: * Interface component to the ODMG Implementation. It is used to get
26: * the ODMG Implementation object to interact with object database
27: * through ODMG API.
28: *
29: * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
30: * @version CVS $Id: ODMG.java 433543 2006-08-22 06:22:54Z crossley $
31: */
32: public interface ODMG extends Component {
33:
34: /** The ROLE */
35: String ROLE = ODMG.class.getName();
36:
37: /**
38: * Get a ODMG Instance with default settings.
39: *
40: * @return a ODMG Implementation Object
41: * @throws ODMGException DOCUMENT ME!
42: */
43: Implementation getInstance() 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 connection) throws ODMGException;
53:
54: /**
55: * Get a ODMG Instance with a specific connection definition and a Database operation mode.
56: *
57: * @param connection The connection name to be used (OJB specific connection name)
58: * @param mode The Database operation mode
59: * @return a ODMG Implementation Object
60: * @throws ODMGException DOCUMENT ME!
61: */
62: Implementation getInstance(String connection, int mode)
63: throws ODMGException;
64:
65: /**
66: * Get a ODMG Instance with a default connection definition and a Database operation mode.
67: *
68: * @param mode The Database operation mode
69: * @return a ODMG Implementation Object
70: * @throws ODMGException DOCUMENT ME!
71: */
72: Implementation getInstance(int mode) throws ODMGException;
73: }
|