org.objectweb.jorm.api
Interface PGenClassAccessor

All Superinterfaces:
PAccessor, PIndexedElemFactory
All Known Subinterfaces:
PAccessorGenClass

public interface PGenClassAccessor
extends PAccessor, PIndexedElemFactory

The PGenClassAccessor interface defines the Accessor for all generic classes. These methods are the same for all generic classes, they are defined by this unique interface that extends the PAccessor interface. Notice that all accessor methods are also prefixed with "pa". It is also a factory of PIndexedElem that defines the object used by the bindings in order to store the generic class element, and that are implemented by generic class MI.

Author:
R. Basset, P. Dechamboux

Method Summary
 void paAdd(PIndexedElem elem, java.lang.Object conn)
          It passes one of the elements extracted from the data store to the memory instance.
 boolean paDeltaSupported()
          It tells if the generic class memory instance supports delta modifications, which means that paadded, padeleted and pamodified are supported.
 int paGetNbElem()
          It retrieves the number of elements contained within the generic class memory instance before storing it.
 java.util.Iterator paIterator()
          It returns an Iterator over the elements of a generic class memory instance.
 void paSetNbElem(int nbelem)
          It passes the number of elements contained within the generic class DSI to the memory instance.
 
Methods inherited from interface org.objectweb.jorm.api.PAccessor
getMemoryInstance
 
Methods inherited from interface org.objectweb.jorm.api.PIndexedElemFactory
createPIndexedElem
 

Method Detail

paAdd

public void paAdd(PIndexedElem elem,
                  java.lang.Object conn)
           throws PException
It passes one of the elements extracted from the data store to the memory instance.

Parameters:
elem - the PIndexElenm to be added to the memory instance.
conn - the connection to the DS
Throws:
PException

paDeltaSupported

public boolean paDeltaSupported()
It tells if the generic class memory instance supports delta modifications, which means that paadded, padeleted and pamodified are supported.

Returns:
It return true is delta is supported by the memory instance.

paGetNbElem

public int paGetNbElem()
It retrieves the number of elements contained within the generic class memory instance before storing it. This is the number of element that should remain into the DSI after writing.

Returns:
The number of elements within the memory instance of this generic class.

paIterator

public java.util.Iterator paIterator()
It returns an Iterator over the elements of a generic class memory instance. It scans all elements of the MI, their modification flag be ELEM_CREATED, ELEM_DELETED, ELEM_MODIFIED or ELEM_UNMODIFIED. The PBinding can then store them into the related DSI.

Returns:
The Iterator over the memory instance elements.

paSetNbElem

public void paSetNbElem(int nbelem)
It passes the number of elements contained within the generic class DSI to the memory instance. This is done just before lements are passed to the memory instance using the paAdd method.

Parameters:
nbelem - The number of elements within this generic class DSI.