1
|
/**
|
2
|
* Copyright (C) 2021 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.api.service.dto;
|
10
|
|
11
|
import java.io.Serializable;
|
12
|
import java.math.BigDecimal;
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
|
16
|
import eu.etaxonomy.cdm.persistence.dto.TermDto;
|
17
|
|
18
|
/**
|
19
|
* @author k.luther
|
20
|
* @since Aug 18, 2021
|
21
|
*/
|
22
|
public class StatisticalMeasurementValueDto implements Serializable {
|
23
|
|
24
|
private static final long serialVersionUID = -7366908849667176718L;
|
25
|
|
26
|
private TermDto type;
|
27
|
private BigDecimal value;
|
28
|
private UUID uuid;
|
29
|
|
30
|
|
31
|
public StatisticalMeasurementValueDto(TermDto typeDto, BigDecimal value, UUID uuid){
|
32
|
type = typeDto;
|
33
|
this.value = value;
|
34
|
this.uuid = uuid;
|
35
|
}
|
36
|
|
37
|
public static StatisticalMeasurementValueDto fromStatisticalMeasurementValue(StatisticalMeasurementValue statValue){
|
38
|
StatisticalMeasurementValueDto result = new StatisticalMeasurementValueDto(TermDto.fromTerm(statValue.getType()), statValue.getValue(), statValue.getUuid());
|
39
|
|
40
|
return result;
|
41
|
}
|
42
|
|
43
|
public TermDto getType() {
|
44
|
return type;
|
45
|
}
|
46
|
public void setType(TermDto typeDto) {
|
47
|
this.type = typeDto;
|
48
|
}
|
49
|
public BigDecimal getValue() {
|
50
|
return value;
|
51
|
}
|
52
|
public void setValue(BigDecimal value) {
|
53
|
this.value = value;
|
54
|
}
|
55
|
|
56
|
/**
|
57
|
* @return the uuid
|
58
|
*/
|
59
|
public UUID getUuid() {
|
60
|
return uuid;
|
61
|
}
|
62
|
|
63
|
/**
|
64
|
* @param uuid the uuid to set
|
65
|
*/
|
66
|
public void setUuid(UUID uuid) {
|
67
|
this.uuid = uuid;
|
68
|
}
|
69
|
|
70
|
}
|