Coverage Report - net.sf.sapjcosupport.SapFieldMapping
 
Classes in this File Line Coverage Branch Coverage Complexity
SapFieldMapping
0% 
0% 
1,889
 
 1  
 package net.sf.sapjcosupport;
 2  
 
 3  
 /**
 4  
  * @author Niki Driessen
 5  
  * @since Jan 23, 2006 - 11:48:36 AM
 6  
  */
 7  
 public class SapFieldMapping {
 8  
     private String propertyName;
 9  
     private String fieldName;
 10  
     private String type;
 11  
     private String key;
 12  
     private String fullyQualifiedClassName;
 13  
     private boolean notNull;
 14  
     private static final int MAGIC_NUMBER = 29;
 15  
 
 16  
     public SapFieldMapping(String propertyName, String fieldName, String type, String fullyQualifiedClassName, boolean notNull) {
 17  0
         this(propertyName, fieldName, type, null, fullyQualifiedClassName, notNull);
 18  0
     }
 19  
 
 20  0
     public SapFieldMapping(String propertyName, String fieldName, String type, String key, String fullyQualifiedClassName, boolean notNull) {
 21  0
         this.propertyName = propertyName;
 22  0
         this.fieldName = fieldName;
 23  0
         this.type = type;
 24  0
         this.key = key;
 25  0
         this.notNull = notNull;
 26  0
         this.fullyQualifiedClassName = fullyQualifiedClassName;
 27  0
     }
 28  
 
 29  
     public String getPropertyName() {
 30  0
         return propertyName;
 31  
     }
 32  
 
 33  
     public String getFieldName() {
 34  0
         return fieldName;
 35  
     }
 36  
 
 37  
     public String getType() {
 38  0
         return type;
 39  
     }
 40  
 
 41  
     public boolean isNotNull() {
 42  0
         return notNull;
 43  
     }
 44  
 
 45  
     public String getKey() {
 46  0
         return key;
 47  
     }
 48  
 
 49  
     public boolean equals(Object o) {
 50  0
         if (this == o) {
 51  0
             return true;
 52  
         }
 53  0
         if (o == null || getClass() != o.getClass()) {
 54  0
             return false;
 55  
         }
 56  0
         final SapFieldMapping that = (SapFieldMapping) o;
 57  0
         if (!fieldName.equals(that.fieldName)) {
 58  0
             return false;
 59  
         }
 60  0
         if (key != null ? !key.equals(that.key) : that.key != null) {
 61  0
             return false;
 62  
         }
 63  0
         return propertyName.equals(that.propertyName);
 64  
     }
 65  
 
 66  
     public int hashCode() {
 67  
         int result;
 68  0
         result = propertyName.hashCode();
 69  0
         result = MAGIC_NUMBER * result + fieldName.hashCode();
 70  0
         result = MAGIC_NUMBER * result + (key != null ? key.hashCode() : 0);
 71  0
         result = MAGIC_NUMBER * result + (fullyQualifiedClassName != null ? fullyQualifiedClassName.hashCode() : 0);
 72  0
         return result;
 73  
     }
 74  
 }