
org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activiti-engine Show documentation
Show all versions of activiti-engine Show documentation
workflow engine base on bboss and activiti.
The newest version!
/* Licensed 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.activiti.engine.impl.persistence.entity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.activiti.engine.history.HistoricVariableInstance;
import org.activiti.engine.impl.context.Context;
import org.activiti.engine.impl.db.HasRevision;
import org.activiti.engine.impl.db.PersistentObject;
import org.activiti.engine.impl.variable.ValueFields;
import org.activiti.engine.impl.variable.VariableType;
/**
* @author Christian Lipphardt (camunda)
*/
public class HistoricVariableInstanceEntity implements ValueFields, HistoricVariableInstance, PersistentObject, HasRevision, Serializable {
private static final long serialVersionUID = 1L;
protected String id;
protected String processInstanceId;
protected String taskId;
protected String executionId;
protected String name;
protected int revision;
protected VariableType variableType;
protected Long longValue;
protected Double doubleValue;
protected String textValue;
protected String textValue2;
protected ByteArrayEntity byteArrayValue;
protected String byteArrayValueId;
protected Object cachedValue;
public HistoricVariableInstanceEntity() {
}
public HistoricVariableInstanceEntity(VariableInstanceEntity variableInstance) {
this.id = variableInstance.getId();
this.processInstanceId = variableInstance.getProcessInstanceId();
this.executionId = variableInstance.getExecutionId();
this.taskId = variableInstance.getTaskId();
this.revision = variableInstance.getRevision();
this.name = variableInstance.getName();
this.variableType = variableInstance.getType();
copyValue(variableInstance);
}
public void copyValue(VariableInstanceEntity variableInstance) {
this.textValue = variableInstance.getTextValue();
this.textValue2 = variableInstance.getTextValue2();
this.doubleValue = variableInstance.getDoubleValue();
this.longValue = variableInstance.getLongValue();
if (variableInstance.getByteArrayValueId()!=null) {
setByteArrayValue(variableInstance.getByteArrayValue().getBytes());
}
}
public void delete() {
deleteByteArrayValue();
Context
.getCommandContext()
.getDbSqlSession()
.delete(this);
}
public Object getPersistentState() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy