|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
org.apache.ojb.odmg.collections.DListImpl
public class DListImpl
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
DListImpl()
Used by PB-Kernel to instantiate ManageableCollections FOR INTERNAL USE ONLY |
|
DListImpl(PBKey pbKey)
Used on odmg-level |
|
| Method Summary | |
|---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list (optional operation). |
void |
afterDelete(PersistenceBroker broker)
noop |
void |
afterInsert(PersistenceBroker broker)
noop |
void |
afterLookup(PersistenceBroker broker)
noop |
void |
afterStore(PersistenceBroker broker)
A callback method to implement 'removal-aware' (track removed objects and delete them by its own) collection implementations. |
void |
afterUpdate(PersistenceBroker broker)
noop |
void |
beforeDelete(PersistenceBroker broker)
noop |
void |
beforeInsert(PersistenceBroker broker)
prepare itself for persistence. |
void |
beforeUpdate(PersistenceBroker broker)
noop |
protected boolean |
checkForOpenTransaction(TransactionImpl tx)
|
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(String predicate)
Determines whether there is an element of the collection that evaluates to true for the predicate. |
Object |
get(int index)
Returns the element at the specified position in this list. |
List |
getElements()
Insert the method's description here. |
Integer |
getId()
Lazily return the Id, no point in precomputing it. |
protected Logger |
getLog()
|
PBKey |
getPBKey()
|
protected TransactionImpl |
getTransaction()
|
int |
hashCode()
|
Iterator |
iterator()
Returns an iterator over the elements in this collection. |
ListIterator |
listIterator()
Returns a list iterator of the elements in this list (in proper sequence). |
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(Object anObject)
add a single Object to the Collection. |
void |
ojbAddAll(ManageableCollection otherCollection)
adds a Collection to this collection. |
Iterator |
ojbIterator()
returns an Iterator over all elements in the collection. |
DCollection |
query(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. |
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. |
Iterator |
select(String predicate)
Access all of the elements of the collection that evaluate to true for the provided query predicate. |
Object |
selectElement(String predicate)
Selects the single element of the collection for which the provided OQL query predicate is true. |
void |
setElements(List elements)
Sets the elements. |
void |
setId(Integer id)
Sets the id. |
void |
setPBKey(PBKey pbKey)
|
int |
size()
Returns the number of elements in this collection. |
String |
toString()
|
| Methods inherited from class java.util.AbstractList |
|---|
add, addAll, clear, equals, indexOf, lastIndexOf, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, addAll, addAll, clear, contains, containsAll, equals, indexOf, isEmpty, lastIndexOf, remove, removeAll, retainAll, set, subList, toArray, toArray |
| Constructor Detail |
|---|
public DListImpl()
public DListImpl(PBKey pbKey)
| Method Detail |
|---|
protected Logger getLog()
protected TransactionImpl getTransaction()
protected boolean checkForOpenTransaction(TransactionImpl tx)
public PBKey getPBKey()
public void setPBKey(PBKey pbKey)
public void add(int index,
Object element)
add in interface Listadd in class AbstractListindex - index at which the specified element is to be inserted.element - element to be inserted.
UnsupportedOperationException - if the add method is not
supported by this list.
ClassCastException - if the class of the specified element
prevents it from being added to this list.
IllegalArgumentException - if some aspect of the specified
element prevents it from being added to this list.
IndexOutOfBoundsException - if the index is out of range
(index < 0 || index > size()).public Object remove(int index)
This implementation always throws an UnsupportedOperationException.
remove in interface Listremove in class AbstractListindex - the index of the element to remove.
UnsupportedOperationException - if the remove method is
not supported by this list.
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 DListotherList - 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(String predicate)
throws QueryInvalidException
existsElement in interface DCollectionpredicate - An OQL boolean query predicate.
QueryInvalidException - The query predicate is invalid.public Object get(int index)
get in interface Listget in class AbstractListindex - index of element to return.
IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= size()).public List getElements()
public Integer getId()
public Iterator iterator()
iterator in interface Iterableiterator in interface Collectioniterator in interface Listiterator in class AbstractListpublic ListIterator listIterator()
listIterator in interface ListlistIterator in class AbstractListpublic ListIterator listIterator(int index)
listIterator in interface ListlistIterator in class AbstractListindex - index of first element to be returned from the
list iterator (by a call to the next method).
IndexOutOfBoundsException - if the index is out of range (index
< 0 || index > size()).
public DCollection query(String predicate)
throws QueryInvalidException
query in interface DCollectionpredicate - An OQL boolean query predicate.
QueryInvalidException - The query predicate is invalid.public int hashCode()
hashCode in interface CollectionhashCode in interface ListhashCode in class AbstractListpublic String toString()
toString in class AbstractCollection
public Iterator select(String predicate)
throws QueryInvalidException
select in interface DCollectionpredicate - An OQL boolean query predicate.
QueryInvalidException - The query predicate is invalid.
public Object selectElement(String predicate)
throws QueryInvalidException
selectElement in interface DCollectionpredicate - An OQL boolean query predicate.
QueryInvalidException - The query predicate is invalid.public int size()
size in interface Collectionsize in interface Listsize in class AbstractCollectionpublic void ojbAdd(Object anObject)
ojbAdd in interface ManageableCollectionanObject - The object to addpublic void ojbAddAll(ManageableCollection otherCollection)
ojbAddAll in interface ManageableCollectionotherCollection - The added collection
public void afterStore(PersistenceBroker broker)
throws PersistenceBrokerException
ManageableCollection
afterStore in interface ManageableCollectionbroker - The persistence broker
PersistenceBrokerExceptionpublic Iterator ojbIterator()
ojbIterator in interface ManageableCollectionpublic void resize(int newSize)
newSize elements.
resize in interface DArraynewSize - The new size of the array.public void setElements(List elements)
elements - The elements to setpublic void setId(Integer id)
id - The id to set
public void beforeInsert(PersistenceBroker broker)
throws PersistenceBrokerException
Identity for the wrapped persistent
object.
beforeInsert in interface PersistenceBrokerAwarebroker - The persistence broker performing the persistence operation
PersistenceBrokerException
public void beforeUpdate(PersistenceBroker broker)
throws PersistenceBrokerException
beforeUpdate in interface PersistenceBrokerAwarebroker - The persistence broker performing the persistence operation
PersistenceBrokerException
public void beforeDelete(PersistenceBroker broker)
throws PersistenceBrokerException
beforeDelete in interface PersistenceBrokerAwarebroker - The persistence broker performing the persistence operation
PersistenceBrokerException
public void afterUpdate(PersistenceBroker broker)
throws PersistenceBrokerException
afterUpdate in interface PersistenceBrokerAwarebroker - The persistence broker performed the persistence operation
PersistenceBrokerException
public void afterInsert(PersistenceBroker broker)
throws PersistenceBrokerException
afterInsert in interface PersistenceBrokerAwarebroker - The persistence broker performing the persistence operation
PersistenceBrokerException
public void afterDelete(PersistenceBroker broker)
throws PersistenceBrokerException
afterDelete in interface PersistenceBrokerAwarebroker - The persistence broker performing the persistence operation
PersistenceBrokerException
public void afterLookup(PersistenceBroker broker)
throws PersistenceBrokerException
afterLookup in interface PersistenceBrokerAwarebroker - The persistence broker performing the persistence operation
PersistenceBrokerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||