|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
wt.fc.collections.AbstractWTCollection
wt.fc.collections.AbstractWTList
wt.fc.collections.WTArrayList
An array-based implementation of WTArrayList
WTArrayList implements wt.fc.ResultProcessor to provide better integration with the persistence layer. By implementing ResultProcessor, the default collections can be used in place of a QueryResult when retrieving data. The APIs to accomplish this are:
PersistenceManager.find(StatementSpec, ResultProcessor) PersisenceManagerSvr.query(StatementSpec, ResultProcessor)
In addition to a no-arg clone method, WTArrayList provides a "deep" clone in which the references are copied and the Persistables in the set are cloned using PersistenceCloner.
A WTArrayList can be constructed with a key mask. The default key mask
is CollectionsHelper.OBJECT_IDENTIFIER.
Supported API: true
Extendable: false
Nested Class Summary | |
(package private) static class |
WTArrayList.FilteredList
|
(package private) static class |
WTArrayList.OffSetList
|
Nested classes inherited from class wt.fc.collections.AbstractWTList |
|
Nested classes inherited from class wt.fc.collections.AbstractWTCollection |
AbstractWTCollection.PersistableCollection |
Field Summary | |
private static String |
CLASSNAME
|
private boolean |
deflatedOnSerialization
|
static long |
EXTERNALIZATION_VERSION_UID
|
(package private) int |
keyMask
|
protected static long |
OLD_FORMAT_VERSION_UID
|
(package private) ReferenceMap.ReferenceList |
referenceList
|
(package private) ReferenceMap |
referenceMap
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
Fields inherited from class wt.fc.collections.AbstractWTList |
|
Fields inherited from class wt.fc.collections.AbstractWTCollection |
|
Fields inherited from interface wt.fc.collections.WTCollection |
DEFLATED_ON_SERIALIZATION |
Constructor Summary | |
WTArrayList()
Supported API: true |
|
WTArrayList(Collection c)
Supported API: true |
|
WTArrayList(Collection c,
int key_mask)
Supported API: true |
|
WTArrayList(int initial_capacity)
Supported API: true |
|
WTArrayList(int initial_capacity,
int key_mask)
Supported API: true |
Method Summary | |
void |
add(int index,
WTReference ref)
Supported API: false |
void |
addElement(Object anObj)
Add the specified object to the result processor, and increase the size by one Supported API: false |
Iterator |
classIterator()
Supported API: false |
void |
clear()
Supported API: false |
Object |
clone()
Supported API: true |
WTArrayList |
clone(boolean deep)
Supported API: true |
int |
getKeyMask()
Supported API: false |
(package private) int |
getModCount()
|
Persistable |
getPersistable(int index)
Supported API: false |
QueryKey |
getQueryKey(int index)
Supported API: false |
WTReference |
getReference(int index)
Supported API: false |
(package private) List |
getReferences()
|
boolean |
isDeflatedOnSerialization()
Gets the value of the attribute: deflatedOnSerialization. |
Iterator |
persistableIterator()
Returns an iterator over the objects in this collection, as Persistables. |
Iterator |
persistableIterator(Class filter,
boolean include_subclasses)
Supported API: false |
ListIterator |
persistableListIterator(int index)
Supported API: false |
Iterator |
queryKeyIterator()
Returns an iterator over the QueryKeys in this collection. |
Iterator |
queryKeyIterator(Class filter,
boolean include_subclasses)
Supported API: false |
ListIterator |
queryKeyListIterator(int index)
Supported API: false |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(WTArrayList thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
Iterator |
referenceIterator()
Returns an Iterator over the objects in this collection, as WTReferences. |
Iterator |
referenceIterator(Class filter,
boolean include_subclasses)
Supported API: false |
ListIterator |
referenceListIterator(int index)
Supported API: false |
WTReference |
set(int index,
WTReference ref)
Supported API: false |
void |
setDeflatedOnSerialization(boolean a_DeflatedOnSerialization)
Sets the value of the attribute: deflatedOnSerialization. |
int |
size()
Return the number of objects which have been added by the result processor Supported API: false |
WTCollection |
subCollection(Class filter,
boolean include_subclasses)
Supported API: false |
List |
subList(int from_index,
int to_index)
Supported API: false |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class wt.fc.collections.AbstractWTList |
add, add, add, add, add, add, addAll, addAll, connect, connect, connect, connect, connectAll, equals, get, indexOf, indexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, persistableListIterator, queryKeyListIterator, referenceListIterator, remove, set, set, set |
Methods inherited from class wt.fc.collections.AbstractWTCollection |
add, addAll, connect, connect, connect, connect, connect, connect, connectAll, connectAll, contains, contains, contains, contains, containsInstance, containsNonPersisted, containsOnly, deflate, getIteratorListener, getLastReturnedReference, getReference, getReference, getReference, getReferences, hashCode, inflate, isEnabled, iterator, persistableCollection, referenceAdded, referenceRemoved, remove, remove, remove, remove, removeAll, removeNonPersisted, retainAll, setLastReturnedReference, subCollection, toArray, toArray, toArray, toArray, toArray, toArray, toIdArray |
Methods inherited from class java.util.AbstractCollection |
containsAll, isEmpty, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wt.fc.collections.WTList |
connect, connect, connect |
Methods inherited from interface wt.fc.collections.WTCollection |
add, addAll, connect, connect, connect, connectAll, connectAll, contains, contains, contains, contains, containsInstance, containsOnly, deflate, inflate, isEnabled, iterator, persistableCollection, remove, remove, remove, remove, removeAll, retainAll, subCollection, toArray, toArray, toArray, toArray, toArray, toArray, toIdArray |
Methods inherited from interface java.util.Collection |
containsAll, hashCode, isEmpty, removeAll, retainAll |
Methods inherited from interface java.util.List |
add, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private transient boolean deflatedOnSerialization
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
int keyMask
transient ReferenceMap referenceMap
transient ReferenceMap.ReferenceList referenceList
Constructor Detail |
public WTArrayList()
public WTArrayList(int initial_capacity)
initial_capacity
- public WTArrayList(int initial_capacity, int key_mask)
initial_capacity
- key_mask
- public WTArrayList(Collection c)
c
- public WTArrayList(Collection c, int key_mask)
c
- key_mask
- Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(WTArrayList thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public boolean isDeflatedOnSerialization()
isDeflatedOnSerialization
in interface WTCollection
isDeflatedOnSerialization
in class AbstractWTCollection
public void setDeflatedOnSerialization(boolean a_DeflatedOnSerialization) throws WTPropertyVetoException
setDeflatedOnSerialization
in interface WTCollection
setDeflatedOnSerialization
in class AbstractWTCollection
a_DeflatedOnSerialization
-
WTPropertyVetoException
public Iterator classIterator()
classIterator
in interface WTCollection
classIterator
in class AbstractWTCollection
public void clear()
clear
in interface Collection
public Object clone()
public WTArrayList clone(boolean deep)
deep
-
public int getKeyMask()
getKeyMask
in interface WTCollection
getKeyMask
in class AbstractWTCollection
public Persistable getPersistable(int index) throws WTException
getPersistable
in interface WTList
getPersistable
in class AbstractWTList
index
-
WTException
public QueryKey getQueryKey(int index)
getQueryKey
in interface WTList
getQueryKey
in class AbstractWTList
index
-
public WTReference getReference(int index)
getReference
in interface WTList
getReference
in class AbstractWTList
index
-
public Iterator persistableIterator() throws WTException
persistableIterator
in interface WTCollection
persistableIterator
in class AbstractWTCollection
ConcurrentModificationException
- If the collection is modified
while the iterator is being processed.
WTException
public Iterator persistableIterator(Class filter, boolean include_subclasses) throws WTException
persistableIterator
in interface WTCollection
persistableIterator
in class AbstractWTCollection
filter
- include_subclasses
-
WTException
public ListIterator persistableListIterator(int index) throws WTException
persistableListIterator
in interface WTList
persistableListIterator
in class AbstractWTList
index
-
WTException
public Iterator queryKeyIterator()
queryKeyIterator
in interface WTCollection
queryKeyIterator
in class AbstractWTCollection
ConcurrentModificationException
- If the collection is modified
while the iterator is being processed.public Iterator queryKeyIterator(Class filter, boolean include_subclasses)
queryKeyIterator
in interface WTCollection
queryKeyIterator
in class AbstractWTCollection
filter
- include_subclasses
-
public ListIterator queryKeyListIterator(int index)
queryKeyListIterator
in interface WTList
queryKeyListIterator
in class AbstractWTList
index
-
public Iterator referenceIterator()
referenceIterator
in interface WTCollection
referenceIterator
in class AbstractWTCollection
ConcurrentModificationException
- If the collection is modified
while the iterator is being processed.public Iterator referenceIterator(Class filter, boolean include_subclasses)
referenceIterator
in interface WTCollection
referenceIterator
in class AbstractWTCollection
filter
- include_subclasses
-
public ListIterator referenceListIterator(int index)
referenceListIterator
in interface WTList
referenceListIterator
in class AbstractWTList
index
-
public WTCollection subCollection(Class filter, boolean include_subclasses)
subCollection
in interface WTCollection
subCollection
in class AbstractWTCollection
filter
- include_subclasses
-
public List subList(int from_index, int to_index)
subList
in interface WTList
subList
in class AbstractWTList
from_index
- to_index
-
public void addElement(Object anObj)
addElement
in interface ResultProcessor
anObj
- public int size()
size
in interface ResultProcessor
public void add(int index, WTReference ref)
AbstractWTList
add
in interface WTList
add
in class AbstractWTList
index
- ref
- public WTReference set(int index, WTReference ref)
AbstractWTList
set
in interface WTList
set
in class AbstractWTList
index
- ref
-
List getReferences()
int getModCount()
getModCount
in class AbstractWTList
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |