de.bea.domingo.map
Class SubMapper

java.lang.Object
  extended by de.bea.domingo.map.SubMapper
All Implemented Interfaces:
Mapper

public abstract class SubMapper
extends java.lang.Object
implements Mapper

Class defining and performing a mapping of an attribute that itself is a complex sub object of a business object.

Author:
Kurt Riede

Constructor Summary
SubMapper(Mapper mapper)
          Constructor.
 
Method Summary
protected abstract  java.lang.Object getObject(java.lang.Object object)
          Implementing class must return the sub-object to map.
 void map(DDocument document, java.lang.Object object)
          Performs the mapping from a document to a business object.
 void map(java.lang.Object object, DDocument document)
          Performs the mapping from a business object to a document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubMapper

public SubMapper(Mapper mapper)
Constructor. Creates a direct mapper where the Notes item name is equal to the itemName attribute and the names of the get/set methods in the business class are equal to "get" + itemName and "set" + itemName.

Parameters:
mapper - the mapper for the sub-object
Method Detail

getObject

protected abstract java.lang.Object getObject(java.lang.Object object)
Implementing class must return the sub-object to map.

Parameters:
object - base object
Returns:
sub-object

map

public final void map(DDocument document,
                      java.lang.Object object)
               throws MappingException
Performs the mapping from a document to a business object.

Specified by:
map in interface Mapper
Parameters:
document - the Notes document
object - the business object
Throws:
MappingException - if an error occurred during mapping

map

public final void map(java.lang.Object object,
                      DDocument document)
               throws MappingException
Performs the mapping from a business object to a document.

Specified by:
map in interface Mapper
Parameters:
object - the business object
document - the Notes document
Throws:
MappingException - if an error occurred during mapping


Domingo Java-API