|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.objectweb.jorm.genclass.lib.GenClassBinding
This abstract class provides all the generic code for PBinding associated with JORM generic classes. It implements all methods except "exist", "read", and "write" (indeed, all I/O methods are DS-specific).
| Field Summary | |
protected GenClassMapping |
genClassMapping
The PClassMapping that manages this GenClass PBinding. |
protected java.util.ArrayList |
indexes
This fields |
protected PName |
pName
The PName of this PBinding object, which gives access to the relevant DSI. |
protected byte |
status
The current state of this PBinding object. |
| 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 | |
GenClassBinding()
It contructs |
|
GenClassBinding(GenClassMapping mapping)
It contructs |
|
| Method Summary | |
void |
bind(PName pn)
It assigns a DSI represented by the PName passed as a parameter to this PBinding. |
PName |
export(java.lang.Object conn)
It creates a new PName for this binding, the binding state is normally changed to LIFECYCLE_NEWTOWRITE, and the link to a data store instance if it existed is removed. |
PName |
export(java.lang.Object conn,
java.lang.Object hints)
It creates a new PName for this binding, the binding state is normally changed to LIFECYCLE_NEWTOWRITE, and the link to a data store instance if it existed is removed. |
PClassMapping |
getPClassMapping()
It gives access to the PClassMapping which manages this binding. |
PName |
getPName()
It gives access to the PName, which designate a particular DSI, associated to this binding. |
byte |
getStatus()
It yields the current status associated with this PBinding. |
void |
init(PClassMapping pcm)
It initialises a PBinding. |
void |
read(java.lang.Object conn,
PAccessor pa,
java.lang.Object txctx)
It reads the data store instance designated by the PName of this binding and transfers each attribute value to the accessor object. |
void |
setPName(PName pn)
It assigns the current PName associated with this PBinding. |
void |
setStatus(byte s)
It assigns the current status associated with this PBinding. |
void |
unbind()
It remove the association between a PName and a PBinding. |
void |
unexport(java.lang.Object conn)
It prepares this PBinding to remove the data store instance from the data store. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.objectweb.jorm.api.PBinding |
exist, read, write |
| Field Detail |
protected byte status
protected GenClassMapping genClassMapping
protected PName pName
protected java.util.ArrayList indexes
| Constructor Detail |
public GenClassBinding()
public GenClassBinding(GenClassMapping mapping)
throws PExceptionProtocol
| Method Detail |
public void bind(PName pn)
throws PException
bind in interface PBindingpn - The new PName to associate to this binding. This name
must belong to the binder associated to this binding.
PExceptionNaming - It is raised when there is a problem for the
associated binder to manage this PName.
PException
public PName export(java.lang.Object conn)
throws PException
export in interface PBindingconn - The connection that can be used to refer to the DS.
PExceptionIO - It is raised when a problem occured while
accessing to the DS.
PExceptionNaming - It is raised when the associated binder
does not manage to create a new name.
PExceptionProtocol - It is raised when it is called with a
state different from the following ones:
LIFECYCLE_ACTIVEFORIO
LIFECYCLE_DELTOWRITE
LIFECYCLE_NEWTOWRITE
LIFECYCLE_NOACC
PException
public PName export(java.lang.Object conn,
java.lang.Object hints)
throws PException
PBinding
export in interface PBindingconn - The connection that can be used to refer to the DS.hints - Any information relevant for name creation.
PExceptionpublic PClassMapping getPClassMapping()
getPClassMapping in interface PBindingpublic PName getPName()
null if the binding
has not been given a PName using a bind or export method.
getPName in interface PBindingpublic byte getStatus()
getStatus in interface PBinding
public void init(PClassMapping pcm)
throws PExceptionProtocol
init in interface PBindingpcm - The PBinding to initialise.
PExceptionProtocol - This PBinding cannot be managed by this
PClassMapping.
public void unbind()
throws PException
unbind in interface PBindingPExceptionNaming - It is raised when there is a problem for the
associated binder to manage this PName.
PException
public void unexport(java.lang.Object conn)
throws PException
unexport in interface PBindingconn - The connection that can be used to refer to the DS.
PExceptionNaming - It is raised when there is a problem for the
associated binder to manage this PName.
PExceptionProtocol - It is raised when it is called with a
state different from the following ones:
LIFECYCLE_ACTIVEFORIO
LIFECYCLE_DELTOWRITE
LIFECYCLE_NEWTOWRITE
PException
public void read(java.lang.Object conn,
PAccessor pa,
java.lang.Object txctx)
throws PException
read in interface PBindingconn - The connection that can be used to refer to the DS.pa - The PAccessor used to access memory variables.txctx - The transaction context that can be used in case of
prefetching.
PExceptionIO - It is raised when a problem occured while
accessing to the DS.
PExceptionNaming - It is raised when there is a problem for the
associated binder to manage this PName.
PExceptionProtocol - It is raised when it is called with a
state different from the following ones:
LIFECYCLE_ACTIVEFORIO
PExceptionpublic void setPName(PName pn)
setPName in interface PBindingCtrlpublic void setStatus(byte s)
setStatus in interface PBindingCtrl
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||