001package org.kuali.ole.deliver.bo;
002
003import org.kuali.ole.deliver.api.OleProxyPatronContract;
004import org.kuali.ole.deliver.api.OleProxyPatronDefinition;
005import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
006
007import java.util.Date;
008
009/**
010 * OleProxyPatronDocument provides OleProxyPatronDocument information through getter and setter.
011 */
012public class OleProxyPatronDocument extends PersistableBusinessObjectBase implements OleProxyPatronContract {
013
014    private String oleProxyPatronDocumentId;
015    private String proxyPatronId;
016    private String olePatronId;
017    private Date proxyPatronExpirationDate;
018    private Date proxyPatronActivationDate;
019    private boolean active;
020
021    private String proxyPatronBarcode;
022    private String proxyPatronFirstName;
023    private String proxyPatronLastName;
024    private String proxyForPatronFirstName;
025    private String proxyForPatronLastName;
026    //private OlePatronDocument proxyPatron;
027    private OlePatronDocument olePatronDocument;
028
029    /**
030     * Gets the value of proxyPatronBarcode property
031     *
032     * @return proxyPatronBarcode
033     */
034    public String getProxyPatronBarcode() {
035        return proxyPatronBarcode;
036    }
037
038    /**
039     * Sets the value for proxyPatronBarcode property
040     *
041     * @param proxyPatronBarcode
042     */
043    public void setProxyPatronBarcode(String proxyPatronBarcode) {
044        this.proxyPatronBarcode = proxyPatronBarcode;
045    }
046
047    /**
048     * Gets the value of proxyPatronFirstName property
049     *
050     * @return proxyPatronFirstName
051     */
052    public String getProxyPatronFirstName() {
053        return proxyPatronFirstName;
054    }
055
056    /**
057     * Sets the value for proxyPatronFirstName property
058     *
059     * @param proxyPatronFirstName
060     */
061    public void setProxyPatronFirstName(String proxyPatronFirstName) {
062        this.proxyPatronFirstName = proxyPatronFirstName;
063    }
064
065    /**
066     * Gets the value of proxyPatronLastName property
067     *
068     * @return proxyPatronLastName
069     */
070    public String getProxyPatronLastName() {
071        return proxyPatronLastName;
072    }
073
074    /**
075     * Sets the value for proxyPatronLastName property
076     *
077     * @param proxyPatronLastName
078     */
079    public void setProxyPatronLastName(String proxyPatronLastName) {
080        this.proxyPatronLastName = proxyPatronLastName;
081    }
082
083    /**
084     * Gets the value of oleProxyPatronDocumentId property
085     *
086     * @return oleProxyPatronDocumentId
087     */
088    public String getOleProxyPatronDocumentId() {
089        return oleProxyPatronDocumentId;
090    }
091
092    /**
093     * Sets the value for oleProxyPatronDocumentId property
094     *
095     * @param oleProxyPatronDocumentId
096     */
097    public void setOleProxyPatronDocumentId(String oleProxyPatronDocumentId) {
098        this.oleProxyPatronDocumentId = oleProxyPatronDocumentId;
099    }
100
101    /**
102     * Gets the value of proxyPatronId property
103     *
104     * @return proxyPatronId
105     */
106    public String getProxyPatronId() {
107        return proxyPatronId;
108    }
109
110    /**
111     * Sets the value for proxyPatronId property
112     *
113     * @param proxyPatronId
114     */
115    public void setProxyPatronId(String proxyPatronId) {
116        this.proxyPatronId = proxyPatronId;
117    }
118
119    /**
120     * Gets the value of olePatronId property
121     *
122     * @return olePatronId
123     */
124    public String getOlePatronId() {
125        return olePatronId;
126    }
127
128    /**
129     * Sets the value for olePatronId property
130     *
131     * @param olePatronId
132     */
133    public void setOlePatronId(String olePatronId) {
134        this.olePatronId = olePatronId;
135    }
136
137   /* public OlePatronDocument getProxyPatron() {
138        return proxyPatron;
139    }
140
141    public void setProxyPatron(OlePatronDocument proxyPatron) {
142        this.proxyPatron = proxyPatron;
143    }*/
144
145    /**
146     * Gets the value of olePatronDocument property
147     *
148     * @return olePatronDocument
149     */
150    public OlePatronDocument getOlePatronDocument() {
151        return olePatronDocument;
152    }
153
154    /**
155     * Sets the value for olePatronDocument property
156     *
157     * @param olePatronDocument
158     */
159    public void setOlePatronDocument(OlePatronDocument olePatronDocument) {
160        this.olePatronDocument = olePatronDocument;
161    }
162
163    /**
164     * Gets the value of proxyPatronExpirationDate property
165     *
166     * @return proxyPatronExpirationDate
167     */
168    public Date getProxyPatronExpirationDate() {
169        return proxyPatronExpirationDate;
170    }
171
172    /**
173     * Sets the value for proxyPatronExpirationDate property
174     *
175     * @param proxyPatronExpirationDate
176     */
177    public void setProxyPatronExpirationDate(Date proxyPatronExpirationDate) {
178        this.proxyPatronExpirationDate = proxyPatronExpirationDate;
179    }
180
181    /**
182     * Gets the value of proxyPatronActivationDate property
183     *
184     * @return proxyPatronActivationDate
185     */
186    public Date getProxyPatronActivationDate() {
187        return proxyPatronActivationDate;
188    }
189
190    /**
191     * Sets the value for proxyPatronActivationDate property
192     *
193     * @param proxyPatronActivationDate
194     */
195    public void setProxyPatronActivationDate(Date proxyPatronActivationDate) {
196        this.proxyPatronActivationDate = proxyPatronActivationDate;
197    }
198
199    /**
200     * Gets the value of active property
201     *
202     * @return active
203     */
204    public boolean isActive() {
205        return active;
206    }
207
208    /**
209     * Sets the value for active property
210     *
211     * @param active
212     */
213    public void setActive(boolean active) {
214        this.active = active;
215    }
216
217    /**
218     * Gets the value of proxyForPatronFirstName property
219     *
220     * @return proxyForPatronFirstName
221     */
222    public String getProxyForPatronFirstName() {
223        return proxyForPatronFirstName;
224    }
225
226    /**
227     * Sets the value for proxyForPatronFirstName property
228     *
229     * @param proxyForPatronFirstName
230     */
231    public void setProxyForPatronFirstName(String proxyForPatronFirstName) {
232        this.proxyForPatronFirstName = proxyForPatronFirstName;
233    }
234
235    /**
236     * Gets the value of proxyForPatronLastName property
237     *
238     * @return proxyForPatronLastName
239     */
240    public String getProxyForPatronLastName() {
241        return proxyForPatronLastName;
242    }
243
244    /**
245     * Sets the value for proxyForPatronLastName property
246     *
247     * @param proxyForPatronLastName
248     */
249    public void setProxyForPatronLastName(String proxyForPatronLastName) {
250        this.proxyForPatronLastName = proxyForPatronLastName;
251    }
252
253    /**
254     * This method converts the PersistableBusinessObjectBase OleProxyPatronDocument into immutable object OleProxyPatronDefinition
255     *
256     * @param bo(OleProxyPatronDefinition)
257     * @return OleProxyPatronDefinition
258     */
259    static OleProxyPatronDefinition to(org.kuali.ole.deliver.bo.OleProxyPatronDocument bo) {
260        if (bo == null) {
261            return null;
262        }
263        return OleProxyPatronDefinition.Builder.create(bo).build();
264    }
265
266    /**
267     * This method converts the immutable object OleProxyPatronDefinition into PersistableBusinessObjectBase OleProxyPatronDocument
268     *
269     * @param im(OleProxyPatronDefinition)
270     * @return bo(OlePatronAffiliation)
271     */
272    public static org.kuali.ole.deliver.bo.OleProxyPatronDocument from(OleProxyPatronDefinition im) {
273        if (im == null) {
274            return null;
275        }
276
277        org.kuali.ole.deliver.bo.OleProxyPatronDocument bo = new org.kuali.ole.deliver.bo.OleProxyPatronDocument();
278        bo.oleProxyPatronDocumentId = im.getOleProxyPatronDocumentId();
279        bo.olePatronId = im.getOlePatronId();
280        bo.proxyPatronId = im.getProxyPatronId();
281       /* if (im.getOlePatronDocument() != null) {
282            bo.olePatronDocument = OlePatronDocument.from(im.getOlePatronDocument());
283        }*/
284        bo.active = im.isActive();
285        bo.proxyPatronExpirationDate = im.getProxyPatronExpirationDate();
286        bo.proxyPatronActivationDate = im.getProxyPatronActivationDate();
287        bo.versionNumber = im.getVersionNumber();
288
289
290        return bo;
291    }
292
293
294    @Override
295    public String getId() {
296        return this.oleProxyPatronDocumentId;
297    }
298}