Coverage Report - org.kuali.rice.kns.bo.CampusImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
CampusImpl
0%
0/23
N/A
1
 
 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.kns.bo;
 17  
 
 18  
 import java.util.LinkedHashMap;
 19  
 
 20  
 import javax.persistence.CascadeType;
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.FetchType;
 24  
 import javax.persistence.Id;
 25  
 import javax.persistence.JoinColumn;
 26  
 import javax.persistence.OneToOne;
 27  
 import javax.persistence.Table;
 28  
 
 29  
 import org.hibernate.annotations.Type;
 30  
 import org.kuali.rice.kns.util.KNSPropertyConstants;
 31  
 
 32  
 /**
 33  
  * 
 34  
  */
 35  
 @Entity
 36  
 @Table(name="KRNS_CAMPUS_T")
 37  
 public class CampusImpl extends PersistableBusinessObjectBase implements Campus, Inactivateable {
 38  
 
 39  
     private static final long serialVersionUID = 787567094298971223L;
 40  
     @Id
 41  
         @Column(name="CAMPUS_CD")
 42  
         private String campusCode;
 43  
     @Column(name="CAMPUS_NM")
 44  
         private String campusName;
 45  
     @Column(name="CAMPUS_SHRT_NM")
 46  
         private String campusShortName;
 47  
     @Column(name="CAMPUS_TYP_CD")
 48  
         private String campusTypeCode;
 49  
         @Type(type="yes_no")
 50  
         @Column(name="ACTV_IND")
 51  
     protected boolean active;
 52  
 
 53  
     @OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST})
 54  
         @JoinColumn(name="CAMPUS_TYP_CD", insertable=false, updatable=false)
 55  
         private CampusType campusType;
 56  
     
 57  
     /**
 58  
      * Default no-arg constructor.
 59  
      */
 60  0
     public CampusImpl() {
 61  
 
 62  0
     }
 63  
 
 64  
     /**
 65  
          * This overridden method ...
 66  
          * 
 67  
          * @see org.kuali.rice.kns.bo.Campus#getCampusCode()
 68  
          */
 69  
     public String getCampusCode() {
 70  0
         return campusCode;
 71  
     }
 72  
 
 73  
     /**
 74  
      * Sets the campusCode attribute.
 75  
      * 
 76  
      * @param campusCode The campusCode to set.
 77  
      * 
 78  
      */
 79  
     public void setCampusCode(String campusCode) {
 80  0
         this.campusCode = campusCode;
 81  0
     }
 82  
 
 83  
     /**
 84  
          * This overridden method ...
 85  
          * 
 86  
          * @see org.kuali.rice.kns.bo.Campus#getCampusName()
 87  
          */
 88  
     public String getCampusName() {
 89  0
         return campusName;
 90  
     }
 91  
 
 92  
     /**
 93  
      * Sets the campusName attribute.
 94  
      * 
 95  
      * @param campusName The campusName to set.
 96  
      * 
 97  
      */
 98  
     public void setCampusName(String campusName) {
 99  0
         this.campusName = campusName;
 100  0
     }
 101  
 
 102  
     /**
 103  
          * This overridden method ...
 104  
          * 
 105  
          * @see org.kuali.rice.kns.bo.Campus#getCampusShortName()
 106  
          */
 107  
     public String getCampusShortName() {
 108  0
         return campusShortName;
 109  
     }
 110  
 
 111  
     /**
 112  
      * Sets the campusShortName attribute.
 113  
      * 
 114  
      * @param campusShortName The campusShortName to set.
 115  
      * 
 116  
      */
 117  
     public void setCampusShortName(String campusShortName) {
 118  0
         this.campusShortName = campusShortName;
 119  0
     }
 120  
 
 121  
     /**
 122  
          * This overridden method ...
 123  
          * 
 124  
          * @see org.kuali.rice.kns.bo.Campus#getCampusTypeCode()
 125  
          */
 126  
     public String getCampusTypeCode() {
 127  0
         return campusTypeCode;
 128  
     }
 129  
 
 130  
     /**
 131  
      * Sets the campusTypeCode attribute.
 132  
      * 
 133  
      * @param campusTypeCode The campusTypeCode to set.
 134  
      * 
 135  
      */
 136  
     public void setCampusTypeCode(String campusTypeCode) {
 137  0
         this.campusTypeCode = campusTypeCode;
 138  0
     }
 139  
 
 140  
     /**
 141  
          * This overridden method ...
 142  
          * 
 143  
          * @see org.kuali.rice.kns.bo.Campus#getCampusType()
 144  
          */
 145  
     public CampusType getCampusType() {
 146  0
         return campusType;
 147  
     }
 148  
 
 149  
     /**
 150  
      * Sets the campusType attribute value.
 151  
      * @param campusType The campusType to set.
 152  
      * @deprecated
 153  
      */
 154  
     public void setCampusType(CampusType campusType) {
 155  0
         this.campusType = campusType;
 156  0
     }
 157  
 
 158  
         /**
 159  
          * This overridden method ...
 160  
          * 
 161  
          * @see org.kuali.rice.kns.bo.Campus#isActive()
 162  
          */
 163  
         public boolean isActive() {
 164  0
                 return this.active;
 165  
         }
 166  
 
 167  
         /**
 168  
          * @param active the active to set
 169  
          */
 170  
         public void setActive(boolean active) {
 171  0
                 this.active = active;
 172  0
         }
 173  
         
 174  
     /**
 175  
      * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
 176  
      */
 177  
     protected LinkedHashMap toStringMapper() {
 178  0
         LinkedHashMap m = new LinkedHashMap();
 179  0
         m.put(KNSPropertyConstants.CAMPUS_CODE, this.campusCode);
 180  0
         return m;
 181  
     }
 182  
 
 183  
 }
 184