org.objectweb.jorm.facility.naming.basidir
Class BasidBinder

java.lang.Object
  extended byorg.objectweb.jorm.facility.naming.basidir.BasidBinder
All Implemented Interfaces:
PBinder, PNameCoder, PNameManager, PNamingContext

public class BasidBinder
extends java.lang.Object
implements PBinder, PNamingContext

Author:
Sebastien Chassande-Barrioz

Field Summary
protected  int codingType
           
protected  java.lang.Object nullOValue
           
protected  long nullValue
           
protected  PClassMapping pcm
           
protected  PType 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
BasidBinder()
           
BasidBinder(int codingtype)
           
BasidBinder(int codingtype, long nullValue)
           
BasidBinder(int codingtype, java.lang.Object nullValue)
           
BasidBinder(PMapper m, java.lang.String genname, byte clact)
           
 
Method Summary
 void bind(PName pn, PBindingCtrl pb)
          It associates a PBinding object with a PName within a PBinder.
 boolean codingSupported(int codingtype)
          It tests if a given coding type is supported by this naming context.
 PName decode(byte[] en)
          The decode methods recreates PName within a naming context from an encoded representation.
 PName decodeAbstract(java.lang.Object en, java.lang.Object context)
          The decodeAbstract methods recreates PName within a naming context from an encoded representation.
 PName decodeBigDecimal(java.math.BigDecimal en)
          The decodeBigDecimal methods recreates PName within a naming context from an encoded representation.
 PName decodeBigInteger(java.math.BigInteger en)
          The decodeBigInteger methods recreates PName within a naming context from an encoded representation.
 PName decodeByte(byte en)
          The decodeByte methods recreates PName within a naming context from an encoded representation.
 PName decodeChar(char en)
          The decodeChar methods recreates PName within a naming context from an encoded representation.
 PName decodeCharArray(char[] en)
          The decodeCharArray methods recreates PName within a naming context from an encoded representation.
 PName decodeDate(java.util.Date en)
          The decodeDate methods recreates PName within a naming context from an encoded representation.
 PName decodeInt(int en)
          The decodeInt methods recreates PName within a naming context from an encoded representation.
 PName decodeLong(long en)
          The decodeLong methods recreates PName within a naming context from an encoded representation.
 PName decodeObyte(java.lang.Byte en)
          The decodeObyte methods recreates PName within a naming context from an encoded representation.
 PName decodeOchar(java.lang.Character en)
          The decodeOchar methods recreates PName within a naming context from an encoded representation.
 PName decodeOint(java.lang.Integer en)
          The decodeOint methods recreates PName within a naming context from an encoded representation.
 PName decodeOlong(java.lang.Long en)
          The decodeOlong methods recreates PName within a naming context from an encoded representation.
 PName decodeOshort(java.lang.Short en)
          The decodeOshort methods recreates PName within a naming context from an encoded representation.
 PName decodeShort(short en)
          The decodeShort methods recreates PName within a naming context from an encoded representation.
 PName decodeString(java.lang.String en)
          The decodeString methods recreates PName within a naming context from an encoded representation.
 byte[] encode(PName pn)
          The encode method produces an encoded representation of a PName within a naming context.
 java.lang.Object encodeAbstract(PName pn)
          The encodeAbstract method produces an encoded representation of a PName within a naming context.
 java.math.BigDecimal encodeBigDecimal(PName pn)
          The encodeBigDecimal method produces an encoded representation of a PName within a naming context.
 java.math.BigInteger encodeBigInteger(PName pn)
          The encodeBigInteger method produces an encoded representation of a PName within a naming context.
 byte encodeByte(PName pn)
          The encodeByte method produces an encoded representation of a PName within a naming context.
 char encodeChar(PName pn)
          The encodeChar method produces an encoded representation of a PName within a naming context.
 char[] encodeCharArray(PName pn)
          The encodeCharArray method produces an encoded representation of a PName within a naming context.
 java.util.Date encodeDate(PName pn)
          The encodeDate method produces an encoded representation of a PName within a naming context.
 int encodeInt(PName pn)
          The encodeInt method produces an encoded representation of a PName within a naming context.
 long encodeLong(PName pn)
          The encodeLong method produces an encoded representation of a PName within a naming context.
 java.lang.Byte encodeObyte(PName pn)
          The encodeObyte method produces an encoded representation of a PName within a naming context.
 java.lang.Character encodeOchar(PName pn)
          The encodeOchar method produces an encoded representation of a PName within a naming context.
 java.lang.Integer encodeOint(PName pn)
          The encodeOint method produces an encoded representation of a PName within a naming context.
 java.lang.Long encodeOlong(PName pn)
          The encodeOlong method produces an encoded representation of a PName within a naming context.
 java.lang.Short encodeOshort(PName pn)
          The encodeOshort method produces an encoded representation of a PName within a naming context.
 short encodeShort(PName pn)
          The encodeShort method produces an encoded representation of a PName within a naming context.
 java.lang.String encodeString(PName pn)
          The encodeString method produces an encoded representation of a PName within a naming context.
 PName export(java.lang.Object conn, java.lang.Object en)
          It associates a PName to an information item within a naming context.
 PName export(java.lang.Object conn, java.lang.Object en, java.lang.Object hints)
          It associates a PName to an information item within a naming context.
 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()
           
 int getCodingType()
           
 PName getNull()
          It yields a "null" representation of a name within this naming context.
 PType getPType()
          Retrieves the PType associated to the JORM class which is the type of the name managed by this naming context.
 PBinding lookup(PName pn)
          It looks for a PBinding object with the given PName within a PBinder.
 PName resolve(java.lang.Object conn, PName pn)
          It retrieves the information item associated to the given PName (if any exists).
 void setCacheManager(CacheManager cm)
          Assigns the cache manager associated with this binder.
 void setCodingType(int codingType)
           
 void setNullPName(java.lang.Object o)
          It defines the null PName since a BasidName or an object value If the encoding is an object format the given value will be the null encoded valued.
 void setNulOValue(java.lang.Object nullvalue)
           
 void setNulValue(long nullvalue)
           
 void setPClassMapping(PClassMapping pcm)
          It set the PClassMapping which use this binder slave.
 void setPType(PType pt)
          Assigns the PType associated to the JORM class which is the type of the name managed by this naming context.
 boolean supportCompositeField(java.lang.String fn, PType ft)
          In case of a naming context that supports composite names (i.e., names composed of several typed fields, whose type is limited to scalar ones), it tests if a particular field is defined by this composite name.
 boolean supportDynamicComposite()
          Tests if this naming context supports comosite name through a dynamic approach, which means that encodingAbstract/decodingAbstract use getter objects that implement the PNameGetter interface.
 boolean supportStaticComposite()
          Tests if this naming context supports comosite name through a static approach, which means that encodingAbstract/decodingAbstract use getter objects that implement specific NsFieldGetter interface generated for a particular field "Field" within a particular NameDef space "Ns".
 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.
 void unexport(java.lang.Object conn, PName pn)
          It removes the PName and all the associated information within a naming context (i.e., the association between the PName and its information item).
 void unexport(java.lang.Object conn, PName pn, java.lang.Object hints)
          It removes the PName and all the associated information within a naming context (i.e., the association between the PName and its information item).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codingType

protected int codingType

nullOValue

protected java.lang.Object nullOValue

nullValue

protected long nullValue

ptype

protected PType ptype

pcm

protected PClassMapping pcm
Constructor Detail

BasidBinder

public BasidBinder()

BasidBinder

public BasidBinder(PMapper m,
                   java.lang.String genname,
                   byte clact)
            throws PException

BasidBinder

public BasidBinder(int codingtype)

BasidBinder

public BasidBinder(int codingtype,
                   java.lang.Object nullValue)

BasidBinder

public BasidBinder(int codingtype,
                   long nullValue)
Method Detail

getCodingType

public int getCodingType()

setCodingType

public void setCodingType(int codingType)

setNulOValue

public void setNulOValue(java.lang.Object nullvalue)

setNulValue

public void setNulValue(long nullvalue)

codingSupported

public boolean codingSupported(int codingtype)
Description copied from interface: PNameCoder
It tests if a given coding type is supported by this naming context.

Specified by:
codingSupported in interface PNameCoder
Parameters:
codingtype - One of the coding type defined by CTxxx constants defined within this interface.
Returns:
It returns true if the coding type is supported by this naming context.

decode

public PName decode(byte[] en)
             throws PExceptionNaming
Description copied from interface: PNameCoder
The decode methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is an array of bytes. It must always be supported by a naming context.

Specified by:
decode in interface PNameCoder
Parameters:
en - The byte to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming

decodeAbstract

public PName decodeAbstract(java.lang.Object en,
                            java.lang.Object context)
                     throws PExceptionNaming,
                            java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeAbstract methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is abstract, which means that this is a Java object of any complexity. One example of such object is a getter interface representing a relational primary key (also called composite names).

Specified by:
decodeAbstract in interface PNameCoder
Parameters:
context - A context used to decode the related data.
en - The Object to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeByte

public PName decodeByte(byte en)
                 throws PExceptionNaming,
                        java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeByte methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a byte.

Specified by:
decodeByte in interface PNameCoder
Parameters:
en - The byte to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeObyte

public PName decodeObyte(java.lang.Byte en)
                  throws PExceptionNaming,
                         java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeObyte methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a byte.

Specified by:
decodeObyte in interface PNameCoder
Parameters:
en - The Byte to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeChar

public PName decodeChar(char en)
                 throws PExceptionNaming,
                        java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeChar methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a char.

Specified by:
decodeChar in interface PNameCoder
Parameters:
en - The char to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeOchar

public PName decodeOchar(java.lang.Character en)
                  throws PExceptionNaming,
                         java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeOchar methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a Character.

Specified by:
decodeOchar in interface PNameCoder
Parameters:
en - The Character to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeInt

public PName decodeInt(int en)
                throws PExceptionNaming,
                       java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeInt methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is an int.

Specified by:
decodeInt in interface PNameCoder
Parameters:
en - The int to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeOint

public PName decodeOint(java.lang.Integer en)
                 throws PExceptionNaming,
                        java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeOint methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is an Integer.

Specified by:
decodeOint in interface PNameCoder
Parameters:
en - The Integer to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeLong

public PName decodeLong(long en)
                 throws PExceptionNaming,
                        java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeLong methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a long.

Specified by:
decodeLong in interface PNameCoder
Parameters:
en - The long to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeOlong

public PName decodeOlong(java.lang.Long en)
                  throws PExceptionNaming,
                         java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeOlong methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a Long.

Specified by:
decodeOlong in interface PNameCoder
Parameters:
en - The Long to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeShort

public PName decodeShort(short en)
                  throws PExceptionNaming,
                         java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeShort methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a short.

Specified by:
decodeShort in interface PNameCoder
Parameters:
en - The short to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeOshort

public PName decodeOshort(java.lang.Short en)
                   throws PExceptionNaming,
                          java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The decodeOshort methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a Short.

Specified by:
decodeOshort in interface PNameCoder
Parameters:
en - The Short to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

decodeString

public PName decodeString(java.lang.String en)
                   throws PExceptionNaming
Description copied from interface: PNameCoder
The decodeString methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a String.

Specified by:
decodeString in interface PNameCoder
Parameters:
en - The String to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming

decodeCharArray

public PName decodeCharArray(char[] en)
                      throws PExceptionNaming
Description copied from interface: PNameCoder
The decodeCharArray methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a String.

Specified by:
decodeCharArray in interface PNameCoder
Parameters:
en - The char[] to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming

decodeDate

public PName decodeDate(java.util.Date en)
                 throws PExceptionNaming
Description copied from interface: PNameCoder
The decodeDate methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a Date.

Specified by:
decodeDate in interface PNameCoder
Parameters:
en - The Date to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming

decodeBigInteger

public PName decodeBigInteger(java.math.BigInteger en)
                       throws PExceptionNaming
Description copied from interface: PNameCoder
The decodeBigInteger methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a BigInteger.

Specified by:
decodeBigInteger in interface PNameCoder
Parameters:
en - The BigInteger to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming

decodeBigDecimal

public PName decodeBigDecimal(java.math.BigDecimal en)
                       throws PExceptionNaming
Description copied from interface: PNameCoder
The decodeBigDecimal methods recreates PName within a naming context from an encoded representation. In the case of this method, the encoded representation is a BigDecimal.

Specified by:
decodeBigDecimal in interface PNameCoder
Parameters:
en - The BigDecimal to be decoded.
Returns:
The resulting PName.
Throws:
PExceptionNaming

encode

public byte[] encode(PName pn)
              throws PExceptionNaming
Description copied from interface: PNameCoder
The encode method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is an array of bytes. It must be always supported by a naming context.

Specified by:
encode in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The array of bytes corresponding to the encoded representation.
Throws:
PExceptionNaming

encodeAbstract

public java.lang.Object encodeAbstract(PName pn)
                                throws PExceptionNaming,
                                       java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeAbstract method produces an encoded representation of a PName within a naming context. The encoding format is the case of this method is a Java object of any complexity. Example of such object is a getter interface giving access of the fields of a relational primary key (also called composite names).

Specified by:
encodeAbstract in interface PNameCoder
Parameters:
pn - The PName to be encoded.
Returns:
The Object corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeByte

public byte encodeByte(PName pn)
                throws PExceptionNaming,
                       java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeByte method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a byte.

Specified by:
encodeByte in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The byte corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeObyte

public java.lang.Byte encodeObyte(PName pn)
                           throws PExceptionNaming,
                                  java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeObyte method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a Byte.

Specified by:
encodeObyte in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The Byte corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeChar

public char encodeChar(PName pn)
                throws PExceptionNaming,
                       java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeChar method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a char.

Specified by:
encodeChar in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The char corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeOchar

public java.lang.Character encodeOchar(PName pn)
                                throws PExceptionNaming,
                                       java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeOchar method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a Character.

Specified by:
encodeOchar in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The Character corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeInt

public int encodeInt(PName pn)
              throws PExceptionNaming,
                     java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeInt method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a int.

Specified by:
encodeInt in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The int corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeOint

public java.lang.Integer encodeOint(PName pn)
                             throws PExceptionNaming,
                                    java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeOint method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a Integer.

Specified by:
encodeOint in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The Integer corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeLong

public long encodeLong(PName pn)
                throws PExceptionNaming,
                       java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeLong method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a long.

Specified by:
encodeLong in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The long corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeOlong

public java.lang.Long encodeOlong(PName pn)
                           throws PExceptionNaming,
                                  java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeOlong method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a Long.

Specified by:
encodeOlong in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The Long corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeShort

public short encodeShort(PName pn)
                  throws PExceptionNaming,
                         java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeShort method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a short.

Specified by:
encodeShort in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The short corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeOshort

public java.lang.Short encodeOshort(PName pn)
                             throws PExceptionNaming,
                                    java.lang.UnsupportedOperationException
Description copied from interface: PNameCoder
The encodeOshort method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a Short.

Specified by:
encodeOshort in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The Short corresponding to the encoded representation.
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

encodeString

public java.lang.String encodeString(PName pn)
                              throws PExceptionNaming
Description copied from interface: PNameCoder
The encodeString method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a String.

Specified by:
encodeString in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The String corresponding to the encoded representation.
Throws:
PExceptionNaming

encodeCharArray

public char[] encodeCharArray(PName pn)
                       throws PExceptionNaming
Description copied from interface: PNameCoder
The encodeCharArray method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a char[].

Specified by:
encodeCharArray in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The char[] corresponding to the encoded representation.
Throws:
PExceptionNaming

encodeDate

public java.util.Date encodeDate(PName pn)
                          throws PExceptionNaming
Description copied from interface: PNameCoder
The encodeDate method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a Date.

Specified by:
encodeDate in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The Date corresponding to the encoded representation.
Throws:
PExceptionNaming

encodeBigInteger

public java.math.BigInteger encodeBigInteger(PName pn)
                                      throws PExceptionNaming
Description copied from interface: PNameCoder
The encodeBigInteger method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a BigInteger.

Specified by:
encodeBigInteger in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The BigInteger corresponding to the encoded representation.
Throws:
PExceptionNaming

encodeBigDecimal

public java.math.BigDecimal encodeBigDecimal(PName pn)
                                      throws PExceptionNaming
Description copied from interface: PNameCoder
The encodeBigDecimal method produces an encoded representation of a PName within a naming context. The encoding format in the case of this method is a BigDecimal.

Specified by:
encodeBigDecimal in interface PNameCoder
Parameters:
pn - The PName to be encoded
Returns:
The BigDecimal corresponding to the encoded representation.
Throws:
PExceptionNaming

export

public PName export(java.lang.Object conn,
                    java.lang.Object en)
             throws PException
Description copied from interface: PNameManager
It associates a PName to an information item within a naming context.

Specified by:
export in interface PNameManager
Parameters:
conn - The connection that can be used to access the data store.
en - The information item that must be accessible through a PName within a naming context.
Returns:
The PName associated to the given information item.
Throws:
PException

export

public PName export(java.lang.Object conn,
                    java.lang.Object en,
                    java.lang.Object hints)
             throws PException
Description copied from interface: PNameManager
It associates a PName to an information item within a naming context.

Specified by:
export in interface PNameManager
Parameters:
conn - The connection that can be used to access the data store.
en - The information item that must be accessible through a PName within a naming context.
hints - Any information relevant for name creation.
Returns:
The PName associated to the given information item.
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)
It defines the null PName since a BasidName or an object value If the encoding is an object format the given value will be the null encoded valued. Otherwise if the encoded format is a primitive value then a object value matching to the primitive type is expected: byte ==> a java.lang.Byte is expected short ==> a java.lang.Short is expected ...

Specified by:
setNullPName in interface PNameCoder
Parameters:
o -

getPType

public PType getPType()
Description copied from interface: PNameCoder
Retrieves the PType associated to the JORM class which is the type of the name managed by this naming context.

Specified by:
getPType in interface PNameCoder
Returns:
The related PType.

getClassName

public java.lang.String getClassName()

resolve

public PName resolve(java.lang.Object conn,
                     PName pn)
              throws PException
Description copied from interface: PNamingContext
It retrieves the information item associated to the given PName (if any exists).

Specified by:
resolve in interface PNamingContext
Parameters:
conn - The connection that can be used to access the data store.
pn - The PName to be looked up.
Returns:
The information item associated with the given PName within a naming context.
Throws:
PException

setPType

public void setPType(PType pt)
Description copied from interface: PNameCoder
Assigns the PType associated to the JORM class which is the type of the name managed by this naming context.

Specified by:
setPType in interface PNameCoder
Parameters:
pt - The PType of the JORM class reference managed by this naming context.

supportDynamicComposite

public boolean supportDynamicComposite()
Description copied from interface: PNameCoder
Tests if this naming context supports comosite name through a dynamic approach, which means that encodingAbstract/decodingAbstract use getter objects that implement the PNameGetter interface.

Specified by:
supportDynamicComposite in interface PNameCoder
Returns:
true if dynamic getter is supported by composite name coding.

supportCompositeField

public boolean supportCompositeField(java.lang.String fn,
                                     PType ft)
Description copied from interface: PNameCoder
In case of a naming context that supports composite names (i.e., names composed of several typed fields, whose type is limited to scalar ones), it tests if a particular field is defined by this composite name. It should be used by PClassMapping objects in order to verify, at deployment time, that naming contexts that are defined to manage the various references supports the same encoding name structure.

Specified by:
supportCompositeField in interface PNameCoder
Returns:
true if the proposed field is supported by this composite name.

supportStaticComposite

public boolean supportStaticComposite()
Description copied from interface: PNameCoder
Tests if this naming context supports comosite name through a static approach, which means that encodingAbstract/decodingAbstract use getter objects that implement specific NsFieldGetter interface generated for a particular field "Field" within a particular NameDef space "Ns".

Specified by:
supportStaticComposite in interface PNameCoder
Returns:
true if static getter is supported by composite name coding.

unexport

public void unexport(java.lang.Object conn,
                     PName pn)
              throws PException
Description copied from interface: PNameManager
It removes the PName and all the associated information within a naming context (i.e., the association between the PName and its information item).

Specified by:
unexport in interface PNameManager
Parameters:
conn - The connection that can be used to access the data store.
pn - A PName valid in this naming context. In case of a PBinder, export is done on a PBinding.
Throws:
PException

unexport

public void unexport(java.lang.Object conn,
                     PName pn,
                     java.lang.Object hints)
              throws PException
Description copied from interface: PNameManager
It removes the PName and all the associated information within a naming context (i.e., the association between the PName and its information item).

Specified by:
unexport in interface PNameManager
Parameters:
conn - The connection that can be used to access the data store.
pn - A PName valid in this naming context. In case of a PBinder, export is done on a PBinding.
hints - Any information relevant for name removing.
Throws:
PException

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.

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()
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
Assigns the cache manager associated with this binder.

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

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.