View Javadoc

1   package uk.co.concise.maven.hdc.model;
2   
3   import java.util.HashSet;
4   import java.util.Set;
5   
6   
7   /***
8    * A chart with labels and data points.
9    * 
10   * @author martenssonb
11   * 
12   * @hibernate.class
13   *             table = "CHARTS"
14   */
15  public class Chart {
16  
17      private long id;
18      private String heading;
19      private Set labels = new HashSet();
20  
21      /***
22       * Returns the unique id.
23       * 
24       * @hibernate.id
25       *      column = "id"
26       *      generator-class = "native"
27       *      unsaved-value = "0"
28       * 
29       * @return Returns the id.
30       */
31      public long getId() {
32          return id;
33      }
34  
35      /***
36       * Sets the unique id. For hibernate.
37       * @param id
38       *            The id to set.
39       */
40      private void setId(long id) {
41          this.id = id;
42      }
43      
44      /***
45       * The heading for this chart.
46       * @return Returns the heading.
47       * 
48       * @hibernate.property not-null="true"
49       *      unique="true"
50       */
51      public String getHeading() {
52          return heading;
53      }
54      /***
55       * The heading for this chart.
56       * @param heading The heading to set.
57       */
58      public void setHeading(String heading) {
59          this.heading = heading;
60      }
61  
62      /***
63       * @return Returns the labels.
64       * 
65       * @hibernate.set
66       *       lazy="false"
67       *       cascade="save-update"
68       *       inverse="true"
69       * 
70       * @hibernate.collection-key
71       *       column="chart_id"
72       * 
73       * @hibernate.collection-one-to-many
74       *       class="uk.co.concise.maven.hdc.model.Label"
75       *  
76       */
77      public Set getLabels() {
78          return labels;
79      }
80  
81      /***
82       * @param labels The labels to set.
83       */
84      public void setLabels(Set labels) {
85          this.labels = labels;
86      }
87  
88  }