52 lines
1.1 KiB
Java
52 lines
1.1 KiB
Java
package eu.dnetlib.is.context.model;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.MappedSuperclass;
|
|
|
|
import org.hibernate.annotations.Type;
|
|
import org.hibernate.annotations.TypeDef;
|
|
import org.hibernate.annotations.TypeDefs;
|
|
|
|
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
|
|
import com.vladmihalcea.hibernate.type.json.JsonStringType;
|
|
|
|
@MappedSuperclass
|
|
@TypeDefs({
|
|
@TypeDef(name = "json", typeClass = JsonStringType.class),
|
|
@TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
|
|
})
|
|
public abstract class CtxInfo implements Serializable {
|
|
|
|
private static final long serialVersionUID = 4912082158208138795L;
|
|
|
|
@Column(name = "label")
|
|
private String label;
|
|
|
|
@Type(type = "jsonb")
|
|
@Column(name = "params")
|
|
private Parameter[] parameters;
|
|
|
|
abstract public String getId();
|
|
|
|
abstract public void setId(final String id);
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
|
|
public void setLabel(final String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public Parameter[] getParameters() {
|
|
return parameters;
|
|
}
|
|
|
|
public void setParameters(final Parameter[] parameters) {
|
|
this.parameters = parameters;
|
|
}
|
|
|
|
}
|