001package org.kuali.ole.deliver.bo;
002
003import org.kuali.ole.deliver.api.OlePatronLocalIdentificationContract;
004import org.kuali.ole.deliver.api.OlePatronLocalIdentificationDefinition;
005import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
006
007/**
008 * OlePatronLocalIdentificationBo provides local id of patron through getter and setter.
009 */
010
011public class OlePatronLocalIdentificationBo extends PersistableBusinessObjectBase implements OlePatronLocalIdentificationContract {
012
013    private String patronLocalSeqId;
014    private String localId;
015    private String olePatronId;
016    private OlePatronDocument olePatronDocument;
017
018    /**
019     * Gets the value of patronLocalSeqId property
020     *
021     * @return patronLocalSeqId
022     */
023    public String getPatronLocalSeqId() {
024        return patronLocalSeqId;
025    }
026
027    /**
028     * Sets the value for patronLocalSeqId property
029     *
030     * @param patronLocalSeqId
031     */
032    public void setPatronLocalSeqId(String patronLocalSeqId) {
033        this.patronLocalSeqId = patronLocalSeqId;
034    }
035
036    /**
037     * Gets the value of localId property
038     *
039     * @return localId
040     */
041    public String getLocalId() {
042        return localId;
043    }
044
045    /**
046     * Sets the value for localId property
047     *
048     * @param localId
049     */
050    public void setLocalId(String localId) {
051        this.localId = localId;
052    }
053
054    /**
055     * Gets the value of olePatronId property
056     *
057     * @return olePatronId
058     */
059    public String getOlePatronId() {
060        return olePatronId;
061    }
062
063    /**
064     * Sets the value for olePatronId property
065     *
066     * @param olePatronId
067     */
068    public void setOlePatronId(String olePatronId) {
069        this.olePatronId = olePatronId;
070    }
071
072    /**
073     * Gets the value of olePatronDocument property
074     *
075     * @return olePatronDocument
076     */
077    public OlePatronDocument getOlePatronDocument() {
078        return olePatronDocument;
079    }
080
081    /**
082     * Sets the value for olePatronDocument property
083     *
084     * @param olePatronDocument
085     */
086    public void setOlePatronDocument(OlePatronDocument olePatronDocument) {
087        this.olePatronDocument = olePatronDocument;
088    }
089
090    /**
091     * This method converts the PersistableBusinessObjectBase OleAddressBo into immutable object OleAddressDefinition
092     *
093     * @param bo
094     * @return OleAddressDefinition
095     */
096    public static OlePatronLocalIdentificationDefinition to(org.kuali.ole.deliver.bo.OlePatronLocalIdentificationBo bo) {
097        if (bo == null) {
098            return null;
099        }
100        return OlePatronLocalIdentificationDefinition.Builder.create(bo).build();
101    }
102
103    /**
104     * This method converts the immutable object OleAddressDefinition into PersistableBusinessObjectBase OleAddressBo
105     *
106     * @param imOleAddressDefinition
107     * @return bo
108     */
109    public static org.kuali.ole.deliver.bo.OlePatronLocalIdentificationBo from(OlePatronLocalIdentificationDefinition imOleAddressDefinition) {
110        if (imOleAddressDefinition == null) {
111            return null;
112        }
113
114        org.kuali.ole.deliver.bo.OlePatronLocalIdentificationBo bo = new org.kuali.ole.deliver.bo.OlePatronLocalIdentificationBo();
115        bo.patronLocalSeqId = imOleAddressDefinition.getPatronLocalSeqId();
116        bo.olePatronId = imOleAddressDefinition.getOlePatronId();
117        bo.localId = imOleAddressDefinition.getLocalId();
118        bo.versionNumber = imOleAddressDefinition.getVersionNumber();
119
120        return bo;
121    }
122
123    @Override
124    public String getId() {
125        return this.patronLocalSeqId;
126    }
127}