001 package org.apache.ojb.broker.core.proxy;
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 * Interface which Collection proxies need to implement to be
020 * treated like collection proxies in ODMG.
021 * <p>
022 * Presently the collection proxy impl class can be plugged in and
023 * not implement this interface, but those implementations will
024 * *not* be treated as proxies by OJB
025 */
026 public interface CollectionProxy
027 {
028 /**
029 * Adds a listener to this collection.
030 *
031 * @param listener The listener to add
032 */
033 void addListener(CollectionProxyListener listener);
034
035 /**
036 * Removes the given listener from this collecton.
037 *
038 * @param listener The listener to remove
039 */
040 void removeListener(CollectionProxyListener listener);
041
042 /**
043 * Determines whether the collection data already has been loaded from the database.
044 *
045 * @return <code>true</code> if the data is already loaded
046 */
047 public boolean isLoaded();
048 }