|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.lib.PBindingImpl
This class is the default implementation of the PBinding interface.
Field Summary | |
PClassMapping |
pClassMapping
|
protected PName |
pname
|
protected byte |
status
|
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 | |
PBindingImpl()
|
|
PBindingImpl(PClassMapping pcm)
|
Method Summary | |
void |
bind(PName pn)
It assigns a DSI represented by the PName passed as a parameter to this PBinding. |
boolean |
exist(java.lang.Object conn)
It verifies if the DSI attached to this binding exists within the DS. |
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)
It reads the data store instance designated by the PName of this binding and transfers each attribute value to the accessor object. |
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 |
read(java.lang.Object conn,
PAccessor pa,
java.lang.Object txctx,
boolean forUpdate)
|
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. |
void |
write(java.lang.Object conn,
PAccessor pa)
It transfers each attribute value taken from the PAccessor object to the data store instance designated by the PName associated with this binding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient byte status
public transient PClassMapping pClassMapping
protected transient PName pname
Constructor Detail |
public PBindingImpl()
public PBindingImpl(PClassMapping pcm)
Method Detail |
public void bind(PName pn) throws PException
PBinding
bind
in interface PBinding
pn
- The new PName to associate to this binding. This name
must belong to the binder associated to this binding.
PException
public boolean exist(java.lang.Object conn) throws PException
PBinding
exist
in interface PBinding
conn
- The connection that can be used to refer to the DS.
PException
public PName export(java.lang.Object conn) throws PException
PBinding
export
in interface PBinding
conn
- The connection that can be used to refer to the DS.
PException
public PName export(java.lang.Object conn, java.lang.Object hints) throws PException
PBinding
export
in interface PBinding
conn
- The connection that can be used to refer to the DS.hints
- Any information relevant for name creation.
PException
public PClassMapping getPClassMapping()
PBinding
getPClassMapping
in interface PBinding
public PName getPName()
PBinding
null
if the binding
has not been given a PName using a bind or export method.
getPName
in interface PBinding
public byte getStatus()
PBinding
getStatus
in interface PBinding
public void setPName(PName pn)
PBindingCtrl
setPName
in interface PBindingCtrl
public void setStatus(byte s)
PBindingCtrl
setStatus
in interface PBindingCtrl
public void init(PClassMapping pcm) throws PException
PBinding
init
in interface PBinding
pcm
- The PBinding to initialise.
PException
public void read(java.lang.Object conn, PAccessor pa) throws PException
PBinding
read
in interface PBinding
conn
- The connection that can be used to refer to the DS.pa
- The PAccessor used to access memory variables.
PException
public void read(java.lang.Object conn, PAccessor pa, java.lang.Object txctx) throws PException
PBinding
read
in interface PBinding
conn
- 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.
PException
public void read(java.lang.Object conn, PAccessor pa, java.lang.Object txctx, boolean forUpdate) throws PException
read
in interface PBinding
PException
public void unbind() throws PException
PBinding
unbind
in interface PBinding
PException
public void unexport(java.lang.Object conn) throws PException
PBinding
unexport
in interface PBinding
conn
- The connection that can be used to refer to the DS.
PException
public void write(java.lang.Object conn, PAccessor pa) throws PException
PBinding
write
in interface PBinding
conn
- The connection that can be used to refer to the DS.pa
- The PAccessor used to access memory variables.
PException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |