org.jboss.test.cmp2.enums.ejb
Class AnimalMapper

java.lang.Object
  extended byorg.jboss.test.cmp2.enums.ejb.AnimalMapper
All Implemented Interfaces:
Mapper (src)

public class AnimalMapper
extends java.lang.Object
implements Mapper (src)

org.jboss.ejb.plugins.cmp.jdbc.Mapper implementation. Maps AnimalEnum to Integer.


Constructor Summary
AnimalMapper()
           
 
Method Summary
 java.lang.Object toColumnValue(java.lang.Object fieldValue)
          This method is called when CMP field is stored.
 java.lang.Object toFieldValue(java.lang.Object columnValue)
          This method is called when CMP field is loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimalMapper

public AnimalMapper()
Method Detail

toColumnValue

public java.lang.Object toColumnValue(java.lang.Object fieldValue)
Description copied from interface: Mapper (src)
This method is called when CMP field is stored.

Specified by:
toColumnValue in interface Mapper (src)
Parameters:
fieldValue - - CMP field value
Returns:
column value.

toFieldValue

public java.lang.Object toFieldValue(java.lang.Object columnValue)
Description copied from interface: Mapper (src)
This method is called when CMP field is loaded.

Specified by:
toFieldValue in interface Mapper (src)
Parameters:
columnValue - - loaded column value.
Returns:
CMP field value.