public void updateFromEvent(HistoricVariableUpdateEventEntity historyEvent) { this.id = historyEvent.getVariableInstanceId(); this.processDefinitionKey = historyEvent.getProcessDefinitionKey(); this.processDefinitionId = historyEvent.getProcessDefinitionId(); this.processInstanceId = historyEvent.getProcessInstanceId(); this.taskId = historyEvent.getTaskId(); this.executionId = historyEvent.getExecutionId(); this.activityInstanceId = historyEvent.getScopeActivityInstanceId(); this.caseDefinitionKey = historyEvent.getCaseDefinitionKey(); this.caseDefinitionId = historyEvent.getCaseDefinitionId(); this.caseInstanceId = historyEvent.getCaseInstanceId(); this.caseExecutionId = historyEvent.getCaseExecutionId(); this.name = historyEvent.getVariableName(); this.longValue = historyEvent.getLongValue(); this.doubleValue = historyEvent.getDoubleValue(); this.textValue = historyEvent.getTextValue(); this.textValue2 = historyEvent.getTextValue2(); setSerializerName(historyEvent.getSerializerName()); byteArrayField.deleteByteArrayValue(); if (historyEvent.getByteValue() != null) { setByteArrayValue(historyEvent.getByteValue()); } }
public void setByteArrayValue(byte[] bytes) { deleteByteArrayValue(); ByteArrayEntity byteArrayValue = null; if (bytes != null) { byteArrayValue = new ByteArrayEntity(valueFields.getName(), bytes); Context.getCommandContext().getDbEntityManager().insert(byteArrayValue); } this.byteArrayValue = byteArrayValue; if (byteArrayValue != null) { this.byteArrayId = byteArrayValue.getId(); } else { this.byteArrayId = null; } }
public void delete() { byteArrayField.deleteByteArrayValue(); Context.getCommandContext().getDbEntityManager().delete(this); }