View Javadoc
1   package org.kuali.ole.deliver.bo;
2   
3   import org.kuali.ole.deliver.api.OleAddressSourceContract;
4   import org.kuali.ole.deliver.api.OleAddressSourceDefinition;
5   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
6   
7   /**
8    * OleAddressSourceBo provides OleAddressSourceBo information through getter and setter.
9    */
10  public class OleAddressSourceBo extends PersistableBusinessObjectBase implements OleAddressSourceContract {
11  
12      private String oleAddressSourceId;
13      private String oleAddressSourceCode;
14      private String oleAddressSourceName;
15      private String oleAddressSourceDesc;
16      private boolean active;
17  
18      /**
19       * Gets the value of oleAddressSourceId property
20       *
21       * @return oleAddressSourceId
22       */
23      public String getOleAddressSourceId() {
24          return oleAddressSourceId;
25      }
26  
27      /**
28       * Sets the value for oleAddressSourceId property
29       *
30       * @param oleAddressSourceId
31       */
32      public void setOleAddressSourceId(String oleAddressSourceId) {
33          this.oleAddressSourceId = oleAddressSourceId;
34      }
35  
36      /**
37       * Gets the value of oleAddressSourceCode property
38       *
39       * @return oleAddressSourceCode
40       */
41      public String getOleAddressSourceCode() {
42          return oleAddressSourceCode;
43      }
44  
45      /**
46       * Sets the value for oleAddressSourceCode property
47       *
48       * @param oleAddressSourceCode
49       */
50      public void setOleAddressSourceCode(String oleAddressSourceCode) {
51          this.oleAddressSourceCode = oleAddressSourceCode;
52      }
53  
54      /**
55       * Gets the value of oleAddressSourceName property
56       *
57       * @return oleAddressSourceName
58       */
59      public String getOleAddressSourceName() {
60          return oleAddressSourceName;
61      }
62  
63      /**
64       * Sets the value for oleAddressSourceName property
65       *
66       * @param oleAddressSourceName
67       */
68      public void setOleAddressSourceName(String oleAddressSourceName) {
69          this.oleAddressSourceName = oleAddressSourceName;
70      }
71  
72      /**
73       * Gets the value of oleAddressSourceDesc property
74       *
75       * @return oleAddressSourceDesc
76       */
77      public String getOleAddressSourceDesc() {
78          return oleAddressSourceDesc;
79      }
80  
81      /**
82       * Sets the value for oleAddressSourceDesc property
83       *
84       * @param oleAddressSourceDesc
85       */
86      public void setOleAddressSourceDesc(String oleAddressSourceDesc) {
87          this.oleAddressSourceDesc = oleAddressSourceDesc;
88      }
89  
90      /**
91       * Gets the value of active property
92       *
93       * @return active
94       */
95      public boolean isActive() {
96          return active;
97      }
98  
99      /**
100      * Sets the value for active property
101      *
102      * @param active
103      */
104     public void setActive(boolean active) {
105         this.active = active;
106     }
107 
108 
109     /**
110      * This method converts the PersistableBusinessObjectBase OlePatronNotes into immutable object OlePatronNotesDefinition
111      *
112      * @param bo
113      * @return OlePatronNotesDefinition
114      */
115     public static OleAddressSourceDefinition to(org.kuali.ole.deliver.bo.OleAddressSourceBo bo) {
116         if (bo == null) {
117             return null;
118         }
119         return OleAddressSourceDefinition.Builder.create(bo).build();
120     }
121 
122     /**
123      * This method converts the immutable object OlePatronNotesDefinition into PersistableBusinessObjectBase OlePatronNotes
124      *
125      * @param imOleAddressSource
126      * @return bo
127      */
128     public static org.kuali.ole.deliver.bo.OleAddressSourceBo from(OleAddressSourceDefinition imOleAddressSource) {
129         if (imOleAddressSource == null) {
130             return null;
131         }
132 
133         org.kuali.ole.deliver.bo.OleAddressSourceBo bo = new org.kuali.ole.deliver.bo.OleAddressSourceBo();
134         bo.oleAddressSourceCode = imOleAddressSource.getOleAddressSourceCode();
135         bo.oleAddressSourceDesc = imOleAddressSource.getOleAddressSourceDesc();
136         bo.oleAddressSourceId = imOleAddressSource.getOleAddressSourceId();
137         bo.oleAddressSourceName = imOleAddressSource.getOleAddressSourceName();
138 
139         return bo;
140     }
141 
142     @Override
143     public String getId() {
144         return this.getOleAddressSourceId();
145     }
146 }