View Javadoc
1   /*
2    * Copyright 2004-2009 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  /*
17   * Created on Aug 25, 2004
18   *
19   */
20  package org.kuali.ole.module.purap.businessobject;
21  
22  import org.apache.commons.lang.builder.ToStringBuilder;
23  
24  import java.util.HashMap;
25  import java.util.Map;
26  
27  public class B2BShoppingCartItem {
28  
29      private String quantity;
30      private String supplierPartId;
31      private String supplierPartAuxiliaryId;
32      private String unitPrice;
33      private String unitPriceCurrency;
34      private String description;
35      private String unitOfMeasure;
36      private String manufacturerPartID;
37      private String manufacturerName;
38      private Map<String, String> classification = new HashMap<String, String>();
39      private Map<String, String> extrinsic = new HashMap<String, String>();
40      private Map<String, String> supplier = new HashMap<String, String>();
41  
42      public B2BShoppingCartItem() {
43      }
44  
45      public String getClassification(String domain) {
46          return classification.get(domain);
47      }
48  
49      public void addClassification(String domain, String value) {
50          classification.put(domain, value);
51      }
52  
53      public Map getClassification() {
54          return classification;
55      }
56  
57      public String getDescription() {
58          return description;
59      }
60  
61      public void setDescription(String description) {
62          this.description = description;
63      }
64  
65      public String getExtrinsic(String domain) {
66          return extrinsic.get(domain);
67      }
68  
69      public void addExtrinsic(String domain, String value) {
70          extrinsic.put(domain, value);
71      }
72  
73      public Map<String, String> getExtrinsic() {
74          return extrinsic;
75      }
76  
77      public String getQuantity() {
78          return quantity;
79      }
80  
81      public void setQuantity(String quantity) {
82          this.quantity = quantity;
83      }
84  
85      public String getSupplier(String domain) {
86          return supplier.get(domain);
87      }
88  
89      public void setSupplier(String domain, String value) {
90          supplier.put(domain, value);
91      }
92  
93      public Map<String, String> getSupplier() {
94          return supplier;
95      }
96  
97      public String getSupplierPartAuxiliaryId() {
98          return supplierPartAuxiliaryId;
99      }
100 
101     public void setSupplierPartAuxiliaryId(String supplierPartAuxiliaryId) {
102         this.supplierPartAuxiliaryId = supplierPartAuxiliaryId;
103     }
104 
105     public String getSupplierPartId() {
106         return supplierPartId;
107     }
108 
109     public void setSupplierPartId(String supplierPartId) {
110         this.supplierPartId = supplierPartId;
111     }
112 
113     public String getUnitOfMeasure() {
114         return unitOfMeasure;
115     }
116 
117     public void setUnitOfMeasure(String unitOfMeasure) {
118         this.unitOfMeasure = unitOfMeasure;
119     }
120 
121     public String getUnitPrice() {
122         return unitPrice;
123     }
124 
125     public void setUnitPrice(String unitPrice) {
126         this.unitPrice = unitPrice;
127     }
128 
129     public String getUnitPriceCurrency() {
130         return unitPriceCurrency;
131     }
132 
133     public void setUnitPriceCurrency(String unitPriceCurrency) {
134         this.unitPriceCurrency = unitPriceCurrency;
135     }
136 
137     public String getManufacturerPartID() {
138         return manufacturerPartID;
139     }
140 
141     public void setManufacturerPartID(String manufacturerPartID) {
142         this.manufacturerPartID = manufacturerPartID;
143     }
144 
145     public String getManufacturerName() {
146         return manufacturerName;
147     }
148 
149     public void setManufacturerName(String manufacturerName) {
150         this.manufacturerName = manufacturerName;
151     }
152 
153     public String toString() {
154 
155         ToStringBuilder toString = new ToStringBuilder(this);
156         toString.append("quantity", quantity);
157         toString.append("supplierPartId", supplierPartId);
158         toString.append("supplierPartAuxiliaryId", supplierPartAuxiliaryId);
159         toString.append("unitPrice", unitPrice);
160         toString.append("unitPriceCurrency", unitPriceCurrency);
161         toString.append("description", description);
162         toString.append("unitOfMeasure", unitOfMeasure);
163         toString.append("manufacturerPartID", manufacturerPartID);
164         toString.append("manufacturerName", manufacturerName);
165         toString.append("classification", classification);
166         toString.append("extrinsic", extrinsic);
167         toString.append("supplier", supplier);
168 
169         return toString.toString();
170     }
171 
172 }