org.objectweb.speedo.genclass
Interface GenClassElement

All Superinterfaces:
org.objectweb.jorm.api.PIndexedElem
All Known Implementing Classes:
CollectionElem

public interface GenClassElement
extends org.objectweb.jorm.api.PIndexedElem

Represents a element of a gen class. It matches to a reference element or a primitive element.

Author:
S.Chassande-Barrioz

Field Summary
 
Fields inherited from interface org.objectweb.jorm.api.PIndexedElem
ELEM_CREATED, ELEM_DELETED, ELEM_MODIFIED, ELEM_UNMODIFIED
 
Method Summary
 void cleanStatusForMerge()
          Forget the retained status.
 GenClassElement cloneGCE()
           
 java.lang.Object getElement()
           
 java.lang.Object getElement(javax.jdo.PersistenceManager pm)
           
 java.lang.Object getIndex()
           
 SpeedoAccessor getSpeedoAccessor()
          Retrieves the Speedo accessor associated to this gen class element.
 byte getStatusForMerge()
           
 byte retainStatusForMerge()
          When thin lock is enabled (locking managed at genclass element level instead of at genclass level), this method store the current status of the genclass element into another variable.
 void setElement(java.lang.Object element)
          Assignes the element of the gen class.
 void setIndex(java.lang.Object index)
          Assignes the index of the element of the gen class.
 void setStatus(byte s)
          Assignes the jorm status of the PIndexedElement
 void unSwizzle()
          In case of the element of the generic class is a persistent class.
 
Methods inherited from interface org.objectweb.jorm.api.PIndexedElem
getElemStatus, pieGetBigDecimalElem, pieGetBigIntegerElem, pieGetBooleanElem, pieGetByteArrayElem, pieGetByteElem, pieGetByteIndexField, pieGetCharArrayElem, pieGetCharElem, pieGetCharIndexField, pieGetDateElem, pieGetDateIndexField, pieGetDoubleElem, pieGetFloatElem, pieGetIntElem, pieGetIntIndexField, pieGetLongElem, pieGetLongIndexField, pieGetObooleanElem, pieGetObyteElem, pieGetObyteIndexField, pieGetOcharElem, pieGetOcharIndexField, pieGetOdoubleElem, pieGetOfloatElem, pieGetOintElem, pieGetOintIndexField, pieGetOlongElem, pieGetOlongIndexField, pieGetOshortElem, pieGetOshortIndexField, pieGetRefElem, pieGetSerializedElem, pieGetShortElem, pieGetShortIndexField, pieGetStringElem, pieGetStringIndexField, pieSetBigDecimalElem, pieSetBigIntegerElem, pieSetBooleanElem, pieSetByteArrayElem, pieSetByteElem, pieSetByteIndexField, pieSetCharArrayElem, pieSetCharElem, pieSetCharIndexField, pieSetDateElem, pieSetDateIndexField, pieSetDoubleElem, pieSetFloatElem, pieSetIntElem, pieSetIntIndexField, pieSetLongElem, pieSetLongIndexField, pieSetObooleanElem, pieSetObyteElem, pieSetObyteIndexField, pieSetOcharElem, pieSetOcharIndexField, pieSetOdoubleElem, pieSetOfloatElem, pieSetOintElem, pieSetOintIndexField, pieSetOlongElem, pieSetOlongIndexField, pieSetOshortElem, pieSetOshortIndexField, pieSetRefElem, pieSetSerializedElem, pieSetShortElem, pieSetShortIndexField, pieSetStringElem, pieSetStringIndexField
 

Method Detail

getIndex

public java.lang.Object getIndex()
Returns:
the index of this gen class element, possibly wrapped in an object.

setIndex

public void setIndex(java.lang.Object index)
Assignes the index of the element of the gen class. It is a user object.

Parameters:
index - to add, it cannot be null.

getElement

public java.lang.Object getElement()
Returns:
the element of the gen class. It is a user object.

setElement

public void setElement(java.lang.Object element)
Assignes the element of the gen class. It is a user object.

Parameters:
element - to add, it cannot be null.

getElement

public java.lang.Object getElement(javax.jdo.PersistenceManager pm)
Parameters:
pm - is the persistence manager which permits to resolve the PName into a java reference.
Returns:
the element of the gen class. The element is a reference (SpeedoProxy).

setStatus

public void setStatus(byte s)
Assignes the jorm status of the PIndexedElement

Parameters:
s - the new status

getSpeedoAccessor

public SpeedoAccessor getSpeedoAccessor()
Retrieves the Speedo accessor associated to this gen class element.


unSwizzle

public void unSwizzle()
In case of the element of the generic class is a persistent class. The implementation of this method should replace the direct reference to the persistent object by its identifier (PName). The aim of the unswizzling feature is to permit to the cache to garbage unused instance. This unswizzling is done at commit time usualy.


retainStatusForMerge

public byte retainStatusForMerge()
When thin lock is enabled (locking managed at genclass element level instead of at genclass level), this method store the current status of the genclass element into another variable. This status is in fact the status of the genclass element during the working set. If the element is modified, the change(delta) has to be report on the reference state (cache) at commit time.

Returns:
a byte indicating the retained status

cleanStatusForMerge

public void cleanStatusForMerge()
Forget the retained status.

See Also:
retainStatusForMerge()

getStatusForMerge

public byte getStatusForMerge()
Returns:
the retained status
See Also:
retainStatusForMerge()

cloneGCE

public GenClassElement cloneGCE()
Returns:
a clone of the current gen class element.