Class COM.odi.coll.CollectionOptions
java.lang.Object
|
+----COM.odi.coll.CollectionOptions
- public class CollectionOptions
- extends Object
This class contains methods for specifying the behavior of an ObjectStore
collection.
An ObjectStore collection object is an instance of a Java peer object
that represents a persistent C++ collection. The options for a collection
specify its behavior (the constants for which are in
Collection),
its proposed cardinality (for an Array), its estimated size, whether
or not it is exported on creation, and the filler objects for empty slots
in an array.
You can use a CollectionOptions object as many times as you
want. You can alter it between uses. The collection creation
operation checks the contents of the CollectionOptions object,
but does not store any references to the CollectionOptions object.
The collection does not cache or copy the collection options object.
A CollectionOptions object is a regular transient Java object.
It is not a peer class or a persistence-capable class, so you do not
need to destroy instances of CollectionOptions. Instances
of CollectionOptions are garbage collected by the regular
Java garbage collector.
You cannot export regular Java peer objects. However, you can export
ObjectStore collection objects. They are a special kind of Java peer
object.
-
CollectionOptions()
- Creates a CollectionOptions instance with default values.
-
CollectionOptions(CollectionOptions)
- Creates a CollectionOptions instance with the same values as another
instance.
-
getBehavior()
- Gets the behavior option for a new collection.
-
getCard()
- Gets the card option for a new collection.
-
getEstimatedSize()
- Gets the estimatedSize option for a new collection.
-
getExport()
- Gets the export option for a new collection.
-
getFill()
- Gets the fill option for a new collection.
-
setBehavior(int)
- Sets the behavior option.
-
setCard(int)
- Sets the card option.
-
setEstimatedSize(int)
- Sets the estimated size option.
-
setExport(boolean)
- Sets the export option.
-
setFill(Object)
- Sets the fill option.
CollectionOptions
public CollectionOptions()
- Creates a CollectionOptions instance with default values.
CollectionOptions
public CollectionOptions(CollectionOptions other)
- Creates a CollectionOptions instance with the same values as another
instance.
setBehavior
public CollectionOptions setBehavior(int behavior)
- Sets the behavior option. The behavior constants for a collection are
in Collection.
- Parameters:
- behavior - The behavior option for a new collection.
setEstimatedSize
public CollectionOptions setEstimatedSize(int estimatedSize)
- Sets the estimated size option. It indicates what the probable size of
a collection will be.
- Parameters:
- estimatedSize - The probable size of a collection.
setCard
public CollectionOptions setCard(int card)
- Sets the card option. This option should only be used for an Array.
It indicates what the initial size of an Array will be.
- Parameters:
- card - The initial size of the Array.
setExport
public CollectionOptions setExport(boolean export)
- Sets the export option. If this option is true, the collection is
exported on creation. If this option is false, the collection is not
exported on creation and it is left to the user to export the collection
later. It is more efficient to export the collection on creation.
- Parameters:
- export - Whether this collection will be exported on
creation or not.
setFill
public CollectionOptions setFill(Object fill)
- Sets the fill option. This option should only be used for an Array.
It specifies the filler object for empty slots in an array.
- Parameters:
- fill - The object to fill the array with.
getBehavior
public int getBehavior()
- Gets the behavior option for a new collection.
- Returns:
- The behavior option.
getEstimatedSize
public int getEstimatedSize()
- Gets the estimatedSize option for a new collection. This method has
package access because only NewCollection needs to access this option
when creating a new collection.
- Returns:
- The estimatedSize option.
getCard
public int getCard()
- Gets the card option for a new collection.
- Returns:
- The card option.
getExport
public boolean getExport()
- Gets the export option for a new collection.
- Returns:
- The export option.
getFill
public Object getFill()
- Gets the fill option for a new collection.
- Returns:
- The fill option.
Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.