org.objectweb.speedo.genclass
Class GenClass

java.lang.Object
  extended byorg.objectweb.speedo.genclass.GenClass
All Implemented Interfaces:
org.objectweb.perseus.cache.api.CacheEntry, org.objectweb.perseus.cache.api.FixableCacheEntry, org.objectweb.jorm.util.api.Loggable, org.objectweb.jorm.api.PBinding, org.objectweb.jorm.api.PBindingCtrl, javax.jdo.spi.PersistenceCapable, org.objectweb.perseus.cache.replacement.api.ReplaceableCacheEntry, SpeedoGenClassCoherence, SpeedoGenClassProxy, SpeedoProxy
Direct Known Subclasses:
CollectionImpl, MapImpl

public abstract class GenClass
extends java.lang.Object
implements SpeedoGenClassProxy, org.objectweb.jorm.util.api.Loggable, org.objectweb.jorm.api.PBindingCtrl

This class is a basic implementation of the SpeedoGenClassProxy interface. It uses a delegate PBinding.

Author:
S.Chassande-Barrioz

Nested Class Summary
 
Nested classes inherited from class javax.jdo.spi.PersistenceCapable
javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer, javax.jdo.spi.PersistenceCapable.ObjectIdFieldManager, javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier
 
Field Summary
protected  long age
           
protected  java.lang.Object encodedPName
           
protected  int fix
           
protected  int gcid
          Id of the field that references this gen class instance
protected  boolean jdoIsActive
          This fields indicates if the proxy is active (attached to at least a Proxy Manager)
protected  java.lang.String linkedField
          The linked field associated to this gen class
protected  java.util.List listeners
          List of SpeedoGenClassListener
 org.objectweb.util.monolog.api.Logger logger
          The logger used to trace this generic class
protected  java.lang.String mapperName
          is the name of the mapper inside which the generic class is persistent
protected  org.objectweb.jorm.api.PBindingCtrl pbinding
          is the PBinding which permits to store/load the data into/from the support
protected  java.lang.Object pnameHints
          Is the PName which
protected  java.lang.String projectName
          is the name of the project name inside which the generic class is used.
protected  org.objectweb.jorm.type.api.PType ptype
          is the type of the generic class
 
Fields inherited from interface javax.jdo.spi.PersistenceCapable
CHECK_READ, CHECK_WRITE, DETACHED, LOAD_REQUIRED, MEDIATE_READ, MEDIATE_WRITE, READ_OK, READ_WRITE_OK, SERIALIZABLE
 
Fields inherited from interface org.objectweb.jorm.api.PBinding
ACTION_BIND, ACTION_EXIST, ACTION_EXPORT, ACTION_READ, ACTION_UNBIND, ACTION_UNEXPORT, ACTION_WRITE, LIFECYCLE_ACTIVEFORIO, LIFECYCLE_DELTOWRITE, LIFECYCLE_ERROR, LIFECYCLE_NEWTOWRITE, LIFECYCLE_NOTBOUND
 
Constructor Summary
GenClass()
           
 
Method Summary
 void bind(org.objectweb.jorm.naming.api.PName name)
           
 void copyAccessor(SpeedoAccessor src, SpeedoAccessor dest)
          Copies persistent fields from an accessor to another.
abstract  SpeedoAccessor createAccessor()
           
 boolean elementIsReference()
           
 boolean exist(java.lang.Object o)
           
 org.objectweb.jorm.naming.api.PName export(java.lang.Object o)
           
 org.objectweb.jorm.naming.api.PName export(java.lang.Object o, java.lang.Object o1)
           
 void fireSpeedoElementAdded(java.lang.Object elem)
          Notifies the listeners of this gen class that an element has been added to this gen class.
 void fireSpeedoElementRemoved(java.lang.Object elem)
          Notifies the listeners of this gen class that an element has been removed to this gen class.
 void fixCe()
           
 long getCeAge()
           
 int getCeFixCount()
           
 java.lang.Object getCeIdentifier()
           
 java.lang.Object getCeObject()
           
 java.lang.Object getDataIdentifier(java.lang.Object o)
           
 java.util.Collection getDataIdentifiers(java.util.Collection os)
           
 java.lang.Object getEncodedPName()
           
 org.objectweb.util.monolog.api.Logger getLogger()
           
 org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
           
 org.objectweb.jorm.api.PClassMapping getPClassMapping()
           
 org.objectweb.jorm.naming.api.PName getPName()
           
abstract  SpeedoAccessor getReferenceAccessor()
           
 SpeedoAccessor getSpeedoAccessor()
          It retrieves the SpeedoAccessor instance used in the current context.
 java.util.Collection getSpeedoAccessors()
           
 SpeedoHome getSpeedoHome()
           
 byte getStatus()
           
 void init(org.objectweb.jorm.api.PClassMapping mapping)
           
 void init(org.objectweb.jorm.type.api.PType _ptype, java.lang.String _linkedField, java.lang.Object _pnameHints, org.objectweb.util.monolog.api.Logger _logger)
          Initializes a Genclass instance
 void jdoCopyFields(java.lang.Object pc, int[] fieldNumbers)
           
 void jdoCopyKeyFieldsFromObjectId(javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer objectIdFieldConsumer, java.lang.Object o)
           
 void jdoCopyKeyFieldsToObjectId(java.lang.Object o)
           
 void jdoCopyKeyFieldsToObjectId(javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier objectIdFieldSupplier, java.lang.Object o)
           
 java.lang.String jdoGetGenClassId()
           
 java.lang.String jdoGetJdoFileName()
           
 java.lang.Object jdoGetObjectId()
           
 org.objectweb.jorm.api.PBinding jdoGetPBinding()
           
 javax.jdo.PersistenceManager jdoGetPersistenceManager()
           
 java.lang.Object jdoGetPNameHints()
          Retrieves the hints needed to build the PName of the persistent object during the export action.
 org.objectweb.jorm.type.api.PType jdoGetPType()
           
 java.lang.Object jdoGetTransactionalObjectId()
           
 java.lang.Object jdoGetVersion()
           
 boolean jdoIsActive()
          Tests whether the Proxy infrastructure has already been set.
 void jdoIsActive(boolean newvalue)
          Sets the new value of the proxy flags
 boolean jdoIsDeleted()
           
 boolean jdoIsDetached()
           
 boolean jdoIsDirty()
           
 boolean jdoIsNew()
           
 boolean jdoIsPersistent()
           
 boolean jdoIsTransactional()
           
 void jdoMakeDirty(java.lang.String fieldName)
           
 javax.jdo.spi.PersistenceCapable jdoNewInstance(javax.jdo.spi.StateManager sm)
           
 javax.jdo.spi.PersistenceCapable jdoNewInstance(javax.jdo.spi.StateManager sm, java.lang.Object oid)
           
 java.lang.Object jdoNewObjectIdInstance()
           
 java.lang.Object jdoNewObjectIdInstance(java.lang.Object arg0)
           
 java.lang.Object jdoNewObjectIdInstance(java.lang.String s)
           
 void jdoProvideField(int fieldNumber)
           
 void jdoProvideFields(int[] fieldNumbers)
           
 void jdoReplaceField(int fieldNumber)
           
 void jdoReplaceFields(int[] fieldNumbers)
           
 void jdoReplaceFlags()
           
 void jdoReplaceObjectId(java.lang.Object arg0)
           
 void jdoReplaceStateManager(javax.jdo.spi.StateManager sm)
           
 void jdoSetLinkedField(java.lang.String lf)
          Assignes the linked field name for this generic class.
 void jdoSetPBinding(org.objectweb.jorm.api.PBinding pb)
          assignes the PBinding to use to load/store the generic class Call this method with null value means that the generic is no more persistent.
 void jdoSetPNameHints(java.lang.Object hints)
          Assignes the hints needed to build the PName of the persistent object during the export action.
 void jdoSetPType(org.objectweb.jorm.type.api.PType _ptype)
          Assignes the PType of the generic class.
 void read(java.lang.Object o, org.objectweb.jorm.api.PAccessor accessor)
           
 void read(java.lang.Object o, org.objectweb.jorm.api.PAccessor pAccessor, java.lang.Object o1)
           
 void removeSpeedoAccessor(SpeedoAccessor sa)
           
 void setCeAge(long l)
           
 void setElements(java.lang.Object o)
          Assignes the new value of the generic class (Collection, Map or Array or ...).
 void setEncodedPName(java.lang.Object _encodedPName)
          Set the encoded PName of the detach copy to allow serialization.
 void setLogger(org.objectweb.util.monolog.api.Logger _logger)
           
 void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerfactory)
           
 void setPName(org.objectweb.jorm.naming.api.PName pName)
           
abstract  void setReferenceAccessor(SpeedoAccessor refAcc)
          Assignes the reference accessor to the SpeedoProxy The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.
 void setStatus(byte b)
           
 void speedoAdd(java.lang.Object elem, int gcFieldNumber)
          Adds an element in the gen class field whose number is given.
 boolean speedoAdd(java.lang.Object elemToAdd, java.lang.Object hints)
          Askes the adding of an element into a generic class.
 void speedoAddGenClassListener(SpeedoGenClassListener l)
          Adds a listener to this gen class instance.
 boolean speedoRemove(java.lang.Object elemToRemove, java.lang.Object hints)
          Askes the removing of an element from a generic class.
 void speedoSetGcId(int _gcid)
          Sets the id of this gen class instance (id of the field that references this instance).
 void unbind()
           
 void unexport(java.lang.Object o)
           
 void unfixCe()
           
 void write(java.lang.Object o, org.objectweb.jorm.api.PAccessor accessor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.speedo.genclass.api.SpeedoGenClassProxy
clear, createGenClass
 

Field Detail

jdoIsActive

protected boolean jdoIsActive
This fields indicates if the proxy is active (attached to at least a Proxy Manager)


pbinding

protected org.objectweb.jorm.api.PBindingCtrl pbinding
is the PBinding which permits to store/load the data into/from the support


logger

public org.objectweb.util.monolog.api.Logger logger
The logger used to trace this generic class


mapperName

protected java.lang.String mapperName
is the name of the mapper inside which the generic class is persistent


projectName

protected java.lang.String projectName
is the name of the project name inside which the generic class is used.


ptype

protected org.objectweb.jorm.type.api.PType ptype
is the type of the generic class


linkedField

protected java.lang.String linkedField
The linked field associated to this gen class


pnameHints

protected java.lang.Object pnameHints
Is the PName which


gcid

protected int gcid
Id of the field that references this gen class instance


listeners

protected java.util.List listeners
List of SpeedoGenClassListener


age

protected long age

fix

protected int fix

encodedPName

protected java.lang.Object encodedPName
Constructor Detail

GenClass

public GenClass()
Method Detail

init

public void init(org.objectweb.jorm.type.api.PType _ptype,
                 java.lang.String _linkedField,
                 java.lang.Object _pnameHints,
                 org.objectweb.util.monolog.api.Logger _logger)
Description copied from interface: SpeedoGenClassProxy
Initializes a Genclass instance

Specified by:
init in interface SpeedoGenClassProxy
Parameters:
_ptype - is the PType of the genclass
_linkedField - is the name of the field referencing the genclass
_pnameHints - is a helper using for the identifier allocation (export) persistent
_logger - is the logger instance for logging.

jdoSetPNameHints

public void jdoSetPNameHints(java.lang.Object hints)
Description copied from interface: SpeedoGenClassProxy
Assignes the hints needed to build the PName of the persistent object during the export action.

Specified by:
jdoSetPNameHints in interface SpeedoGenClassProxy

elementIsReference

public boolean elementIsReference()

speedoSetGcId

public void speedoSetGcId(int _gcid)
Description copied from interface: SpeedoGenClassProxy
Sets the id of this gen class instance (id of the field that references this instance).

Specified by:
speedoSetGcId in interface SpeedoGenClassProxy
Parameters:
_gcid - the new id of this gen class instance.

speedoAddGenClassListener

public void speedoAddGenClassListener(SpeedoGenClassListener l)
Description copied from interface: SpeedoGenClassProxy
Adds a listener to this gen class instance. This listener will be notified each time an element is added or removed for this gen class.

Specified by:
speedoAddGenClassListener in interface SpeedoGenClassProxy
Parameters:
l - a gen class listener.

speedoAdd

public void speedoAdd(java.lang.Object elem,
                      int gcFieldNumber)
Description copied from interface: SpeedoProxy
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.

Specified by:
speedoAdd in interface SpeedoProxy

speedoAdd

public boolean speedoAdd(java.lang.Object elemToAdd,
                         java.lang.Object hints)
Description copied from interface: SpeedoGenClassCoherence
Askes the adding of an element into a generic class. The consistency of relations must not be managed: this is done by the caller of this method.

Specified by:
speedoAdd in interface SpeedoGenClassCoherence
Parameters:
elemToAdd - is the element to add

speedoRemove

public boolean speedoRemove(java.lang.Object elemToRemove,
                            java.lang.Object hints)
Description copied from interface: SpeedoGenClassCoherence
Askes the removing of an element from a generic class. The consistency of relations must not be managed: this is done by the caller of this method.

Specified by:
speedoRemove in interface SpeedoGenClassCoherence
Parameters:
elemToRemove - is the element to remove

fireSpeedoElementAdded

public void fireSpeedoElementAdded(java.lang.Object elem)
Description copied from interface: SpeedoGenClassProxy
Notifies the listeners of this gen class that an element has been added to this gen class.

Specified by:
fireSpeedoElementAdded in interface SpeedoGenClassProxy
Parameters:
elem - the element that has been added.

fireSpeedoElementRemoved

public void fireSpeedoElementRemoved(java.lang.Object elem)
Description copied from interface: SpeedoGenClassProxy
Notifies the listeners of this gen class that an element has been removed to this gen class.

Specified by:
fireSpeedoElementRemoved in interface SpeedoGenClassProxy
Parameters:
elem - the element that has been removed.

getDataIdentifier

public java.lang.Object getDataIdentifier(java.lang.Object o)

getDataIdentifiers

public java.util.Collection getDataIdentifiers(java.util.Collection os)

createAccessor

public abstract SpeedoAccessor createAccessor()
Specified by:
createAccessor in interface SpeedoProxy
Returns:
a new SpeedoAccessor instance.

getReferenceAccessor

public abstract SpeedoAccessor getReferenceAccessor()
Specified by:
getReferenceAccessor in interface SpeedoProxy
Returns:
the reference accessor of the SpeedoProxy instance. It can be * null. The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.

setReferenceAccessor

public abstract void setReferenceAccessor(SpeedoAccessor refAcc)
Description copied from interface: SpeedoProxy
Assignes the reference accessor to the SpeedoProxy The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.

Specified by:
setReferenceAccessor in interface SpeedoProxy
Parameters:
refAcc - the new reference accessor

bind

public void bind(org.objectweb.jorm.naming.api.PName name)
          throws org.objectweb.jorm.api.PException
Specified by:
bind in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

exist

public boolean exist(java.lang.Object o)
              throws org.objectweb.jorm.api.PException
Specified by:
exist in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

export

public org.objectweb.jorm.naming.api.PName export(java.lang.Object o)
                                           throws org.objectweb.jorm.api.PException
Specified by:
export in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

export

public org.objectweb.jorm.naming.api.PName export(java.lang.Object o,
                                                  java.lang.Object o1)
                                           throws org.objectweb.jorm.api.PException
Specified by:
export in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

getPClassMapping

public org.objectweb.jorm.api.PClassMapping getPClassMapping()
Specified by:
getPClassMapping in interface org.objectweb.jorm.api.PBinding

getPName

public org.objectweb.jorm.naming.api.PName getPName()
Specified by:
getPName in interface org.objectweb.jorm.api.PBinding

getStatus

public byte getStatus()
Specified by:
getStatus in interface org.objectweb.jorm.api.PBinding

setPName

public void setPName(org.objectweb.jorm.naming.api.PName pName)
Specified by:
setPName in interface org.objectweb.jorm.api.PBindingCtrl

setStatus

public void setStatus(byte b)
Specified by:
setStatus in interface org.objectweb.jorm.api.PBindingCtrl

init

public void init(org.objectweb.jorm.api.PClassMapping mapping)
          throws org.objectweb.jorm.api.PException
Specified by:
init in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

read

public void read(java.lang.Object o,
                 org.objectweb.jorm.api.PAccessor accessor)
          throws org.objectweb.jorm.api.PException
Specified by:
read in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

read

public void read(java.lang.Object o,
                 org.objectweb.jorm.api.PAccessor pAccessor,
                 java.lang.Object o1)
          throws org.objectweb.jorm.api.PException
Specified by:
read in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

unbind

public void unbind()
            throws org.objectweb.jorm.api.PException
Specified by:
unbind in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

unexport

public void unexport(java.lang.Object o)
              throws org.objectweb.jorm.api.PException
Specified by:
unexport in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

write

public void write(java.lang.Object o,
                  org.objectweb.jorm.api.PAccessor accessor)
           throws org.objectweb.jorm.api.PException
Specified by:
write in interface org.objectweb.jorm.api.PBinding
Throws:
org.objectweb.jorm.api.PException

jdoGetPersistenceManager

public javax.jdo.PersistenceManager jdoGetPersistenceManager()
Specified by:
jdoGetPersistenceManager in interface javax.jdo.spi.PersistenceCapable

jdoReplaceFlags

public void jdoReplaceFlags()
Specified by:
jdoReplaceFlags in interface javax.jdo.spi.PersistenceCapable

jdoNewInstance

public javax.jdo.spi.PersistenceCapable jdoNewInstance(javax.jdo.spi.StateManager sm)
Specified by:
jdoNewInstance in interface javax.jdo.spi.PersistenceCapable

jdoNewInstance

public javax.jdo.spi.PersistenceCapable jdoNewInstance(javax.jdo.spi.StateManager sm,
                                                       java.lang.Object oid)
Specified by:
jdoNewInstance in interface javax.jdo.spi.PersistenceCapable

jdoNewObjectIdInstance

public java.lang.Object jdoNewObjectIdInstance(java.lang.Object arg0)
Specified by:
jdoNewObjectIdInstance in interface javax.jdo.spi.PersistenceCapable

jdoNewObjectIdInstance

public java.lang.Object jdoNewObjectIdInstance()
Specified by:
jdoNewObjectIdInstance in interface javax.jdo.spi.PersistenceCapable

jdoGetObjectId

public java.lang.Object jdoGetObjectId()
Specified by:
jdoGetObjectId in interface javax.jdo.spi.PersistenceCapable

jdoGetVersion

public java.lang.Object jdoGetVersion()
Specified by:
jdoGetVersion in interface javax.jdo.spi.PersistenceCapable

jdoGetTransactionalObjectId

public java.lang.Object jdoGetTransactionalObjectId()
Specified by:
jdoGetTransactionalObjectId in interface javax.jdo.spi.PersistenceCapable

jdoReplaceField

public void jdoReplaceField(int fieldNumber)
Specified by:
jdoReplaceField in interface javax.jdo.spi.PersistenceCapable

jdoReplaceFields

public void jdoReplaceFields(int[] fieldNumbers)
Specified by:
jdoReplaceFields in interface javax.jdo.spi.PersistenceCapable

jdoProvideField

public void jdoProvideField(int fieldNumber)
Specified by:
jdoProvideField in interface javax.jdo.spi.PersistenceCapable

jdoProvideFields

public void jdoProvideFields(int[] fieldNumbers)
Specified by:
jdoProvideFields in interface javax.jdo.spi.PersistenceCapable

jdoCopyFields

public void jdoCopyFields(java.lang.Object pc,
                          int[] fieldNumbers)
Specified by:
jdoCopyFields in interface javax.jdo.spi.PersistenceCapable

jdoMakeDirty

public void jdoMakeDirty(java.lang.String fieldName)
Specified by:
jdoMakeDirty in interface javax.jdo.spi.PersistenceCapable

jdoIsDirty

public boolean jdoIsDirty()
Specified by:
jdoIsDirty in interface javax.jdo.spi.PersistenceCapable

jdoIsDetached

public boolean jdoIsDetached()
Specified by:
jdoIsDetached in interface javax.jdo.spi.PersistenceCapable

jdoReplaceObjectId

public void jdoReplaceObjectId(java.lang.Object arg0)

jdoIsTransactional

public boolean jdoIsTransactional()
Specified by:
jdoIsTransactional in interface javax.jdo.spi.PersistenceCapable

jdoIsPersistent

public boolean jdoIsPersistent()
Specified by:
jdoIsPersistent in interface javax.jdo.spi.PersistenceCapable

jdoIsNew

public boolean jdoIsNew()
Specified by:
jdoIsNew in interface javax.jdo.spi.PersistenceCapable

jdoIsDeleted

public boolean jdoIsDeleted()
Specified by:
jdoIsDeleted in interface javax.jdo.spi.PersistenceCapable

jdoReplaceStateManager

public void jdoReplaceStateManager(javax.jdo.spi.StateManager sm)
Specified by:
jdoReplaceStateManager in interface javax.jdo.spi.PersistenceCapable

jdoNewObjectIdInstance

public java.lang.Object jdoNewObjectIdInstance(java.lang.String s)

jdoCopyKeyFieldsToObjectId

public void jdoCopyKeyFieldsToObjectId(java.lang.Object o)
Specified by:
jdoCopyKeyFieldsToObjectId in interface javax.jdo.spi.PersistenceCapable

jdoCopyKeyFieldsToObjectId

public void jdoCopyKeyFieldsToObjectId(javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier objectIdFieldSupplier,
                                       java.lang.Object o)
Specified by:
jdoCopyKeyFieldsToObjectId in interface javax.jdo.spi.PersistenceCapable

jdoCopyKeyFieldsFromObjectId

public void jdoCopyKeyFieldsFromObjectId(javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer objectIdFieldConsumer,
                                         java.lang.Object o)
Specified by:
jdoCopyKeyFieldsFromObjectId in interface javax.jdo.spi.PersistenceCapable

jdoSetPType

public void jdoSetPType(org.objectweb.jorm.type.api.PType _ptype)
Assignes the PType of the generic class.

Specified by:
jdoSetPType in interface SpeedoGenClassProxy
Parameters:
_ptype - of the generic class

jdoGetPType

public org.objectweb.jorm.type.api.PType jdoGetPType()
Specified by:
jdoGetPType in interface SpeedoGenClassProxy
Returns:
the PType of the generic class.

jdoSetPBinding

public void jdoSetPBinding(org.objectweb.jorm.api.PBinding pb)
assignes the PBinding to use to load/store the generic class Call this method with null value means that the generic is no more persistent.

Specified by:
jdoSetPBinding in interface SpeedoGenClassProxy
Parameters:
pb - is the PBinding.

jdoGetPBinding

public org.objectweb.jorm.api.PBinding jdoGetPBinding()
Specified by:
jdoGetPBinding in interface SpeedoGenClassProxy
Returns:
the pbinding associated to the generic class. The value is if the generic class is not persistent.

jdoGetGenClassId

public java.lang.String jdoGetGenClassId()
Specified by:
jdoGetGenClassId in interface SpeedoGenClassProxy
Returns:
a string which represents the fully path of the persistent field of the class with wich the generic class is persistent. If the linked fiekf is the 'f1' provided by the class 'com.foo.Bar' then the returned string will be 'com.foo.Bar/f1'

jdoSetLinkedField

public void jdoSetLinkedField(java.lang.String lf)
Assignes the linked field name for this generic class.

Specified by:
jdoSetLinkedField in interface SpeedoGenClassProxy
Parameters:
lf - is tring which represents the fully path of the persistent field of the class with wich the generic class is persistent. If the linked fiekf is the 'f1' provided by the class 'com.foo.Bar' then the expected string is 'com.foo.Bar/f1'

setElements

public void setElements(java.lang.Object o)
Assignes the new value of the generic class (Collection, Map or Array or ...).

Specified by:
setElements in interface SpeedoGenClassProxy

copyAccessor

public void copyAccessor(SpeedoAccessor src,
                         SpeedoAccessor dest)
Description copied from interface: SpeedoProxy
Copies persistent fields from an accessor to another.

Specified by:
copyAccessor in interface SpeedoProxy
Parameters:
src - is the accessor containing peristent fields to copy
dest - is the accessor where persistent fields have to be copied

jdoGetPNameHints

public java.lang.Object jdoGetPNameHints()
Description copied from interface: SpeedoProxy
Retrieves the hints needed to build the PName of the persistent object during the export action.

Specified by:
jdoGetPNameHints in interface SpeedoProxy

jdoIsActive

public boolean jdoIsActive()
Description copied from interface: SpeedoProxy
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.

Specified by:
jdoIsActive in interface SpeedoProxy
Returns:
true if this object is a Proxy.

jdoIsActive

public void jdoIsActive(boolean newvalue)
Description copied from interface: SpeedoProxy
Sets the new value of the proxy flags

Specified by:
jdoIsActive in interface SpeedoProxy
Parameters:
newvalue - the new value of the proxy flag
See Also:
SpeedoProxy.jdoIsActive()

getSpeedoAccessor

public SpeedoAccessor getSpeedoAccessor()
Description copied from interface: SpeedoProxy
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

Specified by:
getSpeedoAccessor in interface SpeedoProxy

getSpeedoAccessors

public java.util.Collection getSpeedoAccessors()

removeSpeedoAccessor

public void removeSpeedoAccessor(SpeedoAccessor sa)

jdoGetJdoFileName

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

setEncodedPName

public void setEncodedPName(java.lang.Object _encodedPName)
Description copied from interface: SpeedoProxy
Set the encoded PName of the detach copy to allow serialization.

Specified by:
setEncodedPName in interface SpeedoProxy
Parameters:
_encodedPName - : the encoded PName of the persistent object

getEncodedPName

public java.lang.Object getEncodedPName()
Specified by:
getEncodedPName in interface SpeedoProxy
Returns:
the encoded PName of the detached copy

getSpeedoHome

public SpeedoHome getSpeedoHome()
Specified by:
getSpeedoHome in interface SpeedoProxy

getCeObject

public java.lang.Object getCeObject()
Specified by:
getCeObject in interface org.objectweb.perseus.cache.api.CacheEntry

getCeIdentifier

public java.lang.Object getCeIdentifier()
Specified by:
getCeIdentifier in interface org.objectweb.perseus.cache.api.CacheEntry

fixCe

public void fixCe()
Specified by:
fixCe in interface org.objectweb.perseus.cache.api.FixableCacheEntry

unfixCe

public void unfixCe()
             throws org.objectweb.perseus.cache.api.UnFixProtocolException
Specified by:
unfixCe in interface org.objectweb.perseus.cache.api.FixableCacheEntry
Throws:
org.objectweb.perseus.cache.api.UnFixProtocolException

getCeFixCount

public int getCeFixCount()
Specified by:
getCeFixCount in interface org.objectweb.perseus.cache.api.FixableCacheEntry

getCeAge

public long getCeAge()
Specified by:
getCeAge in interface org.objectweb.perseus.cache.replacement.api.ReplaceableCacheEntry

setCeAge

public void setCeAge(long l)
Specified by:
setCeAge in interface org.objectweb.perseus.cache.replacement.api.ReplaceableCacheEntry

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger _logger)
Specified by:
setLogger in interface org.objectweb.jorm.util.api.Loggable

setLoggerFactory

public void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerfactory)
Specified by:
setLoggerFactory in interface org.objectweb.jorm.util.api.Loggable

getLogger

public org.objectweb.util.monolog.api.Logger getLogger()
Specified by:
getLogger in interface org.objectweb.jorm.util.api.Loggable

getLoggerFactory

public org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
Specified by:
getLoggerFactory in interface org.objectweb.jorm.util.api.Loggable