1 package org.onap.so.db.catalog.beans;
3 import java.io.Serializable;
5 import javax.persistence.Column;
6 import javax.persistence.Entity;
7 import javax.persistence.GeneratedValue;
8 import javax.persistence.GenerationType;
9 import javax.persistence.Id;
10 import javax.persistence.PrePersist;
11 import javax.persistence.Table;
12 import javax.persistence.Temporal;
13 import javax.persistence.TemporalType;
14 import org.apache.commons.lang3.builder.EqualsBuilder;
15 import org.apache.commons.lang3.builder.HashCodeBuilder;
16 import org.apache.commons.lang3.builder.ToStringBuilder;
17 import com.openpojo.business.annotation.BusinessKey;
18 import uk.co.blackpepper.bowman.annotation.RemoteResource;
21 @RemoteResource("/activitySpecParameters")
22 @Table(name = "activity_spec_parameters")
23 public class ActivitySpecParameters implements Serializable {
25 private static final long serialVersionUID = 3627711377147710046L;
28 @Column(name = "ID", nullable = false, updatable = false)
29 @GeneratedValue(strategy = GenerationType.IDENTITY)
33 @Column(name = "NAME")
36 @Column(name = "TYPE")
40 @Column(name = "DIRECTION")
41 private String direction;
43 @Column(name = "DESCRIPTION")
44 private String description;
46 @Column(name = "CREATION_TIMESTAMP", updatable = false)
47 @Temporal(TemporalType.TIMESTAMP)
51 protected void onCreate() {
52 this.created = new Date();
56 public String toString() {
57 return new ToStringBuilder(this).append("name", name).append("direction", direction).toString();
61 public boolean equals(final Object other) {
62 if (!(other instanceof ActivitySpecParameters)) {
65 ActivitySpecParameters castOther = (ActivitySpecParameters) other;
66 return new EqualsBuilder().append(ID, castOther.ID).isEquals();
70 public int hashCode() {
71 return new HashCodeBuilder().append(ID).toHashCode();
74 public Integer getID() {
78 public String getName() {
82 public void setName(String name) {
86 public String getType() {
90 public void setType(String type) {
94 public String getDirection() {
98 public void setDirection(String direction) {
99 this.direction = direction;
102 public String getDescription() {
106 public void setDescription(String description) {
107 this.description = description;
110 public Date getCreated() {
114 public void setCreated(Date created) {
115 this.created = created;