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.


Constructor Index

 o CollectionOptions()
Creates a CollectionOptions instance with default values.
 o CollectionOptions(CollectionOptions)
Creates a CollectionOptions instance with the same values as another instance.

Method Index

 o getBehavior()
Gets the behavior option for a new collection.
 o getCard()
Gets the card option for a new collection.
 o getEstimatedSize()
Gets the estimatedSize option for a new collection.
 o getExport()
Gets the export option for a new collection.
 o getFill()
Gets the fill option for a new collection.
 o setBehavior(int)
Sets the behavior option.
 o setCard(int)
Sets the card option.
 o setEstimatedSize(int)
Sets the estimated size option.
 o setExport(boolean)
Sets the export option.
 o setFill(Object)
Sets the fill option.

Constructors

 o CollectionOptions
  public CollectionOptions()
Creates a CollectionOptions instance with default values.

 o CollectionOptions
  public CollectionOptions(CollectionOptions other)
Creates a CollectionOptions instance with the same values as another instance.

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o getBehavior
  public int getBehavior()
Gets the behavior option for a new collection.

Returns:
The behavior option.
 o 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.
 o getCard
  public int getCard()
Gets the card option for a new collection.

Returns:
The card option.
 o getExport
  public boolean getExport()
Gets the export option for a new collection.

Returns:
The export option.
 o 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.