org.objectweb.jorm.naming.lib
Class MapPNameGetter

java.lang.Object
  extended byorg.objectweb.jorm.naming.lib.MapPNameGetter
All Implemented Interfaces:
PNameGetter

public class MapPNameGetter
extends java.lang.Object
implements PNameGetter

Author:
S.Chassande-Barrioz

Constructor Summary
MapPNameGetter()
           
MapPNameGetter(java.util.Map field2value)
           
MapPNameGetter(java.lang.String[] fieldNames, java.lang.Object[] fieldValues)
           
 
Method Summary
 java.math.BigDecimal pngetBigDecimalField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a BigDecimal field.
 java.math.BigInteger pngetBigIntegerField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a BigInteger field.
 byte[] pngetByteArrayField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a byte[] field.
 byte pngetByteField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a byte field.
 char[] pngetCharArrayField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a char[] field.
 char pngetCharField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a char field.
 java.util.Date pngetDateField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a date field.
 int pngetIntField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of an int field.
 long pngetLongField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a long field.
 java.lang.Byte pngetObyteField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a Byte field.
 java.lang.Character pngetOcharField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a Character field.
 java.lang.Integer pngetOintField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of an Integer field.
 java.lang.Long pngetOlongField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a Long field.
 java.lang.Short pngetOshortField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a Short field.
 short pngetShortField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a short field.
 java.lang.String pngetStringField(java.lang.String fn, java.lang.Object ctxt)
          It retrieves the value of a string field.
 void set(java.lang.String fn, byte b)
           
 void set(java.lang.String fn, char c)
           
 void set(java.lang.String fn, int n)
           
 void set(java.lang.String fn, long l)
           
 void set(java.lang.String fn, java.lang.Object o)
           
 void set(java.lang.String fn, short s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapPNameGetter

public MapPNameGetter(java.lang.String[] fieldNames,
                      java.lang.Object[] fieldValues)

MapPNameGetter

public MapPNameGetter(java.util.Map field2value)

MapPNameGetter

public MapPNameGetter()
Method Detail

set

public void set(java.lang.String fn,
                byte b)

set

public void set(java.lang.String fn,
                char c)

set

public void set(java.lang.String fn,
                short s)

set

public void set(java.lang.String fn,
                int n)

set

public void set(java.lang.String fn,
                long l)

set

public void set(java.lang.String fn,
                java.lang.Object o)

pngetByteField

public byte pngetByteField(java.lang.String fn,
                           java.lang.Object ctxt)
                    throws PException
Description copied from interface: PNameGetter
It retrieves the value of a byte field.

Specified by:
pngetByteField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The byte value of the field as stored within the composite name.
Throws:
PException

pngetObyteField

public java.lang.Byte pngetObyteField(java.lang.String fn,
                                      java.lang.Object ctxt)
                               throws PException
Description copied from interface: PNameGetter
It retrieves the value of a Byte field.

Specified by:
pngetObyteField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The Byte value of the field as stored within the composite name.
Throws:
PException

pngetCharField

public char pngetCharField(java.lang.String fn,
                           java.lang.Object ctxt)
                    throws PException
Description copied from interface: PNameGetter
It retrieves the value of a char field.

Specified by:
pngetCharField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The char value of the field as stored within the composite name.
Throws:
PException

pngetOcharField

public java.lang.Character pngetOcharField(java.lang.String fn,
                                           java.lang.Object ctxt)
                                    throws PException
Description copied from interface: PNameGetter
It retrieves the value of a Character field.

Specified by:
pngetOcharField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The Character value of the field as stored within the composite name.
Throws:
PException

pngetShortField

public short pngetShortField(java.lang.String fn,
                             java.lang.Object ctxt)
                      throws PException
Description copied from interface: PNameGetter
It retrieves the value of a short field.

Specified by:
pngetShortField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data. In in the case of RDB, it can be the result set.
Returns:
The short value of the field as stored within the composite name.
Throws:
PException

pngetOshortField

public java.lang.Short pngetOshortField(java.lang.String fn,
                                        java.lang.Object ctxt)
                                 throws PException
Description copied from interface: PNameGetter
It retrieves the value of a Short field.

Specified by:
pngetOshortField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The Short value of the field as stored within the composite name.
Throws:
PException

pngetIntField

public int pngetIntField(java.lang.String fn,
                         java.lang.Object ctxt)
                  throws PException
Description copied from interface: PNameGetter
It retrieves the value of an int field.

Specified by:
pngetIntField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The int value of the field as stored within the composite name.
Throws:
PException

pngetOintField

public java.lang.Integer pngetOintField(java.lang.String fn,
                                        java.lang.Object ctxt)
                                 throws PException
Description copied from interface: PNameGetter
It retrieves the value of an Integer field.

Specified by:
pngetOintField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The Integer value of the field as stored within the composite name.
Throws:
PException

pngetLongField

public long pngetLongField(java.lang.String fn,
                           java.lang.Object ctxt)
                    throws PException
Description copied from interface: PNameGetter
It retrieves the value of a long field.

Specified by:
pngetLongField in interface PNameGetter
Parameters:
ctxt - A context used by PNameGetter to extract the related data.
fn - A String containing the name of the field.
Returns:
The long value of the field as stored within the composite name.
Throws:
PException

pngetOlongField

public java.lang.Long pngetOlongField(java.lang.String fn,
                                      java.lang.Object ctxt)
                               throws PException
Description copied from interface: PNameGetter
It retrieves the value of a Long field.

Specified by:
pngetOlongField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The Long value of the field as stored within the composite name.
Throws:
PException

pngetStringField

public java.lang.String pngetStringField(java.lang.String fn,
                                         java.lang.Object ctxt)
                                  throws PException
Description copied from interface: PNameGetter
It retrieves the value of a string field.

Specified by:
pngetStringField in interface PNameGetter
Parameters:
ctxt - A context used by PNameGetter to extract the related data.
fn - A String containing the name of the field.
Returns:
The java.lang.String value of the field as stored within the composite name.
Throws:
PException

pngetByteArrayField

public byte[] pngetByteArrayField(java.lang.String fn,
                                  java.lang.Object ctxt)
                           throws PException
Description copied from interface: PNameGetter
It retrieves the value of a byte[] field.

Specified by:
pngetByteArrayField in interface PNameGetter
Parameters:
ctxt - A context used by PNameGetter to extract the related data.
fn - A String containing the name of the field.
Returns:
The byte[] value of the field as stored within the composite name.
Throws:
PException

pngetCharArrayField

public char[] pngetCharArrayField(java.lang.String fn,
                                  java.lang.Object ctxt)
                           throws PException
Description copied from interface: PNameGetter
It retrieves the value of a char[] field.

Specified by:
pngetCharArrayField in interface PNameGetter
Parameters:
ctxt - A context used by PNameGetter to extract the related data.
fn - A String containing the name of the field.
Returns:
The char[] value of the field as stored within the composite name.
Throws:
PException

pngetDateField

public java.util.Date pngetDateField(java.lang.String fn,
                                     java.lang.Object ctxt)
                              throws PException
Description copied from interface: PNameGetter
It retrieves the value of a date field.

Specified by:
pngetDateField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The java.util.Date value of the field as stored within the composite name.
Throws:
PException

pngetBigIntegerField

public java.math.BigInteger pngetBigIntegerField(java.lang.String fn,
                                                 java.lang.Object ctxt)
                                          throws PException
Description copied from interface: PNameGetter
It retrieves the value of a BigInteger field.

Specified by:
pngetBigIntegerField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The java.math.BigInteger value of the field as stored within the composite name.
Throws:
PException

pngetBigDecimalField

public java.math.BigDecimal pngetBigDecimalField(java.lang.String fn,
                                                 java.lang.Object ctxt)
                                          throws PException
Description copied from interface: PNameGetter
It retrieves the value of a BigDecimal field.

Specified by:
pngetBigDecimalField in interface PNameGetter
Parameters:
fn - A String containing the name of the field.
ctxt - A context used by PNameGetter to extract the related data.
Returns:
The java.math.BigDecimal value of the field as stored within the composite name.
Throws:
PException