198 lines
4.0 KiB
Java
198 lines
4.0 KiB
Java
package eu.dnetlib.manager.wf.model;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.LinkedHashMap;
|
|
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.json.JsonBinaryType;
|
|
import com.vladmihalcea.hibernate.type.json.JsonStringType;
|
|
|
|
@Entity
|
|
@Table(name = "workflow_instances")
|
|
@TypeDefs({
|
|
@TypeDef(name = "json", typeClass = JsonStringType.class),
|
|
@TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
|
|
})
|
|
public class WorkflowInstance implements Serializable {
|
|
|
|
private static final long serialVersionUID = 7503841966138333044L;
|
|
|
|
@Id
|
|
@Column(name = "id")
|
|
private String id;
|
|
|
|
@Type(type = "jsonb")
|
|
@Column(name = "data", columnDefinition = "jsonb")
|
|
private Map<String, String> details = new LinkedHashMap<>();
|
|
|
|
@Column(name = "priority")
|
|
private Integer priority;
|
|
|
|
@Column(name = "dsid")
|
|
private String dsId;
|
|
|
|
@Column(name = "dsname")
|
|
private String dsName;
|
|
|
|
@Column(name = "apiid")
|
|
private String apiId;
|
|
|
|
@Column(name = "enabled")
|
|
private boolean enabled;
|
|
|
|
@Column(name = "configured")
|
|
private boolean configured;
|
|
|
|
@Column(name = "scheduling_enabled")
|
|
private boolean schedulingEnabled;
|
|
|
|
@Column(name = "scheduling_cron")
|
|
private String cronExpression;
|
|
|
|
@Column(name = "scheduling_min_interval")
|
|
private int cronMinInterval;
|
|
|
|
@Column(name = "workflow")
|
|
private String workflow;
|
|
|
|
@Column(name = "destroy_wf")
|
|
private String destroyWf;
|
|
|
|
@Type(type = "jsonb")
|
|
@Column(name = "system_params", columnDefinition = "jsonb")
|
|
private Map<String, String> systemParams = new LinkedHashMap<>();
|
|
|
|
@Type(type = "jsonb")
|
|
@Column(name = "user_params", columnDefinition = "jsonb")
|
|
private Map<String, String> userParams = new LinkedHashMap<>();
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(final String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public Map<String, String> getDetails() {
|
|
return details;
|
|
}
|
|
|
|
public void setDetails(final Map<String, String> details) {
|
|
this.details = details;
|
|
}
|
|
|
|
public Integer getPriority() {
|
|
return priority;
|
|
}
|
|
|
|
public void setPriority(final Integer priority) {
|
|
this.priority = priority;
|
|
}
|
|
|
|
public String getDsId() {
|
|
return dsId;
|
|
}
|
|
|
|
public void setDsId(final String dsId) {
|
|
this.dsId = dsId;
|
|
}
|
|
|
|
public String getDsName() {
|
|
return dsName;
|
|
}
|
|
|
|
public void setDsName(final String dsName) {
|
|
this.dsName = dsName;
|
|
}
|
|
|
|
public String getApiId() {
|
|
return apiId;
|
|
}
|
|
|
|
public void setApiId(final String apiId) {
|
|
this.apiId = apiId;
|
|
}
|
|
|
|
public boolean isEnabled() {
|
|
return enabled;
|
|
}
|
|
|
|
public void setEnabled(final boolean enabled) {
|
|
this.enabled = enabled;
|
|
}
|
|
|
|
public boolean isConfigured() {
|
|
return configured;
|
|
}
|
|
|
|
public void setConfigured(final boolean configured) {
|
|
this.configured = configured;
|
|
}
|
|
|
|
public boolean isSchedulingEnabled() {
|
|
return schedulingEnabled;
|
|
}
|
|
|
|
public void setSchedulingEnabled(final boolean schedulingEnabled) {
|
|
this.schedulingEnabled = schedulingEnabled;
|
|
}
|
|
|
|
public String getCronExpression() {
|
|
return cronExpression;
|
|
}
|
|
|
|
public void setCronExpression(final String cronExpression) {
|
|
this.cronExpression = cronExpression;
|
|
}
|
|
|
|
public int getCronMinInterval() {
|
|
return cronMinInterval;
|
|
}
|
|
|
|
public void setCronMinInterval(final int cronMinInterval) {
|
|
this.cronMinInterval = cronMinInterval;
|
|
}
|
|
|
|
public String getWorkflow() {
|
|
return workflow;
|
|
}
|
|
|
|
public void setWorkflow(final String workflow) {
|
|
this.workflow = workflow;
|
|
}
|
|
|
|
public String getDestroyWf() {
|
|
return destroyWf;
|
|
}
|
|
|
|
public void setDestroyWf(final String destroyWf) {
|
|
this.destroyWf = destroyWf;
|
|
}
|
|
|
|
public Map<String, String> getSystemParams() {
|
|
return systemParams;
|
|
}
|
|
|
|
public void setSystemParams(final Map<String, String> systemParams) {
|
|
this.systemParams = systemParams;
|
|
}
|
|
|
|
public Map<String, String> getUserParams() {
|
|
return userParams;
|
|
}
|
|
|
|
public void setUserParams(final Map<String, String> userParams) {
|
|
this.userParams = userParams;
|
|
}
|
|
}
|