View Javadoc

1   package org.sourceforge.vlibrary.user.domain;
2   
3   
4   /**
5    * Bean representing a library dropoff location
6    *
7    * @version $Revision$ $Date$
8    */
9   public class Location {
10      /**
11       * ID representing the location
12       */
13      private long id = 0;
14  
15      /**
16       * Description of the location
17       */
18      private String description = null;
19  
20      /**
21       * Creates a location.
22       *
23       * @param id ID representing the location
24       * @param description text displayed describing the location
25       */
26      public Location(long id, String description) {
27          super();
28          this.id = id;
29          this.description = description;
30      }
31  
32      /**
33       * Creates a location with no properties set.
34       */
35      public Location() {
36      }
37  
38      /**
39       * @return the location description
40       */
41      public String getDescription() {
42          return description;
43      }
44  
45      /**
46       * @return the ID of the location
47       */
48      public long getId() {
49          return id;
50      }
51  
52      /**
53       * @return String representation of this object
54       */
55      public String toString() {
56          return "<Location id=\"" + id + "\" description=\"" + description + "\" />";
57      }
58  
59      /**
60       * Sets the description for this location
61       *
62       * @param description the new description value
63       */
64      public void setDescription(String description) {
65          this.description = description;
66      }
67  
68      /**
69       * Sets the id
70       *
71       * @param id the new id value
72       */
73      public void setId(long id) {
74          this.id = id;
75      }
76  }