no.unit.nva.model.Organization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nva-datamodel-java Show documentation
Show all versions of nva-datamodel-java Show documentation
The java version of the NVA datamodel
package no.unit.nva.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import java.net.URI;
import java.util.Objects;
import nva.commons.core.JacocoGenerated;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
public class Organization extends Corporation {
@JsonProperty("id")
private URI id;
public Organization() {
super();
}
private Organization(Builder builder) {
super();
setId(builder.id);
}
public URI getId() {
return id;
}
public void setId(URI id) {
this.id = id;
}
@JacocoGenerated
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Organization that = (Organization) o;
return Objects.equals(getId(), that.getId());
}
@JacocoGenerated
@Override
public int hashCode() {
return Objects.hash(getId());
}
public static final class Builder {
private URI id;
public Builder() {
}
public Builder withId(URI id) {
this.id = id;
return this;
}
public Organization build() {
return new Organization(this);
}
}
}