Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
/*
* CategoryOfCare.java
* Copyright (c) 2017 Veterans Affairs.
*/
package gov.va.oneconsult.seoc.api.model;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* Description: CategoryOfCare look up values.
*
* @author AbleVets
*/
@Entity
@Table(name = "categoryofcare")
@JsonIgnoreProperties(value = { "serviceLine", "seocs" })
public final class CategoryOfCare
{
/**
* Id value of the CategoryOfCare. Guaranteed to be not null
*/
@Id
@Column(name = "id")
@NotNull
private int id;
/**
* Description value of the CategoryOfCare. Guaranteed to be not null.
*/
@Column(name = "description")
@NotNull
private String description;
/**
* Discontinued value
*/
@Column(name = "discontinued")
private Boolean discontinued;
/**
* {@link ServiceLine} value associated with this categoryOfCare.
*/
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "servicelineid")
@JsonBackReference
@JsonIgnore
private ServiceLine serviceLine;
/**
* {@link Seoc} list of Seocs which have the CategoryOfCare
*/
@OneToMany(mappedBy = "categoryOfCare")
@JsonBackReference
@JsonIgnore
private Set<Seoc> seocs;
/**
* @return id
*/
public int getId()
{
return id;
}
/**
* @param id
*/
public void setId(int id)
{
this.id = id;
}
/**
* @return description
*/
public String getDescription()
{
return description;
}
/**
* @param description
*/
public void setDescription(String description)
{
this.description = description;
}
/**
* @return serviceLine
*/
public ServiceLine getServiceLine()
{
return serviceLine;
}
/**
* @param serviceLine
*/
public void setServiceLine(ServiceLine serviceLine)
{
this.serviceLine = serviceLine;
}
/**
* @return discontinued
*/
public Boolean getDiscontinued()
{
return discontinued;
}
/**
* @param discontinued
*/
public void setDiscontinued(Boolean discontinued)
{
this.discontinued = discontinued;
}
/**
* @return seocs
*/
public Set<Seoc> getSeocs()
{
return seocs;
}
/**
* @param seocs
*/
public void setSeocs(Set<Seoc> seocs)
{
this.seocs = seocs;
}
/**
* {@inheritDoc}
*/
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + id;
result = prime * result + ((discontinued == null) ? 0 : discontinued.hashCode());
return result;
}
/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj)
{
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
CategoryOfCare other = (CategoryOfCare) obj;
if (description == null) {
if (other.description != null) {
return false;
}
} else if (!description.equals(other.description)) {
return false;
}
if (id != other.id) {
return false;
}
if (discontinued == null) {
if (other.discontinued != null) {
return false;
}
} else if (!discontinued.equals(other.discontinued)) {
return false;
}
return true;
}
/**
* {@inheritDoc}
*/
@Override
public String toString()
{
return "CategoryOfCare [id=" + id + ", description=" + description + ", serviceLine="
+ serviceLine + "]";
}
}