com.atlassian.greenhopper.manager
Interface AOListMapper<T extends Entity,U>

Type Parameters:
T - The ActiveObject class
U - The business object mapped by the ActiveObject class
All Known Implementing Classes:
AbstractRelatedAOListMapper, CardColorAOListMapper, ColumnAOListMapper, ColumnStatusAOListMapper, DetailViewFieldAOListMapper, EstimateStatisticAOListMapper, QuickFilterAOListMapper, SubqueryAOListMapper, SwimlaneAOListMapper, TrackingStatisticAOListMapper

public interface AOListMapper<T extends Entity,U>

To be implemented by mappers that map a list of values onto ActiveObjects. AO's that implement Positionable will in addition get their position inside the List persisted


Method Summary
 void addCreateValues(U u, java.util.Map<java.lang.String,java.lang.Object> params)
          Provide the db parameter for T to be created.
 T findExisting(T[] ts, U u)
          Get an existing T for given u.
 java.util.List<U> fromAO(T[] ts)
           
 java.lang.Class<T> getActiveObjectClass()
          Get the class of T
 T[] getExisting()
          Provides all existing T.
 void postCreateUpdate(T t, U u)
          Called on the updated AO object (either once created or updated/saved).
 void preDelete(T t)
          Called before the element is deleted, gives the mapper a chance to clean up child objects
 void setValues(T t, U u)
          Updates an AO.
 

Method Detail

addCreateValues

void addCreateValues(U u,
                     java.util.Map<java.lang.String,java.lang.Object> params)
Provide the db parameter for T to be created.


setValues

void setValues(T t,
               U u)
Updates an AO. Note that save should not be called.


postCreateUpdate

void postCreateUpdate(T t,
                      U u)
Called on the updated AO object (either once created or updated/saved). Gives the mapper a chance to do further work, e.g. update child objects.


preDelete

void preDelete(T t)
Called before the element is deleted, gives the mapper a chance to clean up child objects


getExisting

T[] getExisting()
Provides all existing T.


findExisting

T findExisting(T[] ts,
               U u)
Get an existing T for given u. Returns null if not found.


getActiveObjectClass

java.lang.Class<T> getActiveObjectClass()
Get the class of T


fromAO

java.util.List<U> fromAO(T[] ts)


Copyright © 2007-2012 Atlassian. All Rights Reserved.