1 package org.onap.vid.model;
3 import org.onap.portalsdk.core.domain.support.DomainVo;
5 import javax.persistence.*;
6 import java.io.Serializable;
11 @Table(name = "vid_category_parameter_option")
12 public class CategoryParameterOption extends DomainVo {
17 private CategoryParameter categoryParameter;
19 public CategoryParameterOption() {
22 public CategoryParameterOption(String appId, String name, CategoryParameter categoryParameter) {
25 setCategoryParameter(categoryParameter);
29 @GeneratedValue(strategy = GenerationType.IDENTITY)
30 @Column(name = "CATEGORY_OPT_DB_ID")
35 @Column(name = "CATEGORY_OPT_APP_ID")
36 public String getAppId() {
40 public void setAppId(String appId) {
44 @Column(name = "NAME")
45 public String getName() {
49 public void setName(String name) {
54 @JoinColumn(name="CATEGORY_ID", nullable=false)
55 public CategoryParameter getCategoryParameter() {
56 return categoryParameter;
59 public void setCategoryParameter(CategoryParameter categoryParameter) {
60 this.categoryParameter = categoryParameter;
64 @Column(name = "CREATED_DATE")
65 public Date getCreated() {
66 return super.getCreated();
70 @Column(name = "MODIFIED_DATE")
71 public Date getModified() {
72 return super.getModified();
77 public Long getCreatedId() {
78 return super.getCreatedId();
83 public Long getModifiedId() {
84 return super.getModifiedId();
89 public Serializable getAuditUserId() {
90 return super.getAuditUserId();
95 public Long getRowNum() {
96 return super.getRowNum();
101 public Set getAuditTrail() {
102 return super.getAuditTrail();
106 public boolean equals(Object o) {
107 if (this == o) return true;
108 if (o == null || getClass() != o.getClass()) return false;
110 CategoryParameterOption that = (CategoryParameterOption) o;
112 if (getAppId() != null ? !getAppId().equals(that.getAppId()) : that.getAppId() != null) return false;
113 if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
114 return getCategoryParameter() != null ? getCategoryParameter().equals(that.getCategoryParameter()) : that.getCategoryParameter() == null;
118 public int hashCode() {
119 int result = getAppId() != null ? getAppId().hashCode() : 0;
120 result = 31 * result + (getName() != null ? getName().hashCode() : 0);
121 result = 31 * result + (getCategoryParameter() != null ? getCategoryParameter().hashCode() : 0);
126 public String toString() {
127 return "CategoryParameterOption{" +
129 ", key='" + appId + '\'' +
130 ", value='" + name + '\'' +
131 ", categoryParameterId=" + categoryParameter.getId() +