package io.crnk.activiti.resource;

import io.crnk.core.resource.annotations.JsonApiField;
import io.crnk.core.resource.annotations.JsonApiId;

import java.time.OffsetDateTime;

public class HistoricProcessInstanceResource {

	private String businessKey;

	@JsonApiField(patchable = false)
	private String processDefinitionKey;

	@JsonApiId
	@JsonApiField(postable = false, patchable = false)
	private String id;

	@JsonApiField(postable = false, patchable = false, sortable = false)
	private String startActivityId;

	@JsonApiField(postable = false, patchable = false, sortable = false)
	private String endActivityId;

	@JsonApiField(patchable = false, sortable = false)
	private String description;

	@JsonApiField(patchable = false, sortable = false)
	private String name;


	@JsonApiField(patchable = false, sortable = false)
	private String tenantId;


	private OffsetDateTime startTime;

	private OffsetDateTime endTime;

	private long duration;

	private String startUserId;

	private String deleteReason;

	public OffsetDateTime getStartTime() {
		return startTime;
	}

	public void setStartTime(OffsetDateTime startTime) {
		this.startTime = startTime;
	}

	public OffsetDateTime getEndTime() {
		return endTime;
	}

	public void setEndTime(OffsetDateTime endTime) {
		this.endTime = endTime;
	}

	public long getDuration() {
		return duration;
	}

	public void setDuration(long duration) {
		this.duration = duration;
	}

	public String getStartUserId() {
		return startUserId;
	}

	public void setStartUserId(String startUserId) {
		this.startUserId = startUserId;
	}

	public String getDeleteReason() {
		return deleteReason;
	}

	public void setDeleteReason(String deleteReason) {
		this.deleteReason = deleteReason;
	}

	public String getStartActivityId() {
		return startActivityId;
	}

	public void setStartActivityId(String startActivityId) {
		this.startActivityId = startActivityId;
	}

	public String getEndActivityId() {
		return endActivityId;
	}

	public void setEndActivityId(String endActivityId) {
		this.endActivityId = endActivityId;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTenantId() {
		return tenantId;
	}

	public void setTenantId(String tenantId) {
		this.tenantId = tenantId;
	}

	public String getBusinessKey() {
		return businessKey;
	}

	public void setBusinessKey(String businessKey) {
		this.businessKey = businessKey;
	}

	public String getProcessDefinitionKey() {
		return processDefinitionKey;
	}

	public void setProcessDefinitionKey(String processDefinitionKey) {
		this.processDefinitionKey = processDefinitionKey;
	}
}

@@ -29,16 +29,50 @@
 ource;%0A%0A
+import java.time.OffsetDateTime;%0A%0A
 import i
@@ -175,42 +175,8 @@
 d;%0A%0A
-import java.time.OffsetDateTime;%0A%0A
 publ
@@ -930,17 +930,17 @@
 private 
-l
+L
 ong dura
@@ -1307,17 +1307,17 @@
 %09public 
-l
+L
 ong getD
@@ -1376,17 +1376,17 @@
 uration(
-l
+L
 ong dura

Make duration nullable for historic activiti repositories #384