1 package org.onap.vid.model;
3 import org.openecomp.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 {
18 private CategoryParameter categoryParameter;
20 public CategoryParameterOption() {
23 public CategoryParameterOption(String appId, String name, CategoryParameter categoryParameter) {
26 setCategoryParameter(categoryParameter);
30 @GeneratedValue(strategy = GenerationType.IDENTITY)
31 @Column(name = "CATEGORY_OPT_DB_ID")
36 public void setId(Long id) {
40 @Column(name = "CATEGORY_OPT_APP_ID")
41 public String getAppId() {
45 public void setAppId(String appId) {
49 @Column(name = "NAME")
50 public String getName() {
54 public void setName(String name) {
59 @JoinColumn(name="CATEGORY_ID", nullable=false)
60 public CategoryParameter getCategoryParameter() {
61 return categoryParameter;
64 public void setCategoryParameter(CategoryParameter categoryParameter) {
65 this.categoryParameter = categoryParameter;
69 @Column(name = "CREATED_DATE")
70 public Date getCreated() {
71 return super.getCreated();
75 @Column(name = "MODIFIED_DATE")
76 public Date getModified() {
77 return super.getModified();
82 public Long getCreatedId() {
83 return super.getCreatedId();
88 public Long getModifiedId() {
89 return super.getModifiedId();
94 public Serializable getAuditUserId() {
95 return super.getAuditUserId();
100 public Long getRowNum() {
101 return super.getRowNum();
106 public Set getAuditTrail() {
107 return super.getAuditTrail();
111 public boolean equals(Object o) {
112 if (this == o) return true;
113 if (o == null || getClass() != o.getClass()) return false;
115 CategoryParameterOption that = (CategoryParameterOption) o;
117 if (getAppId() != null ? !getAppId().equals(that.getAppId()) : that.getAppId() != null) return false;
118 if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
119 return getCategoryParameter() != null ? getCategoryParameter().equals(that.getCategoryParameter()) : that.getCategoryParameter() == null;
123 public int hashCode() {
124 int result = getAppId() != null ? getAppId().hashCode() : 0;
125 result = 31 * result + (getName() != null ? getName().hashCode() : 0);
126 result = 31 * result + (getCategoryParameter() != null ? getCategoryParameter().hashCode() : 0);
131 public String toString() {
132 return "CategoryParameterOption{" +
134 ", key='" + appId + '\'' +
135 ", value='" + name + '\'' +
136 ", categoryParameterId=" + categoryParameter.getId() +