de.bea.domingo.map
Class ListMapper

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

public abstract class ListMapper
extends BaseDMapper

Class defining and performing a mapping of Lists of business objects from and to a document.

Author:
Kurt Riede

Constructor Summary
ListMapper(java.lang.String itemName)
          Constructor.
ListMapper(java.lang.String itemName, java.lang.String getName)
          Constructor.
 
Method Summary
protected  void add(java.lang.String itemName, java.lang.Class clazz)
          Adds a 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.
protected  void add(java.lang.String itemName, java.lang.String attributeName, java.lang.Class clazz)
          Adds a 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" + attributeName and "set" + attributeName.
protected  void add(java.lang.String itemName, java.lang.String getName, java.lang.String setName, java.lang.Class clazz)
          Adds a 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 getName and setName.
protected abstract  java.lang.Object createItem(java.lang.Object object)
          Creates a new instance of a list item.
 void map(DDocument document, java.lang.Object object)
          Maps a domingo document to a business object.
 void map(java.lang.Object object, DDocument document)
          Maps a business object to a domingo document.
 
Methods inherited from class de.bea.domingo.map.BaseDMapper
getCalendar, getValue, getValue, getValueDate, getValueDateRange, getValueDouble, getValueInteger, getValueString, hasMethod, replaceItemValue, replaceItemValue, replaceItemValue, replaceItemValue, replaceItemValue, replaceItemValue, replaceItemValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListMapper

public ListMapper(java.lang.String itemName)
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:
itemName - name of Notes item

ListMapper

public ListMapper(java.lang.String itemName,
                  java.lang.String getName)
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 getName and setName.

Parameters:
itemName - name of Notes item
getName - name of get-method
Method Detail

add

protected final void add(java.lang.String itemName,
                         java.lang.Class clazz)
Adds a 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:
itemName - name of Notes item
clazz - the value type

add

protected final void add(java.lang.String itemName,
                         java.lang.String attributeName,
                         java.lang.Class clazz)
Adds a 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" + attributeName and "set" + attributeName.

Parameters:
itemName - name of Notes item
attributeName - name of Java attribute
clazz - the value type

add

protected final void add(java.lang.String itemName,
                         java.lang.String getName,
                         java.lang.String setName,
                         java.lang.Class clazz)
Adds a 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 getName and setName.

Parameters:
itemName - name of Notes item
getName - name of get-method
setName - name of set-method
clazz - the value type

map

public final void map(DDocument document,
                      java.lang.Object object)
               throws MappingException
Maps a domingo document to a business object.

Parameters:
document - the domingo document to map
object - the business object
Throws:
MappingException - if an error occurred during mapping
See Also:
Mapper.map(de.bea.domingo.DDocument, java.lang.Object)

createItem

protected abstract java.lang.Object createItem(java.lang.Object object)
Creates a new instance of a list item. Must be implemented by concrete list mappers.

Parameters:
object - parent object
Returns:
new instance of list item

map

public final void map(java.lang.Object object,
                      DDocument document)
               throws MappingException
Maps a business object to a domingo document.

Parameters:
object - the business object
document - the domingo document to map to
Throws:
MappingException - if an error occurred during mapping
See Also:
Mapper.map(java.lang.Object, de.bea.domingo.DDocument)


Domingo Java-API