1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.promotego.viewbeans;
20
21 import org.promotego.beans.Address;
22 import org.promotego.beans.Location;
23 import org.promotego.beans.LocationType;
24 import org.promotego.beans.User;
25
26 public class LocationViewBean implements Comparable<LocationViewBean>
27 {
28 private Location location;
29 private double distance;
30
31 public double getDistance()
32 {
33 return distance;
34 }
35
36 public void setDistance(double distance)
37 {
38 this.distance = distance;
39 }
40
41 public Location getLocation()
42 {
43 return location;
44 }
45
46 public void setLocation(Location location)
47 {
48 this.location = location;
49 }
50
51 public Address getAddress()
52 {
53 return location.getAddress();
54 }
55
56 public Long getId()
57 {
58 return location.getId();
59 }
60
61 public String getName()
62 {
63 return location.getName();
64 }
65
66 public User getOwner()
67 {
68 return location.getOwner();
69 }
70
71 public LocationType getType()
72 {
73 return location.getType();
74 }
75
76 public int compareTo(LocationViewBean o)
77 {
78 return (int)Math.signum(getDistance() - o.getDistance());
79 }
80 }