|
||||||||||||
| 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.
| 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 |
protected boolean jdoIsActive
protected org.objectweb.jorm.api.PBindingCtrl pbinding
public org.objectweb.util.monolog.api.Logger logger
protected java.lang.String mapperName
protected java.lang.String projectName
protected org.objectweb.jorm.type.api.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
protected java.lang.Object encodedPName
| Constructor Detail |
public GenClass()
| Method Detail |
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)
SpeedoGenClassProxy
init in interface SpeedoGenClassProxy_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.public void jdoSetPNameHints(java.lang.Object hints)
SpeedoGenClassProxy
jdoSetPNameHints in interface SpeedoGenClassProxypublic boolean elementIsReference()
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 SpeedoGenClassProxyl - 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,
java.lang.Object hints)
SpeedoGenClassCoherence
speedoAdd in interface SpeedoGenClassCoherenceelemToAdd - is the element to add
public boolean speedoRemove(java.lang.Object elemToRemove,
java.lang.Object hints)
SpeedoGenClassCoherence
speedoRemove in interface SpeedoGenClassCoherenceelemToRemove - is the element to removepublic void fireSpeedoElementAdded(java.lang.Object elem)
SpeedoGenClassProxy
fireSpeedoElementAdded in interface SpeedoGenClassProxyelem - the element that has been added.public void fireSpeedoElementRemoved(java.lang.Object elem)
SpeedoGenClassProxy
fireSpeedoElementRemoved in interface SpeedoGenClassProxyelem - the element that has been removed.public java.lang.Object getDataIdentifier(java.lang.Object o)
public java.util.Collection getDataIdentifiers(java.util.Collection os)
public abstract SpeedoAccessor createAccessor()
createAccessor in interface SpeedoProxypublic abstract SpeedoAccessor getReferenceAccessor()
getReferenceAccessor in interface SpeedoProxypublic abstract void setReferenceAccessor(SpeedoAccessor refAcc)
SpeedoProxy
setReferenceAccessor in interface SpeedoProxyrefAcc - the new reference accessor
public void bind(org.objectweb.jorm.naming.api.PName name)
throws org.objectweb.jorm.api.PException
bind in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public boolean exist(java.lang.Object o)
throws org.objectweb.jorm.api.PException
exist in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public org.objectweb.jorm.naming.api.PName export(java.lang.Object o)
throws org.objectweb.jorm.api.PException
export in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public org.objectweb.jorm.naming.api.PName export(java.lang.Object o,
java.lang.Object o1)
throws org.objectweb.jorm.api.PException
export in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PExceptionpublic org.objectweb.jorm.api.PClassMapping getPClassMapping()
getPClassMapping in interface org.objectweb.jorm.api.PBindingpublic org.objectweb.jorm.naming.api.PName getPName()
getPName in interface org.objectweb.jorm.api.PBindingpublic byte getStatus()
getStatus in interface org.objectweb.jorm.api.PBindingpublic void setPName(org.objectweb.jorm.naming.api.PName pName)
setPName in interface org.objectweb.jorm.api.PBindingCtrlpublic void setStatus(byte b)
setStatus in interface org.objectweb.jorm.api.PBindingCtrl
public void init(org.objectweb.jorm.api.PClassMapping mapping)
throws org.objectweb.jorm.api.PException
init in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public void read(java.lang.Object o,
org.objectweb.jorm.api.PAccessor accessor)
throws org.objectweb.jorm.api.PException
read in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public void read(java.lang.Object o,
org.objectweb.jorm.api.PAccessor pAccessor,
java.lang.Object o1)
throws org.objectweb.jorm.api.PException
read in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public void unbind()
throws org.objectweb.jorm.api.PException
unbind in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public void unexport(java.lang.Object o)
throws org.objectweb.jorm.api.PException
unexport in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PException
public void write(java.lang.Object o,
org.objectweb.jorm.api.PAccessor accessor)
throws org.objectweb.jorm.api.PException
write in interface org.objectweb.jorm.api.PBindingorg.objectweb.jorm.api.PExceptionpublic javax.jdo.PersistenceManager jdoGetPersistenceManager()
jdoGetPersistenceManager in interface javax.jdo.spi.PersistenceCapablepublic void jdoReplaceFlags()
jdoReplaceFlags in interface javax.jdo.spi.PersistenceCapablepublic javax.jdo.spi.PersistenceCapable jdoNewInstance(javax.jdo.spi.StateManager sm)
jdoNewInstance in interface javax.jdo.spi.PersistenceCapable
public javax.jdo.spi.PersistenceCapable jdoNewInstance(javax.jdo.spi.StateManager sm,
java.lang.Object oid)
jdoNewInstance in interface javax.jdo.spi.PersistenceCapablepublic java.lang.Object jdoNewObjectIdInstance(java.lang.Object arg0)
jdoNewObjectIdInstance in interface javax.jdo.spi.PersistenceCapablepublic java.lang.Object jdoNewObjectIdInstance()
jdoNewObjectIdInstance in interface javax.jdo.spi.PersistenceCapablepublic java.lang.Object jdoGetObjectId()
jdoGetObjectId in interface javax.jdo.spi.PersistenceCapablepublic java.lang.Object jdoGetVersion()
jdoGetVersion in interface javax.jdo.spi.PersistenceCapablepublic java.lang.Object jdoGetTransactionalObjectId()
jdoGetTransactionalObjectId in interface javax.jdo.spi.PersistenceCapablepublic void jdoReplaceField(int fieldNumber)
jdoReplaceField in interface javax.jdo.spi.PersistenceCapablepublic void jdoReplaceFields(int[] fieldNumbers)
jdoReplaceFields in interface javax.jdo.spi.PersistenceCapablepublic void jdoProvideField(int fieldNumber)
jdoProvideField in interface javax.jdo.spi.PersistenceCapablepublic void jdoProvideFields(int[] fieldNumbers)
jdoProvideFields in interface javax.jdo.spi.PersistenceCapable
public void jdoCopyFields(java.lang.Object pc,
int[] fieldNumbers)
jdoCopyFields in interface javax.jdo.spi.PersistenceCapablepublic void jdoMakeDirty(java.lang.String fieldName)
jdoMakeDirty in interface javax.jdo.spi.PersistenceCapablepublic boolean jdoIsDirty()
jdoIsDirty in interface javax.jdo.spi.PersistenceCapablepublic boolean jdoIsDetached()
jdoIsDetached in interface javax.jdo.spi.PersistenceCapablepublic void jdoReplaceObjectId(java.lang.Object arg0)
public boolean jdoIsTransactional()
jdoIsTransactional in interface javax.jdo.spi.PersistenceCapablepublic boolean jdoIsPersistent()
jdoIsPersistent in interface javax.jdo.spi.PersistenceCapablepublic boolean jdoIsNew()
jdoIsNew in interface javax.jdo.spi.PersistenceCapablepublic boolean jdoIsDeleted()
jdoIsDeleted in interface javax.jdo.spi.PersistenceCapablepublic void jdoReplaceStateManager(javax.jdo.spi.StateManager sm)
jdoReplaceStateManager in interface javax.jdo.spi.PersistenceCapablepublic java.lang.Object jdoNewObjectIdInstance(java.lang.String s)
public void jdoCopyKeyFieldsToObjectId(java.lang.Object o)
jdoCopyKeyFieldsToObjectId in interface javax.jdo.spi.PersistenceCapable
public void jdoCopyKeyFieldsToObjectId(javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier objectIdFieldSupplier,
java.lang.Object o)
jdoCopyKeyFieldsToObjectId in interface javax.jdo.spi.PersistenceCapable
public void jdoCopyKeyFieldsFromObjectId(javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer objectIdFieldConsumer,
java.lang.Object o)
jdoCopyKeyFieldsFromObjectId in interface javax.jdo.spi.PersistenceCapablepublic void jdoSetPType(org.objectweb.jorm.type.api.PType _ptype)
jdoSetPType in interface SpeedoGenClassProxy_ptype - of the generic classpublic org.objectweb.jorm.type.api.PType jdoGetPType()
jdoGetPType in interface SpeedoGenClassProxypublic void jdoSetPBinding(org.objectweb.jorm.api.PBinding pb)
jdoSetPBinding in interface SpeedoGenClassProxypb - is the PBinding.public org.objectweb.jorm.api.PBinding jdoGetPBinding()
jdoGetPBinding in interface SpeedoGenClassProxypublic java.lang.String jdoGetGenClassId()
jdoGetGenClassId in interface SpeedoGenClassProxypublic void jdoSetLinkedField(java.lang.String lf)
jdoSetLinkedField in interface SpeedoGenClassProxylf - 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 setElements(java.lang.Object o)
setElements in interface SpeedoGenClassProxy
public void copyAccessor(SpeedoAccessor src,
SpeedoAccessor dest)
SpeedoProxy
copyAccessor in interface SpeedoProxysrc - is the accessor containing peristent fields to copydest - is the accessor where persistent fields have to be copiedpublic java.lang.Object jdoGetPNameHints()
SpeedoProxy
jdoGetPNameHints in interface SpeedoProxypublic boolean jdoIsActive()
SpeedoProxy
jdoIsActive in interface SpeedoProxypublic void jdoIsActive(boolean newvalue)
SpeedoProxy
jdoIsActive in interface SpeedoProxynewvalue - the new value of the proxy flagSpeedoProxy.jdoIsActive()public SpeedoAccessor getSpeedoAccessor()
SpeedoProxy
getSpeedoAccessor in interface SpeedoProxypublic java.util.Collection getSpeedoAccessors()
public void removeSpeedoAccessor(SpeedoAccessor sa)
public java.lang.String jdoGetJdoFileName()
jdoGetJdoFileName in interface SpeedoProxypublic void setEncodedPName(java.lang.Object _encodedPName)
SpeedoProxy
setEncodedPName in interface SpeedoProxy_encodedPName - : the encoded PName of the persistent objectpublic java.lang.Object getEncodedPName()
getEncodedPName in interface SpeedoProxypublic SpeedoHome getSpeedoHome()
getSpeedoHome in interface SpeedoProxypublic java.lang.Object getCeObject()
getCeObject in interface org.objectweb.perseus.cache.api.CacheEntrypublic java.lang.Object getCeIdentifier()
getCeIdentifier in interface org.objectweb.perseus.cache.api.CacheEntrypublic void fixCe()
fixCe in interface org.objectweb.perseus.cache.api.FixableCacheEntry
public void unfixCe()
throws org.objectweb.perseus.cache.api.UnFixProtocolException
unfixCe in interface org.objectweb.perseus.cache.api.FixableCacheEntryorg.objectweb.perseus.cache.api.UnFixProtocolExceptionpublic int getCeFixCount()
getCeFixCount in interface org.objectweb.perseus.cache.api.FixableCacheEntrypublic long getCeAge()
getCeAge in interface org.objectweb.perseus.cache.replacement.api.ReplaceableCacheEntrypublic void setCeAge(long l)
setCeAge in interface org.objectweb.perseus.cache.replacement.api.ReplaceableCacheEntrypublic void setLogger(org.objectweb.util.monolog.api.Logger _logger)
setLogger in interface org.objectweb.jorm.util.api.Loggablepublic void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerfactory)
setLoggerFactory in interface org.objectweb.jorm.util.api.Loggablepublic org.objectweb.util.monolog.api.Logger getLogger()
getLogger in interface org.objectweb.jorm.util.api.Loggablepublic org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
getLoggerFactory in interface org.objectweb.jorm.util.api.Loggable
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||