(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / description / QuantitativeData.java
1 /**
2 * Copyright (C) 2007 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
10 package eu.etaxonomy.cdm.model.description;
11
12
13 import org.apache.log4j.Logger;
14
15 import java.util.*;
16
17 import javax.persistence.*;
18
19 /**
20 * @author m.doering
21 * @version 1.0
22 * @created 08-Nov-2007 13:06:46
23 */
24 @Entity
25 public class QuantitativeData extends DescriptionElementBase {
26 static Logger logger = Logger.getLogger(QuantitativeData.class);
27 private MeasurementUnit unit;
28 private Set<StatisticalMeasurementValue> statisticalValues = new HashSet();
29
30 /**
31 * Factory method
32 * @return
33 */
34 public static QuantitativeData NewInstance(){
35 return new QuantitativeData();
36 }
37
38 /**
39 * Constructor
40 */
41 protected QuantitativeData(){
42 super();
43 }
44
45 @OneToMany
46 public Set<StatisticalMeasurementValue> getStatisticalValues() {
47 return statisticalValues;
48 }
49 protected void setStatisticalValues(
50 Set<StatisticalMeasurementValue> statisticalValues) {
51 this.statisticalValues = statisticalValues;
52 }
53 public void addStatisticalValue(
54 StatisticalMeasurementValue statisticalValue) {
55 this.statisticalValues.add(statisticalValue);
56 }
57 public void removeStatisticalValue(
58 StatisticalMeasurementValue statisticalValue) {
59 this.statisticalValues.remove(statisticalValue);
60 }
61
62
63 @ManyToOne
64 public MeasurementUnit getUnit(){
65 return this.unit;
66 }
67 public void setUnit(MeasurementUnit unit){
68 this.unit = unit;
69 }
70
71 @Transient
72 public float getMin(){
73 return 0;
74 }
75
76 @Transient
77 public float getMax(){
78 return 0;
79 }
80
81 @Transient
82 public float getTypicalLowerBoundary(){
83 return 0;
84 }
85
86 @Transient
87 public float getTypicalUpperBoundary(){
88 return 0;
89 }
90
91 }