001    package org.apache.ojb.odmg;
002    
003    /* Copyright 2002-2005 The Apache Software Foundation
004     *
005     * Licensed under the Apache License, Version 2.0 (the "License");
006     * you may not use this file except in compliance with the License.
007     * You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    
018    
019    /**
020     * This interface defines the configurable setting of the ODMG
021     * layer.
022     * @author <a href="mailto:thma@apache.org">Thomas Mahler<a>
023     * @version $Id: OdmgConfiguration.java,v 1.1 2007-08-24 22:17:37 ewestfal Exp $
024     */
025    
026    public interface OdmgConfiguration
027    {
028            /**
029             * If true acquiring a write-lock on a given object x implies write 
030             * locks on all objects associated to x. 
031             * If false implicit read-locks are acquired.
032             */
033        public boolean lockAssociationAsWrites();
034        
035        /**
036         * This class is used to hold results of OQL queries.
037         * By default a DListImpl is used.
038         */
039        public Class getOqlCollectionClass();
040        
041        /**
042         * defines if implicit lock acquisition is to be used.
043         * If set to true OJB implicitely locks objects to ODMG
044         * transactions after performing OQL queries.
045         * If implicit locking is used locking objects is recursive, that is
046         * associated objects are also locked.
047         * If ImplicitLocking is set to false, no locks are obtained in OQL
048         * queries and there is also no recursive locking.
049         */
050        public boolean useImplicitLocking();
051    
052    }