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(ByteArrayEntity byteArrayValue) {
   byteArrayField.setByteArrayValue(byteArrayValue);
 }
 public void setByteArrayValue(byte[] bytes) {
   byteArrayField.setByteArrayValue(bytes);
 }
 public byte[] getByteArrayValue() {
   return byteArrayField.getByteArrayValue();
 }
 public void setByteArrayId(String byteArrayId) {
   byteArrayField.setByteArrayId(byteArrayId);
 }
 public String getByteArrayId() {
   return byteArrayField.getByteArrayId();
 }
  public void delete() {
    byteArrayField.deleteByteArrayValue();

    Context.getCommandContext().getDbEntityManager().delete(this);
  }