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