View Javadoc

1   /*
2    * Created on Nov 27, 2004
3    *
4    * TODO To change the template for this generated file go to
5    * Window - Preferences - Java - Code Style - Code Templates
6    */
7   package com.panogenesis.model;
8   
9   import java.io.Serializable;
10  
11  import org.apache.commons.lang.builder.EqualsBuilder;
12  import org.apache.commons.lang.builder.HashCodeBuilder;
13  import org.apache.commons.lang.builder.ToStringBuilder;
14  /***
15   * @author John Arthur
16   *
17   * TODO To change the template for this generated type comment go to
18   * Window - Preferences - Java - Code Style - Code Templates
19   * 
20   * @hibernate.class table="severity_lookup"
21   */
22  public class Severity extends BaseObject implements Serializable {
23  	private Integer id;
24  	private String severityName;
25  	private String severityDescription;
26  
27  	/***
28  	 * 
29  	 */
30  	public Severity() {
31  	}
32  	
33  
34  	/***
35  	 * @return Returns the id.
36  	 * @hibernate.id column="id"
37       *  generator-class="increment" unsaved-value="null"
38  	 */
39  	public Integer getId() {
40  		return id;
41  	}
42  	/***
43  	 * @param id The id to set.
44  	 */
45  	public void setId(Integer id) {
46  		this.id = id;
47  	}
48  	/***
49  	 * @return Returns the severityName.
50  	 * @hibernate.property column="severity_name" not-null="true" length="50"
51  	 */
52  	public String getSeverityName() {
53  		return severityName;
54  	}
55  	/***
56  	 * @param severityName The severityName to set.
57  	 * @spring.validator type="required"
58  	 */
59  	public void setSeverityName(String severityName) {
60  		this.severityName = severityName;
61  	}	
62  	/***
63  	 * @return Returns the severityDescription.
64  	 * @hibernate.property column="severity_description" not-null="true" length="255"
65  	 */
66  	public String getSeverityDescription() {
67  		return severityDescription;
68  	}
69  	/***
70  	 * @param severityDescription The severityDescription to set.
71  	 * @spring.validator type="required"
72  	 */
73  	public void setSeverityDescription(String severityDescription) {
74  		this.severityDescription = severityDescription;
75  	}
76  
77  	/***
78  	 * @see java.lang.Object#equals(Object)
79  	 */
80  	public boolean equals(Object object) {
81  		if (!(object instanceof Severity)) {
82  			return false;
83  		}
84  		Severity rhs = (Severity) object;
85  		return new EqualsBuilder().append(
86  				this.severityName, rhs.severityName).append(
87  				this.severityDescription, rhs.severityDescription).append(
88  				this.id, rhs.id).isEquals();
89  	}
90  	/***
91  	 * @see java.lang.Object#hashCode()
92  	 */
93  	public int hashCode() {
94  		return new HashCodeBuilder(-317251967, 422813671).append(this.severityName).append(
95  				this.severityDescription).append(this.id).toHashCode();
96  	}
97  	/***
98  	 * @see java.lang.Object#toString()
99  	 */
100 	public String toString() {
101 		return new ToStringBuilder(this).append("severityName",
102 				this.severityName).append("id", this.id).append(
103 				"severityDescription", this.severityDescription).toString();
104 	}
105 }