98 lines
2.0 KiB
Java
98 lines
2.0 KiB
Java
package eu.dnetlib.openaire.community.db.model;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Map;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
import org.hibernate.annotations.Type;
|
|
import org.hibernate.annotations.TypeDef;
|
|
import org.hibernate.annotations.TypeDefs;
|
|
|
|
import com.vladmihalcea.hibernate.type.array.StringArrayType;
|
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
|
import com.vladmihalcea.hibernate.type.json.JsonStringType;
|
|
|
|
@Entity
|
|
@Table(name = "community_subs")
|
|
@TypeDefs({
|
|
@TypeDef(name = "string-array", typeClass = StringArrayType.class),
|
|
@TypeDef(name = "json", typeClass = JsonStringType.class),
|
|
@TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
|
|
})
|
|
public class DbSubCommunity implements Serializable {
|
|
|
|
private static final long serialVersionUID = 7104936574383307358L;
|
|
|
|
@Id
|
|
@Column(name = "sub_id")
|
|
private String id;
|
|
|
|
@Column(name = "community")
|
|
private String community;
|
|
|
|
@Column(name = "label")
|
|
private String label;
|
|
|
|
@Column(name = "category")
|
|
private String category;
|
|
|
|
@Type(type = "jsonb")
|
|
@Column(name = "params")
|
|
private Map<String, String> params;
|
|
|
|
@Column(name = "parent")
|
|
private String parent;
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(final String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getCommunity() {
|
|
return community;
|
|
}
|
|
|
|
public void setCommunity(final String community) {
|
|
this.community = community;
|
|
}
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
|
|
public void setLabel(final String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public String getCategory() {
|
|
return category;
|
|
}
|
|
|
|
public void setCategory(final String category) {
|
|
this.category = category;
|
|
}
|
|
|
|
public Map<String, String> getParams() {
|
|
return params;
|
|
}
|
|
|
|
public void setParams(final Map<String, String> params) {
|
|
this.params = params;
|
|
}
|
|
|
|
public String getParent() {
|
|
return parent;
|
|
}
|
|
|
|
public void setParent(final String parent) {
|
|
this.parent = parent;
|
|
}
|
|
}
|