Coverage Report - edu.sampleu.financial.bo.VendorDefaultAddress
 
Classes in this File Line Coverage Branch Coverage Complexity
VendorDefaultAddress
0%
0/21
0%
0/4
1.25
 
 1  
 /*
 2  
  * Copyright 2007 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  
 package edu.sampleu.financial.bo;
 18  
 
 19  
 import java.util.LinkedHashMap;
 20  
 
 21  
 import org.apache.commons.lang.builder.EqualsBuilder;
 22  
 import org.kuali.rice.kns.bo.Inactivateable;
 23  
 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
 24  
 import org.kuali.rice.kns.util.ObjectUtils;
 25  
 
 26  
 /**
 27  
  * An association between a <code>Campus</code> and a <code>VendorAddress</code> to indicate that the Address is the default one
 28  
  * for this Campus among the various Addresses available for this Vendor.
 29  
  *
 30  
  * @see org.kuali.rice.kns.bo.Campus
 31  
  * @see org.kuali.kfs.vnd.businessobject.VendorAddress
 32  
  */
 33  
 public class VendorDefaultAddress extends PersistableBusinessObjectBase implements Inactivateable {
 34  
 
 35  
     private Integer vendorDefaultAddressGeneratedIdentifier;
 36  
     private Integer vendorAddressGeneratedIdentifier;
 37  
     private String vendorCampusCode;
 38  
     private boolean active;
 39  
 
 40  
     private VendorAddress vendorAddress;
 41  
 
 42  
     /**
 43  
      * Default constructor.
 44  
      */
 45  
     public VendorDefaultAddress() {
 46  0
         super();
 47  0
     }
 48  
 
 49  
     public String getVendorCampusCode() {
 50  
 
 51  0
         return vendorCampusCode;
 52  
     }
 53  
 
 54  
     public void setVendorCampusCode(String vendorCampusCode) {
 55  0
         this.vendorCampusCode = vendorCampusCode;
 56  0
     }
 57  
 
 58  
     public Integer getVendorAddressGeneratedIdentifier() {
 59  
 
 60  0
         return vendorAddressGeneratedIdentifier;
 61  
     }
 62  
 
 63  
     public void setVendorAddressGeneratedIdentifier(Integer vendorAddressGeneratedIdentifier) {
 64  0
         this.vendorAddressGeneratedIdentifier = vendorAddressGeneratedIdentifier;
 65  0
     }
 66  
 
 67  
     public boolean isActive() {
 68  
 
 69  0
         return active;
 70  
     }
 71  
 
 72  
     public void setActive(boolean active) {
 73  0
         this.active = active;
 74  0
     }
 75  
 
 76  
     public VendorAddress getVendorAddress() {
 77  
 
 78  0
         return vendorAddress;
 79  
     }
 80  
 
 81  
     /**
 82  
      * Sets the vendorAddress attribute.
 83  
      *
 84  
      * @param vendorAddress The vendorAddress to set.
 85  
      * @deprecated
 86  
      */
 87  
     public void setVendorAddress(VendorAddress vendorAddress) {
 88  0
         this.vendorAddress = vendorAddress;
 89  0
     }
 90  
 
 91  
     public Integer getVendorDefaultAddressGeneratedIdentifier() {
 92  
 
 93  0
         return vendorDefaultAddressGeneratedIdentifier;
 94  
     }
 95  
 
 96  
     public void setVendorDefaultAddressGeneratedIdentifier(Integer vendorDefaultAddressGeneratedIdentifier) {
 97  0
         this.vendorDefaultAddressGeneratedIdentifier = vendorDefaultAddressGeneratedIdentifier;
 98  0
     }
 99  
 
 100  
     /**
 101  
      * @see org.kuali.kfs.vnd.document.routing.VendorRoutingComparable#isEqualForRouting(Object)
 102  
      */
 103  
     public boolean isEqualForRouting(Object toCompare) {
 104  0
         if ((ObjectUtils.isNull(toCompare)) || !(toCompare instanceof VendorDefaultAddress)) {
 105  
 
 106  0
             return false;
 107  
         } else {
 108  0
             VendorDefaultAddress vda = (VendorDefaultAddress) toCompare;
 109  
 
 110  0
             return new EqualsBuilder().append(this.getVendorDefaultAddressGeneratedIdentifier(), vda.getVendorDefaultAddressGeneratedIdentifier()).append(this.getVendorAddressGeneratedIdentifier(), vda.getVendorAddressGeneratedIdentifier()).append(this.getVendorCampusCode(), vda.getVendorCampusCode()).isEquals();
 111  
         }
 112  
     }
 113  
 
 114  
 
 115  
 }