org.objectweb.jorm.naming.lib
Class AbstractInheritKeyFilteredPNamingContext

java.lang.Object
  extended byorg.objectweb.jorm.naming.lib.BasicPNamingContext
      extended byorg.objectweb.jorm.naming.lib.AbstractInheritKeyFilteredPNamingContext
All Implemented Interfaces:
KeyFilteredNamingContext, PNameCoder, PNameManager, PNamingContext
Direct Known Subclasses:
LongIdPNC, LongIdPNC

public abstract class AbstractInheritKeyFilteredPNamingContext
extends BasicPNamingContext
implements KeyFilteredNamingContext

This class is a PNamingContext for managing the inheritance. The naming is based on a single filter (Medor expression) for the overall inheritance tree. The medor expression uses naming fields from a PNameGetter. The evalution of the expression on a PNameGetter produces a value. Each non abstract persistent class must define a key value. The comparaison between key values associated to persistent classes and the result of the expression, permits to know the persistent class represented by the PNameGetter. By this way this PNamingContext can delegate the decoding to the binder of the persistent class. This class is abstract. It must be specialized for the evalution of expression.

Author:
S.Chassande-Barrioz
See Also:
KFPNCGenerator

Field Summary
protected  int codingType
          The codingType of the current PNamingContext
protected  PType expressionType
          The PType of the expression which is also the PType of the key of course.
protected  java.util.Map key2binder
          The map mainting the association between keys and binder
protected  PName nullPName
           
protected  java.lang.Object nullValue
          An object representing the null pname value.
protected  PNameGetterConverter pngConverter
          The PNameGetterConvert to use to convert a primitive value to a PNameGetter.
 
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
AbstractInheritKeyFilteredPNamingContext()
          Builds a PNamingContext.
AbstractInheritKeyFilteredPNamingContext(PType expressionType, int codingType)
           
 
Method Summary
 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.
 java.util.Map entries()
           
abstract  java.lang.Object evaluate(java.lang.Object png, java.lang.Object ctx)
          Evaluate the Expression/filter on a PNameGetter
 PName export(java.lang.Object conn, java.lang.Object infoitem)
          It associates a PName to an information item within a naming context.
 PName export(java.lang.Object conn, java.lang.Object infoitem, java.lang.Object hints)
          It associates a PName to an information item within a naming context.
 void exportClass(PBinder binder, java.lang.Object key)
          Export a new persistent class into this PNamingContext
 PType getExpressionType()
           
 PName getNull()
          It yields a "null" representation of a name within this naming context.
 void init()
           
 boolean isNull(java.lang.Object png, java.lang.Object ctx)
           
 PBinder lookup(java.lang.Object key)
           
 PName resolve(java.lang.Object conn, PName pn)
          It retrieves the information item associated to the given PName (if any exists).
 void setCodingType(int codingType)
           
 void setExpressionType(PType type)
           
 void setNullPName(java.lang.Object o)
          It assignes a object which defines a null representation of a name within this naming context.
 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).
 void unexportClass(java.lang.Object key)
          Unexport a persistent class from this PNamingContext
 
Methods inherited from class org.objectweb.jorm.naming.lib.BasicPNamingContext
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.PNameCoder
getPType, setPType, supportCompositeField, supportDynamicComposite, supportStaticComposite
 

Field Detail

expressionType

protected PType expressionType
The PType of the expression which is also the PType of the key of course.


pngConverter

protected PNameGetterConverter pngConverter
The PNameGetterConvert to use to convert a primitive value to a PNameGetter. It can be null only if the coding type is composite.


key2binder

protected java.util.Map key2binder
The map mainting the association between keys and binder


codingType

protected int codingType
The codingType of the current PNamingContext


nullValue

protected java.lang.Object nullValue
An object representing the null pname value. If the coding type is composite, this field must be a PNameGetter. Otherwise this field is the java.lang class matching the coding type. At initialization step it is accepted that the user specify another object. See the checkNullValue() method for more information on this point.


nullPName

protected PName nullPName
Constructor Detail

AbstractInheritKeyFilteredPNamingContext

public AbstractInheritKeyFilteredPNamingContext()
Builds a PNamingContext. The use of this constructor requires to configure the expression/key type, the coding type and the pname null value with the corresponding setter methods, AND to initialize the PNC througth the init() method..


AbstractInheritKeyFilteredPNamingContext

public AbstractInheritKeyFilteredPNamingContext(PType expressionType,
                                                int codingType)
                                         throws PException
Method Detail

init

public void init()
          throws PException
Throws:
PException

setCodingType

public void setCodingType(int codingType)

isNull

public boolean isNull(java.lang.Object png,
                      java.lang.Object ctx)
               throws PException
Throws:
PException

exportClass

public void exportClass(PBinder binder,
                        java.lang.Object key)
                 throws PException
Description copied from interface: KeyFilteredNamingContext
Export a new persistent class into this PNamingContext

Specified by:
exportClass in interface KeyFilteredNamingContext
Parameters:
binder - is the PBinder instance of the persistent class
key - is the key value permitting to identify the persistent class
Throws:
PException

unexportClass

public void unexportClass(java.lang.Object key)
                   throws PException
Description copied from interface: KeyFilteredNamingContext
Unexport a persistent class from this PNamingContext

Specified by:
unexportClass in interface KeyFilteredNamingContext
Parameters:
key - is the key value permitting to identify the persistent class
Throws:
PException

lookup

public PBinder lookup(java.lang.Object key)
Specified by:
lookup in interface KeyFilteredNamingContext
Parameters:
key - is the persistent class identifier
Returns:
the Pbinder instance corresponding a persistent class

entries

public java.util.Map entries()
Specified by:
entries in interface KeyFilteredNamingContext
Returns:
an unmodifiable map representing the associations between a persistent class identifiers (key) and the binder of the persistent class.

setExpressionType

public void setExpressionType(PType type)
Specified by:
setExpressionType in interface KeyFilteredNamingContext

getExpressionType

public PType getExpressionType()
Specified by:
getExpressionType in interface KeyFilteredNamingContext

evaluate

public abstract java.lang.Object evaluate(java.lang.Object png,
                                          java.lang.Object ctx)
                                   throws PException
Description copied from interface: KeyFilteredNamingContext
Evaluate the Expression/filter on a PNameGetter

Specified by:
evaluate in interface KeyFilteredNamingContext
Parameters:
png - is a PNameGetter permitting to fill the expression parameters
Returns:
value of the expression. This value should be a key value of a persistent class.
Throws:
PException

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

export

public PName export(java.lang.Object conn,
                    java.lang.Object infoitem)
             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.
infoitem - 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 infoitem,
                    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.
infoitem - 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

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

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
Overrides:
codingSupported in class BasicPNamingContext

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
Overrides:
decodeAbstract in class BasicPNamingContext
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
Overrides:
decodeByte in class BasicPNamingContext
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
Overrides:
decodeObyte in class BasicPNamingContext
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
Overrides:
decodeChar in class BasicPNamingContext
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
Overrides:
decodeOchar in class BasicPNamingContext
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
Overrides:
decodeInt in class BasicPNamingContext
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
Overrides:
decodeOint in class BasicPNamingContext
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
Overrides:
decodeLong in class BasicPNamingContext
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
Overrides:
decodeOlong in class BasicPNamingContext
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
Overrides:
decodeShort in class BasicPNamingContext
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
Overrides:
decodeOshort in class BasicPNamingContext
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

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
Overrides:
decodeCharArray in class BasicPNamingContext
Throws:
PExceptionNaming

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
Overrides:
decode in class BasicPNamingContext
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
Overrides:
decodeDate in class BasicPNamingContext
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
Overrides:
decodeBigInteger in class BasicPNamingContext
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
Overrides:
decodeBigDecimal in class BasicPNamingContext
Throws:
PExceptionNaming

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

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
Overrides:
encodeByte in class BasicPNamingContext
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
Overrides:
encodeChar in class BasicPNamingContext
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
Overrides:
encodeInt in class BasicPNamingContext
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
Overrides:
encodeLong in class BasicPNamingContext
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
Overrides:
encodeShort in class BasicPNamingContext
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
Overrides:
encodeObyte in class BasicPNamingContext
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
Overrides:
encodeOchar in class BasicPNamingContext
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
Overrides:
encodeOint in class BasicPNamingContext
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
Overrides:
encodeOlong in class BasicPNamingContext
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
Overrides:
encodeOshort in class BasicPNamingContext
Throws:
PExceptionNaming
java.lang.UnsupportedOperationException

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
Overrides:
encodeDate in class BasicPNamingContext
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
Overrides:
encodeBigInteger in class BasicPNamingContext
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
Overrides:
encodeBigDecimal in class BasicPNamingContext
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
Overrides:
encode in class BasicPNamingContext
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
Overrides:
encodeCharArray in class BasicPNamingContext
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
Overrides:
encodeAbstract in class BasicPNamingContext
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

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 - must be the null PName
Throws:
PException