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;
20 @Table(name = "activity_spec_parameters")
21 public class ActivitySpecParameters implements Serializable {
23 private static final long serialVersionUID = 3627711377147710046L;
26 @Column(name = "ID", nullable = false, updatable = false)
27 @GeneratedValue(strategy = GenerationType.IDENTITY)
31 @Column(name = "NAME")
34 @Column(name = "TYPE")
38 @Column(name = "DIRECTION")
39 private String direction;
41 @Column(name = "DESCRIPTION")
42 private String description;
44 @Column(name = "CREATION_TIMESTAMP", updatable = false)
45 @Temporal(TemporalType.TIMESTAMP)
49 protected void onCreate() {
50 this.created = new Date();
54 public String toString() {
55 return new ToStringBuilder(this).append("name", name).append("direction", direction).toString();
59 public boolean equals(final Object other) {
60 if (!(other instanceof ActivitySpecParameters)) {
63 ActivitySpecParameters castOther = (ActivitySpecParameters) other;
64 return new EqualsBuilder().append(ID, castOther.ID).isEquals();
68 public int hashCode() {
69 return new HashCodeBuilder().append(ID).toHashCode();
72 public Integer getID() {
76 public String getName() {
80 public void setName(String name) {
84 public String getType() {
88 public void setType(String type) {
92 public String getDirection() {
96 public void setDirection(String direction) {
97 this.direction = direction;
100 public String getDescription() {
104 public void setDescription(String description) {
105 this.description = description;
108 public Date getCreated() {
112 public void setCreated(Date created) {
113 this.created = created;