View Javadoc
1   package org.kuali.kpme.edo.workflow;
2   
3   import org.kuali.kpme.edo.api.dossier.EdoDossier;
4   import org.kuali.kpme.edo.api.dossier.EdoDossierDocumentInfo;
5   import org.kuali.kpme.edo.api.dossier.EdoDossierDocumentInfoContract;
6   import org.kuali.rice.core.api.mo.ModelObjectUtils;
7   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
8   
9   public class EdoDossierDocumentInfoBo extends PersistableBusinessObjectBase implements EdoDossierDocumentInfoContract {
10  
11      private static final long serialVersionUID = 5073307260441401533L;
12      private String edoDocumentId;
13      private String principalId;
14      private String edoDossierId;
15      private String documentStatus;
16      private String documentTypeName;
17      private EdoDossier edoDossierObj;
18  
19      public EdoDossier getEdoDossierObj() {
20  		return edoDossierObj;
21  	}
22  
23  	public void setEdoDossierObj(EdoDossier edoDossierObj) {
24  		this.edoDossierObj = edoDossierObj;
25  	}
26  
27  	public String getEdoDocumentId() {
28          return edoDocumentId;
29      }
30  
31      public void setEdoDocumentId(String edoDocumentId) {
32          this.edoDocumentId = edoDocumentId;
33      }
34  
35      public String getPrincipalId() {
36          return principalId;
37      }
38  
39      public void setPrincipalId(String principalId) {
40          this.principalId = principalId;
41      }
42  
43      public String getEdoDossierId() {
44  		return edoDossierId;
45  	}
46  
47  	public void setEdoDossierId(String edoDossierId) {
48  		this.edoDossierId = edoDossierId;
49  	}
50  
51  	public String getDocumentStatus() {
52          return documentStatus;
53      }
54  
55      public void setDocumentStatus(String documentStatus) {
56          this.documentStatus = documentStatus;
57      }
58  
59      public String getDocumentTypeName() {
60          return documentTypeName;
61      }
62  
63      public void setDocumentTypeName(String documentTypeName) {
64          this.documentTypeName = documentTypeName;
65      }
66      
67      public static EdoDossierDocumentInfoBo from(EdoDossierDocumentInfo edoDossierDocumentInfo) {
68          if (edoDossierDocumentInfo == null) {
69              return null;
70          }
71          EdoDossierDocumentInfoBo edoDossierDocumentInfoBo = new EdoDossierDocumentInfoBo();
72          
73          edoDossierDocumentInfoBo.setEdoDossierId(edoDossierDocumentInfo.getEdoDossierId());
74          edoDossierDocumentInfoBo.setEdoDocumentId(edoDossierDocumentInfo.getEdoDocumentId());
75          edoDossierDocumentInfoBo.setPrincipalId(edoDossierDocumentInfo.getPrincipalId());
76          edoDossierDocumentInfoBo.setDocumentStatus(edoDossierDocumentInfo.getDocumentStatus());
77          edoDossierDocumentInfoBo.setDocumentTypeName(edoDossierDocumentInfo.getDocumentTypeName());
78          edoDossierDocumentInfoBo.setVersionNumber(edoDossierDocumentInfo.getVersionNumber());
79          edoDossierDocumentInfoBo.setObjectId(edoDossierDocumentInfo.getObjectId());
80          
81          return edoDossierDocumentInfoBo;
82      }
83  
84      public static EdoDossierDocumentInfo to(EdoDossierDocumentInfoBo bo) {
85          if (bo == null) {
86              return null;
87          }
88  
89          return EdoDossierDocumentInfo.Builder.create(bo).build();
90      }
91      
92      
93      public static final ModelObjectUtils.Transformer<EdoDossierDocumentInfoBo, EdoDossierDocumentInfo> toImmutable = new ModelObjectUtils.Transformer<EdoDossierDocumentInfoBo, EdoDossierDocumentInfo>() {
94  		public EdoDossierDocumentInfo transform(EdoDossierDocumentInfoBo input) {
95  			return EdoDossierDocumentInfoBo.to(input);
96  		};
97  	};
98  
99  	public static final ModelObjectUtils.Transformer<EdoDossierDocumentInfo, EdoDossierDocumentInfoBo> toBo = new ModelObjectUtils.Transformer<EdoDossierDocumentInfo, EdoDossierDocumentInfoBo>() {
100 		public EdoDossierDocumentInfoBo transform(EdoDossierDocumentInfo input) {
101 			return EdoDossierDocumentInfoBo.from(input);
102 		};
103 	};
104 }