Coverage Report - org.kuali.rice.kew.doctype.DocumentTypePolicyId
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentTypePolicyId
0%
0/28
0%
0/22
3.571
 
 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.kew.doctype;
 17  
 
 18  
 import java.io.Serializable;
 19  
 
 20  
 import javax.persistence.Column;
 21  
 import javax.persistence.Embeddable;
 22  
 
 23  
 /**
 24  
  * This Compound Primary Class has been generated by the rice ojb2jpa Groovy script.  Please
 25  
  * note that there are no setter methods, only getters.  This is done purposefully as cpk classes
 26  
  * can not change after they have been created.  Also note they require a public no-arg constructor.
 27  
  * TODO: Implement the equals() and hashCode() methods. 
 28  
  */
 29  
 @Embeddable
 30  
 public class DocumentTypePolicyId implements Serializable {
 31  
 
 32  
     private static final long serialVersionUID = -8024479878884387727L;
 33  
         
 34  
     @Column(name="DOC_TYP_ID")
 35  
     private String documentTypeId;
 36  
     @Column(name="DOC_PLCY_NM")
 37  
     private String policyName;
 38  
 
 39  0
     public DocumentTypePolicyId() {}
 40  
 
 41  0
     public String getDocumentTypeId() { return documentTypeId; }
 42  
     
 43  0
     public void setDocumentTypeId(String documentTypeId) { this.documentTypeId = documentTypeId; }
 44  
 
 45  0
     public String getPolicyName() { return policyName; }
 46  
 
 47  0
     public void setPolicyName(String policyName) { this.policyName = policyName; }
 48  
     
 49  
         /**
 50  
          * This overridden method ...
 51  
          * 
 52  
          * @see java.lang.Object#hashCode()
 53  
          */
 54  
         @Override
 55  
         public int hashCode() {
 56  0
                 final int prime = 31;
 57  0
                 int result = 1;
 58  0
                 result = prime
 59  
                                 * result
 60  
                                 + ((this.documentTypeId == null) ? 0 : this.documentTypeId
 61  
                                                 .hashCode());
 62  0
                 result = prime * result
 63  
                                 + ((this.policyName == null) ? 0 : this.policyName.hashCode());
 64  0
                 return result;
 65  
         }
 66  
 
 67  
         /**
 68  
          * This overridden method ...
 69  
          * 
 70  
          * @see java.lang.Object#equals(java.lang.Object)
 71  
          */
 72  
         @Override
 73  
         public boolean equals(Object obj) {
 74  0
                 if (this == obj)
 75  0
                         return true;
 76  0
                 if (obj == null)
 77  0
                         return false;
 78  0
                 if (getClass() != obj.getClass())
 79  0
                         return false;
 80  0
                 final DocumentTypePolicyId other = (DocumentTypePolicyId) obj;
 81  0
                 if (this.documentTypeId == null) {
 82  0
                         if (other.documentTypeId != null)
 83  0
                                 return false;
 84  0
                 } else if (!this.documentTypeId.equals(other.documentTypeId))
 85  0
                         return false;
 86  0
                 if (this.policyName == null) {
 87  0
                         if (other.policyName != null)
 88  0
                                 return false;
 89  0
                 } else if (!this.policyName.equals(other.policyName))
 90  0
                         return false;
 91  0
                 return true;
 92  
         }
 93  
 
 94  
 }
 95