com.atlassian.greenhopper.manager.trackingstatistic
Class TrackingStatisticAOMapper

java.lang.Object
  extended by com.atlassian.greenhopper.manager.trackingstatistic.TrackingStatisticAOMapper
All Implemented Interfaces:
AOMapper<TrackingStatisticAO,StatisticsFieldConfig>, RelatedAOMapper<RapidViewAO,TrackingStatisticAO,StatisticsFieldConfig>

@Service
public class TrackingStatisticAOMapper
extends java.lang.Object
implements RelatedAOMapper<RapidViewAO,TrackingStatisticAO,StatisticsFieldConfig>

An AOMapper for TrackingStatisticAO records. Note that the domain object representation StatisticsFieldConfig of this record is shared with other records.

Since this record is related to RapidViewAO this also implements RelatedAOMapper.


Constructor Summary
TrackingStatisticAOMapper()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> toAO(RapidViewAO rapidViewAO, StatisticsFieldConfig trackingStatistic)
          Returns a map representation of the domain object, similar to AOMapper.toAO(Object) but also incorporating the parent record information.
 java.util.Map<java.lang.String,java.lang.Object> toAO(StatisticsFieldConfig trackingStatistic)
          Return a mapping of AO column names to values which will represent the domain object.
 StatisticsFieldConfig toModel(TrackingStatisticAO trackingStatisticAO)
          Constructs a (usually immutable) domain object from the AO record.
 void update(StatisticsFieldConfig source, TrackingStatisticAO target)
          Copies fields from a domain object to the AO record representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackingStatisticAOMapper

public TrackingStatisticAOMapper()
Method Detail

toAO

@NotNull
public java.util.Map<java.lang.String,java.lang.Object> toAO(StatisticsFieldConfig trackingStatistic)
Description copied from interface: AOMapper
Return a mapping of AO column names to values which will represent the domain object.

The keys of the map must be the exact names of the columns as they will appear in AO. E.g. for a column fieldId the column name would be FIELD_ID.

Note: the ID (primary key) column does not need to be included. This is only used when persisting new domain objects to AO.

Specified by:
toAO in interface AOMapper<TrackingStatisticAO,StatisticsFieldConfig>
Parameters:
trackingStatistic - the new domain object
Returns:
a map containing the columns and values

toAO

@NotNull
public java.util.Map<java.lang.String,java.lang.Object> toAO(RapidViewAO rapidViewAO,
                                                                     StatisticsFieldConfig trackingStatistic)
Description copied from interface: RelatedAOMapper
Returns a map representation of the domain object, similar to AOMapper.toAO(Object) but also incorporating the parent record information.

Specified by:
toAO in interface RelatedAOMapper<RapidViewAO,TrackingStatisticAO,StatisticsFieldConfig>
Returns:

toModel

@NotNull
public StatisticsFieldConfig toModel(TrackingStatisticAO trackingStatisticAO)
Description copied from interface: AOMapper
Constructs a (usually immutable) domain object from the AO record.

Specified by:
toModel in interface AOMapper<TrackingStatisticAO,StatisticsFieldConfig>
Parameters:
trackingStatisticAO - the record to use
Returns:
the domain object

update

public void update(StatisticsFieldConfig source,
                   TrackingStatisticAO target)
Description copied from interface: AOMapper
Copies fields from a domain object to the AO record representation. Note that the save() method must not be called.

Specified by:
update in interface AOMapper<TrackingStatisticAO,StatisticsFieldConfig>
Parameters:
source - the domain object
target - the corresponding AO record


Copyright © 2007-2014 Atlassian. All Rights Reserved.