[SO] Release so 1.13.0 image
[so.git] / mso-catalog-db / src / main / java / org / onap / so / db / catalog / beans / ActivitySpecCategories.java
1 package org.onap.so.db.catalog.beans;
2
3 import java.io.Serializable;
4 import javax.persistence.Column;
5 import javax.persistence.Entity;
6 import javax.persistence.GeneratedValue;
7 import javax.persistence.GenerationType;
8 import javax.persistence.Id;
9 import javax.persistence.Table;
10 import org.apache.commons.lang3.builder.EqualsBuilder;
11 import org.apache.commons.lang3.builder.HashCodeBuilder;
12 import org.apache.commons.lang3.builder.ToStringBuilder;
13 import com.openpojo.business.annotation.BusinessKey;
14 import uk.co.blackpepper.bowman.annotation.RemoteResource;
15
16 @Entity
17 @RemoteResource("/activitySpecCategories")
18 @Table(name = "activity_spec_categories")
19 public class ActivitySpecCategories implements Serializable {
20
21     private static final long serialVersionUID = -6251150462067699643L;
22
23     @Id
24     @Column(name = "ID", nullable = false, updatable = false)
25     @GeneratedValue(strategy = GenerationType.IDENTITY)
26     private Integer ID;
27
28     @BusinessKey
29     @Column(name = "NAME")
30     private String name;
31
32     public Integer getID() {
33         return ID;
34     }
35
36     public String getName() {
37         return name;
38     }
39
40     public void setName(String name) {
41         this.name = name;
42     }
43
44     @Override
45     public String toString() {
46         return new ToStringBuilder(this).append("name", name).toString();
47     }
48
49     @Override
50     public boolean equals(final Object other) {
51         if (!(other instanceof ActivitySpecCategories)) {
52             return false;
53         }
54         ActivitySpecCategories castOther = (ActivitySpecCategories) other;
55         return new EqualsBuilder().append(name, castOther.name).isEquals();
56     }
57
58     @Override
59     public int hashCode() {
60         return new HashCodeBuilder().append(name).toHashCode();
61     }
62 }