org.objectweb.jorm.naming.lib
Class BasicPBinder

java.lang.Object
  extended byorg.objectweb.jorm.naming.lib.BasicPNamingContext
      extended byorg.objectweb.jorm.naming.lib.BasicPBinder
All Implemented Interfaces:
PBinder, PNameCoder, PNameManager, PNamingContext
Direct Known Subclasses:
CompositePBinder, RdbSequenceBinder

public abstract class BasicPBinder
extends BasicPNamingContext
implements PBinder

It defines the a basic PBinder which able to be also a PNamingContext.

Author:
S.Chassande-Barrioz

Field Summary
protected  CacheManager cache
           
protected  PName nullPName
           
protected  PClassMapping pcm
           
 
Fields inherited from class org.objectweb.jorm.naming.lib.BasicPNamingContext
ptype
 
Fields inherited from interface org.objectweb.jorm.naming.api.PNameCoder
CTBIGDECIMAL, CTBIGINTEGER, CTBYTE, CTBYTEARRAY, CTCHAR, CTCHARARRAY, CTCOMPOSITE, CTDATE, CTINT, CTLONG, CTOBYTE, CTOCHAR, CTOINT, CTOLONG, CTOSHORT, CTSHORT, CTSTRING, CTSYSTEM
 
Constructor Summary
BasicPBinder()
           
BasicPBinder(PClassMapping _pcm)
           
BasicPBinder(PName nullPName)
           
 
Method Summary
 void bind(PName pn, PBindingCtrl pb)
          It associates a PBinding object with a PName within a PBinder.
 PClassMapping getBinderClassMapping()
          It returns the PClassMapping for which it is the binder.
 CacheManager getCacheManager()
          Returns the cache manager associated with this binder.
 java.lang.String getClassName()
           
 PName getNull()
          It yields a "null" representation of a name within this naming context.
 PBinding lookup(PName pn)
          It looks for a PBinding object with the given PName within a PBinder.
 void setCacheManager(CacheManager cm)
          Assigns the cache manager associated with this binder.
 void setNullPName(java.lang.Object o)
          It assignes a object which defines a null representation of a name within this naming context.
 void setPClassMapping(PClassMapping pcm)
          It set the PClassMapping which use this binder slave.
 void unbind(PBindingCtrl pb)
          It releases the link between the PBinding passed as parameter and its associated DSI represented by the PName referenced by this PBinding.
 
Methods inherited from class org.objectweb.jorm.naming.lib.BasicPNamingContext
codingSupported, decode, decodeAbstract, decodeBigDecimal, decodeBigInteger, decodeByte, decodeChar, decodeCharArray, decodeDate, decodeInt, decodeLong, decodeObyte, decodeOchar, decodeOint, decodeOlong, decodeOshort, decodeShort, encode, encodeAbstract, encodeBigDecimal, encodeBigInteger, encodeByte, encodeChar, encodeCharArray, encodeDate, encodeInt, encodeLong, encodeObyte, encodeOchar, encodeOint, encodeOlong, encodeOshort, encodeShort, getPType, setPType, supportCompositeField, supportDynamicComposite, supportStaticComposite
 
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.naming.api.PNameManager
export, export, unexport, unexport
 
Methods inherited from interface org.objectweb.jorm.naming.api.PNameCoder
codingSupported, decode, decodeAbstract, decodeBigDecimal, decodeBigInteger, decodeByte, decodeChar, decodeCharArray, decodeDate, decodeInt, decodeLong, decodeObyte, decodeOchar, decodeOint, decodeOlong, decodeOshort, decodeShort, decodeString, encode, encodeAbstract, encodeBigDecimal, encodeBigInteger, encodeByte, encodeChar, encodeCharArray, encodeDate, encodeInt, encodeLong, encodeObyte, encodeOchar, encodeOint, encodeOlong, encodeOshort, encodeShort, encodeString, getPType, setPType, supportCompositeField, supportDynamicComposite, supportStaticComposite
 
Methods inherited from interface org.objectweb.jorm.naming.api.PNamingContext
resolve
 

Field Detail

cache

protected CacheManager cache

pcm

protected PClassMapping pcm

nullPName

protected PName nullPName
Constructor Detail

BasicPBinder

public BasicPBinder()

BasicPBinder

public BasicPBinder(PClassMapping _pcm)

BasicPBinder

public BasicPBinder(PName nullPName)
Method Detail

getClassName

public java.lang.String getClassName()

lookup

public PBinding lookup(PName pn)
                throws PException
Description copied from interface: PBinder
It looks for a PBinding object with the given PName within a PBinder.

Specified by:
lookup in interface PBinder
Parameters:
pn - The PName to associate to the PBinding. This PName must be valid within this binder just like with a naming context.
Returns:
The PBinding bound with the given PName.
Throws:
PException

bind

public void bind(PName pn,
                 PBindingCtrl pb)
          throws PException
Description copied from interface: PBinder
It associates a PBinding object with a PName within a PBinder. This sets/resets the link between a PBinding and a DSI.

Specified by:
bind in interface PBinder
Parameters:
pn - The PName to associate to the PBinding. This PName must be valid within this binder just like with a naming context.
pb - The PBinding to bind with the given PName; this PBinding must have been created or initialised by this PBinder.
Throws:
PException

getBinderClassMapping

public PClassMapping getBinderClassMapping()
Description copied from interface: PBinder
It returns the PClassMapping for which it is the binder.

Specified by:
getBinderClassMapping in interface PBinder
Returns:
The PClassMapping to which it is associated.

setPClassMapping

public void setPClassMapping(PClassMapping pcm)
Description copied from interface: PBinder
It set the PClassMapping which use this binder slave.

Specified by:
setPClassMapping in interface PBinder
Parameters:
pcm - The PClassMapping.

unbind

public void unbind(PBindingCtrl pb)
            throws PException
Description copied from interface: PBinder
It releases the link between the PBinding passed as parameter and its associated DSI represented by the PName referenced by this PBinding.

Specified by:
unbind in interface PBinder
Parameters:
pb - The PBinding to unbind.
Throws:
PException

getCacheManager

public CacheManager getCacheManager()
Description copied from interface: PBinder
Returns the cache manager associated with this binder.

Specified by:
getCacheManager in interface PBinder
Returns:
The cache manager.

setCacheManager

public void setCacheManager(CacheManager cm)
                     throws PException
Description copied from interface: PBinder
Assigns the cache manager associated with this binder.

Specified by:
setCacheManager in interface PBinder
Parameters:
cm - The cache manager.
Throws:
PException

getNull

public PName getNull()
Description copied from interface: PNameCoder
It yields a "null" representation of a name within this naming context.

Specified by:
getNull in interface PNameCoder
Returns:
The "null" PName associated with this naming context.

setNullPName

public void setNullPName(java.lang.Object o)
                  throws PException
Description copied from interface: PNameCoder
It assignes a object which defines a null representation of a name within this naming context.

Specified by:
setNullPName in interface PNameCoder
Parameters:
o - can be a PNameGetter (generic or generated), a pname, or a simple value (ex: Integer).
Throws:
PException