ActEntity.java 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /**
  2. * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
  3. */
  4. package com.jeeplus.common.persistence;
  5. import java.io.Serializable;
  6. import com.fasterxml.jackson.annotation.JsonIgnore;
  7. import com.jeeplus.modules.act.entity.Act;
  8. /**
  9. * Activiti Entity类
  10. * @author jeeplus
  11. * @version 2013-05-28
  12. */
  13. public abstract class ActEntity<T> extends DataEntity<T> implements Serializable {
  14. private static final long serialVersionUID = 1L;
  15. protected Act act; // 流程任务对象
  16. public ActEntity() {
  17. super();
  18. }
  19. public ActEntity(String id) {
  20. super(id);
  21. }
  22. @JsonIgnore
  23. public Act getAct() {
  24. if (act == null){
  25. act = new Act();
  26. }
  27. return act;
  28. }
  29. public void setAct(Act act) {
  30. this.act = act;
  31. }
  32. /**
  33. * 获取流程实例ID
  34. * @return
  35. */
  36. public String getProcInsId() {
  37. return this.getAct().getProcInsId();
  38. }
  39. /**
  40. * 设置流程实例ID
  41. * @param procInsId
  42. */
  43. public void setProcInsId(String procInsId) {
  44. this.getAct().setProcInsId(procInsId);
  45. }
  46. }