Coverage Report - org.kuali.rice.kim.api.identity.type.EntityTypeDataDefault
 
Classes in this File Line Coverage Branch Coverage Complexity
EntityTypeDataDefault
0%
0/20
N/A
1
EntityTypeDataDefault$Constants
0%
0/2
N/A
1
EntityTypeDataDefault$Elements
0%
0/1
N/A
1
 
 1  
 package org.kuali.rice.kim.api.identity.type;
 2  
 
 3  
 import org.apache.commons.lang.builder.EqualsBuilder;
 4  
 import org.apache.commons.lang.builder.HashCodeBuilder;
 5  
 import org.apache.commons.lang.builder.ToStringBuilder;
 6  
 import org.kuali.rice.core.api.CoreConstants;
 7  
 import org.kuali.rice.kim.api.identity.address.EntityAddress;
 8  
 import org.kuali.rice.kim.api.identity.address.EntityAddressContract;
 9  
 import org.kuali.rice.kim.api.identity.email.EntityEmail;
 10  
 import org.kuali.rice.kim.api.identity.phone.EntityPhone;
 11  
 import org.kuali.rice.kim.api.identity.phone.EntityPhoneContract;
 12  
 import org.w3c.dom.Element;
 13  
 
 14  
 import javax.xml.bind.annotation.XmlAccessType;
 15  
 import javax.xml.bind.annotation.XmlAccessorType;
 16  
 import javax.xml.bind.annotation.XmlAnyElement;
 17  
 import javax.xml.bind.annotation.XmlElement;
 18  
 import javax.xml.bind.annotation.XmlRootElement;
 19  
 import javax.xml.bind.annotation.XmlType;
 20  
 import java.util.Collection;
 21  
 
 22  
 @XmlRootElement(name = EntityTypeDataDefault.Constants.ROOT_ELEMENT_NAME)
 23  
 @XmlAccessorType(XmlAccessType.NONE)
 24  
 @XmlType(name = EntityTypeDataDefault.Constants.TYPE_NAME, propOrder = {
 25  
     EntityTypeDataDefault.Elements.ENTITY_TYPE_CODE,
 26  
     EntityTypeDataDefault.Elements.DEFAULT_ADDRESS,
 27  
     EntityTypeDataDefault.Elements.DEFAULT_EMAIL_ADDRESS,
 28  
     EntityTypeDataDefault.Elements.DEFAULT_PHONE_NUMBER,
 29  
 
 30  
     CoreConstants.CommonElements.FUTURE_ELEMENTS
 31  
 })
 32  
 public final class EntityTypeDataDefault
 33  
 {
 34  
     @XmlElement(name = Elements.ENTITY_TYPE_CODE, required = true)
 35  
     private final String entityTypeCode;
 36  
     @XmlElement(name = Elements.DEFAULT_ADDRESS, required = false)
 37  
     private final EntityAddress defaultAddress;
 38  
     @XmlElement(name = Elements.DEFAULT_EMAIL_ADDRESS, required = false)
 39  
     private final EntityEmail defaultEmailAddress;
 40  
     @XmlElement(name = Elements.DEFAULT_PHONE_NUMBER, required = false)
 41  
     private final EntityPhone defaultPhoneNumber;
 42  0
     @SuppressWarnings("unused")
 43  
     @XmlAnyElement
 44  
     private final Collection<Element> _futureElements = null;
 45  
 
 46  
     /**
 47  
      * Private constructor used only by JAXB.
 48  
      */
 49  0
     private EntityTypeDataDefault() {
 50  0
         this.entityTypeCode = null;
 51  0
         this.defaultAddress = null;
 52  0
         this.defaultEmailAddress = null;
 53  0
         this.defaultPhoneNumber = null;
 54  
 
 55  0
     }
 56  
 
 57  0
     public EntityTypeDataDefault(String entityTypeCode, EntityAddress defaultAddress, EntityEmail defaultEmailAddress, EntityPhone defaultPhoneNumber) {
 58  0
         this.entityTypeCode = entityTypeCode;
 59  0
         this.defaultAddress = defaultAddress;
 60  0
         this.defaultEmailAddress = defaultEmailAddress;
 61  0
         this.defaultPhoneNumber = defaultPhoneNumber;
 62  0
     }
 63  
 
 64  
     public String getEntityTypeCode() {
 65  0
         return this.entityTypeCode;
 66  
     }
 67  
     public EntityAddressContract getDefaultAddress() {
 68  0
         return this.defaultAddress;
 69  
     }
 70  
 
 71  
     public EntityEmail getDefaultEmailAddress() {
 72  0
         return this.defaultEmailAddress;
 73  
     }
 74  
 
 75  
     public EntityPhoneContract getDefaultPhoneNumber() {
 76  0
         return this.defaultPhoneNumber;
 77  
     }
 78  
 
 79  
     @Override
 80  
     public int hashCode() {
 81  0
         return HashCodeBuilder.reflectionHashCode(this, Constants.HASH_CODE_EQUALS_EXCLUDE);
 82  
     }
 83  
 
 84  
     @Override
 85  
     public boolean equals(Object object) {
 86  0
         return EqualsBuilder.reflectionEquals(object, this, Constants.HASH_CODE_EQUALS_EXCLUDE);
 87  
     }
 88  
 
 89  
     @Override
 90  
     public String toString() {
 91  0
         return ToStringBuilder.reflectionToString(this);
 92  
     }
 93  
 
 94  
 
 95  
 
 96  
 
 97  
 
 98  
     /**
 99  
      * Defines some internal constants used on this class.
 100  
      *
 101  
      */
 102  0
     static class Constants {
 103  
 
 104  
         final static String ROOT_ELEMENT_NAME = "entityTypeDataDefault";
 105  
         final static String TYPE_NAME = "EntityTypeDataDefaultType";
 106  0
         final static String[] HASH_CODE_EQUALS_EXCLUDE = new String[] {CoreConstants.CommonElements.FUTURE_ELEMENTS };
 107  
 
 108  
     }
 109  
 
 110  
 
 111  
     /**
 112  
      * A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 113  
      *
 114  
      */
 115  0
     static class Elements {
 116  
         final static String ENTITY_TYPE_CODE = "entityTypeCode";
 117  
         final static String DEFAULT_ADDRESS = "defaultAddress";
 118  
         final static String DEFAULT_EMAIL_ADDRESS = "defaultEmailAddress";
 119  
         final static String DEFAULT_PHONE_NUMBER = "defaultPhoneNumber";
 120  
 
 121  
     }
 122  
 
 123  
 }