package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;

import com.sa.ibiz.demo.demo.domain.Org;
import com.sa.ibiz.demo.demo.domain.WFInstance;
import com.sa.ibiz.demo.demo.domain.WFWorkflow;

/**
 * 实体[WFInstance] 数据对象
 */
@TableName(value = "T_SRFWFINSTANCE",resultMap = "WFInstanceResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WFInstance extends EntityBase implements Serializable{

    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private Org org;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFInstance pwfinstance;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFWorkflow wfworkflow;
    private String activestepid;
    private String activestepname;
    private String cancelreason;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "ionicdemo_SysOperatorCodeList")
    private String createman;
    @Dict(dictName = "ionicdemo_YesNoCodeList")
    @TableLogic(value= "1",delval="0")//设定逻辑有效属性
    @TableField(fill = FieldFill.INSERT)
    private Integer enable;
    private Timestamp endtime;
    private String errorinfo;
    private Integer importanceflag;
    @Dict(dictName = "ionicdemo_YesNoCodeList")
    private Integer iscancel;
    @Dict(dictName = "ionicdemo_YesNoCodeList")
    private Integer isclose;
    @Dict(dictName = "ionicdemo_YesNoCodeList")
    private Integer iserror;
    @Dict(dictName = "ionicdemo_YesNoCodeList")
    private Integer isfinish;
    private String lastaction;
    private String lastactorid;
    private String lastwfstepid;
    private String memo;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.ORGID)
    private String orgid;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.ORGNAME)
    private String orgname;
    private String owner;
    @Dict(dictName = "ionicdemo_YesNoCodeList")
    private Integer parallelinst;
    private String pstepid;
    private String pwfinstanceid;
    @TableField(exist = false)//逻辑属性
    private String pwfinstancename;
    private String result;
    private Timestamp starttime;
    @Dict(dictName = "ionicdemo_YesNoCodeList")
    private Integer suspendflag;
    private Integer tracestep;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "ionicdemo_SysOperatorCodeList")
    private String updateman;
    private String userdata;
    private String userdata2;
    private String userdata3;
    private String userdata4;
    private String userdatainfo;
    private String usertag;
    private String usertag2;
    @TableId(value= "wfinstanceid",type=IdType.UUID)//指定主键生成策略
    private String wfinstanceid;
    private String wfinstancename;
    private String wfmodel;
    private Integer wfversion;
    private String wfworkflowid;
    @TableField(exist = false)//逻辑属性
    private String wfworkflowname;
    /**
     *  设置属性值[ACTIVESTEPID]
     *  @param activestepid
     */
    public void setActivestepid(String activestepid){
        if(StringUtils.isEmpty(activestepid))
            activestepid=null;
        this.activestepid = activestepid;
        this.set("activestepiddirtyflag",true);
    }
    /**
     *  获取属性值[ACTIVESTEPID]
     */
    public String getActivestepid(){
        return this.activestepid;
    }
    /**
     *  重置属性值[ACTIVESTEPID]
     */
    public void resetActivestepid(){
        this.set("activestepiddirtyflag",false);
        this.activestepid = null;
    }
    /**
     *  设置属性值[当前步骤名称]
     *  @param activestepname
     */
    public void setActivestepname(String activestepname){
        if(StringUtils.isEmpty(activestepname))
            activestepname=null;
        this.activestepname = activestepname;
        this.set("activestepnamedirtyflag",true);
    }
    /**
     *  获取属性值[当前步骤名称]
     */
    public String getActivestepname(){
        return this.activestepname;
    }
    /**
     *  重置属性值[当前步骤名称]
     */
    public void resetActivestepname(){
        this.set("activestepnamedirtyflag",false);
        this.activestepname = null;
    }
    /**
     *  设置属性值[取消原因]
     *  @param cancelreason
     */
    public void setCancelreason(String cancelreason){
        if(StringUtils.isEmpty(cancelreason))
            cancelreason=null;
        this.cancelreason = cancelreason;
        this.set("cancelreasondirtyflag",true);
    }
    /**
     *  获取属性值[取消原因]
     */
    public String getCancelreason(){
        return this.cancelreason;
    }
    /**
     *  重置属性值[取消原因]
     */
    public void resetCancelreason(){
        this.set("cancelreasondirtyflag",false);
        this.cancelreason = null;
    }
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[逻辑有效标志]
     *  @param enable
     */
    public void setEnable(Integer enable){
        this.enable = enable;
        this.set("enabledirtyflag",true);
    }
    /**
     *  获取属性值[逻辑有效标志]
     */
    public Integer getEnable(){
        if(StringUtils.isEmpty(enable))
        {
            this.enable = 1;//设置逻辑有效值
            this.set("enabledirtyflag",true);
        }
        return this.enable;
    }
    /**
     *  重置属性值[逻辑有效标志]
     */
    public void resetEnable(){
        this.set("enabledirtyflag",false);
        this.enable = null;
    }
    /**
     *  设置属性值[结束时间]
     *  @param endtime
     */
    public void setEndtime(Timestamp endtime){
        this.endtime = endtime;
        this.set("endtimedirtyflag",true);
    }
    /**
     *  获取属性值[结束时间]
     */
    public Timestamp getEndtime(){
        return this.endtime;
    }
    /**
     *  重置属性值[结束时间]
     */
    public void resetEndtime(){
        this.set("endtimedirtyflag",false);
        this.endtime = null;
    }
    /**
     *  设置属性值[错误信息]
     *  @param errorinfo
     */
    public void setErrorinfo(String errorinfo){
        if(StringUtils.isEmpty(errorinfo))
            errorinfo=null;
        this.errorinfo = errorinfo;
        this.set("errorinfodirtyflag",true);
    }
    /**
     *  获取属性值[错误信息]
     */
    public String getErrorinfo(){
        return this.errorinfo;
    }
    /**
     *  重置属性值[错误信息]
     */
    public void resetErrorinfo(){
        this.set("errorinfodirtyflag",false);
        this.errorinfo = null;
    }
    /**
     *  设置属性值[重要程度]
     *  @param importanceflag
     */
    public void setImportanceflag(Integer importanceflag){
        this.importanceflag = importanceflag;
        this.set("importanceflagdirtyflag",true);
    }
    /**
     *  获取属性值[重要程度]
     */
    public Integer getImportanceflag(){
        return this.importanceflag;
    }
    /**
     *  重置属性值[重要程度]
     */
    public void resetImportanceflag(){
        this.set("importanceflagdirtyflag",false);
        this.importanceflag = null;
    }
    /**
     *  设置属性值[是否取消]
     *  @param iscancel
     */
    public void setIscancel(Integer iscancel){
        this.iscancel = iscancel;
        this.set("iscanceldirtyflag",true);
    }
    /**
     *  获取属性值[是否取消]
     */
    public Integer getIscancel(){
        return this.iscancel;
    }
    /**
     *  重置属性值[是否取消]
     */
    public void resetIscancel(){
        this.set("iscanceldirtyflag",false);
        this.iscancel = null;
    }
    /**
     *  设置属性值[是否关闭]
     *  @param isclose
     */
    public void setIsclose(Integer isclose){
        this.isclose = isclose;
        this.set("isclosedirtyflag",true);
    }
    /**
     *  获取属性值[是否关闭]
     */
    public Integer getIsclose(){
        return this.isclose;
    }
    /**
     *  重置属性值[是否关闭]
     */
    public void resetIsclose(){
        this.set("isclosedirtyflag",false);
        this.isclose = null;
    }
    /**
     *  设置属性值[是否错误]
     *  @param iserror
     */
    public void setIserror(Integer iserror){
        this.iserror = iserror;
        this.set("iserrordirtyflag",true);
    }
    /**
     *  获取属性值[是否错误]
     */
    public Integer getIserror(){
        return this.iserror;
    }
    /**
     *  重置属性值[是否错误]
     */
    public void resetIserror(){
        this.set("iserrordirtyflag",false);
        this.iserror = null;
    }
    /**
     *  设置属性值[是否完成]
     *  @param isfinish
     */
    public void setIsfinish(Integer isfinish){
        this.isfinish = isfinish;
        this.set("isfinishdirtyflag",true);
    }
    /**
     *  获取属性值[是否完成]
     */
    public Integer getIsfinish(){
        return this.isfinish;
    }
    /**
     *  重置属性值[是否完成]
     */
    public void resetIsfinish(){
        this.set("isfinishdirtyflag",false);
        this.isfinish = null;
    }
    /**
     *  设置属性值[上一个操作]
     *  @param lastaction
     */
    public void setLastaction(String lastaction){
        if(StringUtils.isEmpty(lastaction))
            lastaction=null;
        this.lastaction = lastaction;
        this.set("lastactiondirtyflag",true);
    }
    /**
     *  获取属性值[上一个操作]
     */
    public String getLastaction(){
        return this.lastaction;
    }
    /**
     *  重置属性值[上一个操作]
     */
    public void resetLastaction(){
        this.set("lastactiondirtyflag",false);
        this.lastaction = null;
    }
    /**
     *  设置属性值[上一个操作者]
     *  @param lastactorid
     */
    public void setLastactorid(String lastactorid){
        if(StringUtils.isEmpty(lastactorid))
            lastactorid=null;
        this.lastactorid = lastactorid;
        this.set("lastactoriddirtyflag",true);
    }
    /**
     *  获取属性值[上一个操作者]
     */
    public String getLastactorid(){
        return this.lastactorid;
    }
    /**
     *  重置属性值[上一个操作者]
     */
    public void resetLastactorid(){
        this.set("lastactoriddirtyflag",false);
        this.lastactorid = null;
    }
    /**
     *  设置属性值[上一个操作步骤]
     *  @param lastwfstepid
     */
    public void setLastwfstepid(String lastwfstepid){
        if(StringUtils.isEmpty(lastwfstepid))
            lastwfstepid=null;
        this.lastwfstepid = lastwfstepid;
        this.set("lastwfstepiddirtyflag",true);
    }
    /**
     *  获取属性值[上一个操作步骤]
     */
    public String getLastwfstepid(){
        return this.lastwfstepid;
    }
    /**
     *  重置属性值[上一个操作步骤]
     */
    public void resetLastwfstepid(){
        this.set("lastwfstepiddirtyflag",false);
        this.lastwfstepid = null;
    }
    /**
     *  设置属性值[工作流说明]
     *  @param memo
     */
    public void setMemo(String memo){
        if(StringUtils.isEmpty(memo))
            memo=null;
        this.memo = memo;
        this.set("memodirtyflag",true);
    }
    /**
     *  获取属性值[工作流说明]
     */
    public String getMemo(){
        return this.memo;
    }
    /**
     *  重置属性值[工作流说明]
     */
    public void resetMemo(){
        this.set("memodirtyflag",false);
        this.memo = null;
    }
    /**
     *  设置属性值[组织标识]
     *  @param orgid
     */
    public void setOrgid(String orgid){
        if(StringUtils.isEmpty(orgid))
            orgid=null;
        this.orgid = orgid;
        this.set("orgiddirtyflag",true);
    }
    /**
     *  获取属性值[组织标识]
     */
    public String getOrgid(){
        return this.orgid;
    }
    /**
     *  重置属性值[组织标识]
     */
    public void resetOrgid(){
        this.set("orgiddirtyflag",false);
        this.orgid = null;
    }
    /**
     *  设置属性值[组织名称]
     *  @param orgname
     */
    public void setOrgname(String orgname){
        if(StringUtils.isEmpty(orgname))
            orgname=null;
        this.orgname = orgname;
        this.set("orgnamedirtyflag",true);
    }
    /**
     *  获取属性值[组织名称]
     */
    public String getOrgname(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.orgname)&&(!StringUtils.isEmpty(this.getOrgid())) && this.getOrg()!=null)
        {
            this.orgname = this.getOrg().getOrgname();
            this.set("orgnamedirtyflag",true);
        }
        return this.orgname;
    }
    /**
     *  重置属性值[组织名称]
     */
    public void resetOrgname(){
        this.set("orgnamedirtyflag",false);
        this.orgname = null;
    }
    /**
     *  设置属性值[OWNER]
     *  @param owner
     */
    public void setOwner(String owner){
        if(StringUtils.isEmpty(owner))
            owner=null;
        this.owner = owner;
        this.set("ownerdirtyflag",true);
    }
    /**
     *  获取属性值[OWNER]
     */
    public String getOwner(){
        return this.owner;
    }
    /**
     *  重置属性值[OWNER]
     */
    public void resetOwner(){
        this.set("ownerdirtyflag",false);
        this.owner = null;
    }
    /**
     *  设置属性值[并行实例]
     *  @param parallelinst
     */
    public void setParallelinst(Integer parallelinst){
        this.parallelinst = parallelinst;
        this.set("parallelinstdirtyflag",true);
    }
    /**
     *  获取属性值[并行实例]
     */
    public Integer getParallelinst(){
        return this.parallelinst;
    }
    /**
     *  重置属性值[并行实例]
     */
    public void resetParallelinst(){
        this.set("parallelinstdirtyflag",false);
        this.parallelinst = null;
    }
    /**
     *  设置属性值[父步骤编号]
     *  @param pstepid
     */
    public void setPstepid(String pstepid){
        if(StringUtils.isEmpty(pstepid))
            pstepid=null;
        this.pstepid = pstepid;
        this.set("pstepiddirtyflag",true);
    }
    /**
     *  获取属性值[父步骤编号]
     */
    public String getPstepid(){
        return this.pstepid;
    }
    /**
     *  重置属性值[父步骤编号]
     */
    public void resetPstepid(){
        this.set("pstepiddirtyflag",false);
        this.pstepid = null;
    }
    /**
     *  设置属性值[父实例]
     *  @param pwfinstanceid
     */
    public void setPwfinstanceid(String pwfinstanceid){
        if(StringUtils.isEmpty(pwfinstanceid))
            pwfinstanceid=null;
        this.pwfinstanceid = pwfinstanceid;
        this.set("pwfinstanceiddirtyflag",true);
    }
    /**
     *  获取属性值[父实例]
     */
    public String getPwfinstanceid(){
        return this.pwfinstanceid;
    }
    /**
     *  重置属性值[父实例]
     */
    public void resetPwfinstanceid(){
        this.set("pwfinstanceiddirtyflag",false);
        this.pwfinstanceid = null;
    }
    /**
     *  设置属性值[父实例]
     *  @param pwfinstancename
     */
    public void setPwfinstancename(String pwfinstancename){
        if(StringUtils.isEmpty(pwfinstancename))
            pwfinstancename=null;
        this.pwfinstancename = pwfinstancename;
        this.set("pwfinstancenamedirtyflag",true);
    }
    /**
     *  获取属性值[父实例]
     */
    public String getPwfinstancename(){
        return this.pwfinstancename;
    }
    /**
     *  重置属性值[父实例]
     */
    public void resetPwfinstancename(){
        this.set("pwfinstancenamedirtyflag",false);
        this.pwfinstancename = null;
    }
    /**
     *  设置属性值[结果信息]
     *  @param result
     */
    public void setResult(String result){
        if(StringUtils.isEmpty(result))
            result=null;
        this.result = result;
        this.set("resultdirtyflag",true);
    }
    /**
     *  获取属性值[结果信息]
     */
    public String getResult(){
        return this.result;
    }
    /**
     *  重置属性值[结果信息]
     */
    public void resetResult(){
        this.set("resultdirtyflag",false);
        this.result = null;
    }
    /**
     *  设置属性值[开始时间]
     *  @param starttime
     */
    public void setStarttime(Timestamp starttime){
        this.starttime = starttime;
        this.set("starttimedirtyflag",true);
    }
    /**
     *  获取属性值[开始时间]
     */
    public Timestamp getStarttime(){
        return this.starttime;
    }
    /**
     *  重置属性值[开始时间]
     */
    public void resetStarttime(){
        this.set("starttimedirtyflag",false);
        this.starttime = null;
    }
    /**
     *  设置属性值[流程挂起]
     *  @param suspendflag
     */
    public void setSuspendflag(Integer suspendflag){
        this.suspendflag = suspendflag;
        this.set("suspendflagdirtyflag",true);
    }
    /**
     *  获取属性值[流程挂起]
     */
    public Integer getSuspendflag(){
        return this.suspendflag;
    }
    /**
     *  重置属性值[流程挂起]
     */
    public void resetSuspendflag(){
        this.set("suspendflagdirtyflag",false);
        this.suspendflag = null;
    }
    /**
     *  设置属性值[跟踪步骤]
     *  @param tracestep
     */
    public void setTracestep(Integer tracestep){
        this.tracestep = tracestep;
        this.set("tracestepdirtyflag",true);
    }
    /**
     *  获取属性值[跟踪步骤]
     */
    public Integer getTracestep(){
        return this.tracestep;
    }
    /**
     *  重置属性值[跟踪步骤]
     */
    public void resetTracestep(){
        this.set("tracestepdirtyflag",false);
        this.tracestep = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     *  设置属性值[用户数据]
     *  @param userdata
     */
    public void setUserdata(String userdata){
        if(StringUtils.isEmpty(userdata))
            userdata=null;
        this.userdata = userdata;
        this.set("userdatadirtyflag",true);
    }
    /**
     *  获取属性值[用户数据]
     */
    public String getUserdata(){
        return this.userdata;
    }
    /**
     *  重置属性值[用户数据]
     */
    public void resetUserdata(){
        this.set("userdatadirtyflag",false);
        this.userdata = null;
    }
    /**
     *  设置属性值[用户数据2]
     *  @param userdata2
     */
    public void setUserdata2(String userdata2){
        if(StringUtils.isEmpty(userdata2))
            userdata2=null;
        this.userdata2 = userdata2;
        this.set("userdata2dirtyflag",true);
    }
    /**
     *  获取属性值[用户数据2]
     */
    public String getUserdata2(){
        return this.userdata2;
    }
    /**
     *  重置属性值[用户数据2]
     */
    public void resetUserdata2(){
        this.set("userdata2dirtyflag",false);
        this.userdata2 = null;
    }
    /**
     *  设置属性值[用户数据3]
     *  @param userdata3
     */
    public void setUserdata3(String userdata3){
        if(StringUtils.isEmpty(userdata3))
            userdata3=null;
        this.userdata3 = userdata3;
        this.set("userdata3dirtyflag",true);
    }
    /**
     *  获取属性值[用户数据3]
     */
    public String getUserdata3(){
        return this.userdata3;
    }
    /**
     *  重置属性值[用户数据3]
     */
    public void resetUserdata3(){
        this.set("userdata3dirtyflag",false);
        this.userdata3 = null;
    }
    /**
     *  设置属性值[用户数据4]
     *  @param userdata4
     */
    public void setUserdata4(String userdata4){
        if(StringUtils.isEmpty(userdata4))
            userdata4=null;
        this.userdata4 = userdata4;
        this.set("userdata4dirtyflag",true);
    }
    /**
     *  获取属性值[用户数据4]
     */
    public String getUserdata4(){
        return this.userdata4;
    }
    /**
     *  重置属性值[用户数据4]
     */
    public void resetUserdata4(){
        this.set("userdata4dirtyflag",false);
        this.userdata4 = null;
    }
    /**
     *  设置属性值[用户数据信息]
     *  @param userdatainfo
     */
    public void setUserdatainfo(String userdatainfo){
        if(StringUtils.isEmpty(userdatainfo))
            userdatainfo=null;
        this.userdatainfo = userdatainfo;
        this.set("userdatainfodirtyflag",true);
    }
    /**
     *  获取属性值[用户数据信息]
     */
    public String getUserdatainfo(){
        return this.userdatainfo;
    }
    /**
     *  重置属性值[用户数据信息]
     */
    public void resetUserdatainfo(){
        this.set("userdatainfodirtyflag",false);
        this.userdatainfo = null;
    }
    /**
     *  设置属性值[自定义数据]
     *  @param usertag
     */
    public void setUsertag(String usertag){
        if(StringUtils.isEmpty(usertag))
            usertag=null;
        this.usertag = usertag;
        this.set("usertagdirtyflag",true);
    }
    /**
     *  获取属性值[自定义数据]
     */
    public String getUsertag(){
        return this.usertag;
    }
    /**
     *  重置属性值[自定义数据]
     */
    public void resetUsertag(){
        this.set("usertagdirtyflag",false);
        this.usertag = null;
    }
    /**
     *  设置属性值[自定义数据]
     *  @param usertag2
     */
    public void setUsertag2(String usertag2){
        if(StringUtils.isEmpty(usertag2))
            usertag2=null;
        this.usertag2 = usertag2;
        this.set("usertag2dirtyflag",true);
    }
    /**
     *  获取属性值[自定义数据]
     */
    public String getUsertag2(){
        return this.usertag2;
    }
    /**
     *  重置属性值[自定义数据]
     */
    public void resetUsertag2(){
        this.set("usertag2dirtyflag",false);
        this.usertag2 = null;
    }
    /**
     *  设置属性值[工作流实例标识]
     *  @param wfinstanceid
     */
    public void setWfinstanceid(String wfinstanceid){
        if(StringUtils.isEmpty(wfinstanceid))
            wfinstanceid=null;
        this.wfinstanceid = wfinstanceid;
        this.set("wfinstanceiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流实例标识]
     */
    public String getWfinstanceid(){
        return this.wfinstanceid;
    }
    /**
     *  重置属性值[工作流实例标识]
     */
    public void resetWfinstanceid(){
        this.set("wfinstanceiddirtyflag",false);
        this.wfinstanceid = null;
    }
    /**
     *  设置属性值[工作流实例名称]
     *  @param wfinstancename
     */
    public void setWfinstancename(String wfinstancename){
        if(StringUtils.isEmpty(wfinstancename))
            wfinstancename=null;
        this.wfinstancename = wfinstancename;
        this.set("wfinstancenamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流实例名称]
     */
    public String getWfinstancename(){
        return this.wfinstancename;
    }
    /**
     *  重置属性值[工作流实例名称]
     */
    public void resetWfinstancename(){
        this.set("wfinstancenamedirtyflag",false);
        this.wfinstancename = null;
    }
    /**
     *  设置属性值[流程配置]
     *  @param wfmodel
     */
    public void setWfmodel(String wfmodel){
        if(StringUtils.isEmpty(wfmodel))
            wfmodel=null;
        this.wfmodel = wfmodel;
        this.set("wfmodeldirtyflag",true);
    }
    /**
     *  获取属性值[流程配置]
     */
    public String getWfmodel(){
        return this.wfmodel;
    }
    /**
     *  重置属性值[流程配置]
     */
    public void resetWfmodel(){
        this.set("wfmodeldirtyflag",false);
        this.wfmodel = null;
    }
    /**
     *  设置属性值[工作流版本]
     *  @param wfversion
     */
    public void setWfversion(Integer wfversion){
        this.wfversion = wfversion;
        this.set("wfversiondirtyflag",true);
    }
    /**
     *  获取属性值[工作流版本]
     */
    public Integer getWfversion(){
        return this.wfversion;
    }
    /**
     *  重置属性值[工作流版本]
     */
    public void resetWfversion(){
        this.set("wfversiondirtyflag",false);
        this.wfversion = null;
    }
    /**
     *  设置属性值[工作流名称]
     *  @param wfworkflowid
     */
    public void setWfworkflowid(String wfworkflowid){
        if(StringUtils.isEmpty(wfworkflowid))
            wfworkflowid=null;
        this.wfworkflowid = wfworkflowid;
        this.set("wfworkflowiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流名称]
     */
    public String getWfworkflowid(){
        return this.wfworkflowid;
    }
    /**
     *  重置属性值[工作流名称]
     */
    public void resetWfworkflowid(){
        this.set("wfworkflowiddirtyflag",false);
        this.wfworkflowid = null;
    }
    /**
     *  设置属性值[工作流名称]
     *  @param wfworkflowname
     */
    public void setWfworkflowname(String wfworkflowname){
        if(StringUtils.isEmpty(wfworkflowname))
            wfworkflowname=null;
        this.wfworkflowname = wfworkflowname;
        this.set("wfworkflownamedirtyflag",true);
    }
    /**
     *  获取属性值[工作流名称]
     */
    public String getWfworkflowname(){
        return this.wfworkflowname;
    }
    /**
     *  重置属性值[工作流名称]
     */
    public void resetWfworkflowname(){
        this.set("wfworkflownamedirtyflag",false);
        this.wfworkflowname = null;
    }
     /**
     *  获取主实体关联数据[Org]
     */
    public Org getOrg() {
        return org;
    }
    /**
     *  设置主实体关联数据[Org]
     */
    public void setOrg(Org org) {
        this.org = org;
    }

     /**
     *  获取主实体关联数据[WFInstance]
     */
    public WFInstance getPwfinstance() {
        return pwfinstance;
    }
    /**
     *  设置主实体关联数据[WFInstance]
     */
    public void setPwfinstance(WFInstance pwfinstance) {
        this.pwfinstance = pwfinstance;
    }

     /**
     *  获取主实体关联数据[WFWorkflow]
     */
    public WFWorkflow getWfworkflow() {
        return wfworkflow;
    }
    /**
     *  设置主实体关联数据[WFWorkflow]
     */
    public void setWfworkflow(WFWorkflow wfworkflow) {
        this.wfworkflow = wfworkflow;
    }

    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetActivestepid();
        resetActivestepname();
        resetCancelreason();
        resetCreatedate();
        resetCreateman();
        resetEnable();
        resetEndtime();
        resetErrorinfo();
        resetImportanceflag();
        resetIscancel();
        resetIsclose();
        resetIserror();
        resetIsfinish();
        resetLastaction();
        resetLastactorid();
        resetLastwfstepid();
        resetMemo();
        resetOrgid();
        resetOrgname();
        resetOwner();
        resetParallelinst();
        resetPstepid();
        resetPwfinstanceid();
        resetPwfinstancename();
        resetResult();
        resetStarttime();
        resetSuspendflag();
        resetTracestep();
        resetUpdatedate();
        resetUpdateman();
        resetUserdata();
        resetUserdata2();
        resetUserdata3();
        resetUserdata4();
        resetUserdatainfo();
        resetUsertag();
        resetUsertag2();
        resetWfinstanceid();
        resetWfinstancename();
        resetWfmodel();
        resetWfversion();
        resetWfworkflowid();
        resetWfworkflowname();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
	    //随机生成主键
         return  IdWorker.get32UUID();

    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public WFInstance copyTo(WFInstance targetEntity)
	{
		BeanCopier copier=BeanCopier.create(WFInstance.class, WFInstance.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetWfinstanceid();
		return targetEntity;
	}
}