|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The List interface is a subinterface of the Collection interface. The List interface encapsulates the operations on a list.
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.
ListOfObject
Method Summary | |
void |
add(int index,
java.lang.Object obj)
Equivalent to the ODMG method void insert_element_before(). |
void |
append(List otherList)
Equivalent to the ODMG method void append(). |
List |
concat(List otherList)
Equivalent to the ODMG method List concat(). |
java.lang.Object |
get(int index)
Equivalent to the ODMG method any retrieve_element_at(). |
void |
put(int index,
java.lang.Object obj)
Equivalent to the ODMG method void replace-element_at(). |
java.lang.Object |
remove(int index)
Equivalent to the ODMG method void remove_element_at(). |
Methods inherited from interface com.odi.odmg.Collection |
add, contains, elements, existsElement, isEmpty, query, remove, select, selectElement, size |
Methods inherited from interface com.odi.IPersistent |
clearContents, flushContents, initializeContents, ODIgetRef, ODIgetState, ODIsetRef, ODIsetState |
Method Detail |
public void add(int index, java.lang.Object obj) throws java.lang.ArrayIndexOutOfBoundsException
index
- The position at which to add the object.obj
- The object to be added.
ObjectNotExportedException
- If the list and the
object being inserted are in different segments and the object is not
exported.ObjectNotPersistenceCapableException
- If the object is
not persistence-capable.java.lang.ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.public void put(int index, java.lang.Object obj) throws java.lang.ArrayIndexOutOfBoundsException
index
- The position at which to put the object.obj
- The object to be added.
ObjectNotExportedException
- If the list and the
object being inserted are in different segments and the object is not
exported.ObjectNotPersistenceCapableException
- If the object is
not persistence-capable.java.lang.ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.public java.lang.Object remove(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The position at which to remove the element.
java.lang.ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.public java.lang.Object get(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- The index of the object to be retrieved.
java.lang.ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.public List concat(List otherList)
otherList
- The list with which to form a concatenation.
public void append(List otherList)
otherList
- The list that you want to append to this list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |