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 = "USER_PARAMETERS")
21 public class UserParameters implements Serializable {
23 private static final long serialVersionUID = -5036895978102778877L;
26 @Column(name = "ID", nullable = false, updatable = false)
27 @GeneratedValue(strategy = GenerationType.IDENTITY)
31 @Column(name = "NAME")
34 @Column(name = "PAYLOAD_LOCATION")
35 private String payloadLocation;
37 @Column(name = "LABEL")
40 @Column(name = "TYPE")
43 @Column(name = "DESCRIPTION")
44 private String description;
46 @Column(name = "IS_REQUIRED")
47 private Boolean isRequried;
49 @Column(name = "MAX_LENGTH")
50 private Integer maxLength;
52 @Column(name = "ALLOWABLE_CHARS")
53 private String allowableChars;
55 @Column(name = "CREATION_TIMESTAMP", updatable = false)
56 @Temporal(TemporalType.TIMESTAMP)
60 protected void onCreate() {
61 this.created = new Date();
64 public Integer getID() {
68 public String getName() {
72 public void setName(String name) {
77 public String toString() {
78 return new ToStringBuilder(this).append("name", name).toString();
81 public String getPayloadLocation() {
82 return payloadLocation;
85 public void setPayloadLocation(String payloadLocation) {
86 this.payloadLocation = payloadLocation;
89 public String getLabel() {
93 public void setLabel(String label) {
97 public String getType() {
101 public void setType(String type) {
105 public String getDescription() {
109 public void setDescription(String description) {
110 this.description = description;
113 public Boolean getIsRequried() {
117 public void setIsRequried(Boolean isRequried) {
118 this.isRequried = isRequried;
121 public Integer getMaxLength() {
125 public void setMaxLength(Integer maxLength) {
126 this.maxLength = maxLength;
129 public String getAllowableChars() {
130 return allowableChars;
133 public void setAllowableChars(String allowableChars) {
134 this.allowableChars = allowableChars;
137 public Date getCreated() {
141 public void setCreated(Date created) {
142 this.created = created;
146 public boolean equals(final Object other) {
147 if (!(other instanceof UserParameters)) {
150 UserParameters castOther = (UserParameters) other;
151 return new EqualsBuilder().append(name, castOther.name).isEquals();
155 public int hashCode() {
156 return new HashCodeBuilder().append(name).toHashCode();