1 /*
2 * Copyright 2011 The Kuali Foundation.
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.ole.select.businessobject;
17
18 import org.kuali.ole.module.purap.businessobject.PurApItem;
19 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20
21 import java.util.LinkedHashMap;
22
23 /**
24 * This class... OLE PurchaseOrderNotes Business class Base
25 */
26 public class OlePurchaseOrderNotes extends PersistableBusinessObjectBase implements OleNotes {
27
28 /**
29 * Constructs a OlePurchaseOrderNotesBase.java.
30 */
31 public OlePurchaseOrderNotes() {
32
33 }
34
35 private Integer itemNoteId;
36 private String documentNumber;
37 private Integer itemIdentifier;
38 private String note;
39 private Integer noteTypeId;
40
41 private OleNoteType noteType;
42 private PurApItem purapItem;
43
44 /**
45 * get the PO Item Note Id
46 *
47 * @return itemNoteId
48 * @see org.kuali.ole.select.businessobject.OleNotes#getItemNoteId()
49 */
50 public Integer getItemNoteId() {
51 return itemNoteId;
52 }
53
54 /**
55 * set PO Item Note Id
56 *
57 * @param itemNoteId
58 * @see org.kuali.ole.select.businessobject.OleNotes#setItemNoteId(java.math.BigDecimal)
59 */
60 public void setItemNoteId(Integer itemNoteId) {
61 this.itemNoteId = itemNoteId;
62 }
63
64 /**
65 * get the Document Number
66 *
67 * @return documentNumber
68 */
69 public String getDocumentNumber() {
70 return documentNumber;
71 }
72
73 /**
74 * set Document Number
75 *
76 * @param documentNumber
77 */
78 public void setDocumentNumber(String documentNumber) {
79 this.documentNumber = documentNumber;
80 }
81
82 /**
83 * get Item Identifier
84 *
85 * @return item Identifier
86 * @see org.kuali.ole.select.businessobject.OleNotes#getItemIdentifier()
87 */
88 public Integer getItemIdentifier() {
89 return itemIdentifier;
90 }
91
92 /**
93 * set Item Identifier
94 *
95 * @return itemIdentifier
96 * @see org.kuali.ole.select.businessobject.OleNotes#setItemIdentifier(java.lang.Integer)
97 */
98 public void setItemIdentifier(Integer itemIdentifier) {
99 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 }