blob: b20ddd83b6b4839d49cea487c65740805347f9ac [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.airavata.datalake.orchestrator.registry.persistance.entity;
import org.apache.airavata.datalake.orchestrator.registry.persistance.entity.WorkflowEntity;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.Date;
/**
* An entity class represents the task entity
*/
@Entity
@Table(name = "WORKFLOW_TASK_ENTITY")
@EntityListeners(AuditingEntityListener.class)
public class WorkflowTaskEntity {
@Id
private String id;
@ManyToOne
@JoinColumn(name = "workflow_entity_id")
private WorkflowEntity workflowEntity;
@Column(nullable = false)
@Temporal(TemporalType.TIMESTAMP)
@CreatedDate
private Date createdAt;
@Column(nullable = false)
@Temporal(TemporalType.TIMESTAMP)
@LastModifiedDate
private Date lastModifiedAt;
@Column(nullable = false)
private String status;
@Lob
private String error;
private int errorCode;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public WorkflowEntity getWorkflowEntity() {
return workflowEntity;
}
public void setWorkflowEntity(WorkflowEntity workFlowEntity) {
this.workflowEntity = workFlowEntity;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getLastModifiedAt() {
return lastModifiedAt;
}
public void setLastModifiedAt(Date lastModifiedAt) {
this.lastModifiedAt = lastModifiedAt;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public int getErrorCode() {
return errorCode;
}
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
}
}