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 */ 016 package org.kuali.kfs.module.purap.businessobject; 017 018 import java.util.LinkedHashMap; 019 020 import org.kuali.kfs.coa.businessobject.Chart; 021 import org.kuali.kfs.coa.businessobject.Organization; 022 import org.kuali.rice.kns.bo.Inactivateable; 023 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 024 025 /** 026 * Receiving Address Business Object. 027 * Used when an institution has products shipped by vendors to their "central receiving" organziation, 028 * which will then deliever the products to the final delivery addresses. 029 * ReceivingAddress defines all the required address fields as well as an indicator to decide whether the 030 * receiving address or the final delivery address will be used as the shipping address provided to a vendor. 031 */ 032 public class ReceivingAddress extends PersistableBusinessObjectBase implements Inactivateable{ 033 034 private Integer receivingAddressIdentifier; 035 private String chartOfAccountsCode; 036 private String organizationCode; 037 private String receivingName; 038 private String receivingLine1Address; 039 private String receivingLine2Address; 040 private String receivingCityName; 041 private String receivingStateCode; 042 private String receivingPostalCode; 043 private String receivingCountryCode; 044 private boolean useReceivingIndicator; 045 private boolean defaultIndicator; 046 private boolean active; 047 048 private Chart chartOfAccounts; 049 private Organization organization; 050 051 /** 052 * Default constructor. 053 */ 054 public ReceivingAddress() { 055 } 056 057 public boolean isActive() { 058 return active; 059 } 060 061 public void setActive(boolean active) { 062 this.active = active; 063 } 064 065 public String getChartOfAccountsCode() { 066 return chartOfAccountsCode; 067 } 068 069 public void setChartOfAccountsCode(String chartOfAccountsCode) { 070 this.chartOfAccountsCode = chartOfAccountsCode; 071 } 072 073 public boolean isDefaultIndicator() { 074 return defaultIndicator; 075 } 076 077 public void setDefaultIndicator(boolean defaultIndicator) { 078 this.defaultIndicator = defaultIndicator; 079 } 080 081 public String getOrganizationCode() { 082 return organizationCode; 083 } 084 085 public void setOrganizationCode(String organizationCode) { 086 this.organizationCode = organizationCode; 087 } 088 089 public Integer getReceivingAddressIdentifier() { 090 return receivingAddressIdentifier; 091 } 092 093 public void setReceivingAddressIdentifier(Integer receivingAddressIdentifier) { 094 this.receivingAddressIdentifier = receivingAddressIdentifier; 095 } 096 097 public String getReceivingCityName() { 098 return receivingCityName; 099 } 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.kns.bo.BusinessObjectBase#toStringMapper() 185 */ 186 protected LinkedHashMap toStringMapper() { 187 LinkedHashMap m = new LinkedHashMap(); 188 m.put("chartOfAccountsCode", this.chartOfAccountsCode); 189 return m; 190 } 191 }