org.objectweb.speedo.mim.api
Interface SpeedoProxy

All Known Subinterfaces:
SpeedoGenClassProxy
All Known Implementing Classes:
ArrayListImpl, GenClass, HashMapImpl, HashSetImpl, HashtableImpl, LinkedListImpl, PropertiesImpl, TreeMapImpl, VectorImpl

public interface SpeedoProxy

This interface what is a Proxy in Speedo. A proxy a PersistentCapable instance because it is the user object. It is the jorm PBinding because it is unique. There are several fields:

Author:
S.Chassande-Barrioz

Method Summary
 void copyAccessor(SpeedoAccessor src, SpeedoAccessor dest)
           
 SpeedoAccessor createAccessor()
           
 java.lang.Object getJormConfig()
          It retrieves an object helping the configuration of the Jorm class.
 SpeedoAccessor getReferenceAccessor()
           
 SpeedoAccessor getSpeedoAccessor()
          It retrieves the SpeedoAccessor instance used in the current context.
 void jdoDeletePersistent(ProxyManager pm, SpeedoAccessor sa)
           
 java.lang.Object jdoGePNameHints()
          Retrieves the hints needed to build the PName of the persistent object during the export action.
 java.lang.String jdoGetJdoFileName()
           
 java.lang.String jdoGetMapperName()
           
 java.lang.String jdoGetProjectName()
           
 ProxyManagerFactory jdoGetProxyManagerFactory()
           
 TransactionalPersistenceManager jdoGetTransactionalPersistenceManager()
           
 boolean jdoIsActive()
          Tests whether the Proxy infrastructure has already been set.
 void jdoIsActive(boolean newvalue)
          Sets the new value of the proxy flags
 void jdoMakePersistent(ProxyManager pm, SpeedoAccessor sa)
           
 void jdoSetPNameHints(java.lang.Object hints)
          Assignes the hints needed to build the PName of the persistent object during the export action.
 void jdoSetProxyManagerFactory(ProxyManagerFactory pmf)
          It assignes a ProxyManagerFactory
 void jdoSetTransactionalPersistenceManager(TransactionalPersistenceManager tpm)
          It assignes a TransactionalPersistenceManager
 void setReferenceAccessor(SpeedoAccessor refAcc)
           
 void speedoAdd(java.lang.Object elem, int gcFieldNumber)
          Adds an element in the gen class field whose number is given.
 

Method Detail

jdoIsActive

public boolean jdoIsActive()
Tests whether the Proxy infrastructure has already been set. A proxy has a correct PClassMapping linked to a PBinder, a PName obtained thanks to this PClassMapping.

Returns:
true if this object is a Proxy.

jdoIsActive

public void jdoIsActive(boolean newvalue)
Sets the new value of the proxy flags

Parameters:
newvalue - the new value of the proxy flag
See Also:
jdoIsActive()

getSpeedoAccessor

public SpeedoAccessor getSpeedoAccessor()
It retrieves the SpeedoAccessor instance used in the current context. If the proxy is not active then the reference state is returned. otherwise a $classNameFields is returned


getReferenceAccessor

public SpeedoAccessor getReferenceAccessor()

setReferenceAccessor

public void setReferenceAccessor(SpeedoAccessor refAcc)

createAccessor

public SpeedoAccessor createAccessor()

copyAccessor

public void copyAccessor(SpeedoAccessor src,
                         SpeedoAccessor dest)

jdoGetProxyManagerFactory

public ProxyManagerFactory jdoGetProxyManagerFactory()
Returns:
the ProxyManagerFactory which represents the data support inside which the proxy is persistent.

jdoSetProxyManagerFactory

public void jdoSetProxyManagerFactory(ProxyManagerFactory pmf)
It assignes a ProxyManagerFactory

Parameters:
pmf - is the ProxyManagerFactory which represents the data support inside which the proxy is persistent.

jdoGetTransactionalPersistenceManager

public TransactionalPersistenceManager jdoGetTransactionalPersistenceManager()
Returns:
the TransactionalPersistenceManager which manage the concurrency, loading, ... of the proxy.

jdoSetTransactionalPersistenceManager

public void jdoSetTransactionalPersistenceManager(TransactionalPersistenceManager tpm)
It assignes a TransactionalPersistenceManager

Parameters:
tpm - is the TransactionalPersistenceManager which manage the concurrency, loading, ... of the proxy.

getJormConfig

public java.lang.Object getJormConfig()
It retrieves an object helping the configuration of the Jorm class. Currently Jorm is not fractalize then the returned object is the PBinder class name.


jdoMakePersistent

public void jdoMakePersistent(ProxyManager pm,
                              SpeedoAccessor sa)

jdoDeletePersistent

public void jdoDeletePersistent(ProxyManager pm,
                                SpeedoAccessor sa)

jdoGetMapperName

public java.lang.String jdoGetMapperName()
Returns:
return the mapper name by which the instance is persistent.

jdoGetProjectName

public java.lang.String jdoGetProjectName()
Returns:
return the mapper name by which the instance is persistent.

jdoGetJdoFileName

public java.lang.String jdoGetJdoFileName()
Returns:
The file name of the jdo descriptor. This file must be availlable in the class at runtime.

jdoGePNameHints

public java.lang.Object jdoGePNameHints()
Retrieves the hints needed to build the PName of the persistent object during the export action.


jdoSetPNameHints

public void jdoSetPNameHints(java.lang.Object hints)
Assignes the hints needed to build the PName of the persistent object during the export action.


speedoAdd

public void speedoAdd(java.lang.Object elem,
                      int gcFieldNumber)
Adds an element in the gen class field whose number is given. This method must call the speedoAdd method of the SpeedoGenClassCoherence interface, or the Collection.add method (if the field contains a collection that does implement the previous interface). If the field is null, a new (speedo) collection must be created first.