Interface COM.odi.odmg.Bag
- public interface Bag
- extends Collection
The Bag interface is a subinterface of the Collection interface.
This interface encapsulates the operations on a bag.
All methods in this interface throw the following exceptions:
COM.odi.odmg.TransactionNotInProgressException If there is no
transaction in progress.
COM.odi.ObjectStoreException If the current thread is not
associated with a transaction or if the current transaction is not
associated with the current thread.
Methods that modify persistent objects throw this exception:
COM.odi.odmg.DatabaseIsReadOnlyException If there is a readonly
transaction in progress or if the database is open for readonly.
- See Also:
- BagOfObject
-
difference(Bag)
- Eqivalent to the ODMG method create_difference().
-
intersection(Bag)
- Eqivalent to the ODMG method create_intersection().
-
occurences(Object)
- Indicates the number of instances of the specified object in
this bag.
-
union(Bag)
- Equivalent to the ODMG method create_union().
union
public abstract Bag union(Bag otherBag)
- Equivalent to the ODMG method create_union().
- Parameters:
- otherBag - The bag with which to form a union.
- Returns:
- The union between this bag and otherBag.
intersection
public abstract Bag intersection(Bag otherBag)
- Eqivalent to the ODMG method create_intersection().
- Parameters:
- otherBag - The bag with which to form an intersection.
- Returns:
- The intersection between this bag and otherBag.
difference
public abstract Bag difference(Bag otherBag)
- Eqivalent to the ODMG method create_difference().
- Parameters:
- otherBag - The bag with which to form a difference.
- Returns:
- The difference between this bag and otherBag.
occurences
public abstract int occurences(Object obj)
- Indicates the number of instances of the specified object in
this bag. There is no equivalent standard ODMG API.
- Parameters:
- obj - The object for which to determine the
number of instances in this bag.
- Returns:
- The number of instances of obj in this bag.
Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.