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
/*
* Status.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.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonBackReference;
/**
* Description: Contains lookup values of Status. Possible values are
* DRAFT,ACTIVE,DISCONTINUED,IN-PROGRESS,DATE HOLD
*
* @author AbleVets
*/
@Entity
@Table(name = "status")
public final class Status
{
/**
* Id of Status. Guaranteed to be not null.Auto generated.
*/
@Id
@NotNull
@Column(name = "id")
private int id;
/**
* Description of Status. Guaranteed to be not null.
*/
@NotNull
@Column(name = "description")
private String description;
/**
*
*/
@OneToMany(mappedBy = "status")
@JsonBackReference
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 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;
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;
}
Status other = (Status) obj;
if (description == null) {
if (other.description != null) {
return false;
}
} else if (!description.equals(other.description)) {
return false;
}
if (id != other.id) {
return false;
}
return true;
}
/**
* {@inheritDoc}
*/
@Override
public String toString()
{
return "Status [id=" + id + ", description=" + description + "]";
}
}