View Javadoc

1   package org.kuali.ole.patron.bo;
2   
3   import org.kuali.ole.patron.api.OleAddressContract;
4   import org.kuali.ole.patron.api.OleAddressDefinition;
5   import org.kuali.ole.patron.api.OlePatronLostBarcodeContract;
6   import org.kuali.ole.patron.api.OlePatronLostBarcodeDefinition;
7   import org.kuali.rice.kim.impl.identity.address.EntityAddressBo;
8   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
9   
10  import java.util.Date;
11  
12  /**
13   OlePatronDocument provides OlePatronDocument information through getter and setter.
14   */
15  public class OlePatronLostBarcode extends PersistableBusinessObjectBase implements OlePatronLostBarcodeContract {
16  
17      private String olePatronLostBarcodeId;
18      private String olePatronId;
19      private Date invalidOrLostBarcodeEffDate;
20      private String invalidOrLostBarcodeNumber;
21      private OlePatronDocument olePatronDocument;
22  
23      public String getOlePatronLostBarcodeId() {
24          return olePatronLostBarcodeId;
25      }
26  
27      public void setOlePatronLostBarcodeId(String olePatronLostBarcodeId) {
28          this.olePatronLostBarcodeId = olePatronLostBarcodeId;
29      }
30  
31      public String getOlePatronId() {
32          return olePatronId;
33      }
34  
35      public void setOlePatronId(String olePatronId) {
36          this.olePatronId = olePatronId;
37      }
38  
39      public Date getInvalidOrLostBarcodeEffDate() {
40          return invalidOrLostBarcodeEffDate;
41      }
42  
43      public void setInvalidOrLostBarcodeEffDate(Date invalidOrLostBarcodeEffDate) {
44          this.invalidOrLostBarcodeEffDate = invalidOrLostBarcodeEffDate;
45      }
46  
47      public String getInvalidOrLostBarcodeNumber() {
48          return invalidOrLostBarcodeNumber;
49      }
50  
51      public void setInvalidOrLostBarcodeNumber(String invalidOrLostBarcodeNumber) {
52          this.invalidOrLostBarcodeNumber = invalidOrLostBarcodeNumber;
53      }
54  
55      public OlePatronDocument getOlePatronDocument() {
56          return olePatronDocument;
57      }
58  
59      public void setOlePatronDocument(OlePatronDocument olePatronDocument) {
60          this.olePatronDocument = olePatronDocument;
61      }
62  
63      /**
64       * This method converts the PersistableBusinessObjectBase OlePatronNotes into immutable object OlePatronNotesDefinition
65       * @param bo
66       * @return OlePatronNotesDefinition
67       */
68      public static OlePatronLostBarcodeDefinition to(OlePatronLostBarcode bo) {
69          if (bo == null) { return null; }
70          return OlePatronLostBarcodeDefinition.Builder.create(bo).build();
71      }
72      /**
73       * This method converts the immutable object OlePatronNotesDefinition into PersistableBusinessObjectBase OlePatronNotes
74       * @param im
75       * @return bo
76       */
77      public static OlePatronLostBarcode from(OlePatronLostBarcodeDefinition im) {
78          if (im == null) { return null; }
79  
80          OlePatronLostBarcode bo = new OlePatronLostBarcode();
81          bo.olePatronLostBarcodeId = im.getOlePatronLostBarcodeId();
82          bo.olePatronId = im.getOlePatronId();
83          //bo.olePatron = OlePatronDocument.from(im.getOlePatron());
84          bo.invalidOrLostBarcodeEffDate= im.getInvalidOrLostBarcodeEffDate();
85          bo.invalidOrLostBarcodeNumber= im.getInvalidOrLostBarcodeNumber();
86          bo.versionNumber = im.getVersionNumber();
87  
88          return bo;
89      }
90  
91      @Override
92      public String getId() {
93          return this.olePatronLostBarcodeId;
94      }
95  }