Class COM.odi.coll.NewCollection

java.lang.Object
   |
   +----COM.odi.coll.NewCollection

public class NewCollection
extends Object
This class contains static methods to create various kinds of collections. This is an all-static class; it is never instantiated and exists only for name scoping.

When you create a collection, it has certain behaviors. These behaviors are described in Chapter 7 of the API User Guide. There is also a discussion there of which kinds of collections can have which behaviors. When you create a collection, you can accept the default behavior or you can pass a CollectionOptions object that specifies other behavior.

An ObjectStore collection object is an instance of a Java peer object that represents a persistent C++ collection. You cannot use the NewCollection methods to create transient collections.

You cannot export regular Java peer objects. However, you can export ObjectStore collection objects. They are a special kind of Java peer objects.


Method Index

 o createArray(Placement)
Creates and returns a new Array.
 o createArray(Placement, CollectionOptions)
Creates and returns a new Array.
 o createArray(Placement, int)
Deprecated.
 o createArray(Placement, int, int)
Deprecated.
 o createArray(Placement, int, int, int, Object)
Deprecated.
 o createBag(Placement)
Creates and returns a new bag.
 o createBag(Placement, CollectionOptions)
Creates and returns a new Bag.
 o createBag(Placement, int)
Deprecated.
 o createBag(Placement, int, int)
Deprecated.
 o createDictionary_int(Placement)
Creates and returns a new dictionary that can contain keys of type int.
 o createDictionary_int(Placement, CollectionOptions)
Creates and returns a new dictionary that can contain keys of type int, with the specified collection options.
 o createDictionary_int(Placement, int)
Deprecated.
 o createDictionary_int(Placement, int, int)
Deprecated.
 o createDictionary_String(Placement)
Creates and returns a new dictionary that can contain keys of type String.
 o createDictionary_String(Placement, CollectionOptions)
Creates and returns a new dictionary that can contain keys of type String, with the specified collection options.
 o createDictionary_String(Placement, int)
Deprecated.
 o createDictionary_String(Placement, int, int)
Deprecated.
 o createList(Placement)
Creates and returns a new List.
 o createList(Placement, CollectionOptions)
Creates and returns a new List.
 o createList(Placement, int)
Deprecated.
 o createList(Placement, int, int)
Deprecated.
 o createSet(Placement)
Creates and returns a new set.
 o createSet(Placement, CollectionOptions)
Creates and returns a new Set.
 o createSet(Placement, int)
Deprecated.
 o createSet(Placement, int, int)
Deprecated.

Methods

 o createSet
  public static Set createSet(Placement placement)
Creates and returns a new set.

Parameters:
placement - The segment or database in which to create the set.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createSet
  public static Set createSet(Placement placement,
                              CollectionOptions ops)
Creates and returns a new Set.

Parameters:
placement - The segment or database in which to create the Set.
ops - The CollectionOptions instance used for creating this Set.

Returns:
The new Set.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createSet
  public static Set createSet(Placement placement,
                              int behavior)
Note: createSet() is deprecated. Creates and returns a new set with the specified behavior.

Parameters:
placement - The segment or database in which to create the set.

behavior - Behavior flags.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createSet
  public static Set createSet(Placement placement,
                              int behavior,
                              int estimatedSize)
Note: createSet() is deprecated. Creates and returns a new set with the specified behavior and estimated size.

Parameters:
placement - The segment or database in which to create the set.

behavior - Behavior flags.

estimatedSize - The number of elements the set is expected to contain.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createBag
  public static Bag createBag(Placement placement)
Creates and returns a new bag.

Parameters:
placement - The segment or database in which to create the bag.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createBag
  public static Bag createBag(Placement placement,
                              CollectionOptions ops)
Creates and returns a new Bag.

Parameters:
placement - The segment or database in which to create the Bag.
ops - The CollectionOptions instance used for creating this Bag.

Returns:
The new Bag.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createBag
  public static Bag createBag(Placement placement,
                              int behavior)
Note: createBag() is deprecated. Creates and returns a new bag with the specified behavior.

Parameters:
placement - The segment or database in which to create the bag.

behavior - Behavior flags.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createBag
  public static Bag createBag(Placement placement,
                              int behavior,
                              int estimatedSize)
Note: createBag() is deprecated. Creates and returns a new bag with the specified behavior and estimated size.

Parameters:
placement - The segment or database in which to create the bag.

behavior - Behavior flags.

estimatedSize - The number of elements the bag is expected to contain.
Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createList
  public static List createList(Placement placement)
Creates and returns a new List.

Parameters:
placement - The segment or database in which to create the list.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createList
  public static List createList(Placement placement,
                                CollectionOptions ops)
Creates and returns a new List.

Parameters:
placement - The segment or database in which to create the List.
ops - The CollectionOptions instance used for creating this List.

Returns:
The new List.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createList
  public static List createList(Placement placement,
                                int behavior)
Note: createList() is deprecated. Creates and returns a new list with the specified behavior.

Parameters:
placement - The segment or database in which to create the list.

behavior - Behavior flags.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createList
  public static List createList(Placement placement,
                                int behavior,
                                int estimatedSize)
Note: createList() is deprecated. Creates and returns a new list with the specified behavior and estimated size.

Parameters:
placement - The segment or database in which to create the list.

behavior - Behavior flags.

estimatedSize - The number of elements the list is expected to contain.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createArray
  public static Array createArray(Placement placement)
Creates and returns a new Array.

Parameters:
placement - The segment or database in which to create the array.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createArray
  public static Array createArray(Placement placement,
                                  CollectionOptions ops)
Creates and returns a new Array.

Parameters:
placement - The segment or database in which to create the Array.
ops - The CollectionOptions instance used for creating this Array.

Returns:
The new Array.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createArray
  public static Array createArray(Placement placement,
                                  int behavior)
Note: createArray() is deprecated. Creates and returns a new array with the specified behavior.

Parameters:
placement - The segment or database in which to create the array.

behavior - Behavior flags.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createArray
  public static Array createArray(Placement placement,
                                  int behavior,
                                  int estimatedSize)
Note: createArray() is deprecated. Creates and returns a new array with the specified behavior and estimated size.

Parameters:
placement - The segment or database in which to create the array.

behavior - Behavior flags.

estimatedSize - The number of elements the array is expected to contain.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createArray
  public static Array createArray(Placement placement,
                                  int behavior,
                                  int estimatedSize,
                                  int card,
                                  Object fill)
Note: createArray() is deprecated. Creates and returns a new array with the specified behavior, estimated size, cardinality, and initial element.

Parameters:
placement - The segment or database in which to create the array.

behavior - Behavior flags.

estimatedSize - The number of elements the array is expected to contain.

card - The initial number of elements in the array.

fill - The object to insert in each element of the array. It is card number of elements that will be inserted.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_int
  public static Dictionary_int createDictionary_int(Placement placement)
Creates and returns a new dictionary that can contain keys of type int.

Parameters:
placement - The segment or database in which to create the dictionary.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_int
  public static Dictionary_int createDictionary_int(Placement placement,
                                                    CollectionOptions ops)
Creates and returns a new dictionary that can contain keys of type int, with the specified collection options.

Parameters:
placement - The segment or database in which to create the dictionary.
ops - The CollectionOptions instance used for creating this Set.

Returns:
The new Dictionary_int.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_int
  public static Dictionary_int createDictionary_int(Placement placement,
                                                    int estimatedSize)
Note: createDictionary_int() is deprecated. Creates and returns a new dictionary that can contain keys of type int, with the specified estimated size.

Parameters:
placement - The segment or database in which to create the dictionary.
estimatedSize - The number of elements the dictionary is expected to contain.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_int
  public static Dictionary_int createDictionary_int(Placement placement,
                                                    int estimatedSize,
                                                    int behavior)
Note: createDictionary_int() is deprecated. Creates and returns a new dictionary that can contain keys of type int, with the specified behavior and estimated size. The legal dictionary behavior flags are SIGNAL_DUP_KEYS, DONT_MAINTAIN_CARDINALITY, and PICK_FROM_EMPTY_RETURNS_NULL.

Parameters:
placement - The segment or database in which to create the dictionary.

estimatedSize - The number of elements the dictionary is expected to contain.

behavior - Dictionary behavior flags.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_String
  public static Dictionary_String createDictionary_String(Placement placement)
Creates and returns a new dictionary that can contain keys of type String.

Parameters:
placement - The segment or database in which to create the dictionary.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_String
  public static Dictionary_String createDictionary_String(Placement placement,
                                                          CollectionOptions ops)
Creates and returns a new dictionary that can contain keys of type String, with the specified collection options.

Parameters:
placement - The segment or database in which to create the dictionary.
ops - The CollectionOptions instance used for creating this Set.

Returns:
The new Dictionary_String.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_String
  public static Dictionary_String createDictionary_String(Placement placement,
                                                          int estimatedSize)
Note: createDictionary_String() is deprecated. Creates and returns a new dictionary that can contain keys of type String, with the specified estimated size.

Parameters:
placement - The segment or database in which to create the dictionary.

estimatedSize - The number of elements the dictionary is expected to contain.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.
 o createDictionary_String
  public static Dictionary_String createDictionary_String(Placement placement,
                                                          int estimatedSize,
                                                          int behavior)
Note: createDictionary_String() is deprecated. Creates and returns a new dictionary that can contain keys of type String, with the specified behavior and estimated size. The legal dictionary behavior flags are SIGNAL_DUP_KEYS, DONT_MAINTAIN_CARDINALITY, and PICK_FROM_EMPTY_RETURNS_NULL.

Parameters:
placement - The segment or database in which to create the dictionary.

estimatedSize - The number of elements the dictionary is expected to contain.

behavior - Dictionary behavior flags.

Returns:
The new collection.

Throws: SegmentException
If the placement argument is the transient segment or the transient database.

Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.