Class TrackingStatisticAOMapper
java.lang.Object
com.atlassian.greenhopper.manager.trackingstatistic.TrackingStatisticAOMapper
- All Implemented Interfaces:
AOMapper<TrackingStatisticAO,
,StatisticsFieldConfig> RelatedAOMapper<RapidViewAO,
TrackingStatisticAO, StatisticsFieldConfig>
@Service
public class TrackingStatisticAOMapper
extends 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoAO
(StatisticsFieldConfig trackingStatistic) Return a mapping of AO column names to values which will represent the domain object.toAO
(RapidViewAO rapidViewAO, StatisticsFieldConfig trackingStatistic) Returns a map representation of the domain object, similar toAOMapper.toAO(Object)
but also incorporating the parent record information.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.
-
Constructor Details
-
TrackingStatisticAOMapper
public TrackingStatisticAOMapper()
-
-
Method Details
-
toAO
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 interfaceAOMapper<TrackingStatisticAO,
StatisticsFieldConfig> - Parameters:
trackingStatistic
- the new domain object- Returns:
- a map containing the columns and values
-
toAO
@Nonnull public Map<String,Object> toAO(RapidViewAO rapidViewAO, StatisticsFieldConfig trackingStatistic) Description copied from interface:RelatedAOMapper
Returns a map representation of the domain object, similar toAOMapper.toAO(Object)
but also incorporating the parent record information.- Specified by:
toAO
in interfaceRelatedAOMapper<RapidViewAO,
TrackingStatisticAO, StatisticsFieldConfig> - Parameters:
rapidViewAO
-trackingStatistic
-- Returns:
-
toModel
Description copied from interface:AOMapper
Constructs a (usually immutable) domain object from the AO record.- Specified by:
toModel
in interfaceAOMapper<TrackingStatisticAO,
StatisticsFieldConfig> - Parameters:
trackingStatisticAO
- the record to use- Returns:
- the domain object
-
update
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 interfaceAOMapper<TrackingStatisticAO,
StatisticsFieldConfig> - Parameters:
source
- the domain objecttarget
- the corresponding AO record
-