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

import com.chenyang.nse.bussiness.entity.orm.table.TBaseEntity;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(
   name = "T_CORE_SENSITIVECOLUMN"
)
public class TCoreSensitivecolumn extends TBaseEntity {
   private String datasourceid;
   private String tschema;
   private String tablename;
   private String columnname;
   private String regextype;
   private String ruleid;
   private String checked;
   private String groupid;
   private String adminname;
   private Date createtime;
   @Transient
   private String datasourcename;
   @Transient
   private String rulename;
   @Transient
   private String groupname;

   public TCoreSensitivecolumn() {
   }

   public TCoreSensitivecolumn(String datasourceid, String tschema, String tablename, String columnname, String regextype, String ruleid, String checked, String groupId, Date createtime) {
      this.datasourceid = datasourceid;
      this.tschema = tschema;
      this.tablename = tablename;
      this.columnname = columnname;
      if ("".equals(regextype)) {
         this.regextype = null;
      } else {
         this.regextype = regextype;
      }

      this.ruleid = ruleid;
      this.checked = checked;
      this.groupid = groupId;
      this.createtime = createtime;
   }

   public TCoreSensitivecolumn(String datasourceid, String tschema, String tablename, String columnname, String regextype, String ruleid, String checked, String groupid, String datasourcename, String rulename, Date createtime) {
      this.datasourceid = datasourceid;
      this.tschema = tschema;
      this.tablename = tablename;
      this.columnname = columnname;
      this.regextype = regextype;
      this.ruleid = ruleid;
      this.checked = checked;
      this.groupid = groupid;
      this.datasourcename = datasourcename;
      this.rulename = rulename;
      this.createtime = createtime;
   }

   public String getDatasourceid() {
      return this.datasourceid;
   }

   public void setDatasourceid(String datasourceid) {
      this.datasourceid = datasourceid;
   }

   public String getTschema() {
      return this.tschema;
   }

   public void setTschema(String tschema) {
      this.tschema = tschema;
   }

   public String getTablename() {
      return this.tablename;
   }

   public void setTablename(String tablename) {
      this.tablename = tablename;
   }

   public String getColumnname() {
      return this.columnname;
   }

   public void setColumnname(String columnname) {
      this.columnname = columnname;
   }

   public String getRegextype() {
      return this.regextype;
   }

   public void setRegextype(String regextype) {
      this.regextype = regextype;
   }

   public String getRuleid() {
      return this.ruleid;
   }

   public void setRuleid(String ruleid) {
      this.ruleid = ruleid;
   }

   public String getChecked() {
      return this.checked;
   }

   public void setChecked(String checked) {
      this.checked = checked;
   }

   public String getGroupid() {
      return this.groupid;
   }

   public void setGroupid(String groupid) {
      this.groupid = groupid;
   }

   public String getDatasourcename() {
      return this.datasourcename;
   }

   public void setDatasourcename(String datasourcename) {
      this.datasourcename = datasourcename;
   }

   public String getRulename() {
      return this.rulename;
   }

   public void setRulename(String rulename) {
      this.rulename = rulename;
   }

   public String getGroupname() {
      return this.groupname;
   }

   public void setGroupname(String groupname) {
      this.groupname = groupname;
   }

   public Date getCreatetime() {
      return this.createtime;
   }

   public void setCreatetime(Date createtime) {
      this.createtime = createtime;
   }

   public String getAdminname() {
      return this.adminname;
   }

   public void setAdminname(String adminname) {
      this.adminname = adminname;
   }

   public String toString() {
      return "TCoreSensitivecolumn [datasourceid=" + this.datasourceid + ", schema=" + this.tschema + ", tablename=" + this.tablename + ", columnname=" + this.columnname + ", regextype=" + this.regextype + ", ruleid=" + this.ruleid + ", checked=" + this.checked + ", groupid=" + this.groupid + ", adminname=" + this.adminname + ", createtime=" + this.createtime + ", datasourcename=" + this.datasourcename + ", rulename=" + this.rulename + ", groupname=" + this.groupname + "]";
   }

   public int hashCode() {
      int prime = 31;
      int result = 1;
      result = 31 * result + (this.adminname == null ? 0 : this.adminname.hashCode());
      result = 31 * result + (this.checked == null ? 0 : this.checked.hashCode());
      result = 31 * result + (this.columnname == null ? 0 : this.columnname.hashCode());
      result = 31 * result + (this.createtime == null ? 0 : this.createtime.hashCode());
      result = 31 * result + (this.datasourceid == null ? 0 : this.datasourceid.hashCode());
      result = 31 * result + (this.datasourcename == null ? 0 : this.datasourcename.hashCode());
      result = 31 * result + (this.groupid == null ? 0 : this.groupid.hashCode());
      result = 31 * result + (this.groupname == null ? 0 : this.groupname.hashCode());
      result = 31 * result + (this.regextype == null ? 0 : this.regextype.hashCode());
      result = 31 * result + (this.ruleid == null ? 0 : this.ruleid.hashCode());
      result = 31 * result + (this.rulename == null ? 0 : this.rulename.hashCode());
      result = 31 * result + (this.tschema == null ? 0 : this.tschema.hashCode());
      result = 31 * result + (this.tablename == null ? 0 : this.tablename.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 {
         TCoreSensitivecolumn other = (TCoreSensitivecolumn)obj;
         if (this.adminname == null) {
            if (other.adminname != null) {
               return false;
            }
         } else if (!this.adminname.equals(other.adminname)) {
            return false;
         }

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

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

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

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

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

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

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

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

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

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

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

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

         return true;
      }
   }
}
