001/*
002 * Copyright 2011 The Kuali Foundation.
003 * 
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 * 
008 * http://www.opensource.org/licenses/ecl2.php
009 * 
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.ole.select.businessobject;
017
018import org.kuali.ole.module.purap.businessobject.PurApItem;
019import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
020
021import java.util.LinkedHashMap;
022
023/**
024 * This class... OLE PurchaseOrderNotes Business class Base
025 */
026public class OlePurchaseOrderNotes extends PersistableBusinessObjectBase implements OleNotes {
027
028    /**
029     * Constructs a OlePurchaseOrderNotesBase.java.
030     */
031    public OlePurchaseOrderNotes() {
032
033    }
034
035    private Integer itemNoteId;
036    private String documentNumber;
037    private Integer itemIdentifier;
038    private String note;
039    private Integer noteTypeId;
040
041    private OleNoteType noteType;
042    private PurApItem purapItem;
043
044    /**
045     * get the PO Item Note Id
046     *
047     * @return itemNoteId
048     * @see org.kuali.ole.select.businessobject.OleNotes#getItemNoteId()
049     */
050    public Integer getItemNoteId() {
051        return itemNoteId;
052    }
053
054    /**
055     * set PO Item Note Id
056     *
057     * @param itemNoteId
058     * @see org.kuali.ole.select.businessobject.OleNotes#setItemNoteId(java.math.BigDecimal)
059     */
060    public void setItemNoteId(Integer itemNoteId) {
061        this.itemNoteId = itemNoteId;
062    }
063
064    /**
065     * get the Document Number
066     *
067     * @return documentNumber
068     */
069    public String getDocumentNumber() {
070        return documentNumber;
071    }
072
073    /**
074     * set Document Number
075     *
076     * @param documentNumber
077     */
078    public void setDocumentNumber(String documentNumber) {
079        this.documentNumber = documentNumber;
080    }
081
082    /**
083     * get Item Identifier
084     *
085     * @return item Identifier
086     * @see org.kuali.ole.select.businessobject.OleNotes#getItemIdentifier()
087     */
088    public Integer getItemIdentifier() {
089        return itemIdentifier;
090    }
091
092    /**
093     * set Item Identifier
094     *
095     * @return itemIdentifier
096     * @see org.kuali.ole.select.businessobject.OleNotes#setItemIdentifier(java.lang.Integer)
097     */
098    public void setItemIdentifier(Integer itemIdentifier) {
099        this.itemIdentifier = itemIdentifier;
100    }
101
102    /**
103     * get PO Note
104     *
105     * @return note
106     * @see org.kuali.ole.select.businessobject.OleNotes#getNote()
107     */
108    public String getNote() {
109        return note;
110    }
111
112    /**
113     * set PO Note
114     *
115     * @param note
116     * @see org.kuali.ole.select.businessobject.OleNotes#setNote(java.lang.String)
117     */
118    public void setNote(String note) {
119        this.note = note;
120    }
121
122    /**
123     * get PO NoteType Id
124     *
125     * @return noteTypeId
126     * @see org.kuali.ole.select.businessobject.OleNotes#getNoteTypeId()
127     */
128    public Integer getNoteTypeId() {
129        return noteTypeId;
130    }
131
132    /**
133     * set PO NoteType Id
134     *
135     * @param noteTypeId
136     * @see org.kuali.ole.select.businessobject.OleNotes#setNoteTypeId(java.math.BigDecimal)
137     */
138    public void setNoteTypeId(Integer noteTypeId) {
139        this.noteTypeId = noteTypeId;
140    }
141
142    /**
143     * get Note Type
144     *
145     * @return note
146     * @see org.kuali.ole.select.businessobject.OleNotes#getNoteType()
147     */
148    public OleNoteType getNoteType() {
149        return noteType;
150    }
151
152    /**
153     * set Note Type
154     *
155     * @param note
156     * @see org.kuali.ole.select.businessobject.OleNotes#setNoteType(org.kuali.ole.select.businessobject.OleNoteType)
157     */
158    public void setNoteType(OleNoteType noteType) {
159        this.noteType = noteType;
160    }
161
162    /**
163     * Constructs a OlePurchaseOrderNotesBase.java.
164     *
165     * @param OleRequisitionNotes notes
166     */
167    public OlePurchaseOrderNotes(OleNotes notes) {
168        this.setNote(notes.getNote());
169        this.setNoteTypeId(notes.getNoteTypeId());
170    }
171
172    /**
173     * This method... for getting OlePurchaseOrderItem from PurapItem
174     *
175     * @return purapItem
176     */
177    public OlePurchaseOrderItem getOlePurchaseOrderItem() {
178        return this.getPurapItem();
179    }
180
181    /**
182     * This method... for setting the OlePurchaseOrderItem to PurApItem
183     *
184     * @param item
185     */
186    public void setOlePurchaseOrderItem(OlePurchaseOrderItem item) {
187        this.setPurapItem(item);
188    }
189
190    /**
191     * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
192     */
193
194    protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
195        LinkedHashMap map = new LinkedHashMap();
196        map.put("documentNumber", documentNumber);
197        map.put("itemIdentifier", itemIdentifier);
198        map.put("poItemNoteId", itemNoteId);
199        map.put("noteTypeId", noteTypeId);
200        map.put("note", note);
201        return map;
202    }
203
204    /**
205     * @see org.kuali.ole.select.businessobject.OleNotes#getPurapItem()
206     */
207    @Override
208    public <T extends PurApItem> T getPurapItem() {
209        return (T) purapItem;
210    }
211
212    /**
213     * @see org.kuali.ole.select.businessobject.OleNotes#setPurapItem(org.kuali.ole.module.purap.businessobject.PurApItem)
214     */
215    @Override
216    public void setPurapItem(PurApItem item) {
217        purapItem = item;
218
219    }
220
221}