Interface COM.odi.odmg.VArray
- public interface VArray
- extends Collection
The VArray interface is a subinterface of the Collection
interface. The VArray interface encapsulates the operations on a resizeable array.
All methods 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 instance in question 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:
- VArrayOfObject
-
add(int, Object)
- Equivalent to the ODMG method void insert_element_before().
-
get(int)
- Equivalent to the ODMG method any retrieve_element_at().
-
put(int, Object)
- Equivalent to the ODMG method void replace-element_at().
-
remove(int)
- Equivalent to the ODMG method void remove_element_at().
-
resize(int)
- Equivalent to the ODMG method Array concat().
add
public abstract void add(int index,
Object obj) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method void insert_element_before().
- Parameters:
- index - The position at which to add the object.
- obj - The object to add to the array.
- Throws: ObjectNotExportedException
- If the array and the
object being inserted are in different segments and the object is not
exported.
- Throws: ObjectNotPersistenceCapableException
- If the object is
not persistence-capable.
put
public abstract void put(int index,
Object obj) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method void replace-element_at().
- Parameters:
- index - The position at which to put the object.
- obj - The object to put in the array.
- Throws: ObjectNotExportedException
- If the array and the
object being inserted are in different segments and the object is not
exported.
- Throws: ObjectNotPersistenceCapableException
- If the object is
not persistence-capable.
- Throws: ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.
remove
public abstract Object remove(int index) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method void remove_element_at().
- Parameters:
- index - The index of the object to be removed.
- Returns:
- Returns the object that was successfully removed.
- Throws: ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.
get
public abstract Object get(int index) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method any retrieve_element_at().
- Parameters:
- index - The position of the object to retrieve.
- Returns:
- Returns the object at the specified position.
- Throws: ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.
resize
public abstract void resize(int newSize)
- Equivalent to the ODMG method Array concat().
- Parameters:
- newSize - The new size of the array after the resize.
Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.