org.objectweb.speedo.genclass.collection
Class ListAccessor
java.lang.Object
org.objectweb.speedo.mim.lib.AbstractStateImpl
org.objectweb.speedo.genclass.GenClassAccessor
org.objectweb.speedo.genclass.collection.CollectionAccessor
org.objectweb.speedo.genclass.collection.ListAccessor
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.List, org.objectweb.jorm.api.PAccessor, org.objectweb.jorm.api.PGenClassAccessor, org.objectweb.jorm.api.PIndexedElemFactory, State, SpeedoGenClassCoherence, StateItf
public class ListAccessor
- extends CollectionAccessor
- implements java.util.List
- Author:
- S.Chassande-Barrioz
- See Also:
- Serialized Form
Field Summary |
protected int |
loadedSize
Indicates the number of elements existing on the data support. |
Method Summary |
void |
add(int i,
java.lang.Object o)
|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(int i,
java.util.Collection c)
|
void |
attachCopy(POManagerItf pm,
java.util.Map map,
StateItf fieldsClone)
This method is used during the attach operation. |
boolean |
contains(java.lang.Object o,
int index)
|
org.objectweb.jorm.api.PIndexedElem |
createPIndexedElem(GenClassAccessor gca)
|
java.lang.Object |
get(int i)
|
int |
indexOf(java.lang.Object o)
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int i)
|
void |
paAdd(org.objectweb.jorm.api.PIndexedElem elem,
java.lang.Object conn)
|
void |
paSetNbElem(int nbelem)
|
java.lang.Object |
remove(int i)
|
java.lang.Object |
set(int i,
java.lang.Object o)
|
protected GenClassElement |
speedoAddOnAttach(java.lang.Object o,
int index)
|
java.util.List |
subList(int i,
int i1)
|
java.lang.String |
toString()
|
void |
workingSetClosed()
At the end of the working set, the writing mode is initialized
(deltaSupported), and the reference to the persistent are unswilled |
Methods inherited from class org.objectweb.speedo.genclass.collection.CollectionAccessor |
addAll, clear, contains, containsAll, deletePersistent, detachCopy, duplicatAllowed, equals, forceDetachedDirty, isEmpty, iterator, loadFieldsFromAccessor, makePersistent, makePersistentOnAttach, refresh, remove, removeAll, restoreDetachedNone, retainAll, retrieve, setElements, size, speedoAdd, speedoAdd, speedoAddOnAttach, speedoRemove, speedoRemove2, toArray, toArray |
Methods inherited from class org.objectweb.speedo.genclass.GenClassAccessor |
createPIndexedElem, getLogger, getMemoryInstance, loadFields, makeToMerge, merge, paDeltaSupported, paGetNbElem, paIterator, setFlushed, unSwizzle |
Methods inherited from class org.objectweb.speedo.mim.lib.AbstractStateImpl |
checkVersion, getCacheEntry, getDetachedStatus, getSpeedoPO, getUserKey, getVersion, hasBeenFlush, indexFieldModified, isToMerge, prepareWrite, setCacheEntry, setDetachedStatus, setSpeedoPO, speedoChangeStatus, speedoChangeVersion, speedoGetStatus, speedoSetStatus |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
loadedSize
protected int loadedSize
- Indicates the number of elements existing on the data support. All
element added after this index must be marked as CREATED.
ListAccessor
public ListAccessor(SpeedoGenClassPO thepo)
workingSetClosed
public void workingSetClosed()
- Description copied from class:
GenClassAccessor
- At the end of the working set, the writing mode is initialized
(deltaSupported), and the reference to the persistent are unswilled
- Specified by:
workingSetClosed
in interface StateItf
- Overrides:
workingSetClosed
in class GenClassAccessor
toString
public java.lang.String toString()
- Overrides:
toString
in class CollectionAccessor
createPIndexedElem
public org.objectweb.jorm.api.PIndexedElem createPIndexedElem(GenClassAccessor gca)
- Overrides:
createPIndexedElem
in class CollectionAccessor
paSetNbElem
public void paSetNbElem(int nbelem)
- Specified by:
paSetNbElem
in interface org.objectweb.jorm.api.PGenClassAccessor
- Overrides:
paSetNbElem
in class GenClassAccessor
paAdd
public void paAdd(org.objectweb.jorm.api.PIndexedElem elem,
java.lang.Object conn)
throws org.objectweb.jorm.api.PExceptionIO
- Specified by:
paAdd
in interface org.objectweb.jorm.api.PGenClassAccessor
- Overrides:
paAdd
in class GenClassAccessor
- Throws:
org.objectweb.jorm.api.PExceptionIO
add
public boolean add(java.lang.Object o)
- Specified by:
add
in interface java.util.Collection
- Specified by:
add
in interface java.util.List
- Overrides:
add
in class CollectionAccessor
addAll
public boolean addAll(int i,
java.util.Collection c)
- Specified by:
addAll
in interface java.util.List
get
public java.lang.Object get(int i)
- Specified by:
get
in interface java.util.List
set
public java.lang.Object set(int i,
java.lang.Object o)
- Specified by:
set
in interface java.util.List
add
public void add(int i,
java.lang.Object o)
- Specified by:
add
in interface java.util.List
remove
public java.lang.Object remove(int i)
- Specified by:
remove
in interface java.util.List
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOf
in interface java.util.List
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOf
in interface java.util.List
listIterator
public java.util.ListIterator listIterator()
- Specified by:
listIterator
in interface java.util.List
listIterator
public java.util.ListIterator listIterator(int i)
- Specified by:
listIterator
in interface java.util.List
subList
public java.util.List subList(int i,
int i1)
- Specified by:
subList
in interface java.util.List
attachCopy
public void attachCopy(POManagerItf pm,
java.util.Map map,
StateItf fieldsClone)
- Description copied from interface:
StateItf
- This method is used during the attach operation. A call to this method
copy the field of the cloned state into the the current state. When a field
references a persistent object, according to the fetch plan, the
referenced can be attached too.
- Specified by:
attachCopy
in interface StateItf
- Overrides:
attachCopy
in class CollectionAccessor
- Parameters:
pm
- is the po manager used during the attach operationmap
- is the map of the atttached object. The use of this map permits
to support cycle in the object graph.fieldsClone
- is the detached state used to update the current state
speedoAddOnAttach
protected GenClassElement speedoAddOnAttach(java.lang.Object o,
int index)
contains
public boolean contains(java.lang.Object o,
int index)