added cascading hibernate behaviour
[cdmlib.git] / cdmlibrary / src / main / java / eu / etaxonomy / cdm / model / location / Point.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.location;
11
12
13 import eu.etaxonomy.cdm.model.common.VersionableEntity;
14 import org.apache.log4j.Logger;
15 import org.hibernate.annotations.Cascade;
16 import org.hibernate.annotations.CascadeType;
17
18 import java.util.*;
19 import javax.persistence.*;
20
21 /**
22 * @author m.doering
23 * @version 1.0
24 * @created 08-Nov-2007 13:06:44
25 */
26 @Embeddable
27 public class Point {
28 static Logger logger = Logger.getLogger(Point.class);
29 private float longitude;
30 private float latitude;
31 //in Meters
32 private int errorRadius = 0;
33 private ReferenceSystem referenceSystem;
34
35 @ManyToOne
36 public ReferenceSystem getReferenceSystem(){
37 return this.referenceSystem;
38 }
39
40 /**
41 *
42 * @param referenceSystem referenceSystem
43 */
44 public void setReferenceSystem(ReferenceSystem referenceSystem){
45 this.referenceSystem = referenceSystem;
46 }
47
48 public float getLongitude(){
49 return this.longitude;
50 }
51
52 /**
53 *
54 * @param longitude longitude
55 */
56 public void setLongitude(float longitude){
57 this.longitude = longitude;
58 }
59
60 public float getLatitude(){
61 return this.latitude;
62 }
63
64 /**
65 *
66 * @param latitude latitude
67 */
68 public void setLatitude(float latitude){
69 this.latitude = latitude;
70 }
71
72 public int getErrorRadius(){
73 return this.errorRadius;
74 }
75
76 /**
77 *
78 * @param errorRadius errorRadius
79 */
80 public void setErrorRadius(int errorRadius){
81 this.errorRadius = errorRadius;
82 }
83
84 }