|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.apache.ojb.odmg.collections.DListImpl
Insert the type's description here. Creation date: (10.02.2001 20:50:26)
Field Summary | |
protected PBKey |
pbKey
PBKey this DList belongs to. |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
DListImpl()
DListImpl constructor comment. |
|
DListImpl(int theId,
int theSize)
DListImpl constructor comment. |
|
DListImpl(PBKey pbKey)
DListImpl constructor comment. |
Method Summary | |
void |
add(int index,
java.lang.Object element)
Inserts the specified element at the specified position in this list (optional operation). |
void |
afterStore(PersistenceBroker broker)
A callback method to implement 'removal-aware' (track removed objects and delete them by its own) collection implementations. |
DList |
concat(DList otherList)
Creates a new DList object that contains the contents of this
DList object concatenated
with the contents of the otherList object. |
boolean |
existsElement(java.lang.String predicate)
Determines whether there is an element of the collection that evaluates to true for the predicate. |
protected int |
generateNewId()
return a unique id for PK |
java.lang.Object |
get(int index)
Returns the element at the specified position in this list. |
java.util.Vector |
getElements()
Insert the method's description here. |
int |
getId()
Lazily return the Id, no point in precomputing it. |
PBKey |
getPBKey()
|
int |
getSize()
Gets the size. |
java.util.Iterator |
iterator()
Returns an iterator over the elements in this collection. |
java.util.ListIterator |
listIterator()
Returns a list iterator of the elements in this list (in proper sequence). |
java.util.ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. |
void |
ojbAdd(java.lang.Object anObject)
add a single Object to the Collection. |
void |
ojbAddAll(ManageableCollection otherCollection)
adds a Collection to this collection. |
java.util.Iterator |
ojbIterator()
returns an Iterator over all elements in the collection. |
DCollection |
query(java.lang.String predicate)
Evaluate the boolean query predicate for each element of the collection and return a new collection that contains each element that evaluated to true. |
java.lang.Object |
remove(int index)
Removes the element at the specified position in this list (optional operation). |
void |
resize(int newSize)
Resize the array to have newSize elements. |
java.util.Iterator |
select(java.lang.String predicate)
Access all of the elements of the collection that evaluate to true for the provided query predicate. |
java.lang.Object |
selectElement(java.lang.String predicate)
Selects the single element of the collection for which the provided OQL query predicate is true. |
void |
setElements(java.util.Vector elements)
Sets the elements. |
void |
setId(int id)
Sets the id. |
void |
setPBKey(PBKey pbKey)
|
void |
setSize(int size)
Sets the size. |
int |
size()
Returns the number of elements in this collection. |
Methods inherited from class java.util.AbstractList |
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from interface java.util.List |
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, remove, removeAll, retainAll, set, subList, toArray, toArray |
Field Detail |
protected PBKey pbKey
Constructor Detail |
public DListImpl()
public DListImpl(PBKey pbKey)
public DListImpl(int theId, int theSize)
Method Detail |
public PBKey getPBKey()
public void setPBKey(PBKey pbKey)
public void add(int index, java.lang.Object element)
add
in interface java.util.List
index
- index at which the specified element is to be inserted.element
- element to be inserted.
java.lang.UnsupportedOperationException
- if the add method is not
supported by this list.
java.lang.ClassCastException
- if the class of the specified element
prevents it from being added to this list.
java.lang.IllegalArgumentException
- if some aspect of the specified
element prevents it from being added to this list.
java.lang.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index > size()).public java.lang.Object remove(int index)
This implementation always throws an UnsupportedOperationException.
remove
in interface java.util.List
index
- the index of the element to remove.
java.lang.UnsupportedOperationException
- if the remove method is
not supported by this list.
java.lang.IndexOutOfBoundsException
- if the specified index is out of
range (index < 0 || index >= size()).public DList concat(DList otherList)
DList
object that contains the contents of this
DList
object concatenated
with the contents of the otherList
object.
concat
in interface DList
otherList
- The list whose elements are placed at the end of the list
returned by this method.
DList
that is the concatenation of this list and
the list referenced by otherList
.public boolean existsElement(java.lang.String predicate) throws QueryInvalidException
existsElement
in interface DCollection
predicate
- An OQL boolean query predicate.
QueryInvalidException
- The query predicate is invalid.protected int generateNewId()
public java.lang.Object get(int index)
get
in interface java.util.List
index
- index of element to return.
java.lang.IndexOutOfBoundsException
- if the index is out of range (index
< 0 || index >= size()).public java.util.Vector getElements()
public int getId()
public java.util.Iterator iterator()
iterator
in interface java.util.Collection
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
index
- index of first element to be returned from the
list iterator (by a call to the next method).
java.lang.IndexOutOfBoundsException
- if the index is out of range (index
< 0 || index > size()).public DCollection query(java.lang.String predicate) throws QueryInvalidException
query
in interface DCollection
predicate
- An OQL boolean query predicate.
QueryInvalidException
- The query predicate is invalid.public java.util.Iterator select(java.lang.String predicate) throws QueryInvalidException
select
in interface DCollection
predicate
- An OQL boolean query predicate.
QueryInvalidException
- The query predicate is invalid.public java.lang.Object selectElement(java.lang.String predicate) throws QueryInvalidException
selectElement
in interface DCollection
predicate
- An OQL boolean query predicate.
QueryInvalidException
- The query predicate is invalid.public int size()
size
in interface java.util.Collection
public void ojbAdd(java.lang.Object anObject)
ojbAdd
in interface ManageableCollection
public void ojbAddAll(ManageableCollection otherCollection)
ojbAddAll
in interface ManageableCollection
public void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
ManageableCollection
afterStore
in interface ManageableCollection
PersistenceBrokerException
public java.util.Iterator ojbIterator()
ojbIterator
in interface ManageableCollection
public void resize(int newSize)
newSize
elements.
resize
in interface DArray
newSize
- The new size of the array.public void setElements(java.util.Vector elements)
elements
- The elements to setpublic void setId(int id)
id
- The id to setpublic int getSize()
public void setSize(int size)
size
- The size to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |