View Javadoc
1   package org.kuali.ole.deliver.bo;
2   
3   import org.kuali.ole.deliver.api.OleEntityEmailContract;
4   import org.kuali.ole.deliver.api.OleEntityEmailDefinition;
5   import org.kuali.rice.kim.impl.identity.email.EntityEmailBo;
6   import org.kuali.rice.krad.bo.BusinessObjectBase;
7   
8   /**
9    * Created by angelind on 10/13/15.
10   */
11  public class OleEntityEmailBo extends BusinessObjectBase implements OleEntityEmailContract {
12  
13      private OleEmailBo oleEmailBo;
14      private EntityEmailBo entityEmailBo;
15  
16      public OleEmailBo getOleEmailBo() {
17          return oleEmailBo;
18      }
19  
20      public void setOleEmailBo(OleEmailBo oleEmailBo) {
21          this.oleEmailBo = oleEmailBo;
22      }
23  
24      public EntityEmailBo getEntityEmailBo() {
25          return entityEmailBo;
26      }
27  
28      public void setEntityEmailBo(EntityEmailBo entityEmailBo) {
29          this.entityEmailBo = entityEmailBo;
30      }
31  
32      public static OleEntityEmailDefinition to(OleEntityEmailBo bo) {
33          if (bo == null) {
34              return null;
35          }
36          return OleEntityEmailDefinition.Builder.create(bo).build();
37      }
38  
39      public static OleEntityEmailBo from(OleEntityEmailDefinition im) {
40          if (im == null) {
41              return null;
42          }
43  
44          OleEntityEmailBo bo = new OleEntityEmailBo();
45  
46          if (im.getOleEmailBo() != null) {
47              bo.oleEmailBo = OleEmailBo.from(im.getOleEmailBo());
48          }
49  
50          if (im.getEntityEmailBo() != null) {
51              bo.entityEmailBo = EntityEmailBo.from(im.getEntityEmailBo());
52          }
53  
54          return bo;
55      }
56  
57      @Override
58      public void refresh() {
59  
60      }
61  }