Coverage Report - org.kuali.rice.location.impl.postalcode.PostalCodeId
 
Classes in this File Line Coverage Branch Coverage Complexity
PostalCodeId
0%
0/5
N/A
0
 
 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 org.kuali.rice.location.impl.postalcode
 17  
 
 18  
 
 19  
 
 20  
 import javax.persistence.Column
 21  
 import javax.persistence.Id
 22  
 import org.apache.commons.lang.builder.EqualsBuilder
 23  
 import org.apache.commons.lang.builder.HashCodeBuilder
 24  
 import org.apache.commons.lang.builder.ToStringBuilder
 25  
 
 26  
 final class PostalCodeId {
 27  
 
 28  
     @Id
 29  
         @Column(name="POSTAL_CNTRY_CD")
 30  
     def final String countryCode;
 31  
 
 32  
     @Id
 33  
         @Column(name="POSTAL_CD")
 34  
     def final String code;
 35  
 
 36  
         PostalCodeId() { }
 37  
 
 38  
         PostalCodeId(String countryCode, String code) {
 39  0
                 this.countryCode = countryCode;
 40  0
                 this.code = code;
 41  
         }
 42  
 
 43  
     @Override
 44  
     int hashCode() {
 45  0
         return HashCodeBuilder.reflectionHashCode(this);
 46  
     }
 47  
 
 48  
     @Override
 49  
     boolean equals(Object obj) {
 50  0
         return EqualsBuilder.reflectionEquals(obj, this);
 51  
     }
 52  
 
 53  
     @Override
 54  
     String toString() {
 55  0
         return ToStringBuilder.reflectionToString(this);
 56  
     }
 57  
 }