package com.chenyang.nse.bussiness.entity.orm.table.core.desensitizationtask;

import com.chenyang.nse.bussiness.entity.orm.table.TBaseEntity;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(
   name = "DESENSITIZATION_DATA_SOURCEFIELD"
)
public class DesensitizationDataSourcefield extends TBaseEntity {
   private String datasystemtype;
   private String fieldname;

   public DesensitizationDataSourcefield() {
   }

   public DesensitizationDataSourcefield(String datasystemtype, String fieldname) {
      this.datasystemtype = datasystemtype;
      this.fieldname = fieldname;
   }

   public String getDatasystemtype() {
      return this.datasystemtype;
   }

   public void setDatasystemtype(String datasystemtype) {
      this.datasystemtype = datasystemtype;
   }

   public String getFieldname() {
      return this.fieldname;
   }

   public void setFieldname(String fieldname) {
      this.fieldname = fieldname;
   }

   public String toString() {
      return "TConsoleDatamappingField [datasystemtype=" + this.datasystemtype + ", fieldname=" + this.fieldname + "]";
   }

   public int hashCode() {
      int prime = 31;
      int result = 1;
      result = 31 * result + (this.datasystemtype == null ? 0 : this.datasystemtype.hashCode());
      result = 31 * result + (this.fieldname == null ? 0 : this.fieldname.hashCode());
      return result;
   }

   public boolean equals(Object obj) {
      if (this == obj) {
         return true;
      } else if (obj == null) {
         return false;
      } else if (this.getClass() != obj.getClass()) {
         return false;
      } else {
         DesensitizationDataSourcefield other = (DesensitizationDataSourcefield)obj;
         if (this.datasystemtype == null) {
            if (other.datasystemtype != null) {
               return false;
            }
         } else if (!this.datasystemtype.equals(other.datasystemtype)) {
            return false;
         }

         if (this.fieldname == null) {
            if (other.fieldname != null) {
               return false;
            }
         } else if (!this.fieldname.equals(other.fieldname)) {
            return false;
         }

         return true;
      }
   }
}
