Coverage Report - org.kuali.rice.kim.bo.entity.impl.KimEntityEntityTypeImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
KimEntityEntityTypeImpl
0%
0/22
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.kim.bo.entity.impl;
 17  
 
 18  
 import org.hibernate.annotations.Fetch;
 19  
 import org.hibernate.annotations.FetchMode;
 20  
 import org.kuali.rice.kim.bo.entity.KimEntityAddress;
 21  
 import org.kuali.rice.kim.bo.entity.KimEntityEmail;
 22  
 import org.kuali.rice.kim.bo.entity.KimEntityEntityType;
 23  
 import org.kuali.rice.kim.bo.entity.KimEntityPhone;
 24  
 import org.kuali.rice.kim.bo.reference.EntityType;
 25  
 import org.kuali.rice.kim.bo.reference.impl.EntityTypeImpl;
 26  
 
 27  
 import javax.persistence.*;
 28  
 import java.util.List;
 29  
 
 30  
 /**
 31  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 32  
  */
 33  
 
 34  
 @Entity
 35  
 @IdClass(KimEntityEntityTypeId.class)
 36  
 @Table(name = "KRIM_ENTITY_ENT_TYP_T")
 37  0
 public class KimEntityEntityTypeImpl extends KimInactivatableEntityDataBase implements KimEntityEntityType {
 38  
 
 39  
         private static final long serialVersionUID = 1L;
 40  
 
 41  
         @Id
 42  
         @Column(name = "ENTITY_ID")
 43  
         protected String entityId;
 44  
         
 45  
         @Id
 46  
         @Column(name = "ENT_TYP_CD")
 47  
         protected String entityTypeCode;
 48  
          
 49  
         @ManyToOne(targetEntity = EntityTypeImpl.class, fetch = FetchType.EAGER, cascade = {})
 50  
         @JoinColumn(name = "ENT_TYP_CD", insertable = false, updatable = false)
 51  
         protected EntityType entityType;
 52  
         
 53  
         @OneToMany(targetEntity = KimEntityEmailImpl.class, fetch = FetchType.EAGER, cascade = { CascadeType.ALL })
 54  
         @Fetch(value = FetchMode.SELECT)
 55  
         @JoinColumns({
 56  
             @JoinColumn(name="ENTITY_ID", insertable = false, updatable = false), 
 57  
             @JoinColumn(name="ENT_TYP_CD", insertable = false, updatable = false)
 58  
         })
 59  
         protected List<KimEntityEmail> emailAddresses;// = new AutoPopulatingList(KimEntityEmailImpl.class);
 60  
         
 61  
         @OneToMany(targetEntity = KimEntityPhoneImpl.class, fetch = FetchType.EAGER, cascade = { CascadeType.ALL })
 62  
         @Fetch(value = FetchMode.SELECT)
 63  
         @JoinColumns({
 64  
             @JoinColumn(name="ENTITY_ID", insertable = false, updatable = false), 
 65  
             @JoinColumn(name="ENT_TYP_CD", insertable = false, updatable = false)
 66  
         })
 67  
         protected List<KimEntityPhone> phoneNumbers;// = new AutoPopulatingList(KimEntityPhoneImpl.class);
 68  
         
 69  
         @OneToMany(targetEntity = KimEntityAddressImpl.class, fetch = FetchType.EAGER, cascade = { CascadeType.ALL })
 70  
         @Fetch(value = FetchMode.SELECT)
 71  
         @JoinColumns({
 72  
             @JoinColumn(name="ENTITY_ID", insertable = false, updatable = false), 
 73  
             @JoinColumn(name="ENT_TYP_CD", insertable = false, updatable = false)
 74  
         })
 75  
         protected List<KimEntityAddress> addresses;// = new AutoPopulatingList(KimEntityAddressImpl.class);
 76  
         
 77  
         /**
 78  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getAddresses()
 79  
          */
 80  
         public List<KimEntityAddress> getAddresses() {
 81  0
                 return addresses;
 82  
         }
 83  
 
 84  
         /**
 85  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getEmailAddresses()
 86  
          */
 87  
         public List<KimEntityEmail> getEmailAddresses() {
 88  0
                 return emailAddresses;
 89  
         }
 90  
 
 91  
         /**
 92  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getPhoneNumbers()
 93  
          */
 94  
         public List<KimEntityPhone> getPhoneNumbers() {
 95  0
                 return phoneNumbers;
 96  
         }
 97  
 
 98  
         /**
 99  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getEntityType()
 100  
          */
 101  
         public EntityType getEntityType() {
 102  0
                 return entityType;
 103  
         }
 104  
 
 105  
         /**
 106  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getEntityTypeCode()
 107  
          */
 108  
         public String getEntityTypeCode() {
 109  0
                 return entityTypeCode;
 110  
         }
 111  
 
 112  
         public String getEntityId() {
 113  0
                 return this.entityId;
 114  
         }
 115  
 
 116  
         public void setEntityId(String entityId) {
 117  0
                 this.entityId = entityId;
 118  0
         }
 119  
 
 120  
         public void setEntityType(EntityType entityType) {
 121  0
                 this.entityType = entityType;
 122  0
         }
 123  
 
 124  
         public void setEntityTypeCode(String entityTypeCode) {
 125  0
                 this.entityTypeCode = entityTypeCode;
 126  0
         }
 127  
 
 128  
         public void setEmailAddresses(List<KimEntityEmail> entityEmailAddresses) {
 129  0
                 this.emailAddresses = entityEmailAddresses;
 130  0
         }
 131  
 
 132  
         public void setPhoneNumbers(List<KimEntityPhone> entityPhoneNumbers) {
 133  0
                 this.phoneNumbers = entityPhoneNumbers;
 134  0
         }
 135  
 
 136  
         public void setAddresses(List<KimEntityAddress> entityAddresses) {
 137  0
                 this.addresses = entityAddresses;
 138  0
         }
 139  
         
 140  
         /**
 141  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getDefaultAddress()
 142  
          */
 143  
         public KimEntityAddress getDefaultAddress() {
 144  0
                 return (KimEntityAddress)getDefaultItem( addresses );
 145  
         }
 146  
         
 147  
         /**
 148  
          * This overridden method ...
 149  
          * 
 150  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getDefaultEmailAddress()
 151  
          */
 152  
         public KimEntityEmail getDefaultEmailAddress() {
 153  0
                 return (KimEntityEmail)getDefaultItem( emailAddresses );
 154  
         }
 155  
         
 156  
         /**
 157  
          * This overridden method ...
 158  
          * 
 159  
          * @see org.kuali.rice.kim.bo.entity.KimEntityEntityType#getDefaultPhoneNumber()
 160  
          */
 161  
         public KimEntityPhone getDefaultPhoneNumber() {
 162  0
                 return (KimEntityPhone)getDefaultItem( phoneNumbers );
 163  
         }
 164  
 }