Coverage Report - edu.sampleu.financial.bo.VendorAddress
 
Classes in this File Line Coverage Branch Coverage Complexity
VendorAddress
0%
0/74
0%
0/4
1.044
 
 1  
 /*
 2  
  * Copyright 2007 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the
 5  
  * "License"); 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, WITHOUT
 12  
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 13  
  * License for the specific language governing permissions and limitations under
 14  
  * the License.
 15  
  */
 16  
 
 17  
 package edu.sampleu.financial.bo;
 18  
 
 19  
 import java.util.ArrayList;
 20  
 import java.util.LinkedHashMap;
 21  
 import java.util.List;
 22  
 
 23  
 import org.apache.commons.lang.StringUtils;
 24  
 import org.apache.log4j.Logger;
 25  
 import org.kuali.rice.core.framework.services.CoreFrameworkServiceLocator;
 26  
 import org.kuali.rice.kns.bo.Inactivateable;
 27  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
 28  
 import org.kuali.rice.kns.service.KNSServiceLocator;
 29  
 import org.kuali.rice.kns.service.KNSServiceLocatorInternal;
 30  
 import org.kuali.rice.kns.util.KNSConstants;
 31  
 import org.kuali.rice.shareddata.api.country.Country;
 32  
 import org.kuali.rice.shareddata.api.services.SharedDataApiServiceLocator;
 33  
 import org.kuali.rice.shareddata.api.state.State;
 34  
 
 35  
 /**
 36  
  * Address to be associated with a particular Vendor.
 37  
  */
 38  
 public class VendorAddress extends PersistableBusinessObjectBase implements Inactivateable {
 39  0
     private static Logger LOG = Logger.getLogger(VendorAddress.class);
 40  
 
 41  
     private Integer vendorAddressGeneratedIdentifier;
 42  
     private Integer vendorHeaderGeneratedIdentifier;
 43  
     private Integer vendorDetailAssignedIdentifier;
 44  
     private String vendorAddressTypeCode;
 45  
     private String vendorLine1Address;
 46  
     private String vendorLine2Address;
 47  
     private String vendorCityName;
 48  
     private String vendorStateCode;
 49  
     private String vendorZipCode;
 50  
     private String vendorCountryCode;
 51  
     private String vendorAttentionName;
 52  
     private String vendorAddressInternationalProvinceName;
 53  
     private String vendorAddressEmailAddress;
 54  
     private String vendorBusinessToBusinessUrlAddress;
 55  
     private String vendorFaxNumber;
 56  
     private boolean vendorDefaultAddressIndicator;
 57  
     private boolean active;
 58  
 
 59  
     private List<VendorDefaultAddress> vendorDefaultAddresses;
 60  
 
 61  
     private VendorDetail vendorDetail;
 62  
     private AddressType vendorAddressType;
 63  
     private State vendorState;
 64  
     private Country vendorCountry;
 65  
 
 66  
     /**
 67  
      * Default constructor.
 68  
      */
 69  0
     public VendorAddress() {
 70  0
         vendorDefaultAddresses = new ArrayList();
 71  0
     }
 72  
 
 73  
     public Integer getVendorAddressGeneratedIdentifier() {
 74  
 
 75  0
         return vendorAddressGeneratedIdentifier;
 76  
     }
 77  
 
 78  
     public void setVendorAddressGeneratedIdentifier(Integer vendorAddressGeneratedIdentifier) {
 79  0
         this.vendorAddressGeneratedIdentifier = vendorAddressGeneratedIdentifier;
 80  0
     }
 81  
 
 82  
     public Integer getVendorHeaderGeneratedIdentifier() {
 83  0
         return vendorHeaderGeneratedIdentifier;
 84  
     }
 85  
 
 86  
     public void setVendorHeaderGeneratedIdentifier(Integer vendorHeaderGeneratedIdentifier) {
 87  0
         this.vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
 88  0
     }
 89  
 
 90  
     public Integer getVendorDetailAssignedIdentifier() {
 91  0
         return vendorDetailAssignedIdentifier;
 92  
     }
 93  
 
 94  
     public void setVendorDetailAssignedIdentifier(Integer vendorDetailAssignedIdentifier) {
 95  0
         this.vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
 96  0
     }
 97  
 
 98  
     public String getVendorAddressInternationalProvinceName() {
 99  0
         return vendorAddressInternationalProvinceName;
 100  
     }
 101  
 
 102  
     public void setVendorAddressInternationalProvinceName(String vendorAddressInternationalProvinceName) {
 103  0
         this.vendorAddressInternationalProvinceName = vendorAddressInternationalProvinceName;
 104  0
     }
 105  
 
 106  
     public String getVendorAddressEmailAddress() {
 107  0
         return vendorAddressEmailAddress;
 108  
     }
 109  
 
 110  
     public void setVendorAddressEmailAddress(String vendorAddressEmailAddress) {
 111  0
         this.vendorAddressEmailAddress = vendorAddressEmailAddress;
 112  0
     }
 113  
 
 114  
     public String getVendorAddressTypeCode() {
 115  0
         return vendorAddressTypeCode;
 116  
     }
 117  
 
 118  
     public void setVendorAddressTypeCode(String vendorAddressTypeCode) {
 119  0
         this.vendorAddressTypeCode = vendorAddressTypeCode;
 120  0
     }
 121  
 
 122  
     public String getVendorLine1Address() {
 123  0
         return vendorLine1Address;
 124  
     }
 125  
 
 126  
     public void setVendorLine1Address(String vendorLine1Address) {
 127  0
         this.vendorLine1Address = vendorLine1Address;
 128  0
     }
 129  
 
 130  
     public String getVendorLine2Address() {
 131  0
         return vendorLine2Address;
 132  
     }
 133  
 
 134  
     public void setVendorLine2Address(String vendorLine2Address) {
 135  0
         this.vendorLine2Address = vendorLine2Address;
 136  0
     }
 137  
 
 138  
     public String getVendorCityName() {
 139  0
         return vendorCityName;
 140  
     }
 141  
 
 142  
     public void setVendorCityName(String vendorCityName) {
 143  0
         this.vendorCityName = vendorCityName;
 144  0
     }
 145  
 
 146  
     public String getVendorStateCode() {
 147  0
         return vendorStateCode;
 148  
     }
 149  
 
 150  
     public void setVendorStateCode(String vendorStateCode) {
 151  0
         this.vendorStateCode = vendorStateCode;
 152  0
     }
 153  
 
 154  
     public String getVendorZipCode() {
 155  0
         return vendorZipCode;
 156  
     }
 157  
 
 158  
     public void setVendorZipCode(String vendorZipCode) {
 159  0
         this.vendorZipCode = vendorZipCode;
 160  0
     }
 161  
 
 162  
     public String getVendorCountryCode() {
 163  0
         return vendorCountryCode;
 164  
     }
 165  
 
 166  
     public void setVendorCountryCode(String vendorCountryCode) {
 167  0
         this.vendorCountryCode = vendorCountryCode;
 168  0
     }
 169  
 
 170  
     public String getVendorAttentionName() {
 171  0
         return vendorAttentionName;
 172  
     }
 173  
 
 174  
     public void setVendorAttentionName(String vendorAttentionName) {
 175  0
         this.vendorAttentionName = vendorAttentionName;
 176  0
     }
 177  
 
 178  
     public String getVendorBusinessToBusinessUrlAddress() {
 179  0
         return vendorBusinessToBusinessUrlAddress;
 180  
     }
 181  
 
 182  
     public void setVendorBusinessToBusinessUrlAddress(String vendorBusinessToBusinessUrlAddress) {
 183  0
         this.vendorBusinessToBusinessUrlAddress = vendorBusinessToBusinessUrlAddress;
 184  0
     }
 185  
 
 186  
     public VendorDetail getVendorDetail() {
 187  0
         return vendorDetail;
 188  
     }
 189  
 
 190  
     public void setVendorDetail(VendorDetail vendorDetail) {
 191  0
         this.vendorDetail = vendorDetail;
 192  0
     }
 193  
 
 194  
     public AddressType getVendorAddressType() {
 195  0
         return vendorAddressType;
 196  
     }
 197  
 
 198  
     public void setVendorAddressType(AddressType vendorAddressType) {
 199  0
         this.vendorAddressType = vendorAddressType;
 200  0
     }
 201  
 
 202  
     public State getVendorState() {
 203  0
         if ((vendorState == null) || (StringUtils.equals(vendorState.getCode(), vendorStateCode))) {
 204  0
             vendorState = SharedDataApiServiceLocator.getStateService().getState(vendorCountryCode, vendorStateCode);
 205  
         }
 206  
 
 207  0
         return vendorState;
 208  
     }
 209  
 
 210  
     public void setVendorState(State vendorState) {
 211  0
         this.vendorState = vendorState;
 212  0
     }
 213  
 
 214  
     public Country getVendorCountry() {
 215  0
         String postalCountryCode = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsString(KNSConstants.KNS_NAMESPACE,
 216  
                 KNSConstants.DetailTypes.ALL_DETAIL_TYPE, KNSConstants.SystemGroupParameterNames.DEFAULT_COUNTRY);
 217  0
         vendorCountry = SharedDataApiServiceLocator.getCountryService().getCountry(postalCountryCode);
 218  
 
 219  0
         return vendorCountry;
 220  
     }
 221  
 
 222  
     public void setVendorCountry(Country vendorCountry) {
 223  0
         this.vendorCountry = vendorCountry;
 224  0
     }
 225  
 
 226  
     public String getVendorFaxNumber() {
 227  0
         return vendorFaxNumber;
 228  
     }
 229  
 
 230  
     public void setVendorFaxNumber(String vendorFaxNumber) {
 231  0
         this.vendorFaxNumber = vendorFaxNumber;
 232  0
     }
 233  
 
 234  
     public boolean isVendorDefaultAddressIndicator() {
 235  0
         return vendorDefaultAddressIndicator;
 236  
     }
 237  
 
 238  
     public void setVendorDefaultAddressIndicator(boolean vendorDefaultAddressIndicator) {
 239  0
         this.vendorDefaultAddressIndicator = vendorDefaultAddressIndicator;
 240  0
     }
 241  
 
 242  
     public boolean isActive() {
 243  0
         return active;
 244  
     }
 245  
 
 246  
     public void setActive(boolean active) {
 247  0
         this.active = active;
 248  0
     }
 249  
 
 250  
     public List<VendorDefaultAddress> getVendorDefaultAddresses() {
 251  0
         return this.vendorDefaultAddresses;
 252  
     }
 253  
 
 254  
     public void setVendorDefaultAddresses(List<VendorDefaultAddress> vendorDefaultAddresses) {
 255  0
         this.vendorDefaultAddresses = vendorDefaultAddresses;
 256  0
     }
 257  
 }