Coverage Report - org.kuali.rice.shareddata.impl.state.StateId
 
Classes in this File Line Coverage Branch Coverage Complexity
StateId
0%
0/5
N/A
0
 
 1  
 package org.kuali.rice.shareddata.impl.state
 2  
 
 3  
 /*
 4  
  * Copyright 2007 The Kuali Foundation
 5  
  *
 6  
  * Licensed under the Educational Community License, Version 1.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  * http://www.opensource.org/licenses/ecl1.php
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15  
  * See the License for the specific language governing permissions and
 16  
  * limitations under the License.
 17  
  */
 18  
 
 19  
 import javax.persistence.Column
 20  
 import javax.persistence.Id
 21  
 import org.apache.commons.lang.builder.EqualsBuilder
 22  
 import org.apache.commons.lang.builder.HashCodeBuilder
 23  
 import org.apache.commons.lang.builder.ToStringBuilder
 24  
 
 25  
 class StateId implements Serializable {
 26  
 
 27  
     @Id
 28  
     @Column(name = "POSTAL_CNTRY_CD")
 29  
     def final String countryCode;
 30  
     @Id
 31  
     @Column(name = "POSTAL_STATE_CD")
 32  
     def final String code;
 33  
 
 34  
     StateId() { }
 35  
 
 36  
     StateId(String countryCode, String code) {
 37  0
         this.countryCode = countryCode;
 38  0
         this.code = code;
 39  
     }
 40  
 
 41  
     @Override
 42  
     int hashCode() {
 43  0
         return HashCodeBuilder.reflectionHashCode(this);
 44  
     }
 45  
 
 46  
     @Override
 47  
     boolean equals(Object obj) {
 48  0
         return EqualsBuilder.reflectionEquals(obj, this);
 49  
     }
 50  
 
 51  
     @Override
 52  
     String toString() {
 53  0
         return ToStringBuilder.reflectionToString(this);
 54  
     }
 55  
 }
 56