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