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