org.objectweb.speedo.genclass.collection
Class CollectionElem

java.lang.Object
  extended byorg.objectweb.speedo.genclass.collection.CollectionElem
All Implemented Interfaces:
GenClassElement
Direct Known Subclasses:
ListElem, MapElem, SetElem

public class CollectionElem
extends java.lang.Object
implements GenClassElement

Author:
P. D?chamboux

Field Summary
protected  java.lang.Object element
          This field is the element (or its PName for a reference).
static java.lang.String ERROR_MESSAGE_BAD_FIELD_NAME
          The error message thrown when an accessor method associated to a primitive element type is called.
static java.lang.String ERROR_MESSAGE_NO_NULL_INDEX
          The error message thrown when an accessor method associated to a primitive element type is called.
protected  GenClassAccessor gca
           
protected  java.lang.Object index
          This field can be the index.
static java.lang.String INDEX_FIELD_NAME
          This constant is the name of the index field.
protected  byte status
          This field represents the satus of the PIndexedEleme.
 
Constructor Summary
CollectionElem(GenClassAccessor gca)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Object getElement()
           
 java.lang.Object getElement(PersistenceManager pm)
           
 byte getElemStatus()
           
 java.lang.Object getIndex()
           
 SpeedoAccessor getSpeedoAccessor()
          Retrieves the Speedo accessor associated to this gen class element.
 java.math.BigDecimal pieGetBigDecimalElem()
           
 java.math.BigInteger pieGetBigIntegerElem()
           
 boolean pieGetBooleanElem()
           
 byte[] pieGetByteArrayElem()
           
 byte pieGetByteElem()
           
 byte pieGetByteIndexField(java.lang.String fn)
           
 char[] pieGetCharArrayElem()
           
 char pieGetCharElem()
           
 char pieGetCharIndexField(java.lang.String fn)
           
 java.util.Date pieGetDateElem()
           
 java.util.Date pieGetDateIndexField(java.lang.String fn)
           
 double pieGetDoubleElem()
           
 float pieGetFloatElem()
           
 int pieGetIntElem()
           
 int pieGetIntIndexField(java.lang.String fn)
           
 long pieGetLongElem()
           
 long pieGetLongIndexField(java.lang.String fn)
           
 java.lang.Boolean pieGetObooleanElem()
           
 java.lang.Byte pieGetObyteElem()
           
 java.lang.Byte pieGetObyteIndexField(java.lang.String fn)
           
 java.lang.Character pieGetOcharElem()
           
 java.lang.Character pieGetOcharIndexField(java.lang.String fn)
           
 java.lang.Double pieGetOdoubleElem()
           
 java.lang.Float pieGetOfloatElem()
           
 java.lang.Integer pieGetOintElem()
           
 java.lang.Integer pieGetOintIndexField(java.lang.String fn)
           
 java.lang.Long pieGetOlongElem()
           
 java.lang.Long pieGetOlongIndexField(java.lang.String fn)
           
 java.lang.Short pieGetOshortElem()
           
 java.lang.Short pieGetOshortIndexField(java.lang.String fn)
           
 PName pieGetRefElem()
           
 java.io.Serializable pieGetSerializedElem()
           
 short pieGetShortElem()
           
 short pieGetShortIndexField(java.lang.String fn)
           
 java.lang.String pieGetStringElem()
           
 java.lang.String pieGetStringIndexField(java.lang.String fn)
           
 void pieSetBigDecimalElem(java.math.BigDecimal bigDecimal)
           
 void pieSetBigIntegerElem(java.math.BigInteger value)
           
 void pieSetBooleanElem(boolean value)
           
 void pieSetByteArrayElem(byte[] value)
           
 void pieSetByteElem(byte value)
           
 void pieSetByteIndexField(java.lang.String fn, byte value)
           
 void pieSetCharArrayElem(char[] value)
           
 void pieSetCharElem(char value)
           
 void pieSetCharIndexField(java.lang.String fn, char value)
           
 void pieSetDateElem(java.util.Date value)
           
 void pieSetDateIndexField(java.lang.String fn, java.util.Date value)
           
 void pieSetDoubleElem(double value)
           
 void pieSetFloatElem(float value)
           
 void pieSetIntElem(int value)
           
 void pieSetIntIndexField(java.lang.String fn, int value)
           
 void pieSetLongElem(long value)
           
 void pieSetLongIndexField(java.lang.String fn, long value)
           
 void pieSetObooleanElem(java.lang.Boolean value)
           
 void pieSetObyteElem(java.lang.Byte value)
           
 void pieSetObyteIndexField(java.lang.String fn, java.lang.Byte value)
           
 void pieSetOcharElem(java.lang.Character value)
           
 void pieSetOcharIndexField(java.lang.String fn, java.lang.Character value)
           
 void pieSetOdoubleElem(java.lang.Double value)
           
 void pieSetOfloatElem(java.lang.Float value)
           
 void pieSetOintElem(java.lang.Integer value)
           
 void pieSetOintIndexField(java.lang.String fn, java.lang.Integer value)
           
 void pieSetOlongElem(java.lang.Long value)
           
 void pieSetOlongIndexField(java.lang.String fn, java.lang.Long value)
           
 void pieSetOshortElem(java.lang.Short value)
           
 void pieSetOshortIndexField(java.lang.String fn, java.lang.Short value)
           
 void pieSetRefElem(PName value)
           
 void pieSetSerializedElem(java.io.Serializable value)
           
 void pieSetShortElem(short value)
           
 void pieSetShortIndexField(java.lang.String fn, short value)
           
 void pieSetStringElem(java.lang.String value)
           
 void pieSetStringIndexField(java.lang.String fn, java.lang.String value)
           
 void setElement(java.lang.Object element)
          Assignes the element of the gen class.
 void setIndex(java.lang.Object index)
          Assignes the index of the element of the gen class.
 void setStatus(byte s)
          Assignes the jorm status of the PIndexedElement
 void unSwizzle()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_MESSAGE_BAD_FIELD_NAME

public static final java.lang.String ERROR_MESSAGE_BAD_FIELD_NAME
The error message thrown when an accessor method associated to a primitive element type is called. Indeed this implementation supports only object elements.

See Also:
Constant Field Values

ERROR_MESSAGE_NO_NULL_INDEX

public static final java.lang.String ERROR_MESSAGE_NO_NULL_INDEX
The error message thrown when an accessor method associated to a primitive element type is called. Indeed this implementation supports only object elements.

See Also:
Constant Field Values

INDEX_FIELD_NAME

public static final java.lang.String INDEX_FIELD_NAME
This constant is the name of the index field. This value must be use with the methods associated to the management of the index.

See Also:
Constant Field Values

element

protected java.lang.Object element
This field is the element (or its PName for a reference).


index

protected java.lang.Object index
This field can be the index. The index type is known at instanciation time.


status

protected byte status
This field represents the satus of the PIndexedEleme. The possible value are ELEM_CREATED, ELEM_DELETED, ELEM_MODIFIED, ELEM_UNMODIFIED


gca

protected GenClassAccessor gca
Constructor Detail

CollectionElem

public CollectionElem(GenClassAccessor gca)
Method Detail

getIndex

public java.lang.Object getIndex()
Specified by:
getIndex in interface GenClassElement
Returns:
the index of this gen class element, possibly wrapped in an object.

setIndex

public void setIndex(java.lang.Object index)
Description copied from interface: GenClassElement
Assignes the index of the element of the gen class. It is a user object.

Specified by:
setIndex in interface GenClassElement
Parameters:
index - to add, it cannot be null.

getElement

public java.lang.Object getElement()
Specified by:
getElement in interface GenClassElement
Returns:
the element of the gen class. It is a user object.

setElement

public void setElement(java.lang.Object element)
Assignes the element of the gen class. It is a user object.

Specified by:
setElement in interface GenClassElement
Parameters:
element - to add

getElement

public java.lang.Object getElement(PersistenceManager pm)
Specified by:
getElement in interface GenClassElement
Parameters:
pm - is the persistence manager which permits to resolve the PName into a java reference.
Returns:
the element of the gen class. The element is a reference (SpeedoProxy).

getSpeedoAccessor

public SpeedoAccessor getSpeedoAccessor()
Description copied from interface: GenClassElement
Retrieves the Speedo accessor associated to this gen class element.

Specified by:
getSpeedoAccessor in interface GenClassElement

unSwizzle

public void unSwizzle()
Specified by:
unSwizzle in interface GenClassElement

getElemStatus

public byte getElemStatus()

pieGetStringElem

public java.lang.String pieGetStringElem()
                                  throws PExceptionTyping
Throws:
PExceptionTyping

pieGetDateElem

public java.util.Date pieGetDateElem()
                              throws PExceptionTyping
Throws:
PExceptionTyping

pieGetCharArrayElem

public char[] pieGetCharArrayElem()
                           throws PExceptionTyping
Throws:
PExceptionTyping

pieGetByteArrayElem

public byte[] pieGetByteArrayElem()
                           throws PExceptionTyping
Throws:
PExceptionTyping

pieGetSerializedElem

public java.io.Serializable pieGetSerializedElem()
                                          throws PExceptionTyping
Throws:
PExceptionTyping

pieGetRefElem

public PName pieGetRefElem()

pieGetBooleanElem

public boolean pieGetBooleanElem()
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieGetObooleanElem

public java.lang.Boolean pieGetObooleanElem()
                                     throws PExceptionTyping
Throws:
PExceptionTyping

pieGetByteElem

public byte pieGetByteElem()
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieGetObyteElem

public java.lang.Byte pieGetObyteElem()
                               throws PExceptionTyping
Throws:
PExceptionTyping

pieGetCharElem

public char pieGetCharElem()
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOcharElem

public java.lang.Character pieGetOcharElem()
                                    throws PExceptionTyping
Throws:
PExceptionTyping

pieGetShortElem

public short pieGetShortElem()
                      throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOshortElem

public java.lang.Short pieGetOshortElem()
                                 throws PExceptionTyping
Throws:
PExceptionTyping

pieGetIntElem

public int pieGetIntElem()
                  throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOintElem

public java.lang.Integer pieGetOintElem()
                                 throws PExceptionTyping
Throws:
PExceptionTyping

pieGetLongElem

public long pieGetLongElem()
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOlongElem

public java.lang.Long pieGetOlongElem()
                               throws PExceptionTyping
Throws:
PExceptionTyping

pieGetFloatElem

public float pieGetFloatElem()
                      throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOfloatElem

public java.lang.Float pieGetOfloatElem()
                                 throws PExceptionTyping
Throws:
PExceptionTyping

pieGetDoubleElem

public double pieGetDoubleElem()
                        throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOdoubleElem

public java.lang.Double pieGetOdoubleElem()
                                   throws PExceptionTyping
Throws:
PExceptionTyping

pieGetBigDecimalElem

public java.math.BigDecimal pieGetBigDecimalElem()
                                          throws PException
Throws:
PException

pieGetBigIntegerElem

public java.math.BigInteger pieGetBigIntegerElem()
                                          throws PException
Throws:
PException

pieSetStringElem

public void pieSetStringElem(java.lang.String value)
                      throws PExceptionTyping
Throws:
PExceptionTyping

pieSetDateElem

public void pieSetDateElem(java.util.Date value)
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieSetCharArrayElem

public void pieSetCharArrayElem(char[] value)
                         throws PExceptionTyping
Throws:
PExceptionTyping

pieSetByteArrayElem

public void pieSetByteArrayElem(byte[] value)
                         throws PExceptionTyping
Throws:
PExceptionTyping

pieSetSerializedElem

public void pieSetSerializedElem(java.io.Serializable value)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieSetRefElem

public void pieSetRefElem(PName value)
                   throws PExceptionTyping
Throws:
PExceptionTyping

pieSetBooleanElem

public void pieSetBooleanElem(boolean value)
                       throws PExceptionTyping
Throws:
PExceptionTyping

pieSetObooleanElem

public void pieSetObooleanElem(java.lang.Boolean value)
                        throws PExceptionTyping
Throws:
PExceptionTyping

pieSetByteElem

public void pieSetByteElem(byte value)
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieSetObyteElem

public void pieSetObyteElem(java.lang.Byte value)
                     throws PExceptionTyping
Throws:
PExceptionTyping

pieSetCharElem

public void pieSetCharElem(char value)
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOcharElem

public void pieSetOcharElem(java.lang.Character value)
                     throws PExceptionTyping
Throws:
PExceptionTyping

pieSetShortElem

public void pieSetShortElem(short value)
                     throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOshortElem

public void pieSetOshortElem(java.lang.Short value)
                      throws PExceptionTyping
Throws:
PExceptionTyping

pieSetIntElem

public void pieSetIntElem(int value)
                   throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOintElem

public void pieSetOintElem(java.lang.Integer value)
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieSetLongElem

public void pieSetLongElem(long value)
                    throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOlongElem

public void pieSetOlongElem(java.lang.Long value)
                     throws PExceptionTyping
Throws:
PExceptionTyping

pieSetFloatElem

public void pieSetFloatElem(float value)
                     throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOfloatElem

public void pieSetOfloatElem(java.lang.Float value)
                      throws PExceptionTyping
Throws:
PExceptionTyping

pieSetDoubleElem

public void pieSetDoubleElem(double value)
                      throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOdoubleElem

public void pieSetOdoubleElem(java.lang.Double value)
                       throws PExceptionTyping
Throws:
PExceptionTyping

pieSetBigDecimalElem

public void pieSetBigDecimalElem(java.math.BigDecimal bigDecimal)
                          throws PException
Throws:
PException

pieSetBigIntegerElem

public void pieSetBigIntegerElem(java.math.BigInteger value)
                          throws PException
Throws:
PException

pieSetByteIndexField

public void pieSetByteIndexField(java.lang.String fn,
                                 byte value)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieSetObyteIndexField

public void pieSetObyteIndexField(java.lang.String fn,
                                  java.lang.Byte value)
                           throws PExceptionTyping
Throws:
PExceptionTyping

pieSetCharIndexField

public void pieSetCharIndexField(java.lang.String fn,
                                 char value)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOcharIndexField

public void pieSetOcharIndexField(java.lang.String fn,
                                  java.lang.Character value)
                           throws PExceptionTyping
Throws:
PExceptionTyping

pieSetShortIndexField

public void pieSetShortIndexField(java.lang.String fn,
                                  short value)
                           throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOshortIndexField

public void pieSetOshortIndexField(java.lang.String fn,
                                   java.lang.Short value)
                            throws PExceptionTyping
Throws:
PExceptionTyping

pieSetIntIndexField

public void pieSetIntIndexField(java.lang.String fn,
                                int value)
                         throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOintIndexField

public void pieSetOintIndexField(java.lang.String fn,
                                 java.lang.Integer value)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieSetLongIndexField

public void pieSetLongIndexField(java.lang.String fn,
                                 long value)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieSetOlongIndexField

public void pieSetOlongIndexField(java.lang.String fn,
                                  java.lang.Long value)
                           throws PExceptionTyping
Throws:
PExceptionTyping

pieSetStringIndexField

public void pieSetStringIndexField(java.lang.String fn,
                                   java.lang.String value)
                            throws PExceptionTyping
Throws:
PExceptionTyping

pieSetDateIndexField

public void pieSetDateIndexField(java.lang.String fn,
                                 java.util.Date value)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieGetShortIndexField

public short pieGetShortIndexField(java.lang.String fn)
                            throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOshortIndexField

public java.lang.Short pieGetOshortIndexField(java.lang.String fn)
                                       throws PExceptionTyping
Throws:
PExceptionTyping

pieGetLongIndexField

public long pieGetLongIndexField(java.lang.String fn)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOlongIndexField

public java.lang.Long pieGetOlongIndexField(java.lang.String fn)
                                     throws PExceptionTyping
Throws:
PExceptionTyping

pieGetIntIndexField

public int pieGetIntIndexField(java.lang.String fn)
                        throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOintIndexField

public java.lang.Integer pieGetOintIndexField(java.lang.String fn)
                                       throws PExceptionTyping
Throws:
PExceptionTyping

pieGetStringIndexField

public java.lang.String pieGetStringIndexField(java.lang.String fn)
                                        throws PExceptionTyping
Throws:
PExceptionTyping

pieGetDateIndexField

public java.util.Date pieGetDateIndexField(java.lang.String fn)
                                    throws PExceptionTyping
Throws:
PExceptionTyping

pieGetByteIndexField

public byte pieGetByteIndexField(java.lang.String fn)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieGetObyteIndexField

public java.lang.Byte pieGetObyteIndexField(java.lang.String fn)
                                     throws PExceptionTyping
Throws:
PExceptionTyping

pieGetCharIndexField

public char pieGetCharIndexField(java.lang.String fn)
                          throws PExceptionTyping
Throws:
PExceptionTyping

pieGetOcharIndexField

public java.lang.Character pieGetOcharIndexField(java.lang.String fn)
                                          throws PExceptionTyping
Throws:
PExceptionTyping

setStatus

public void setStatus(byte s)
Description copied from interface: GenClassElement
Assignes the jorm status of the PIndexedElement

Specified by:
setStatus in interface GenClassElement
Parameters:
s - the new status

equals

public boolean equals(java.lang.Object o)