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      private boolean revertBarcode;
23  
24      public String getOlePatronLostBarcodeId() {
25          return olePatronLostBarcodeId;
26      }
27  
28      public void setOlePatronLostBarcodeId(String olePatronLostBarcodeId) {
29          this.olePatronLostBarcodeId = olePatronLostBarcodeId;
30      }
31  
32      public String getOlePatronId() {
33          return olePatronId;
34      }
35  
36      public void setOlePatronId(String olePatronId) {
37          this.olePatronId = olePatronId;
38      }
39  
40      public Date getInvalidOrLostBarcodeEffDate() {
41          return invalidOrLostBarcodeEffDate;
42      }
43  
44      public void setInvalidOrLostBarcodeEffDate(Date invalidOrLostBarcodeEffDate) {
45          this.invalidOrLostBarcodeEffDate = invalidOrLostBarcodeEffDate;
46      }
47  
48      public String getInvalidOrLostBarcodeNumber() {
49          return invalidOrLostBarcodeNumber;
50      }
51  
52      public void setInvalidOrLostBarcodeNumber(String invalidOrLostBarcodeNumber) {
53          this.invalidOrLostBarcodeNumber = invalidOrLostBarcodeNumber;
54      }
55  
56      public OlePatronDocument getOlePatronDocument() {
57          return olePatronDocument;
58      }
59  
60      public void setOlePatronDocument(OlePatronDocument olePatronDocument) {
61          this.olePatronDocument = olePatronDocument;
62      }
63  
64      /**
65       * This method converts the PersistableBusinessObjectBase OlePatronNotes into immutable object OlePatronNotesDefinition
66       * @param bo
67       * @return OlePatronNotesDefinition
68       */
69      public static OlePatronLostBarcodeDefinition to(OlePatronLostBarcode bo) {
70          if (bo == null) { return null; }
71          return OlePatronLostBarcodeDefinition.Builder.create(bo).build();
72      }
73      /**
74       * This method converts the immutable object OlePatronNotesDefinition into PersistableBusinessObjectBase OlePatronNotes
75       * @param im
76       * @return bo
77       */
78      public static OlePatronLostBarcode from(OlePatronLostBarcodeDefinition im) {
79          if (im == null) { return null; }
80  
81          OlePatronLostBarcode bo = new OlePatronLostBarcode();
82          bo.olePatronLostBarcodeId = im.getOlePatronLostBarcodeId();
83          bo.olePatronId = im.getOlePatronId();
84          //bo.olePatron = OlePatronDocument.from(im.getOlePatron());
85          bo.invalidOrLostBarcodeEffDate= im.getInvalidOrLostBarcodeEffDate();
86          bo.invalidOrLostBarcodeNumber= im.getInvalidOrLostBarcodeNumber();
87          bo.versionNumber = im.getVersionNumber();
88  
89          return bo;
90      }
91  
92      public boolean isRevertBarcode() {
93          return revertBarcode;
94      }
95  
96      public void setRevertBarcode(boolean revertBarcode) {
97          this.revertBarcode = revertBarcode;
98      }
99  
100     @Override
101     public String getId() {
102         return this.olePatronLostBarcodeId;
103     }
104 }