001package org.kuali.ole.deliver.bo; 002 003import org.kuali.ole.deliver.api.OlePatronLostBarcodeContract; 004import org.kuali.ole.deliver.api.OlePatronLostBarcodeDefinition; 005import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; 006 007import java.sql.Date; 008 009/** 010 * OlePatronDocument provides OlePatronDocument information through getter and setter. 011 */ 012public class OlePatronLostBarcode extends PersistableBusinessObjectBase implements OlePatronLostBarcodeContract { 013 014 private String olePatronLostBarcodeId; 015 private String olePatronId; 016 private Date invalidOrLostBarcodeEffDate; 017 private String invalidOrLostBarcodeNumber; 018 private OlePatronDocument olePatronDocument; 019 private boolean revertBarcode; 020 private String status; 021 private String description; 022 private boolean active; 023 public String getOlePatronLostBarcodeId() { 024 return olePatronLostBarcodeId; 025 } 026 027 public void setOlePatronLostBarcodeId(String olePatronLostBarcodeId) { 028 this.olePatronLostBarcodeId = olePatronLostBarcodeId; 029 } 030 031 public String getOlePatronId() { 032 return olePatronId; 033 } 034 035 public void setOlePatronId(String olePatronId) { 036 this.olePatronId = olePatronId; 037 } 038 039 public Date getInvalidOrLostBarcodeEffDate() { 040 return invalidOrLostBarcodeEffDate; 041 } 042 043 public void setInvalidOrLostBarcodeEffDate(Date invalidOrLostBarcodeEffDate) { 044 this.invalidOrLostBarcodeEffDate = invalidOrLostBarcodeEffDate; 045 } 046 047 public String getInvalidOrLostBarcodeNumber() { 048 return invalidOrLostBarcodeNumber; 049 } 050 051 public void setInvalidOrLostBarcodeNumber(String invalidOrLostBarcodeNumber) { 052 this.invalidOrLostBarcodeNumber = invalidOrLostBarcodeNumber; 053 } 054 055 public OlePatronDocument getOlePatronDocument() { 056 return olePatronDocument; 057 } 058 059 public void setOlePatronDocument(OlePatronDocument olePatronDocument) { 060 this.olePatronDocument = olePatronDocument; 061 } 062 063 /** 064 * This method converts the PersistableBusinessObjectBase OlePatronNotes into immutable object OlePatronNotesDefinition 065 * 066 * @param bo 067 * @return OlePatronNotesDefinition 068 */ 069 public static OlePatronLostBarcodeDefinition to(org.kuali.ole.deliver.bo.OlePatronLostBarcode bo) { 070 if (bo == null) { 071 return null; 072 } 073 return OlePatronLostBarcodeDefinition.Builder.create(bo).build(); 074 } 075 076 /** 077 * This method converts the immutable object OlePatronNotesDefinition into PersistableBusinessObjectBase OlePatronNotes 078 * 079 * @param im 080 * @return bo 081 */ 082 public static org.kuali.ole.deliver.bo.OlePatronLostBarcode from(OlePatronLostBarcodeDefinition im) { 083 if (im == null) { 084 return null; 085 } 086 087 org.kuali.ole.deliver.bo.OlePatronLostBarcode bo = new org.kuali.ole.deliver.bo.OlePatronLostBarcode(); 088 bo.olePatronLostBarcodeId = im.getOlePatronLostBarcodeId(); 089 bo.olePatronId = im.getOlePatronId(); 090 //bo.olePatron = OlePatronDocument.from(im.getOlePatron()); 091 bo.invalidOrLostBarcodeEffDate = im.getInvalidOrLostBarcodeEffDate(); 092 bo.invalidOrLostBarcodeNumber = im.getInvalidOrLostBarcodeNumber(); 093 bo.versionNumber = im.getVersionNumber(); 094 095 return bo; 096 } 097 098 public boolean isRevertBarcode() { 099 return revertBarcode; 100 } 101 102 public void setRevertBarcode(boolean revertBarcode) { 103 this.revertBarcode = revertBarcode; 104 } 105 106 @Override 107 public String getId() { 108 return this.olePatronLostBarcodeId; 109 } 110 111 public String getStatus() { 112 return status; 113 } 114 115 public void setStatus(String status) { 116 this.status = status; 117 } 118 119 public String getDescription() { 120 return description; 121 } 122 123 public void setDescription(String description) { 124 this.description = description; 125 } 126 127 public boolean isActive() { 128 return active; 129 } 130 131 public void setActive(boolean active) { 132 this.active = active; 133 } 134}