Coverage Report - org.kuali.rice.kim.bo.reference.impl.KimCodeBase
 
Classes in this File Line Coverage Branch Coverage Complexity
KimCodeBase
0%
0/15
0%
0/4
1.5
 
 1  
 /*
 2  
  * Copyright 2007-2008 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 org.kuali.rice.kim.bo.reference.impl;
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 import org.kuali.rice.kim.bo.reference.KimCode;
 20  
 import org.kuali.rice.krad.bo.KualiCodeBase;
 21  
 
 22  
 import javax.persistence.AttributeOverride;
 23  
 import javax.persistence.AttributeOverrides;
 24  
 import javax.persistence.Column;
 25  
 import javax.persistence.MappedSuperclass;
 26  
 
 27  
 /**
 28  
  * This is a description of what this class does - jonathan don't forget to fill this in. 
 29  
  * 
 30  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 31  
  */
 32  
 @MappedSuperclass
 33  
 @AttributeOverrides({
 34  
         @AttributeOverride(name="active",column=@Column(name="ACTV_IND"))
 35  
 })
 36  0
 public abstract class KimCodeBase extends KualiCodeBase implements KimCode {
 37  
     
 38  
     private static final long serialVersionUID = 1660166679188995697L;
 39  0
         @Column(name="DISPLAY_SORT_CD")
 40  
     protected String displaySortCode = "";
 41  
 
 42  
         /**
 43  
          * @see org.kuali.core.bo.KualiCode#isActive()
 44  
          */
 45  
         public boolean isActive() {
 46  0
                 return active;
 47  
         }
 48  
 
 49  
         /**
 50  
          * @see org.kuali.core.bo.KualiCode#setActive(boolean)
 51  
          */
 52  
         public void setActive(boolean active) {
 53  0
                 this.active = active;
 54  0
         }
 55  
 
 56  
     /**
 57  
      * Implements equals comparing code to code.
 58  
      * 
 59  
      * @see java.lang.Object#equals(java.lang.Object)
 60  
      */
 61  
     public boolean equals(Object obj) {
 62  0
         if (obj instanceof KualiCodeBase) {
 63  0
             return StringUtils.equals(this.getCode(), ((KualiCodeBase) obj).getCode());
 64  
         }
 65  0
         return false;
 66  
     }
 67  
 
 68  
     /**
 69  
      * Overriding equals requires writing a hashCode method.
 70  
      * 
 71  
      * @see java.lang.Object#hashCode()
 72  
      */
 73  
     public int hashCode() {
 74  0
         int hashCode = 0;
 75  
 
 76  0
         if (getCode() != null) {
 77  0
             hashCode = getCode().hashCode();
 78  
         }
 79  
 
 80  0
         return hashCode;
 81  
     }
 82  
 
 83  
         /**
 84  
          * @return the displaySortCode
 85  
          */
 86  
         public String getDisplaySortCode() {
 87  0
                 return this.displaySortCode;
 88  
         }
 89  
 
 90  
         /**
 91  
          * @param displaySortCode the displaySortCode to set
 92  
          */
 93  
         public void setDisplaySortCode(String displaySortCode) {
 94  0
                 this.displaySortCode = displaySortCode;
 95  0
         }
 96  
         
 97  
 }