View Javadoc
1   package org.kuali.ole.deliver.bo;
2   
3   import org.kuali.ole.deliver.api.OleEntityAddressContract;
4   import org.kuali.ole.deliver.api.OleEntityAddressDefinition;
5   import org.kuali.rice.kim.impl.identity.address.EntityAddressBo;
6   import org.kuali.rice.krad.bo.BusinessObjectBase;
7   
8   /**
9    * OleEntityAddressBo provides OleEntityAddressBo information through getter and setter.
10   */
11  public class OleEntityAddressBo extends BusinessObjectBase implements OleEntityAddressContract {
12  
13      private OleAddressBo oleAddressBo;
14  
15      private EntityAddressBo entityAddressBo;
16  
17      /**
18       * Gets the value of entityAddressBo property
19       *
20       * @return entityAddressBo
21       */
22      public EntityAddressBo getEntityAddressBo() {
23          return entityAddressBo;
24      }
25  
26      /**
27       * Sets the value for entityAddressBo property
28       *
29       * @param entityAddressBo
30       */
31      public void setEntityAddressBo(EntityAddressBo entityAddressBo) {
32          this.entityAddressBo = entityAddressBo;
33      }
34  
35      /**
36       * Gets the value of oleAddressBo property
37       *
38       * @return oleAddressBo
39       */
40      public OleAddressBo getOleAddressBo() {
41          return oleAddressBo;
42      }
43  
44      /**
45       * Sets the value for oleAddressBo property
46       *
47       * @param oleAddressBo
48       */
49      public void setOleAddressBo(OleAddressBo oleAddressBo) {
50          this.oleAddressBo = oleAddressBo;
51      }
52  
53      /**
54       * This method converts the PersistableBusinessObjectBase OleEntityAddressBo into immutable object OleEntityAddressDefinition
55       *
56       * @param bo
57       * @return OleEntityAddressDefinition
58       */
59      public static OleEntityAddressDefinition to(org.kuali.ole.deliver.bo.OleEntityAddressBo bo) {
60          if (bo == null) {
61              return null;
62          }
63          return OleEntityAddressDefinition.Builder.create(bo).build();
64      }
65  
66      /**
67       * This method converts the immutable object OleEntityAddressDefinition into PersistableBusinessObjectBase OleEntityAddressBo
68       *
69       * @param im
70       * @return bo
71       */
72      public static org.kuali.ole.deliver.bo.OleEntityAddressBo from(OleEntityAddressDefinition im) {
73          if (im == null) {
74              return null;
75          }
76  
77          org.kuali.ole.deliver.bo.OleEntityAddressBo bo = new org.kuali.ole.deliver.bo.OleEntityAddressBo();
78  
79          if (im.getOleAddressBo() != null) {
80              bo.oleAddressBo = OleAddressBo.from(im.getOleAddressBo());
81          }
82  
83          if (im.getEntityAddressBo() != null) {
84              bo.entityAddressBo = EntityAddressBo.from(im.getEntityAddressBo());
85          }
86  
87          return bo;
88      }
89  
90  
91      @Override
92      public void refresh() {
93          //To change body of implemented methods use File | Settings | File Templates.
94      }
95  }