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

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

@Entity
@Table(
   name = "T_CORE_DATAMAP_FOREIGNKEY"
)
public class TCoreDatamapForeignkey extends TBaseEntity {
   private String pktableid;
   private String pkcolumnid;
   private String fktableid;
   private String fkcolumnid;
   private String datamapid;

   public TCoreDatamapForeignkey() {
   }

   public TCoreDatamapForeignkey(String pktableid, String pkcolumnid, String fktableid, String fkcolumnid, String datamapid) {
      this.pktableid = pktableid;
      this.pkcolumnid = pkcolumnid;
      this.fktableid = fktableid;
      this.fkcolumnid = fkcolumnid;
      this.datamapid = datamapid;
   }

   public String getPktableid() {
      return this.pktableid;
   }

   public void setPktableid(String pktableid) {
      this.pktableid = pktableid;
   }

   public String getPkcolumnid() {
      return this.pkcolumnid;
   }

   public void setPkcolumnid(String pkcolumnid) {
      this.pkcolumnid = pkcolumnid;
   }

   public String getFktableid() {
      return this.fktableid;
   }

   public void setFktableid(String fktableid) {
      this.fktableid = fktableid;
   }

   public String getFkcolumnid() {
      return this.fkcolumnid;
   }

   public void setFkcolumnid(String fkcolumnid) {
      this.fkcolumnid = fkcolumnid;
   }

   public String getDatamapid() {
      return this.datamapid;
   }

   public void setDatamapid(String datamapid) {
      this.datamapid = datamapid;
   }

   public String toString() {
      return "TCoreDatamapForeignkey [pktableid=" + this.pktableid + ", pkcolumnid=" + this.pkcolumnid + ", fktableid=" + this.fktableid + ", fkcolumnid=" + this.fkcolumnid + ", datamapid=" + this.datamapid + "]";
   }

   public int hashCode() {
      int prime = 31;
      int result = 1;
      result = 31 * result + (this.datamapid == null ? 0 : this.datamapid.hashCode());
      result = 31 * result + (this.fkcolumnid == null ? 0 : this.fkcolumnid.hashCode());
      result = 31 * result + (this.fktableid == null ? 0 : this.fktableid.hashCode());
      result = 31 * result + (this.pkcolumnid == null ? 0 : this.pkcolumnid.hashCode());
      result = 31 * result + (this.pktableid == null ? 0 : this.pktableid.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 {
         TCoreDatamapForeignkey other = (TCoreDatamapForeignkey)obj;
         if (this.datamapid == null) {
            if (other.datamapid != null) {
               return false;
            }
         } else if (!this.datamapid.equals(other.datamapid)) {
            return false;
         }

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

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

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

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

         return true;
      }
   }
}
