View Javadoc
1   /*
2    * Copyright 2008 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.module.purap.businessobject;
17  
18  import org.kuali.ole.coa.businessobject.Chart;
19  import org.kuali.ole.coa.businessobject.Organization;
20  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
21  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
22  
23  import java.util.LinkedHashMap;
24  
25  /**
26   * Receiving Address Business Object.
27   * Used when an institution has products shipped by vendors to their "central receiving" organziation,
28   * which will then deliever the products to the final delivery addresses.
29   * ReceivingAddress defines all the required address fields as well as an indicator to decide whether the
30   * receiving address or the final delivery address will be used as the shipping address provided to a vendor.
31   */
32  public class ReceivingAddress extends PersistableBusinessObjectBase implements MutableInactivatable {
33  
34      private Integer receivingAddressIdentifier;
35      private String chartOfAccountsCode;
36      private String organizationCode;
37      private String receivingName;
38      private String receivingLine1Address;
39      private String receivingLine2Address;
40      private String receivingCityName;
41      private String receivingStateCode;
42      private String receivingPostalCode;
43      private String receivingCountryCode;
44      private boolean useReceivingIndicator;
45      private boolean defaultIndicator;
46      private boolean active;
47  
48      private Chart chartOfAccounts;
49      private Organization organization;
50  
51      /**
52       * Default constructor.
53       */
54      public ReceivingAddress() {
55      }
56  
57      public boolean isActive() {
58          return active;
59      }
60  
61      public void setActive(boolean active) {
62          this.active = active;
63      }
64  
65      public String getChartOfAccountsCode() {
66          return chartOfAccountsCode;
67      }
68  
69      public void setChartOfAccountsCode(String chartOfAccountsCode) {
70          this.chartOfAccountsCode = chartOfAccountsCode;
71      }
72  
73      public boolean isDefaultIndicator() {
74          return defaultIndicator;
75      }
76  
77      public void setDefaultIndicator(boolean defaultIndicator) {
78          this.defaultIndicator = defaultIndicator;
79      }
80  
81      public String getOrganizationCode() {
82          return organizationCode;
83      }
84  
85      public void setOrganizationCode(String organizationCode) {
86          this.organizationCode = organizationCode;
87      }
88  
89      public Integer getReceivingAddressIdentifier() {
90          return receivingAddressIdentifier;
91      }
92  
93      public void setReceivingAddressIdentifier(Integer receivingAddressIdentifier) {
94          this.receivingAddressIdentifier = receivingAddressIdentifier;
95      }
96  
97      public String getReceivingCityName() {
98          return receivingCityName;
99      }
100 
101     public void setReceivingCityName(String receivingCityName) {
102         this.receivingCityName = receivingCityName;
103     }
104 
105     public String getReceivingCountryCode() {
106         return receivingCountryCode;
107     }
108 
109     public void setReceivingCountryCode(String receivingCountryCode) {
110         this.receivingCountryCode = receivingCountryCode;
111     }
112 
113     public String getReceivingLine1Address() {
114         return receivingLine1Address;
115     }
116 
117     public void setReceivingLine1Address(String receivingLine1Address) {
118         this.receivingLine1Address = receivingLine1Address;
119     }
120 
121     public String getReceivingLine2Address() {
122         return receivingLine2Address;
123     }
124 
125     public void setReceivingLine2Address(String receivingLine2Address) {
126         this.receivingLine2Address = receivingLine2Address;
127     }
128 
129     public String getReceivingName() {
130         return receivingName;
131     }
132 
133     public void setReceivingName(String receivingName) {
134         this.receivingName = receivingName;
135     }
136 
137     public String getReceivingPostalCode() {
138         return receivingPostalCode;
139     }
140 
141     public void setReceivingPostalCode(String receivingPostalCode) {
142         this.receivingPostalCode = receivingPostalCode;
143     }
144 
145     public String getReceivingStateCode() {
146         return receivingStateCode;
147     }
148 
149     public void setReceivingStateCode(String receivingStateCode) {
150         this.receivingStateCode = receivingStateCode;
151     }
152 
153     public boolean isUseReceivingIndicator() {
154         return useReceivingIndicator;
155     }
156 
157     public void setUseReceivingIndicator(boolean useReceivingIndicator) {
158         this.useReceivingIndicator = useReceivingIndicator;
159     }
160 
161     public Chart getChartOfAccounts() {
162         return chartOfAccounts;
163     }
164 
165     /**
166      * @deprecated
167      */
168     public void setChartOfAccounts(Chart chartOfAccounts) {
169         this.chartOfAccounts = chartOfAccounts;
170     }
171 
172     public Organization getOrganization() {
173         return organization;
174     }
175 
176     /**
177      * @deprecated
178      */
179     public void setOrganization(Organization organization) {
180         this.organization = organization;
181     }
182 
183     /**
184      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
185      */
186     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
187         LinkedHashMap m = new LinkedHashMap();
188         m.put("chartOfAccountsCode", this.chartOfAccountsCode);
189         return m;
190     }
191 }