Skip to content
Snippets Groups Projects
Commit 2b206cfc authored by Mirco Nasuti's avatar Mirco Nasuti
Browse files

only keep code attribute for variables and groups

parent 90aaa054
No related branches found
No related tags found
No related merge requests found
......@@ -8,9 +8,9 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import javax.persistence.*;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "`group`")
......@@ -22,14 +22,6 @@ public class Group {
@Id
private String code = null;
private String label = null;
@ManyToOne(fetch = FetchType.EAGER)
private Group parent = null;
@OneToMany(fetch = FetchType.EAGER)
private List<Group> groups = new LinkedList<>();
public Group() {
/*
......@@ -42,35 +34,4 @@ public class Group {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public Group getParent() {
return parent;
}
public void setParent(Group parent) {
this.parent = parent;
}
public List<Group> getGroups() {
return groups;
}
public void setGroups(List<Group> groups) {
this.groups = groups;
}
}
......@@ -6,13 +6,12 @@ package eu.hbp.mip.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.Expose;
import io.swagger.annotations.ApiModel;
import javax.persistence.*;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "`variable`")
......@@ -25,38 +24,6 @@ public class Variable {
@Expose
private String code = null;
private String label = null;
private String type = null;
private Integer length = null;
private Double minValue = null;
private Double maxValue = null;
private String units = null;
private Boolean isVariable = null;
private Boolean isGrouping = null;
private Boolean isCovariable = null;
private Boolean isFilter = null;
@ManyToOne(fetch = FetchType.EAGER)
private Group group = null;
@ManyToMany(fetch = FetchType.EAGER)
private List<Value> values = new LinkedList<>();
@ManyToMany(fetch = FetchType.EAGER, mappedBy = "variables")
private List<Query> queries = new LinkedList<>();
@Column(columnDefinition = "text")
private String description = null;
public Variable() {
/*
......@@ -64,16 +31,6 @@ public class Variable {
*/
}
public Group getGroup() {
return group;
}
public void setGroup(Group group) {
this.group = group;
}
public String getCode() {
return code;
}
......@@ -83,124 +40,5 @@ public class Variable {
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Integer getLength() {
return length;
}
public void setLength(Integer length) {
this.length = length;
}
@JsonProperty("isVariable")
public Boolean getIsVariable() {
return isVariable;
}
public void setIsVariable(Boolean isVariable) {
this.isVariable = isVariable;
}
@JsonProperty("isGrouping")
public Boolean getIsGrouping() {
return isGrouping;
}
public void setIsGrouping(Boolean isGrouping) {
this.isGrouping = isGrouping;
}
@JsonProperty("isCovariable")
public Boolean getIsCovariable() {
return isCovariable;
}
public void setIsCovariable(Boolean isCovariable) {
this.isCovariable = isCovariable;
}
@JsonProperty("isFilter")
public Boolean getIsFilter() {
return isFilter;
}
public void setIsFilter(Boolean isFilter) {
this.isFilter = isFilter;
}
public List<Value> getValues() {
return values;
}
public void setValues(List<Value> values) {
this.values = values;
}
public Double getMinValue() {
return minValue;
}
public void setMinValue(Double minValue) {
this.minValue = minValue;
}
public Double getMaxValue() {
return maxValue;
}
public void setMaxValue(Double maxValue) {
this.maxValue = maxValue;
}
public String getUnits() {
return units;
}
public void setUnits(String units) {
this.units = units;
}
public List<Query> getQueries() {
return queries;
}
public void setQueries(List<Query> queries) {
this.queries = queries;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment