|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.genclass.GenClass
This class is a basic implementation of the SpeedoGenClassProxy interface. It uses a delegate PBinding.
Field Summary | |
protected long |
age
|
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 |
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 PBindingCtrl |
pbinding
is the PBinding which permits to store/load the data into/from the support |
protected ProxyManagerFactory |
pmf
This is field is null when the proxy is not active |
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 PType |
ptype
is the type of the generic class |
protected TransactionalPersistenceManager |
tpm
This field is the Transactional persistence manager. |
Constructor Summary | |
GenClass()
|
Method Summary | |
void |
bind(PName name)
|
void |
copyAccessor(SpeedoAccessor src,
SpeedoAccessor dest)
|
abstract SpeedoAccessor |
createAccessor()
|
boolean |
elementIsReference()
|
boolean |
exist(java.lang.Object o)
|
PName |
export(java.lang.Object o)
|
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 |
getInner()
|
java.lang.Object |
getJormConfig()
It retrieves an object helping the configuration of the Jorm class. |
Logger |
getLogger()
|
LoggerFactory |
getLoggerFactory()
|
PClassMapping |
getPClassMapping()
|
PName |
getPName()
|
abstract SpeedoAccessor |
getReferenceAccessor()
|
SpeedoAccessor |
getSpeedoAccessor()
It retrieves the SpeedoAccessor instance used in the current context. |
java.util.Collection |
getSpeedoAccessors()
|
byte |
getStatus()
|
void |
init(PClassMapping mapping)
|
void |
init(PType ptype,
java.lang.String linkedField,
java.lang.Object pnameHints,
java.lang.String mapperName,
Logger logger)
Initializes a Genclass instance |
void |
jdoCopyFields(java.lang.Object pc,
int[] fieldNumbers)
|
void |
jdoCopyKeyFieldsFromObjectId(PersistenceCapable.ObjectIdFieldConsumer objectIdFieldConsumer,
java.lang.Object o)
|
void |
jdoCopyKeyFieldsToObjectId(java.lang.Object o)
|
void |
jdoCopyKeyFieldsToObjectId(PersistenceCapable.ObjectIdFieldSupplier objectIdFieldSupplier,
java.lang.Object o)
|
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 |
jdoGetGenClassId()
|
java.lang.String |
jdoGetJdoFileName()
|
java.lang.String |
jdoGetMapperName()
|
java.lang.Object |
jdoGetObjectId()
|
PBinding |
jdoGetPBinding()
|
PersistenceManager |
jdoGetPersistenceManager()
|
java.lang.String |
jdoGetProjectName()
|
ProxyManagerFactory |
jdoGetProxyManagerFactory()
|
PType |
jdoGetPType()
|
java.lang.Object |
jdoGetTransactionalObjectId()
|
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 |
boolean |
jdoIsDeleted()
|
boolean |
jdoIsDirty()
|
boolean |
jdoIsNew()
|
boolean |
jdoIsPersistent()
|
boolean |
jdoIsTransactional()
|
void |
jdoMakeDirty(java.lang.String fieldName)
|
void |
jdoMakePersistent(ProxyManager pm,
java.util.Iterator it)
|
void |
jdoMakePersistent(ProxyManager pm,
SpeedoProxy sp)
Askes to the SpeedoGenClassProxy to make persistent an element of the gen class. |
PersistenceCapable |
jdoNewInstance(StateManager sm)
|
PersistenceCapable |
jdoNewInstance(StateManager sm,
java.lang.Object oid)
|
java.lang.Object |
jdoNewObjectIdInstance()
|
java.lang.Object |
jdoNewObjectIdInstance(java.lang.String s)
|
void |
jdoProvideField(int fieldNumber)
|
void |
jdoProvideFields(int[] fieldNumbers)
|
SpeedoAccessor |
jdoReadIntention()
Askes the read access on the genclass. |
void |
jdoReplaceField(int fieldNumber)
|
void |
jdoReplaceFields(int[] fieldNumbers)
|
void |
jdoReplaceFlags()
|
void |
jdoReplaceStateManager(StateManager sm)
|
void |
jdoSetLinkedField(java.lang.String lf)
Assignes the linked field name for this generic class. |
void |
jdoSetMapperName(java.lang.String mn)
|
void |
jdoSetPBinding(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 |
jdoSetProxyManagerFactory(ProxyManagerFactory pmf)
It assignes a ProxyManagerFactory |
void |
jdoSetPType(PType ptype)
Assignes the PType of the generic class. |
void |
jdoSetTransactionalPersistenceManager(TransactionalPersistenceManager tpm)
It assignes a TransactionalPersistenceManager |
SpeedoAccessor |
jdoWriteIntention()
Askes the write access on the genclass. |
void |
read(java.lang.Object o,
PAccessor accessor)
|
void |
read(java.lang.Object o,
PAccessor pAccessor,
java.lang.Object o1)
|
void |
removeSpeedoAccessor(SpeedoAccessor sa)
|
void |
setCeAge(long l)
|
void |
setInner(java.lang.Object o)
Assignes the new value of the generic class (Collection, Map or Array or ...). |
void |
setLogger(Logger _logger)
|
void |
setLoggerFactory(LoggerFactory loggerfactory)
|
void |
setPName(PName pName)
|
abstract void |
setReferenceAccessor(SpeedoAccessor refAcc)
|
void |
setStatus(byte b)
|
boolean |
speedoAdd(java.lang.Object elemToAdd)
Askes the adding of an element into a generic class. |
void |
speedoAdd(java.lang.Object elem,
int gcFieldNumber)
Adds an element in the gen class field whose number is given. |
void |
speedoAddGenClassListener(SpeedoGenClassListener l)
Adds a listener to this gen class instance. |
boolean |
speedoRemove(java.lang.Object elemToRemove)
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,
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 |
Methods inherited from interface org.objectweb.speedo.mim.api.SpeedoProxy |
jdoMakePersistent |
Field Detail |
protected boolean jdoIsActive
protected ProxyManagerFactory pmf
protected TransactionalPersistenceManager tpm
protected PBindingCtrl pbinding
public Logger logger
protected java.lang.String mapperName
protected java.lang.String projectName
protected PType ptype
protected java.lang.String linkedField
protected java.lang.Object pnameHints
protected int gcid
protected java.util.List listeners
protected long age
protected int fix
Constructor Detail |
public GenClass()
Method Detail |
public void init(PType ptype, java.lang.String linkedField, java.lang.Object pnameHints, java.lang.String mapperName, Logger logger)
SpeedoGenClassProxy
init
in interface SpeedoGenClassProxy
ptype
- is the PType of the genclasslinkedField
- is the name of the field referencing the genclasspnameHints
- is a helper using for the identifier allocation (export)mapperName
- is the name of the mapper where the gen class is
persistentlogger
- is the logger instance for logging.public boolean elementIsReference()
public void jdoMakePersistent(ProxyManager pm, SpeedoProxy sp)
SpeedoGenClassProxy
jdoMakePersistent
in interface SpeedoGenClassProxy
pm
- is the persistence manager to use for making persistent the
speedo proxy. If this parameter is null a pm will be fetched on the pmf
if needed.sp
- is the speedo proxy to make persistent. null value is not
supported.public void jdoMakePersistent(ProxyManager pm, java.util.Iterator it)
public void speedoSetGcId(int gcid)
SpeedoGenClassProxy
speedoSetGcId
in interface SpeedoGenClassProxy
gcid
- the new id of this gen class instance.public void speedoAddGenClassListener(SpeedoGenClassListener l)
SpeedoGenClassProxy
speedoAddGenClassListener
in interface SpeedoGenClassProxy
l
- a gen class listener.public void speedoAdd(java.lang.Object elem, int gcFieldNumber)
SpeedoProxy
speedoAdd
in interface SpeedoProxy
public boolean speedoAdd(java.lang.Object elemToAdd)
SpeedoGenClassCoherence
speedoAdd
in interface SpeedoGenClassCoherence
elemToAdd
- is the element to addpublic boolean speedoRemove(java.lang.Object elemToRemove)
SpeedoGenClassCoherence
speedoRemove
in interface SpeedoGenClassCoherence
elemToRemove
- is the element to removepublic void fireSpeedoElementAdded(java.lang.Object elem)
SpeedoGenClassProxy
fireSpeedoElementAdded
in interface SpeedoGenClassProxy
elem
- the element that has been added.public void fireSpeedoElementRemoved(java.lang.Object elem)
SpeedoGenClassProxy
fireSpeedoElementRemoved
in interface SpeedoGenClassProxy
elem
- the element that has been removed.public abstract SpeedoAccessor createAccessor()
createAccessor
in interface SpeedoProxy
public abstract SpeedoAccessor getReferenceAccessor()
getReferenceAccessor
in interface SpeedoProxy
public abstract void setReferenceAccessor(SpeedoAccessor refAcc)
setReferenceAccessor
in interface SpeedoProxy
public void bind(PName name) throws PException
PException
public boolean exist(java.lang.Object o) throws PException
PException
public PName export(java.lang.Object o) throws PException
PException
public PName export(java.lang.Object o, java.lang.Object o1) throws PException
PException
public PClassMapping getPClassMapping()
public PName getPName()
public byte getStatus()
public void setPName(PName pName)
public void setStatus(byte b)
public void init(PClassMapping mapping) throws PException
PException
public void read(java.lang.Object o, PAccessor accessor) throws PException
PException
public void read(java.lang.Object o, PAccessor pAccessor, java.lang.Object o1) throws PException
PException
public void unbind() throws PException
PException
public void unexport(java.lang.Object o) throws PException
PException
public void write(java.lang.Object o, PAccessor accessor) throws PException
PException
public PersistenceManager jdoGetPersistenceManager()
public void jdoReplaceFlags()
public PersistenceCapable jdoNewInstance(StateManager sm)
public PersistenceCapable jdoNewInstance(StateManager sm, java.lang.Object oid)
public java.lang.Object jdoNewObjectIdInstance()
public java.lang.Object jdoGetObjectId()
public java.lang.Object jdoGetTransactionalObjectId()
public void jdoReplaceField(int fieldNumber)
public void jdoReplaceFields(int[] fieldNumbers)
public void jdoProvideField(int fieldNumber)
public void jdoProvideFields(int[] fieldNumbers)
public void jdoCopyFields(java.lang.Object pc, int[] fieldNumbers)
public void jdoMakeDirty(java.lang.String fieldName)
public boolean jdoIsDirty()
public boolean jdoIsTransactional()
public boolean jdoIsPersistent()
public boolean jdoIsNew()
public boolean jdoIsDeleted()
public void jdoReplaceStateManager(StateManager sm)
public java.lang.Object jdoNewObjectIdInstance(java.lang.String s)
public void jdoCopyKeyFieldsToObjectId(java.lang.Object o)
public void jdoCopyKeyFieldsToObjectId(PersistenceCapable.ObjectIdFieldSupplier objectIdFieldSupplier, java.lang.Object o)
public void jdoCopyKeyFieldsFromObjectId(PersistenceCapable.ObjectIdFieldConsumer objectIdFieldConsumer, java.lang.Object o)
public void jdoSetMapperName(java.lang.String mn)
jdoSetMapperName
in interface SpeedoGenClassProxy
mn
- is the mapper name by which the instance is persistent.public void jdoSetPType(PType ptype)
jdoSetPType
in interface SpeedoGenClassProxy
ptype
- of the generic classpublic PType jdoGetPType()
jdoGetPType
in interface SpeedoGenClassProxy
public void jdoSetPBinding(PBinding pb)
jdoSetPBinding
in interface SpeedoGenClassProxy
pb
- is the PBinding.public PBinding jdoGetPBinding()
jdoGetPBinding
in interface SpeedoGenClassProxy
public java.lang.String jdoGetGenClassId()
jdoGetGenClassId
in interface SpeedoGenClassProxy
public void jdoSetLinkedField(java.lang.String lf)
jdoSetLinkedField
in interface SpeedoGenClassProxy
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'public void setInner(java.lang.Object o)
setInner
in interface SpeedoGenClassProxy
public java.lang.Object getInner()
public void copyAccessor(SpeedoAccessor src, SpeedoAccessor dest)
copyAccessor
in interface SpeedoProxy
public java.lang.Object jdoGePNameHints()
SpeedoProxy
jdoGePNameHints
in interface SpeedoProxy
public void jdoSetPNameHints(java.lang.Object hints)
SpeedoProxy
jdoSetPNameHints
in interface SpeedoProxy
public java.lang.String jdoGetMapperName()
jdoGetMapperName
in interface SpeedoProxy
public java.lang.String jdoGetProjectName()
jdoGetProjectName
in interface SpeedoProxy
public boolean jdoIsActive()
SpeedoProxy
jdoIsActive
in interface SpeedoProxy
public void jdoIsActive(boolean newvalue)
SpeedoProxy
jdoIsActive
in interface SpeedoProxy
newvalue
- the new value of the proxy flagSpeedoProxy.jdoIsActive()
public SpeedoAccessor getSpeedoAccessor()
SpeedoProxy
getSpeedoAccessor
in interface SpeedoProxy
public java.util.Collection getSpeedoAccessors()
public void removeSpeedoAccessor(SpeedoAccessor sa)
public ProxyManagerFactory jdoGetProxyManagerFactory()
jdoGetProxyManagerFactory
in interface SpeedoProxy
public void jdoSetProxyManagerFactory(ProxyManagerFactory pmf)
SpeedoProxy
jdoSetProxyManagerFactory
in interface SpeedoProxy
pmf
- is the ProxyManagerFactory which represents the data
support inside which the proxy is persistent.public TransactionalPersistenceManager jdoGetTransactionalPersistenceManager()
jdoGetTransactionalPersistenceManager
in interface SpeedoProxy
public void jdoSetTransactionalPersistenceManager(TransactionalPersistenceManager tpm)
SpeedoProxy
jdoSetTransactionalPersistenceManager
in interface SpeedoProxy
tpm
- is the TransactionalPersistenceManager which manage the
concurrency, loading, ... of the proxy.public SpeedoAccessor jdoReadIntention()
SpeedoGenClassProxy
jdoReadIntention
in interface SpeedoGenClassProxy
public SpeedoAccessor jdoWriteIntention()
SpeedoGenClassProxy
jdoWriteIntention
in interface SpeedoGenClassProxy
public java.lang.Object getJormConfig()
SpeedoProxy
getJormConfig
in interface SpeedoProxy
public java.lang.String jdoGetJdoFileName()
jdoGetJdoFileName
in interface SpeedoProxy
public void jdoDeletePersistent(ProxyManager pm, SpeedoAccessor sa)
jdoDeletePersistent
in interface SpeedoProxy
public java.lang.Object getCeObject()
public java.lang.Object getCeIdentifier()
public void fixCe()
public void unfixCe() throws UnFixProtocolException
UnFixProtocolException
public int getCeFixCount()
public long getCeAge()
public void setCeAge(long l)
public void setLogger(Logger _logger)
public void setLoggerFactory(LoggerFactory loggerfactory)
public Logger getLogger()
public LoggerFactory getLoggerFactory()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |